From 0e169437982bdb89fd16a5a14ea0100206db8698 Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Tue, 16 Feb 2021 18:46:22 -0800 Subject: [PATCH 01/12] feat: added support for test cases and agent validation PiperOrigin-RevId: 352834280 Source-Author: Google APIs Source-Date: Wed Jan 20 11:21:52 2021 -0800 Source-Repo: googleapis/googleapis Source-Sha: f83715b48369c8d43548cc3cd84015e60be94cf2 Source-Link: https://github.com/googleapis/googleapis/commit/f83715b48369c8d43548cc3cd84015e60be94cf2 --- .../dialogflow/cx/v3beta1/AgentsClient.java | 82 + .../dialogflow/cx/v3beta1/AgentsSettings.java | 23 + .../cx/v3beta1/ExperimentsClient.java | 638 - .../cx/v3beta1/ExperimentsSettings.java | 251 - .../dialogflow/cx/v3beta1/FlowsClient.java | 82 + .../dialogflow/cx/v3beta1/FlowsSettings.java | 23 + .../cx/v3beta1/TestCasesClient.java | 847 ++ .../cx/v3beta1/TestCasesSettings.java | 356 + .../dialogflow/cx/v3beta1/package-info.java | 15 +- .../cx/v3beta1/stub/AgentsStub.java | 12 + .../cx/v3beta1/stub/AgentsStubSettings.java | 58 +- .../cx/v3beta1/stub/ExperimentsStub.java | 81 - .../v3beta1/stub/ExperimentsStubSettings.java | 492 - .../dialogflow/cx/v3beta1/stub/FlowsStub.java | 12 + .../cx/v3beta1/stub/FlowsStubSettings.java | 57 +- .../cx/v3beta1/stub/GrpcAgentsStub.java | 73 + .../cx/v3beta1/stub/GrpcExperimentsStub.java | 370 - .../cx/v3beta1/stub/GrpcFlowsStub.java | 71 + ...java => GrpcTestCasesCallableFactory.java} | 4 +- .../cx/v3beta1/stub/GrpcTestCasesStub.java | 579 + .../cx/v3beta1/stub/TestCasesStub.java | 148 + .../v3beta1/stub/TestCasesStubSettings.java | 868 ++ .../cx/v3beta1/AgentsClientTest.java | 146 + .../cx/v3beta1/ExperimentsClientTest.java | 721 -- .../cx/v3beta1/FlowsClientTest.java | 140 + .../dialogflow/cx/v3beta1/MockAgentsImpl.java | 31 + .../dialogflow/cx/v3beta1/MockFlowsImpl.java | 31 + ...ockExperiments.java => MockTestCases.java} | 8 +- ...imentsImpl.java => MockTestCasesImpl.java} | 123 +- .../cx/v3beta1/TestCasesClientTest.java | 852 ++ .../dialogflow/cx/v3beta1/AgentsGrpc.java | 256 + .../cx/v3beta1/ExperimentsGrpc.java | 1081 -- .../dialogflow/cx/v3beta1/FlowsGrpc.java | 255 + .../dialogflow/cx/v3beta1/TestCasesGrpc.java | 1544 +++ .../cloud/dialogflow/cx/v3beta1/Agent.java | 339 +- .../dialogflow/cx/v3beta1/AgentOrBuilder.java | 65 +- .../dialogflow/cx/v3beta1/AgentProto.java | 204 +- .../cx/v3beta1/AgentValidationResult.java | 1224 ++ .../cx/v3beta1/AgentValidationResultName.java | 224 + .../AgentValidationResultOrBuilder.java | 118 + .../v3beta1/BatchDeleteTestCasesRequest.java | 988 ++ .../BatchDeleteTestCasesRequestOrBuilder.java | 119 + .../cx/v3beta1/BatchRunTestCasesMetadata.java | 963 ++ .../BatchRunTestCasesMetadataOrBuilder.java | 77 + .../cx/v3beta1/BatchRunTestCasesRequest.java | 1191 ++ .../BatchRunTestCasesRequestOrBuilder.java | 152 + .../cx/v3beta1/BatchRunTestCasesResponse.java | 1017 ++ .../BatchRunTestCasesResponseOrBuilder.java | 87 + .../cx/v3beta1/CalculateCoverageRequest.java | 1001 ++ .../CalculateCoverageRequestOrBuilder.java | 85 + .../cx/v3beta1/CalculateCoverageResponse.java | 1358 ++ .../CalculateCoverageResponseOrBuilder.java | 126 + .../cx/v3beta1/ConversationTurn.java | 5697 +++++++++ .../cx/v3beta1/ConversationTurnOrBuilder.java | 104 + .../cx/v3beta1/CreateAgentRequest.java | 6 +- ...equest.java => CreateTestCaseRequest.java} | 419 +- ...va => CreateTestCaseRequestOrBuilder.java} | 38 +- .../cx/v3beta1/DeleteAgentRequest.java | 6 +- .../dialogflow/cx/v3beta1/EntityType.java | 2 - .../dialogflow/cx/v3beta1/Experiment.java | 10192 ---------------- .../cx/v3beta1/ExperimentOrBuilder.java | 440 - .../cx/v3beta1/ExperimentProto.java | 436 - .../cx/v3beta1/ExportAgentRequest.java | 62 +- .../v3beta1/ExportAgentRequestOrBuilder.java | 16 +- .../cx/v3beta1/ExportAgentResponse.java | 27 +- .../v3beta1/ExportAgentResponseOrBuilder.java | 6 +- .../cx/v3beta1/ExportTestCasesMetadata.java | 465 + .../ExportTestCasesMetadataOrBuilder.java | 24 + .../cx/v3beta1/ExportTestCasesRequest.java | 1522 +++ .../ExportTestCasesRequestOrBuilder.java | 156 + .../cx/v3beta1/ExportTestCasesResponse.java | 868 ++ .../ExportTestCasesResponseOrBuilder.java | 70 + .../dialogflow/cx/v3beta1/FlowProto.java | 230 +- .../cx/v3beta1/FlowValidationResult.java | 1466 +++ .../cx/v3beta1/FlowValidationResultName.java | 261 + .../FlowValidationResultOrBuilder.java | 148 + .../cloud/dialogflow/cx/v3beta1/Form.java | 45 +- .../cx/v3beta1/GetAgentRequest.java | 6 +- .../GetAgentValidationResultRequest.java | 857 ++ ...gentValidationResultRequestOrBuilder.java} | 39 +- .../GetFlowValidationResultRequest.java | 856 ++ ...tFlowValidationResultRequestOrBuilder.java | 83 + ...ntRequest.java => GetTestCaseRequest.java} | 170 +- ....java => GetTestCaseRequestOrBuilder.java} | 14 +- .../cx/v3beta1/ImportTestCasesMetadata.java | 969 ++ .../ImportTestCasesMetadataOrBuilder.java | 77 + .../cx/v3beta1/ImportTestCasesRequest.java | 1067 ++ .../ImportTestCasesRequestOrBuilder.java | 100 + .../cx/v3beta1/ImportTestCasesResponse.java | 770 ++ .../ImportTestCasesResponseOrBuilder.java | 84 + .../cloud/dialogflow/cx/v3beta1/Intent.java | 45 +- ...rsionVariants.java => IntentCoverage.java} | 1145 +- .../cx/v3beta1/IntentCoverageOrBuilder.java | 91 + .../cx/v3beta1/ListAgentsRequest.java | 6 +- .../cx/v3beta1/ListAgentsResponse.java | 6 +- .../ListExperimentsResponseOrBuilder.java | 119 - .../v3beta1/ListTestCaseResultsRequest.java | 1259 ++ .../ListTestCaseResultsRequestOrBuilder.java | 160 + .../v3beta1/ListTestCaseResultsResponse.java | 1185 ++ .../ListTestCaseResultsResponseOrBuilder.java | 105 + ...Request.java => ListTestCasesRequest.java} | 525 +- ...ava => ListTestCasesRequestOrBuilder.java} | 46 +- ...sponse.java => ListTestCasesResponse.java} | 637 +- .../ListTestCasesResponseOrBuilder.java | 109 + .../cloud/dialogflow/cx/v3beta1/Page.java | 138 +- .../dialogflow/cx/v3beta1/PageOrBuilder.java | 30 +- ...perimentRequest.java => ResourceName.java} | 381 +- .../cx/v3beta1/ResourceNameOrBuilder.java | 75 + .../cx/v3beta1/ResponseMessage.java | 4632 +++---- .../cx/v3beta1/ResponseMessageProto.java | 70 +- .../cx/v3beta1/RestoreAgentRequest.java | 6 +- .../cx/v3beta1/RunTestCaseMetadata.java | 457 + .../v3beta1/RunTestCaseMetadataOrBuilder.java | 24 + .../cx/v3beta1/RunTestCaseRequest.java | 865 ++ .../v3beta1/RunTestCaseRequestOrBuilder.java | 89 + .../cx/v3beta1/RunTestCaseResponse.java | 736 ++ .../v3beta1/RunTestCaseResponseOrBuilder.java | 60 + .../dialogflow/cx/v3beta1/SessionInfo.java | 42 +- .../cx/v3beta1/SessionInfoOrBuilder.java | 12 +- .../cloud/dialogflow/cx/v3beta1/TestCase.java | 2801 +++++ .../dialogflow/cx/v3beta1/TestCaseError.java | 995 ++ .../cx/v3beta1/TestCaseErrorOrBuilder.java | 95 + .../dialogflow/cx/v3beta1/TestCaseName.java | 257 + .../cx/v3beta1/TestCaseOrBuilder.java | 352 + .../dialogflow/cx/v3beta1/TestCaseProto.java | 789 ++ .../dialogflow/cx/v3beta1/TestCaseResult.java | 1837 +++ ...imentName.java => TestCaseResultName.java} | 130 +- .../cx/v3beta1/TestCaseResultOrBuilder.java | 209 + .../dialogflow/cx/v3beta1/TestConfig.java | 930 ++ .../cx/v3beta1/TestConfigOrBuilder.java | 105 + .../dialogflow/cx/v3beta1/TestError.java | 1164 ++ .../cx/v3beta1/TestErrorOrBuilder.java | 120 + .../dialogflow/cx/v3beta1/TestResult.java | 178 + .../cx/v3beta1/TestRunDifference.java | 999 ++ .../v3beta1/TestRunDifferenceOrBuilder.java | 75 + .../cx/v3beta1/TransitionCoverage.java | 4509 +++++++ .../v3beta1/TransitionCoverageOrBuilder.java | 103 + .../cx/v3beta1/TransitionRouteGroup.java | 92 - .../TransitionRouteGroupOrBuilder.java | 20 - .../cx/v3beta1/UpdateAgentRequest.java | 6 +- ...equest.java => UpdateTestCaseRequest.java} | 432 +- ...va => UpdateTestCaseRequestOrBuilder.java} | 40 +- ...Request.java => ValidateAgentRequest.java} | 360 +- ...ava => ValidateAgentRequestOrBuilder.java} | 41 +- ...tRequest.java => ValidateFlowRequest.java} | 357 +- ...java => ValidateFlowRequestOrBuilder.java} | 39 +- .../cx/v3beta1/ValidationMessage.java | 2346 ++++ .../v3beta1/ValidationMessageOrBuilder.java | 209 + .../cx/v3beta1/ValidationMessageProto.java | 103 + .../cx/v3beta1/VariantsHistory.java | 1118 -- .../cx/v3beta1/VariantsHistoryOrBuilder.java | 97 - .../cx/v3beta1/VersionVariantsOrBuilder.java | 78 - .../cx/v3beta1/VoiceSelectionParams.java | 14 + .../VoiceSelectionParamsOrBuilder.java | 4 + .../dialogflow/cx/v3beta1/WebhookProto.java | 9 +- .../cloud/dialogflow/cx/v3beta1/agent.proto | 143 +- .../dialogflow/cx/v3beta1/audio_config.proto | 3 + .../dialogflow/cx/v3beta1/entity_type.proto | 1 - .../dialogflow/cx/v3beta1/experiment.proto | 415 - .../cloud/dialogflow/cx/v3beta1/flow.proto | 71 + .../cloud/dialogflow/cx/v3beta1/intent.proto | 9 +- .../cloud/dialogflow/cx/v3beta1/page.proto | 15 +- .../cx/v3beta1/response_message.proto | 38 +- .../dialogflow/cx/v3beta1/test_case.proto | 835 ++ .../cx/v3beta1/transition_route_group.proto | 5 - .../cx/v3beta1/validation_message.proto | 115 + .../cloud/dialogflow/cx/v3beta1/webhook.proto | 10 +- synth.metadata | 142 +- 168 files changed, 61740 insertions(+), 21596 deletions(-) delete mode 100644 google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsClient.java delete mode 100644 google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsSettings.java create mode 100644 google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCasesClient.java create mode 100644 google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCasesSettings.java delete mode 100644 google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/ExperimentsStub.java delete mode 100644 google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/ExperimentsStubSettings.java delete mode 100644 google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcExperimentsStub.java rename google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/{GrpcExperimentsCallableFactory.java => GrpcTestCasesCallableFactory.java} (96%) create mode 100644 google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcTestCasesStub.java create mode 100644 google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/TestCasesStub.java create mode 100644 google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/TestCasesStubSettings.java delete mode 100644 google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsClientTest.java rename google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/{MockExperiments.java => MockTestCases.java} (88%) rename google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/{MockExperimentsImpl.java => MockTestCasesImpl.java} (51%) create mode 100644 google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/TestCasesClientTest.java delete mode 100644 grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsGrpc.java create mode 100644 grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCasesGrpc.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentValidationResult.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentValidationResultName.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentValidationResultOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BatchDeleteTestCasesRequest.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BatchDeleteTestCasesRequestOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BatchRunTestCasesMetadata.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BatchRunTestCasesMetadataOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BatchRunTestCasesRequest.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BatchRunTestCasesRequestOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BatchRunTestCasesResponse.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BatchRunTestCasesResponseOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CalculateCoverageRequest.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CalculateCoverageRequestOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CalculateCoverageResponse.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CalculateCoverageResponseOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ConversationTurn.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ConversationTurnOrBuilder.java rename proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/{CreateExperimentRequest.java => CreateTestCaseRequest.java} (59%) rename proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/{CreateExperimentRequestOrBuilder.java => CreateTestCaseRequestOrBuilder.java} (56%) delete mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Experiment.java delete mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentOrBuilder.java delete mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentProto.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportTestCasesMetadata.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportTestCasesMetadataOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportTestCasesRequest.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportTestCasesRequestOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportTestCasesResponse.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportTestCasesResponseOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowValidationResult.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowValidationResultName.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowValidationResultOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetAgentValidationResultRequest.java rename proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/{GetExperimentRequestOrBuilder.java => GetAgentValidationResultRequestOrBuilder.java} (65%) create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetFlowValidationResultRequest.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetFlowValidationResultRequestOrBuilder.java rename proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/{GetExperimentRequest.java => GetTestCaseRequest.java} (73%) rename proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/{StopExperimentRequestOrBuilder.java => GetTestCaseRequestOrBuilder.java} (77%) create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportTestCasesMetadata.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportTestCasesMetadataOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportTestCasesRequest.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportTestCasesRequestOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportTestCasesResponse.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportTestCasesResponseOrBuilder.java rename proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/{VersionVariants.java => IntentCoverage.java} (51%) create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/IntentCoverageOrBuilder.java delete mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExperimentsResponseOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListTestCaseResultsRequest.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListTestCaseResultsRequestOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListTestCaseResultsResponse.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListTestCaseResultsResponseOrBuilder.java rename proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/{ListExperimentsRequest.java => ListTestCasesRequest.java} (61%) rename proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/{ListExperimentsRequestOrBuilder.java => ListTestCasesRequestOrBuilder.java} (65%) rename proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/{ListExperimentsResponse.java => ListTestCasesResponse.java} (50%) create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListTestCasesResponseOrBuilder.java rename proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/{StopExperimentRequest.java => ResourceName.java} (60%) create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ResourceNameOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunTestCaseMetadata.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunTestCaseMetadataOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunTestCaseRequest.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunTestCaseRequestOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunTestCaseResponse.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunTestCaseResponseOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCase.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseError.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseErrorOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseName.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseProto.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseResult.java rename proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/{ExperimentName.java => TestCaseResultName.java} (62%) create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseResultOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestConfig.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestConfigOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestError.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestErrorOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestResult.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestRunDifference.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestRunDifferenceOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionCoverage.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionCoverageOrBuilder.java rename proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/{UpdateExperimentRequest.java => UpdateTestCaseRequest.java} (60%) rename proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/{UpdateExperimentRequestOrBuilder.java => UpdateTestCaseRequestOrBuilder.java} (54%) rename proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/{StartExperimentRequest.java => ValidateAgentRequest.java} (60%) rename proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/{DeleteExperimentRequestOrBuilder.java => ValidateAgentRequestOrBuilder.java} (65%) rename proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/{DeleteExperimentRequest.java => ValidateFlowRequest.java} (61%) rename proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/{StartExperimentRequestOrBuilder.java => ValidateFlowRequestOrBuilder.java} (65%) create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidationMessage.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidationMessageOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidationMessageProto.java delete mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VariantsHistory.java delete mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VariantsHistoryOrBuilder.java delete mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VersionVariantsOrBuilder.java delete mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/experiment.proto create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/test_case.proto create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/validation_message.proto diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClient.java index be4b30b50..163f99588 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClient.java @@ -474,6 +474,88 @@ public final UnaryCallable restoreAgentCallable( return stub.restoreAgentCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AgentValidationResult validateAgent(ValidateAgentRequest request) { + return validateAgentCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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. + * + *

Sample code: + */ + public final UnaryCallable validateAgentCallable() { + return stub.validateAgentCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the latest agent validation result. Agent validation is performed when ValidateAgent is + * called. + * + * @param name Required. The agent name. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>/validationResult`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AgentValidationResult getAgentValidationResult(AgentValidationResultName name) { + GetAgentValidationResultRequest request = + GetAgentValidationResultRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getAgentValidationResult(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the latest agent validation result. Agent validation is performed when ValidateAgent is + * called. + * + * @param name Required. The agent name. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>/validationResult`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AgentValidationResult getAgentValidationResult(String name) { + GetAgentValidationResultRequest request = + GetAgentValidationResultRequest.newBuilder().setName(name).build(); + return getAgentValidationResult(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the latest agent validation result. Agent validation is performed when ValidateAgent is + * called. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AgentValidationResult getAgentValidationResult( + GetAgentValidationResultRequest request) { + return getAgentValidationResultCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the latest agent validation result. Agent validation is performed when ValidateAgent is + * called. + * + *

Sample code: + */ + public final UnaryCallable + getAgentValidationResultCallable() { + return stub.getAgentValidationResultCallable(); + } + @Override public final void close() { stub.close(); diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsSettings.java index d33de6cec..4a60e0b6e 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsSettings.java @@ -120,6 +120,17 @@ public OperationCallSettings restoreAgentOpe return ((AgentsStubSettings) getStubSettings()).restoreAgentOperationSettings(); } + /** Returns the object with the settings used for calls to validateAgent. */ + public UnaryCallSettings validateAgentSettings() { + return ((AgentsStubSettings) getStubSettings()).validateAgentSettings(); + } + + /** Returns the object with the settings used for calls to getAgentValidationResult. */ + public UnaryCallSettings + getAgentValidationResultSettings() { + return ((AgentsStubSettings) getStubSettings()).getAgentValidationResultSettings(); + } + public static final AgentsSettings create(AgentsStubSettings stub) throws IOException { return new AgentsSettings.Builder(stub.toBuilder()).build(); } @@ -265,6 +276,18 @@ public UnaryCallSettings.Builder restoreAgentSet return getStubSettingsBuilder().restoreAgentOperationSettings(); } + /** Returns the builder for the settings used for calls to validateAgent. */ + public UnaryCallSettings.Builder + validateAgentSettings() { + return getStubSettingsBuilder().validateAgentSettings(); + } + + /** Returns the builder for the settings used for calls to getAgentValidationResult. */ + public UnaryCallSettings.Builder + getAgentValidationResultSettings() { + return getStubSettingsBuilder().getAgentValidationResultSettings(); + } + @Override public AgentsSettings build() throws IOException { return new AgentsSettings(this); diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsClient.java deleted file mode 100644 index d958df2f7..000000000 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsClient.java +++ /dev/null @@ -1,638 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.dialogflow.cx.v3beta1; - -import com.google.api.core.ApiFunction; -import com.google.api.core.ApiFuture; -import com.google.api.core.ApiFutures; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.paging.AbstractFixedSizeCollection; -import com.google.api.gax.paging.AbstractPage; -import com.google.api.gax.paging.AbstractPagedListResponse; -import com.google.api.gax.rpc.PageContext; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.dialogflow.cx.v3beta1.stub.ExperimentsStub; -import com.google.cloud.dialogflow.cx.v3beta1.stub.ExperimentsStubSettings; -import com.google.common.util.concurrent.MoreExecutors; -import com.google.protobuf.Empty; -import com.google.protobuf.FieldMask; -import java.io.IOException; -import java.util.List; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Service Description: Service for managing - * [Experiments][google.cloud.dialogflow.cx.v3beta1.Experiment]. - * - *

This class provides the ability to make remote calls to the backing service through method - * calls that map to API methods. Sample code to get started: - * - *

Note: close() needs to be called on the ExperimentsClient object to clean up resources such as - * threads. In the example above, try-with-resources is used, which automatically calls close(). - * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
- * - *

See the individual methods for example code. - * - *

Many parameters require resource names to be formatted in a particular way. To assist with - * these names, this class includes a format method for each type of name, and additionally a parse - * method to extract the individual identifiers contained within names that are returned. - * - *

This class can be customized by passing in a custom instance of ExperimentsSettings to - * create(). For example: - * - *

To customize credentials: - * - *

{@code
- * ExperimentsSettings experimentsSettings =
- *     ExperimentsSettings.newBuilder()
- *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- *         .build();
- * ExperimentsClient experimentsClient = ExperimentsClient.create(experimentsSettings);
- * }
- * - *

To customize the endpoint: - * - *

{@code
- * ExperimentsSettings experimentsSettings =
- *     ExperimentsSettings.newBuilder().setEndpoint(myEndpoint).build();
- * ExperimentsClient experimentsClient = ExperimentsClient.create(experimentsSettings);
- * }
- * - *

Please refer to the GitHub repository's samples for more quickstart code snippets. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class ExperimentsClient implements BackgroundResource { - private final ExperimentsSettings settings; - private final ExperimentsStub stub; - - /** Constructs an instance of ExperimentsClient with default settings. */ - public static final ExperimentsClient create() throws IOException { - return create(ExperimentsSettings.newBuilder().build()); - } - - /** - * Constructs an instance of ExperimentsClient, using the given settings. The channels are created - * based on the settings passed in, or defaults for any settings that are not set. - */ - public static final ExperimentsClient create(ExperimentsSettings settings) throws IOException { - return new ExperimentsClient(settings); - } - - /** - * Constructs an instance of ExperimentsClient, using the given stub for making calls. This is for - * advanced usage - prefer using create(ExperimentsSettings). - */ - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") - public static final ExperimentsClient create(ExperimentsStub stub) { - return new ExperimentsClient(stub); - } - - /** - * Constructs an instance of ExperimentsClient, using the given settings. This is protected so - * that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected ExperimentsClient(ExperimentsSettings settings) throws IOException { - this.settings = settings; - this.stub = ((ExperimentsStubSettings) settings.getStubSettings()).createStub(); - } - - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") - protected ExperimentsClient(ExperimentsStub stub) { - this.settings = null; - this.stub = stub; - } - - public final ExperimentsSettings getSettings() { - return settings; - } - - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") - public ExperimentsStub getStub() { - return stub; - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns the list of all experiments in the specified - * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. - * - * @param parent Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to - * list all environments for. Format: `projects/<Project ID>/locations/<Location - * ID>/agents/<Agent ID>/environments/<Environment ID>`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListExperimentsPagedResponse listExperiments(EnvironmentName parent) { - ListExperimentsRequest request = - ListExperimentsRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listExperiments(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns the list of all experiments in the specified - * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. - * - * @param parent Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to - * list all environments for. Format: `projects/<Project ID>/locations/<Location - * ID>/agents/<Agent ID>/environments/<Environment ID>`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListExperimentsPagedResponse listExperiments(String parent) { - ListExperimentsRequest request = ListExperimentsRequest.newBuilder().setParent(parent).build(); - return listExperiments(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns the list of all experiments in the specified - * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. - * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListExperimentsPagedResponse listExperiments(ListExperimentsRequest request) { - return listExperimentsPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns the list of all experiments in the specified - * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. - * - *

Sample code: - */ - public final UnaryCallable - listExperimentsPagedCallable() { - return stub.listExperimentsPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns the list of all experiments in the specified - * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. - * - *

Sample code: - */ - public final UnaryCallable - listExperimentsCallable() { - return stub.listExperimentsCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Retrieves the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. - * - * @param name Required. The name of the - * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. Format: - * `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/environments/<Environment ID>/experiments/<Experiment ID>`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Experiment getExperiment(ExperimentName name) { - GetExperimentRequest request = - GetExperimentRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return getExperiment(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Retrieves the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. - * - * @param name Required. The name of the - * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. Format: - * `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/environments/<Environment ID>/experiments/<Experiment ID>`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Experiment getExperiment(String name) { - GetExperimentRequest request = GetExperimentRequest.newBuilder().setName(name).build(); - return getExperiment(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Retrieves the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. - * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Experiment getExperiment(GetExperimentRequest request) { - return getExperimentCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Retrieves the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. - * - *

Sample code: - */ - public final UnaryCallable getExperimentCallable() { - return stub.getExperimentCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates an [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment] in the specified - * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. - * - * @param parent Required. The [Agent][google.cloud.dialogflow.cx.v3beta1.Agent] to create an - * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] for. Format: - * `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/environments/<Environment ID>`. - * @param experiment Required. The experiment to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Experiment createExperiment(EnvironmentName parent, Experiment experiment) { - CreateExperimentRequest request = - CreateExperimentRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setExperiment(experiment) - .build(); - return createExperiment(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates an [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment] in the specified - * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. - * - * @param parent Required. The [Agent][google.cloud.dialogflow.cx.v3beta1.Agent] to create an - * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] for. Format: - * `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/environments/<Environment ID>`. - * @param experiment Required. The experiment to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Experiment createExperiment(String parent, Experiment experiment) { - CreateExperimentRequest request = - CreateExperimentRequest.newBuilder().setParent(parent).setExperiment(experiment).build(); - return createExperiment(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates an [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment] in the specified - * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. - * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Experiment createExperiment(CreateExperimentRequest request) { - return createExperimentCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates an [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment] in the specified - * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. - * - *

Sample code: - */ - public final UnaryCallable createExperimentCallable() { - return stub.createExperimentCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. - * - * @param experiment Required. The experiment to update. - * @param updateMask Required. The mask to control which fields get updated. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Experiment updateExperiment(Experiment experiment, FieldMask updateMask) { - UpdateExperimentRequest request = - UpdateExperimentRequest.newBuilder() - .setExperiment(experiment) - .setUpdateMask(updateMask) - .build(); - return updateExperiment(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. - * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Experiment updateExperiment(UpdateExperimentRequest request) { - return updateExperimentCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. - * - *

Sample code: - */ - public final UnaryCallable updateExperimentCallable() { - return stub.updateExperimentCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. - * - * @param name Required. The name of the - * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to delete. Format: - * `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/environments/<Environment ID>/experiments/<Experiment ID>`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteExperiment(ExperimentName name) { - DeleteExperimentRequest request = - DeleteExperimentRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - deleteExperiment(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. - * - * @param name Required. The name of the - * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to delete. Format: - * `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/environments/<Environment ID>/experiments/<Experiment ID>`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteExperiment(String name) { - DeleteExperimentRequest request = DeleteExperimentRequest.newBuilder().setName(name).build(); - deleteExperiment(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. - * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteExperiment(DeleteExperimentRequest request) { - deleteExperimentCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. - * - *

Sample code: - */ - public final UnaryCallable deleteExperimentCallable() { - return stub.deleteExperimentCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Starts the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only - * changes the state of experiment from PENDING to RUNNING. - * - * @param name Required. Resource name of the experiment to start. Format: `projects/<Project - * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment - * ID>/experiments/<Experiment ID>`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Experiment startExperiment(ExperimentName name) { - StartExperimentRequest request = - StartExperimentRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return startExperiment(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Starts the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only - * changes the state of experiment from PENDING to RUNNING. - * - * @param name Required. Resource name of the experiment to start. Format: `projects/<Project - * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment - * ID>/experiments/<Experiment ID>`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Experiment startExperiment(String name) { - StartExperimentRequest request = StartExperimentRequest.newBuilder().setName(name).build(); - return startExperiment(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Starts the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only - * changes the state of experiment from PENDING to RUNNING. - * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Experiment startExperiment(StartExperimentRequest request) { - return startExperimentCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Starts the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only - * changes the state of experiment from PENDING to RUNNING. - * - *

Sample code: - */ - public final UnaryCallable startExperimentCallable() { - return stub.startExperimentCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Stops the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only - * changes the state of experiment from RUNNING to DONE. - * - * @param name Required. Resource name of the experiment to stop. Format: `projects/<Project - * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment - * ID>/experiments/<Experiment ID>`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Experiment stopExperiment(ExperimentName name) { - StopExperimentRequest request = - StopExperimentRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return stopExperiment(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Stops the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only - * changes the state of experiment from RUNNING to DONE. - * - * @param name Required. Resource name of the experiment to stop. Format: `projects/<Project - * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment - * ID>/experiments/<Experiment ID>`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Experiment stopExperiment(String name) { - StopExperimentRequest request = StopExperimentRequest.newBuilder().setName(name).build(); - return stopExperiment(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Stops the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only - * changes the state of experiment from RUNNING to DONE. - * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Experiment stopExperiment(StopExperimentRequest request) { - return stopExperimentCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Stops the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only - * changes the state of experiment from RUNNING to DONE. - * - *

Sample code: - */ - public final UnaryCallable stopExperimentCallable() { - return stub.stopExperimentCallable(); - } - - @Override - public final void close() { - stub.close(); - } - - @Override - public void shutdown() { - stub.shutdown(); - } - - @Override - public boolean isShutdown() { - return stub.isShutdown(); - } - - @Override - public boolean isTerminated() { - return stub.isTerminated(); - } - - @Override - public void shutdownNow() { - stub.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return stub.awaitTermination(duration, unit); - } - - public static class ListExperimentsPagedResponse - extends AbstractPagedListResponse< - ListExperimentsRequest, - ListExperimentsResponse, - Experiment, - ListExperimentsPage, - ListExperimentsFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListExperimentsPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - new ApiFunction() { - @Override - public ListExperimentsPagedResponse apply(ListExperimentsPage input) { - return new ListExperimentsPagedResponse(input); - } - }, - MoreExecutors.directExecutor()); - } - - private ListExperimentsPagedResponse(ListExperimentsPage page) { - super(page, ListExperimentsFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListExperimentsPage - extends AbstractPage< - ListExperimentsRequest, ListExperimentsResponse, Experiment, ListExperimentsPage> { - - private ListExperimentsPage( - PageContext context, - ListExperimentsResponse response) { - super(context, response); - } - - private static ListExperimentsPage createEmptyPage() { - return new ListExperimentsPage(null, null); - } - - @Override - protected ListExperimentsPage createPage( - PageContext context, - ListExperimentsResponse response) { - return new ListExperimentsPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListExperimentsFixedSizeCollection - extends AbstractFixedSizeCollection< - ListExperimentsRequest, - ListExperimentsResponse, - Experiment, - ListExperimentsPage, - ListExperimentsFixedSizeCollection> { - - private ListExperimentsFixedSizeCollection( - List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListExperimentsFixedSizeCollection createEmptyCollection() { - return new ListExperimentsFixedSizeCollection(null, 0); - } - - @Override - protected ListExperimentsFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListExperimentsFixedSizeCollection(pages, collectionSize); - } - } -} diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsSettings.java deleted file mode 100644 index 3ec11eabb..000000000 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsSettings.java +++ /dev/null @@ -1,251 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.dialogflow.cx.v3beta1; - -import static com.google.cloud.dialogflow.cx.v3beta1.ExperimentsClient.ListExperimentsPagedResponse; - -import com.google.api.core.ApiFunction; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientSettings; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.cloud.dialogflow.cx.v3beta1.stub.ExperimentsStubSettings; -import com.google.protobuf.Empty; -import java.io.IOException; -import java.util.List; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Settings class to configure an instance of {@link ExperimentsClient}. - * - *

The default instance has everything set to sensible defaults: - * - *

    - *
  • The default service address (dialogflow.googleapis.com) and default port (443) are used. - *
  • Credentials are acquired automatically through Application Default Credentials. - *
  • Retries are configured for idempotent methods but not for non-idempotent methods. - *
- * - *

The builder of this class is recursive, so contained classes are themselves builders. When - * build() is called, the tree of builders is called to create the complete settings object. - * - *

For example, to set the total timeout of getExperiment to 30 seconds: - * - *

{@code
- * ExperimentsSettings.Builder experimentsSettingsBuilder = ExperimentsSettings.newBuilder();
- * experimentsSettingsBuilder
- *     .getExperimentSettings()
- *     .setRetrySettings(
- *         experimentsSettingsBuilder
- *             .getExperimentSettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * ExperimentsSettings experimentsSettings = experimentsSettingsBuilder.build();
- * }
- */ -@BetaApi -@Generated("by gapic-generator-java") -public class ExperimentsSettings extends ClientSettings { - - /** Returns the object with the settings used for calls to listExperiments. */ - public PagedCallSettings< - ListExperimentsRequest, ListExperimentsResponse, ListExperimentsPagedResponse> - listExperimentsSettings() { - return ((ExperimentsStubSettings) getStubSettings()).listExperimentsSettings(); - } - - /** Returns the object with the settings used for calls to getExperiment. */ - public UnaryCallSettings getExperimentSettings() { - return ((ExperimentsStubSettings) getStubSettings()).getExperimentSettings(); - } - - /** Returns the object with the settings used for calls to createExperiment. */ - public UnaryCallSettings createExperimentSettings() { - return ((ExperimentsStubSettings) getStubSettings()).createExperimentSettings(); - } - - /** Returns the object with the settings used for calls to updateExperiment. */ - public UnaryCallSettings updateExperimentSettings() { - return ((ExperimentsStubSettings) getStubSettings()).updateExperimentSettings(); - } - - /** Returns the object with the settings used for calls to deleteExperiment. */ - public UnaryCallSettings deleteExperimentSettings() { - return ((ExperimentsStubSettings) getStubSettings()).deleteExperimentSettings(); - } - - /** Returns the object with the settings used for calls to startExperiment. */ - public UnaryCallSettings startExperimentSettings() { - return ((ExperimentsStubSettings) getStubSettings()).startExperimentSettings(); - } - - /** Returns the object with the settings used for calls to stopExperiment. */ - public UnaryCallSettings stopExperimentSettings() { - return ((ExperimentsStubSettings) getStubSettings()).stopExperimentSettings(); - } - - public static final ExperimentsSettings create(ExperimentsStubSettings stub) throws IOException { - return new ExperimentsSettings.Builder(stub.toBuilder()).build(); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return ExperimentsStubSettings.defaultExecutorProviderBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return ExperimentsStubSettings.getDefaultEndpoint(); - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return ExperimentsStubSettings.getDefaultServiceScopes(); - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return ExperimentsStubSettings.defaultCredentialsProviderBuilder(); - } - - /** Returns a builder for the default ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return ExperimentsStubSettings.defaultGrpcTransportProviderBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return ExperimentsStubSettings.defaultTransportChannelProvider(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return ExperimentsStubSettings.defaultApiClientHeaderProviderBuilder(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(ClientContext clientContext) { - return new Builder(clientContext); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected ExperimentsSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - } - - /** Builder for ExperimentsSettings. */ - public static class Builder extends ClientSettings.Builder { - - protected Builder() throws IOException { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(ExperimentsStubSettings.newBuilder(clientContext)); - } - - protected Builder(ExperimentsSettings settings) { - super(settings.getStubSettings().toBuilder()); - } - - protected Builder(ExperimentsStubSettings.Builder stubSettings) { - super(stubSettings); - } - - private static Builder createDefault() { - return new Builder(ExperimentsStubSettings.newBuilder()); - } - - public ExperimentsStubSettings.Builder getStubSettingsBuilder() { - return ((ExperimentsStubSettings.Builder) getStubSettings()); - } - - // NEXT_MAJOR_VER: remove 'throws Exception'. - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { - super.applyToAllUnaryMethods( - getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); - return this; - } - - /** Returns the builder for the settings used for calls to listExperiments. */ - public PagedCallSettings.Builder< - ListExperimentsRequest, ListExperimentsResponse, ListExperimentsPagedResponse> - listExperimentsSettings() { - return getStubSettingsBuilder().listExperimentsSettings(); - } - - /** Returns the builder for the settings used for calls to getExperiment. */ - public UnaryCallSettings.Builder getExperimentSettings() { - return getStubSettingsBuilder().getExperimentSettings(); - } - - /** Returns the builder for the settings used for calls to createExperiment. */ - public UnaryCallSettings.Builder - createExperimentSettings() { - return getStubSettingsBuilder().createExperimentSettings(); - } - - /** Returns the builder for the settings used for calls to updateExperiment. */ - public UnaryCallSettings.Builder - updateExperimentSettings() { - return getStubSettingsBuilder().updateExperimentSettings(); - } - - /** Returns the builder for the settings used for calls to deleteExperiment. */ - public UnaryCallSettings.Builder deleteExperimentSettings() { - return getStubSettingsBuilder().deleteExperimentSettings(); - } - - /** Returns the builder for the settings used for calls to startExperiment. */ - public UnaryCallSettings.Builder startExperimentSettings() { - return getStubSettingsBuilder().startExperimentSettings(); - } - - /** Returns the builder for the settings used for calls to stopExperiment. */ - public UnaryCallSettings.Builder stopExperimentSettings() { - return getStubSettingsBuilder().stopExperimentSettings(); - } - - @Override - public ExperimentsSettings build() throws IOException { - return new ExperimentsSettings(this); - } - } -} diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsClient.java index 92c81e57f..3890b9bca 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsClient.java @@ -458,6 +458,88 @@ public final UnaryCallable trainFlowCallable() { return stub.trainFlowCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final FlowValidationResult validateFlow(ValidateFlowRequest request) { + return validateFlowCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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. + * + *

Sample code: + */ + public final UnaryCallable validateFlowCallable() { + return stub.validateFlowCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the latest flow validation result. Flow validation is performed when ValidateFlow is + * called. + * + * @param name Required. The flow name. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow + * ID>/validationResult`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final FlowValidationResult getFlowValidationResult(FlowValidationResultName name) { + GetFlowValidationResultRequest request = + GetFlowValidationResultRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getFlowValidationResult(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the latest flow validation result. Flow validation is performed when ValidateFlow is + * called. + * + * @param name Required. The flow name. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow + * ID>/validationResult`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final FlowValidationResult getFlowValidationResult(String name) { + GetFlowValidationResultRequest request = + GetFlowValidationResultRequest.newBuilder().setName(name).build(); + return getFlowValidationResult(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the latest flow validation result. Flow validation is performed when ValidateFlow is + * called. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final FlowValidationResult getFlowValidationResult( + GetFlowValidationResultRequest request) { + return getFlowValidationResultCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the latest flow validation result. Flow validation is performed when ValidateFlow is + * called. + * + *

Sample code: + */ + public final UnaryCallable + getFlowValidationResultCallable() { + return stub.getFlowValidationResultCallable(); + } + @Override public final void close() { stub.close(); diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsSettings.java index 95c94f84e..085e3d52c 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsSettings.java @@ -109,6 +109,17 @@ public OperationCallSettings trainFlowOperation return ((FlowsStubSettings) getStubSettings()).trainFlowOperationSettings(); } + /** Returns the object with the settings used for calls to validateFlow. */ + public UnaryCallSettings validateFlowSettings() { + return ((FlowsStubSettings) getStubSettings()).validateFlowSettings(); + } + + /** Returns the object with the settings used for calls to getFlowValidationResult. */ + public UnaryCallSettings + getFlowValidationResultSettings() { + return ((FlowsStubSettings) getStubSettings()).getFlowValidationResultSettings(); + } + public static final FlowsSettings create(FlowsStubSettings stub) throws IOException { return new FlowsSettings.Builder(stub.toBuilder()).build(); } @@ -243,6 +254,18 @@ public UnaryCallSettings.Builder trainFlowSettings( return getStubSettingsBuilder().trainFlowOperationSettings(); } + /** Returns the builder for the settings used for calls to validateFlow. */ + public UnaryCallSettings.Builder + validateFlowSettings() { + return getStubSettingsBuilder().validateFlowSettings(); + } + + /** Returns the builder for the settings used for calls to getFlowValidationResult. */ + public UnaryCallSettings.Builder + getFlowValidationResultSettings() { + return getStubSettingsBuilder().getFlowValidationResultSettings(); + } + @Override public FlowsSettings build() throws IOException { return new FlowsSettings(this); diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCasesClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCasesClient.java new file mode 100644 index 000000000..138b3a858 --- /dev/null +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCasesClient.java @@ -0,0 +1,847 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.cx.v3beta1; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dialogflow.cx.v3beta1.stub.TestCasesStub; +import com.google.cloud.dialogflow.cx.v3beta1.stub.TestCasesStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; +import com.google.longrunning.OperationsClient; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Service for managing [Test + * Cases][google.cloud.dialogflow.cx.v3beta1.TestCase] and [Test Case + * Results][google.cloud.dialogflow.cx.v3beta1.TestCaseResult]. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

Note: close() needs to be called on the TestCasesClient object to clean up resources such as + * threads. In the example above, try-with-resources is used, which automatically calls close(). + * + *

The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of TestCasesSettings to create(). + * For example: + * + *

To customize credentials: + * + *

{@code
+ * TestCasesSettings testCasesSettings =
+ *     TestCasesSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * TestCasesClient testCasesClient = TestCasesClient.create(testCasesSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * TestCasesSettings testCasesSettings =
+ *     TestCasesSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * TestCasesClient testCasesClient = TestCasesClient.create(testCasesSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class TestCasesClient implements BackgroundResource { + private final TestCasesSettings settings; + private final TestCasesStub stub; + private final OperationsClient operationsClient; + + /** Constructs an instance of TestCasesClient with default settings. */ + public static final TestCasesClient create() throws IOException { + return create(TestCasesSettings.newBuilder().build()); + } + + /** + * Constructs an instance of TestCasesClient, using the given settings. The channels are created + * based on the settings passed in, or defaults for any settings that are not set. + */ + public static final TestCasesClient create(TestCasesSettings settings) throws IOException { + return new TestCasesClient(settings); + } + + /** + * Constructs an instance of TestCasesClient, using the given stub for making calls. This is for + * advanced usage - prefer using create(TestCasesSettings). + */ + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public static final TestCasesClient create(TestCasesStub stub) { + return new TestCasesClient(stub); + } + + /** + * Constructs an instance of TestCasesClient, using the given settings. This is protected so that + * it is easy to make a subclass, but otherwise, the static factory methods should be preferred. + */ + protected TestCasesClient(TestCasesSettings settings) throws IOException { + this.settings = settings; + this.stub = ((TestCasesStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + protected TestCasesClient(TestCasesStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + public final TestCasesSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public TestCasesStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final OperationsClient getOperationsClient() { + return operationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Fetches a list of test cases for a given agent. + * + * @param parent Required. The agent to list all pages for. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListTestCasesPagedResponse listTestCases(AgentName parent) { + ListTestCasesRequest request = + ListTestCasesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listTestCases(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Fetches a list of test cases for a given agent. + * + * @param parent Required. The agent to list all pages for. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListTestCasesPagedResponse listTestCases(String parent) { + ListTestCasesRequest request = ListTestCasesRequest.newBuilder().setParent(parent).build(); + return listTestCases(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Fetches a list of test cases for a given agent. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListTestCasesPagedResponse listTestCases(ListTestCasesRequest request) { + return listTestCasesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Fetches a list of test cases for a given agent. + * + *

Sample code: + */ + public final UnaryCallable + listTestCasesPagedCallable() { + return stub.listTestCasesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Fetches a list of test cases for a given agent. + * + *

Sample code: + */ + public final UnaryCallable listTestCasesCallable() { + return stub.listTestCasesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Batch deletes test cases. + * + * @param parent Required. The agent to delete test cases from. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void batchDeleteTestCases(AgentName parent) { + BatchDeleteTestCasesRequest request = + BatchDeleteTestCasesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + batchDeleteTestCases(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Batch deletes test cases. + * + * @param parent Required. The agent to delete test cases from. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void batchDeleteTestCases(String parent) { + BatchDeleteTestCasesRequest request = + BatchDeleteTestCasesRequest.newBuilder().setParent(parent).build(); + batchDeleteTestCases(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Batch deletes test cases. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void batchDeleteTestCases(BatchDeleteTestCasesRequest request) { + batchDeleteTestCasesCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Batch deletes test cases. + * + *

Sample code: + */ + public final UnaryCallable batchDeleteTestCasesCallable() { + return stub.batchDeleteTestCasesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a test case. + * + * @param name Required. The name of the testcase. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>/testCases/<TestCase + * ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TestCase getTestCase(TestCaseName name) { + GetTestCaseRequest request = + GetTestCaseRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getTestCase(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a test case. + * + * @param name Required. The name of the testcase. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>/testCases/<TestCase + * ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TestCase getTestCase(String name) { + GetTestCaseRequest request = GetTestCaseRequest.newBuilder().setName(name).build(); + return getTestCase(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a test case. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TestCase getTestCase(GetTestCaseRequest request) { + return getTestCaseCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a test case. + * + *

Sample code: + */ + public final UnaryCallable getTestCaseCallable() { + return stub.getTestCaseCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a test case for the given agent. + * + * @param parent Required. The agent to create the test case for. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>`. + * @param testCase Required. The test case to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TestCase createTestCase(AgentName parent, TestCase testCase) { + CreateTestCaseRequest request = + CreateTestCaseRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setTestCase(testCase) + .build(); + return createTestCase(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a test case for the given agent. + * + * @param parent Required. The agent to create the test case for. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>`. + * @param testCase Required. The test case to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TestCase createTestCase(String parent, TestCase testCase) { + CreateTestCaseRequest request = + CreateTestCaseRequest.newBuilder().setParent(parent).setTestCase(testCase).build(); + return createTestCase(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a test case for the given agent. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TestCase createTestCase(CreateTestCaseRequest request) { + return createTestCaseCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a test case for the given agent. + * + *

Sample code: + */ + public final UnaryCallable createTestCaseCallable() { + return stub.createTestCaseCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the specified test case. + * + * @param testCase Required. The test case to update. + * @param updateMask Required. The mask to specify which fields should be updated. Only a test + * case's metadata and replayed_conversation_turns may be updated. The original + * test_case_conversation_turns may not be updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TestCase updateTestCase(TestCase testCase, FieldMask updateMask) { + UpdateTestCaseRequest request = + UpdateTestCaseRequest.newBuilder().setTestCase(testCase).setUpdateMask(updateMask).build(); + return updateTestCase(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the specified test case. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TestCase updateTestCase(UpdateTestCaseRequest request) { + return updateTestCaseCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the specified test case. + * + *

Sample code: + */ + public final UnaryCallable updateTestCaseCallable() { + return stub.updateTestCaseCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Kicks off a test case run. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture runTestCaseAsync( + RunTestCaseRequest request) { + return runTestCaseOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Kicks off a test case run. + * + *

Sample code: + */ + public final OperationCallable + runTestCaseOperationCallable() { + return stub.runTestCaseOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Kicks off a test case run. + * + *

Sample code: + */ + public final UnaryCallable runTestCaseCallable() { + return stub.runTestCaseCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Kicks off a batch run of test cases. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + batchRunTestCasesAsync(BatchRunTestCasesRequest request) { + return batchRunTestCasesOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Kicks off a batch run of test cases. + * + *

Sample code: + */ + public final OperationCallable< + BatchRunTestCasesRequest, BatchRunTestCasesResponse, BatchRunTestCasesMetadata> + batchRunTestCasesOperationCallable() { + return stub.batchRunTestCasesOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Kicks off a batch run of test cases. + * + *

Sample code: + */ + public final UnaryCallable batchRunTestCasesCallable() { + return stub.batchRunTestCasesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Calculates the test coverage for an agent. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final CalculateCoverageResponse calculateCoverage(CalculateCoverageRequest request) { + return calculateCoverageCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Calculates the test coverage for an agent. + * + *

Sample code: + */ + public final UnaryCallable + calculateCoverageCallable() { + return stub.calculateCoverageCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Imports the test cases from a Cloud Storage bucket or a local file. It always creates new test + * cases and won't overwite any existing ones. The provided ID in the imported test case is + * neglected. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + importTestCasesAsync(ImportTestCasesRequest request) { + return importTestCasesOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Imports the test cases from a Cloud Storage bucket or a local file. It always creates new test + * cases and won't overwite any existing ones. The provided ID in the imported test case is + * neglected. + * + *

Sample code: + */ + public final OperationCallable< + ImportTestCasesRequest, ImportTestCasesResponse, ImportTestCasesMetadata> + importTestCasesOperationCallable() { + return stub.importTestCasesOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Imports the test cases from a Cloud Storage bucket or a local file. It always creates new test + * cases and won't overwite any existing ones. The provided ID in the imported test case is + * neglected. + * + *

Sample code: + */ + public final UnaryCallable importTestCasesCallable() { + return stub.importTestCasesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + exportTestCasesAsync(ExportTestCasesRequest request) { + return exportTestCasesOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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. + * + *

Sample code: + */ + public final OperationCallable< + ExportTestCasesRequest, ExportTestCasesResponse, ExportTestCasesMetadata> + exportTestCasesOperationCallable() { + return stub.exportTestCasesOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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. + * + *

Sample code: + */ + public final UnaryCallable exportTestCasesCallable() { + return stub.exportTestCasesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Fetches a list of results for a given test case. + * + * @param parent Required. The test case to list results for. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>/ testCases/<TestCase + * ID>`. Specify a `-` as a wildcard for TestCase ID to list results across multiple test + * cases. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListTestCaseResultsPagedResponse listTestCaseResults(TestCaseName parent) { + ListTestCaseResultsRequest request = + ListTestCaseResultsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listTestCaseResults(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Fetches a list of results for a given test case. + * + * @param parent Required. The test case to list results for. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>/ testCases/<TestCase + * ID>`. Specify a `-` as a wildcard for TestCase ID to list results across multiple test + * cases. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListTestCaseResultsPagedResponse listTestCaseResults(String parent) { + ListTestCaseResultsRequest request = + ListTestCaseResultsRequest.newBuilder().setParent(parent).build(); + return listTestCaseResults(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Fetches a list of results for a given test case. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListTestCaseResultsPagedResponse listTestCaseResults( + ListTestCaseResultsRequest request) { + return listTestCaseResultsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Fetches a list of results for a given test case. + * + *

Sample code: + */ + public final UnaryCallable + listTestCaseResultsPagedCallable() { + return stub.listTestCaseResultsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Fetches a list of results for a given test case. + * + *

Sample code: + */ + public final UnaryCallable + listTestCaseResultsCallable() { + return stub.listTestCaseResultsCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListTestCasesPagedResponse + extends AbstractPagedListResponse< + ListTestCasesRequest, + ListTestCasesResponse, + TestCase, + ListTestCasesPage, + ListTestCasesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListTestCasesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListTestCasesPagedResponse apply(ListTestCasesPage input) { + return new ListTestCasesPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListTestCasesPagedResponse(ListTestCasesPage page) { + super(page, ListTestCasesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListTestCasesPage + extends AbstractPage< + ListTestCasesRequest, ListTestCasesResponse, TestCase, ListTestCasesPage> { + + private ListTestCasesPage( + PageContext context, + ListTestCasesResponse response) { + super(context, response); + } + + private static ListTestCasesPage createEmptyPage() { + return new ListTestCasesPage(null, null); + } + + @Override + protected ListTestCasesPage createPage( + PageContext context, + ListTestCasesResponse response) { + return new ListTestCasesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListTestCasesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListTestCasesRequest, + ListTestCasesResponse, + TestCase, + ListTestCasesPage, + ListTestCasesFixedSizeCollection> { + + private ListTestCasesFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListTestCasesFixedSizeCollection createEmptyCollection() { + return new ListTestCasesFixedSizeCollection(null, 0); + } + + @Override + protected ListTestCasesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListTestCasesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListTestCaseResultsPagedResponse + extends AbstractPagedListResponse< + ListTestCaseResultsRequest, + ListTestCaseResultsResponse, + TestCaseResult, + ListTestCaseResultsPage, + ListTestCaseResultsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListTestCaseResultsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListTestCaseResultsPagedResponse apply(ListTestCaseResultsPage input) { + return new ListTestCaseResultsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListTestCaseResultsPagedResponse(ListTestCaseResultsPage page) { + super(page, ListTestCaseResultsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListTestCaseResultsPage + extends AbstractPage< + ListTestCaseResultsRequest, + ListTestCaseResultsResponse, + TestCaseResult, + ListTestCaseResultsPage> { + + private ListTestCaseResultsPage( + PageContext + context, + ListTestCaseResultsResponse response) { + super(context, response); + } + + private static ListTestCaseResultsPage createEmptyPage() { + return new ListTestCaseResultsPage(null, null); + } + + @Override + protected ListTestCaseResultsPage createPage( + PageContext + context, + ListTestCaseResultsResponse response) { + return new ListTestCaseResultsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListTestCaseResultsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListTestCaseResultsRequest, + ListTestCaseResultsResponse, + TestCaseResult, + ListTestCaseResultsPage, + ListTestCaseResultsFixedSizeCollection> { + + private ListTestCaseResultsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListTestCaseResultsFixedSizeCollection createEmptyCollection() { + return new ListTestCaseResultsFixedSizeCollection(null, 0); + } + + @Override + protected ListTestCaseResultsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListTestCaseResultsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCasesSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCasesSettings.java new file mode 100644 index 000000000..433119db9 --- /dev/null +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCasesSettings.java @@ -0,0 +1,356 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.cx.v3beta1; + +import static com.google.cloud.dialogflow.cx.v3beta1.TestCasesClient.ListTestCaseResultsPagedResponse; +import static com.google.cloud.dialogflow.cx.v3beta1.TestCasesClient.ListTestCasesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.dialogflow.cx.v3beta1.stub.TestCasesStubSettings; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link TestCasesClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (dialogflow.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of batchDeleteTestCases to 30 seconds: + * + *

{@code
+ * TestCasesSettings.Builder testCasesSettingsBuilder = TestCasesSettings.newBuilder();
+ * testCasesSettingsBuilder
+ *     .batchDeleteTestCasesSettings()
+ *     .setRetrySettings(
+ *         testCasesSettingsBuilder
+ *             .batchDeleteTestCasesSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * TestCasesSettings testCasesSettings = testCasesSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class TestCasesSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to listTestCases. */ + public PagedCallSettings + listTestCasesSettings() { + return ((TestCasesStubSettings) getStubSettings()).listTestCasesSettings(); + } + + /** Returns the object with the settings used for calls to batchDeleteTestCases. */ + public UnaryCallSettings batchDeleteTestCasesSettings() { + return ((TestCasesStubSettings) getStubSettings()).batchDeleteTestCasesSettings(); + } + + /** Returns the object with the settings used for calls to getTestCase. */ + public UnaryCallSettings getTestCaseSettings() { + return ((TestCasesStubSettings) getStubSettings()).getTestCaseSettings(); + } + + /** Returns the object with the settings used for calls to createTestCase. */ + public UnaryCallSettings createTestCaseSettings() { + return ((TestCasesStubSettings) getStubSettings()).createTestCaseSettings(); + } + + /** Returns the object with the settings used for calls to updateTestCase. */ + public UnaryCallSettings updateTestCaseSettings() { + return ((TestCasesStubSettings) getStubSettings()).updateTestCaseSettings(); + } + + /** Returns the object with the settings used for calls to runTestCase. */ + public UnaryCallSettings runTestCaseSettings() { + return ((TestCasesStubSettings) getStubSettings()).runTestCaseSettings(); + } + + /** Returns the object with the settings used for calls to runTestCase. */ + public OperationCallSettings + runTestCaseOperationSettings() { + return ((TestCasesStubSettings) getStubSettings()).runTestCaseOperationSettings(); + } + + /** Returns the object with the settings used for calls to batchRunTestCases. */ + public UnaryCallSettings batchRunTestCasesSettings() { + return ((TestCasesStubSettings) getStubSettings()).batchRunTestCasesSettings(); + } + + /** Returns the object with the settings used for calls to batchRunTestCases. */ + public OperationCallSettings< + BatchRunTestCasesRequest, BatchRunTestCasesResponse, BatchRunTestCasesMetadata> + batchRunTestCasesOperationSettings() { + return ((TestCasesStubSettings) getStubSettings()).batchRunTestCasesOperationSettings(); + } + + /** Returns the object with the settings used for calls to calculateCoverage. */ + public UnaryCallSettings + calculateCoverageSettings() { + return ((TestCasesStubSettings) getStubSettings()).calculateCoverageSettings(); + } + + /** Returns the object with the settings used for calls to importTestCases. */ + public UnaryCallSettings importTestCasesSettings() { + return ((TestCasesStubSettings) getStubSettings()).importTestCasesSettings(); + } + + /** Returns the object with the settings used for calls to importTestCases. */ + public OperationCallSettings< + ImportTestCasesRequest, ImportTestCasesResponse, ImportTestCasesMetadata> + importTestCasesOperationSettings() { + return ((TestCasesStubSettings) getStubSettings()).importTestCasesOperationSettings(); + } + + /** Returns the object with the settings used for calls to exportTestCases. */ + public UnaryCallSettings exportTestCasesSettings() { + return ((TestCasesStubSettings) getStubSettings()).exportTestCasesSettings(); + } + + /** Returns the object with the settings used for calls to exportTestCases. */ + public OperationCallSettings< + ExportTestCasesRequest, ExportTestCasesResponse, ExportTestCasesMetadata> + exportTestCasesOperationSettings() { + return ((TestCasesStubSettings) getStubSettings()).exportTestCasesOperationSettings(); + } + + /** Returns the object with the settings used for calls to listTestCaseResults. */ + public PagedCallSettings< + ListTestCaseResultsRequest, ListTestCaseResultsResponse, ListTestCaseResultsPagedResponse> + listTestCaseResultsSettings() { + return ((TestCasesStubSettings) getStubSettings()).listTestCaseResultsSettings(); + } + + public static final TestCasesSettings create(TestCasesStubSettings stub) throws IOException { + return new TestCasesSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return TestCasesStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return TestCasesStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return TestCasesStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return TestCasesStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return TestCasesStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return TestCasesStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return TestCasesStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected TestCasesSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for TestCasesSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(TestCasesStubSettings.newBuilder(clientContext)); + } + + protected Builder(TestCasesSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(TestCasesStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(TestCasesStubSettings.newBuilder()); + } + + public TestCasesStubSettings.Builder getStubSettingsBuilder() { + return ((TestCasesStubSettings.Builder) getStubSettings()); + } + + // NEXT_MAJOR_VER: remove 'throws Exception'. + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to listTestCases. */ + public PagedCallSettings.Builder< + ListTestCasesRequest, ListTestCasesResponse, ListTestCasesPagedResponse> + listTestCasesSettings() { + return getStubSettingsBuilder().listTestCasesSettings(); + } + + /** Returns the builder for the settings used for calls to batchDeleteTestCases. */ + public UnaryCallSettings.Builder + batchDeleteTestCasesSettings() { + return getStubSettingsBuilder().batchDeleteTestCasesSettings(); + } + + /** Returns the builder for the settings used for calls to getTestCase. */ + public UnaryCallSettings.Builder getTestCaseSettings() { + return getStubSettingsBuilder().getTestCaseSettings(); + } + + /** Returns the builder for the settings used for calls to createTestCase. */ + public UnaryCallSettings.Builder createTestCaseSettings() { + return getStubSettingsBuilder().createTestCaseSettings(); + } + + /** Returns the builder for the settings used for calls to updateTestCase. */ + public UnaryCallSettings.Builder updateTestCaseSettings() { + return getStubSettingsBuilder().updateTestCaseSettings(); + } + + /** Returns the builder for the settings used for calls to runTestCase. */ + public UnaryCallSettings.Builder runTestCaseSettings() { + return getStubSettingsBuilder().runTestCaseSettings(); + } + + /** Returns the builder for the settings used for calls to runTestCase. */ + public OperationCallSettings.Builder< + RunTestCaseRequest, RunTestCaseResponse, RunTestCaseMetadata> + runTestCaseOperationSettings() { + return getStubSettingsBuilder().runTestCaseOperationSettings(); + } + + /** Returns the builder for the settings used for calls to batchRunTestCases. */ + public UnaryCallSettings.Builder + batchRunTestCasesSettings() { + return getStubSettingsBuilder().batchRunTestCasesSettings(); + } + + /** Returns the builder for the settings used for calls to batchRunTestCases. */ + public OperationCallSettings.Builder< + BatchRunTestCasesRequest, BatchRunTestCasesResponse, BatchRunTestCasesMetadata> + batchRunTestCasesOperationSettings() { + return getStubSettingsBuilder().batchRunTestCasesOperationSettings(); + } + + /** Returns the builder for the settings used for calls to calculateCoverage. */ + public UnaryCallSettings.Builder + calculateCoverageSettings() { + return getStubSettingsBuilder().calculateCoverageSettings(); + } + + /** Returns the builder for the settings used for calls to importTestCases. */ + public UnaryCallSettings.Builder importTestCasesSettings() { + return getStubSettingsBuilder().importTestCasesSettings(); + } + + /** Returns the builder for the settings used for calls to importTestCases. */ + public OperationCallSettings.Builder< + ImportTestCasesRequest, ImportTestCasesResponse, ImportTestCasesMetadata> + importTestCasesOperationSettings() { + return getStubSettingsBuilder().importTestCasesOperationSettings(); + } + + /** Returns the builder for the settings used for calls to exportTestCases. */ + public UnaryCallSettings.Builder exportTestCasesSettings() { + return getStubSettingsBuilder().exportTestCasesSettings(); + } + + /** Returns the builder for the settings used for calls to exportTestCases. */ + public OperationCallSettings.Builder< + ExportTestCasesRequest, ExportTestCasesResponse, ExportTestCasesMetadata> + exportTestCasesOperationSettings() { + return getStubSettingsBuilder().exportTestCasesOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listTestCaseResults. */ + public PagedCallSettings.Builder< + ListTestCaseResultsRequest, + ListTestCaseResultsResponse, + ListTestCaseResultsPagedResponse> + listTestCaseResultsSettings() { + return getStubSettingsBuilder().listTestCaseResultsSettings(); + } + + @Override + public TestCasesSettings build() throws IOException { + return new TestCasesSettings(this); + } + } +} diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/package-info.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/package-info.java index 7e0513beb..d8057754a 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/package-info.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/package-info.java @@ -37,13 +37,6 @@ * *

Sample for EnvironmentsClient: * - *

======================= ExperimentsClient ======================= - * - *

Service Description: Service for managing - * [Experiments][google.cloud.dialogflow.cx.v3beta1.Experiment]. - * - *

Sample for ExperimentsClient: - * *

======================= FlowsClient ======================= * *

Service Description: Service for managing [Flows][google.cloud.dialogflow.cx.v3beta1.Flow]. @@ -84,6 +77,14 @@ * *

Sample for SessionEntityTypesClient: * + *

======================= TestCasesClient ======================= + * + *

Service Description: Service for managing [Test + * Cases][google.cloud.dialogflow.cx.v3beta1.TestCase] and [Test Case + * Results][google.cloud.dialogflow.cx.v3beta1.TestCaseResult]. + * + *

Sample for TestCasesClient: + * *

======================= TransitionRouteGroupsClient ======================= * *

Service Description: Service for managing diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/AgentsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/AgentsStub.java index db8548f4d..b88da8b81 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/AgentsStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/AgentsStub.java @@ -23,15 +23,18 @@ import com.google.api.gax.rpc.OperationCallable; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.cx.v3beta1.Agent; +import com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult; import com.google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest; import com.google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest; import com.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest; import com.google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse; import com.google.cloud.dialogflow.cx.v3beta1.GetAgentRequest; +import com.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest; import com.google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest; import com.google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse; import com.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest; import com.google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest; import com.google.longrunning.Operation; import com.google.longrunning.stub.OperationsStub; import com.google.protobuf.Empty; @@ -93,6 +96,15 @@ public UnaryCallable restoreAgentCallable() { throw new UnsupportedOperationException("Not implemented: restoreAgentCallable()"); } + public UnaryCallable validateAgentCallable() { + throw new UnsupportedOperationException("Not implemented: validateAgentCallable()"); + } + + public UnaryCallable + getAgentValidationResultCallable() { + throw new UnsupportedOperationException("Not implemented: getAgentValidationResultCallable()"); + } + @Override public abstract void close(); } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/AgentsStubSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/AgentsStubSettings.java index 3daccfc7e..f110ee026 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/AgentsStubSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/AgentsStubSettings.java @@ -45,15 +45,18 @@ import com.google.api.gax.rpc.UnaryCallSettings; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.cx.v3beta1.Agent; +import com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult; import com.google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest; import com.google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest; import com.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest; import com.google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse; import com.google.cloud.dialogflow.cx.v3beta1.GetAgentRequest; +import com.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest; import com.google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest; import com.google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse; import com.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest; import com.google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; @@ -119,6 +122,10 @@ public class AgentsStubSettings extends StubSettings { private final UnaryCallSettings restoreAgentSettings; private final OperationCallSettings restoreAgentOperationSettings; + private final UnaryCallSettings + validateAgentSettings; + private final UnaryCallSettings + getAgentValidationResultSettings; private static final PagedListDescriptor LIST_AGENTS_PAGE_STR_DESC = @@ -220,6 +227,17 @@ public OperationCallSettings restoreAgentOpe return restoreAgentOperationSettings; } + /** Returns the object with the settings used for calls to validateAgent. */ + public UnaryCallSettings validateAgentSettings() { + return validateAgentSettings; + } + + /** Returns the object with the settings used for calls to getAgentValidationResult. */ + public UnaryCallSettings + getAgentValidationResultSettings() { + return getAgentValidationResultSettings; + } + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public AgentsStub createStub() throws IOException { if (getTransportChannelProvider() @@ -297,6 +315,8 @@ protected AgentsStubSettings(Builder settingsBuilder) throws IOException { exportAgentOperationSettings = settingsBuilder.exportAgentOperationSettings().build(); restoreAgentSettings = settingsBuilder.restoreAgentSettings().build(); restoreAgentOperationSettings = settingsBuilder.restoreAgentOperationSettings().build(); + validateAgentSettings = settingsBuilder.validateAgentSettings().build(); + getAgentValidationResultSettings = settingsBuilder.getAgentValidationResultSettings().build(); } /** Builder for AgentsStubSettings. */ @@ -315,6 +335,10 @@ public static class Builder extends StubSettings.Builder restoreAgentSettings; private final OperationCallSettings.Builder restoreAgentOperationSettings; + private final UnaryCallSettings.Builder + validateAgentSettings; + private final UnaryCallSettings.Builder + getAgentValidationResultSettings; private static final ImmutableMap> RETRYABLE_CODE_DEFINITIONS; @@ -362,6 +386,8 @@ protected Builder(ClientContext clientContext) { exportAgentOperationSettings = OperationCallSettings.newBuilder(); restoreAgentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); restoreAgentOperationSettings = OperationCallSettings.newBuilder(); + validateAgentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getAgentValidationResultSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -371,7 +397,9 @@ protected Builder(ClientContext clientContext) { updateAgentSettings, deleteAgentSettings, exportAgentSettings, - restoreAgentSettings); + restoreAgentSettings, + validateAgentSettings, + getAgentValidationResultSettings); initDefaults(this); } @@ -387,6 +415,8 @@ protected Builder(AgentsStubSettings settings) { exportAgentOperationSettings = settings.exportAgentOperationSettings.toBuilder(); restoreAgentSettings = settings.restoreAgentSettings.toBuilder(); restoreAgentOperationSettings = settings.restoreAgentOperationSettings.toBuilder(); + validateAgentSettings = settings.validateAgentSettings.toBuilder(); + getAgentValidationResultSettings = settings.getAgentValidationResultSettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -396,7 +426,9 @@ protected Builder(AgentsStubSettings settings) { updateAgentSettings, deleteAgentSettings, exportAgentSettings, - restoreAgentSettings); + restoreAgentSettings, + validateAgentSettings, + getAgentValidationResultSettings); } private static Builder createDefault() { @@ -446,6 +478,16 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + builder + .validateAgentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getAgentValidationResultSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + builder .exportAgentOperationSettings() .setInitialCallSettings( @@ -564,6 +606,18 @@ public UnaryCallSettings.Builder restoreAgentSet return restoreAgentOperationSettings; } + /** Returns the builder for the settings used for calls to validateAgent. */ + public UnaryCallSettings.Builder + validateAgentSettings() { + return validateAgentSettings; + } + + /** Returns the builder for the settings used for calls to getAgentValidationResult. */ + public UnaryCallSettings.Builder + getAgentValidationResultSettings() { + return getAgentValidationResultSettings; + } + @Override public AgentsStubSettings build() throws IOException { return new AgentsStubSettings(this); diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/ExperimentsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/ExperimentsStub.java deleted file mode 100644 index ccc91afae..000000000 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/ExperimentsStub.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.dialogflow.cx.v3beta1.stub; - -import static com.google.cloud.dialogflow.cx.v3beta1.ExperimentsClient.ListExperimentsPagedResponse; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest; -import com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest; -import com.google.cloud.dialogflow.cx.v3beta1.Experiment; -import com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest; -import com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest; -import com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse; -import com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest; -import com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest; -import com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest; -import com.google.protobuf.Empty; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Base stub class for the Experiments service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@BetaApi -@Generated("by gapic-generator-java") -public abstract class ExperimentsStub implements BackgroundResource { - - public UnaryCallable - listExperimentsPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listExperimentsPagedCallable()"); - } - - public UnaryCallable listExperimentsCallable() { - throw new UnsupportedOperationException("Not implemented: listExperimentsCallable()"); - } - - public UnaryCallable getExperimentCallable() { - throw new UnsupportedOperationException("Not implemented: getExperimentCallable()"); - } - - public UnaryCallable createExperimentCallable() { - throw new UnsupportedOperationException("Not implemented: createExperimentCallable()"); - } - - public UnaryCallable updateExperimentCallable() { - throw new UnsupportedOperationException("Not implemented: updateExperimentCallable()"); - } - - public UnaryCallable deleteExperimentCallable() { - throw new UnsupportedOperationException("Not implemented: deleteExperimentCallable()"); - } - - public UnaryCallable startExperimentCallable() { - throw new UnsupportedOperationException("Not implemented: startExperimentCallable()"); - } - - public UnaryCallable stopExperimentCallable() { - throw new UnsupportedOperationException("Not implemented: stopExperimentCallable()"); - } - - @Override - public abstract void close(); -} diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/ExperimentsStubSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/ExperimentsStubSettings.java deleted file mode 100644 index 6d2948799..000000000 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/ExperimentsStubSettings.java +++ /dev/null @@ -1,492 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.dialogflow.cx.v3beta1.stub; - -import static com.google.cloud.dialogflow.cx.v3beta1.ExperimentsClient.ListExperimentsPagedResponse; - -import com.google.api.core.ApiFunction; -import com.google.api.core.ApiFuture; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GaxProperties; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.GrpcTransportChannel; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.retrying.RetrySettings; -import com.google.api.gax.rpc.ApiCallContext; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.PageContext; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.PagedListDescriptor; -import com.google.api.gax.rpc.PagedListResponseFactory; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.StubSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest; -import com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest; -import com.google.cloud.dialogflow.cx.v3beta1.Experiment; -import com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest; -import com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest; -import com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse; -import com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest; -import com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest; -import com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableSet; -import com.google.common.collect.Lists; -import com.google.protobuf.Empty; -import java.io.IOException; -import java.util.List; -import javax.annotation.Generated; -import org.threeten.bp.Duration; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Settings class to configure an instance of {@link ExperimentsStub}. - * - *

The default instance has everything set to sensible defaults: - * - *

    - *
  • The default service address (dialogflow.googleapis.com) and default port (443) are used. - *
  • Credentials are acquired automatically through Application Default Credentials. - *
  • Retries are configured for idempotent methods but not for non-idempotent methods. - *
- * - *

The builder of this class is recursive, so contained classes are themselves builders. When - * build() is called, the tree of builders is called to create the complete settings object. - * - *

For example, to set the total timeout of getExperiment to 30 seconds: - * - *

{@code
- * ExperimentsStubSettings.Builder experimentsSettingsBuilder =
- *     ExperimentsStubSettings.newBuilder();
- * experimentsSettingsBuilder
- *     .getExperimentSettings()
- *     .setRetrySettings(
- *         experimentsSettingsBuilder
- *             .getExperimentSettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * ExperimentsStubSettings experimentsSettings = experimentsSettingsBuilder.build();
- * }
- */ -@BetaApi -@Generated("by gapic-generator-java") -public class ExperimentsStubSettings extends StubSettings { - /** The default scopes of the service. */ - private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder() - .add("https://www.googleapis.com/auth/cloud-platform") - .add("https://www.googleapis.com/auth/dialogflow") - .build(); - - private final PagedCallSettings< - ListExperimentsRequest, ListExperimentsResponse, ListExperimentsPagedResponse> - listExperimentsSettings; - private final UnaryCallSettings getExperimentSettings; - private final UnaryCallSettings createExperimentSettings; - private final UnaryCallSettings updateExperimentSettings; - private final UnaryCallSettings deleteExperimentSettings; - private final UnaryCallSettings startExperimentSettings; - private final UnaryCallSettings stopExperimentSettings; - - private static final PagedListDescriptor< - ListExperimentsRequest, ListExperimentsResponse, Experiment> - LIST_EXPERIMENTS_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListExperimentsRequest injectToken( - ListExperimentsRequest payload, String token) { - return ListExperimentsRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListExperimentsRequest injectPageSize( - ListExperimentsRequest payload, int pageSize) { - return ListExperimentsRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListExperimentsRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListExperimentsResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListExperimentsResponse payload) { - return payload.getExperimentsList() == null - ? ImmutableList.of() - : payload.getExperimentsList(); - } - }; - - private static final PagedListResponseFactory< - ListExperimentsRequest, ListExperimentsResponse, ListExperimentsPagedResponse> - LIST_EXPERIMENTS_PAGE_STR_FACT = - new PagedListResponseFactory< - ListExperimentsRequest, ListExperimentsResponse, ListExperimentsPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListExperimentsRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext pageContext = - PageContext.create(callable, LIST_EXPERIMENTS_PAGE_STR_DESC, request, context); - return ListExperimentsPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - /** Returns the object with the settings used for calls to listExperiments. */ - public PagedCallSettings< - ListExperimentsRequest, ListExperimentsResponse, ListExperimentsPagedResponse> - listExperimentsSettings() { - return listExperimentsSettings; - } - - /** Returns the object with the settings used for calls to getExperiment. */ - public UnaryCallSettings getExperimentSettings() { - return getExperimentSettings; - } - - /** Returns the object with the settings used for calls to createExperiment. */ - public UnaryCallSettings createExperimentSettings() { - return createExperimentSettings; - } - - /** Returns the object with the settings used for calls to updateExperiment. */ - public UnaryCallSettings updateExperimentSettings() { - return updateExperimentSettings; - } - - /** Returns the object with the settings used for calls to deleteExperiment. */ - public UnaryCallSettings deleteExperimentSettings() { - return deleteExperimentSettings; - } - - /** Returns the object with the settings used for calls to startExperiment. */ - public UnaryCallSettings startExperimentSettings() { - return startExperimentSettings; - } - - /** Returns the object with the settings used for calls to stopExperiment. */ - public UnaryCallSettings stopExperimentSettings() { - return stopExperimentSettings; - } - - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") - public ExperimentsStub createStub() throws IOException { - if (getTransportChannelProvider() - .getTransportName() - .equals(GrpcTransportChannel.getGrpcTransportName())) { - return GrpcExperimentsStub.create(this); - } - throw new UnsupportedOperationException( - String.format( - "Transport not supported: %s", getTransportChannelProvider().getTransportName())); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return InstantiatingExecutorProvider.newBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return "dialogflow.googleapis.com:443"; - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return DEFAULT_SERVICE_SCOPES; - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES); - } - - /** Returns a builder for the default ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return InstantiatingGrpcChannelProvider.newBuilder() - .setMaxInboundMessageSize(Integer.MAX_VALUE); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return defaultGrpcTransportProviderBuilder().build(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(ExperimentsStubSettings.class)) - .setTransportToken( - GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(ClientContext clientContext) { - return new Builder(clientContext); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected ExperimentsStubSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - - listExperimentsSettings = settingsBuilder.listExperimentsSettings().build(); - getExperimentSettings = settingsBuilder.getExperimentSettings().build(); - createExperimentSettings = settingsBuilder.createExperimentSettings().build(); - updateExperimentSettings = settingsBuilder.updateExperimentSettings().build(); - deleteExperimentSettings = settingsBuilder.deleteExperimentSettings().build(); - startExperimentSettings = settingsBuilder.startExperimentSettings().build(); - stopExperimentSettings = settingsBuilder.stopExperimentSettings().build(); - } - - /** Builder for ExperimentsStubSettings. */ - public static class Builder extends StubSettings.Builder { - private final ImmutableList> unaryMethodSettingsBuilders; - private final PagedCallSettings.Builder< - ListExperimentsRequest, ListExperimentsResponse, ListExperimentsPagedResponse> - listExperimentsSettings; - private final UnaryCallSettings.Builder getExperimentSettings; - private final UnaryCallSettings.Builder - createExperimentSettings; - private final UnaryCallSettings.Builder - updateExperimentSettings; - private final UnaryCallSettings.Builder - deleteExperimentSettings; - private final UnaryCallSettings.Builder - startExperimentSettings; - private final UnaryCallSettings.Builder - stopExperimentSettings; - private static final ImmutableMap> - RETRYABLE_CODE_DEFINITIONS; - - static { - ImmutableMap.Builder> definitions = - ImmutableMap.builder(); - definitions.put( - "retry_policy_0_codes", - ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); - RETRYABLE_CODE_DEFINITIONS = definitions.build(); - } - - private static final ImmutableMap RETRY_PARAM_DEFINITIONS; - - static { - ImmutableMap.Builder definitions = ImmutableMap.builder(); - RetrySettings settings = null; - settings = - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(100L)) - .setRetryDelayMultiplier(1.3) - .setMaxRetryDelay(Duration.ofMillis(60000L)) - .setInitialRpcTimeout(Duration.ofMillis(60000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(60000L)) - .setTotalTimeout(Duration.ofMillis(60000L)) - .build(); - definitions.put("retry_policy_0_params", settings); - RETRY_PARAM_DEFINITIONS = definitions.build(); - } - - protected Builder() { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(clientContext); - - listExperimentsSettings = PagedCallSettings.newBuilder(LIST_EXPERIMENTS_PAGE_STR_FACT); - getExperimentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createExperimentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateExperimentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteExperimentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - startExperimentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - stopExperimentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - listExperimentsSettings, - getExperimentSettings, - createExperimentSettings, - updateExperimentSettings, - deleteExperimentSettings, - startExperimentSettings, - stopExperimentSettings); - initDefaults(this); - } - - protected Builder(ExperimentsStubSettings settings) { - super(settings); - - listExperimentsSettings = settings.listExperimentsSettings.toBuilder(); - getExperimentSettings = settings.getExperimentSettings.toBuilder(); - createExperimentSettings = settings.createExperimentSettings.toBuilder(); - updateExperimentSettings = settings.updateExperimentSettings.toBuilder(); - deleteExperimentSettings = settings.deleteExperimentSettings.toBuilder(); - startExperimentSettings = settings.startExperimentSettings.toBuilder(); - stopExperimentSettings = settings.stopExperimentSettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - listExperimentsSettings, - getExperimentSettings, - createExperimentSettings, - updateExperimentSettings, - deleteExperimentSettings, - startExperimentSettings, - stopExperimentSettings); - } - - private static Builder createDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultTransportChannelProvider()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - - return initDefaults(builder); - } - - private static Builder initDefaults(Builder builder) { - builder - .listExperimentsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .getExperimentSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .createExperimentSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .updateExperimentSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .deleteExperimentSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .startExperimentSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .stopExperimentSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - return builder; - } - - // NEXT_MAJOR_VER: remove 'throws Exception'. - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { - super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); - return this; - } - - public ImmutableList> unaryMethodSettingsBuilders() { - return unaryMethodSettingsBuilders; - } - - /** Returns the builder for the settings used for calls to listExperiments. */ - public PagedCallSettings.Builder< - ListExperimentsRequest, ListExperimentsResponse, ListExperimentsPagedResponse> - listExperimentsSettings() { - return listExperimentsSettings; - } - - /** Returns the builder for the settings used for calls to getExperiment. */ - public UnaryCallSettings.Builder getExperimentSettings() { - return getExperimentSettings; - } - - /** Returns the builder for the settings used for calls to createExperiment. */ - public UnaryCallSettings.Builder - createExperimentSettings() { - return createExperimentSettings; - } - - /** Returns the builder for the settings used for calls to updateExperiment. */ - public UnaryCallSettings.Builder - updateExperimentSettings() { - return updateExperimentSettings; - } - - /** Returns the builder for the settings used for calls to deleteExperiment. */ - public UnaryCallSettings.Builder deleteExperimentSettings() { - return deleteExperimentSettings; - } - - /** Returns the builder for the settings used for calls to startExperiment. */ - public UnaryCallSettings.Builder startExperimentSettings() { - return startExperimentSettings; - } - - /** Returns the builder for the settings used for calls to stopExperiment. */ - public UnaryCallSettings.Builder stopExperimentSettings() { - return stopExperimentSettings; - } - - @Override - public ExperimentsStubSettings build() throws IOException { - return new ExperimentsStubSettings(this); - } - } -} diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/FlowsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/FlowsStub.java index 654e22dcd..de43978c3 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/FlowsStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/FlowsStub.java @@ -25,11 +25,14 @@ import com.google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest; import com.google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest; import com.google.cloud.dialogflow.cx.v3beta1.Flow; +import com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult; import com.google.cloud.dialogflow.cx.v3beta1.GetFlowRequest; +import com.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest; import com.google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest; import com.google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse; import com.google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest; import com.google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest; import com.google.longrunning.Operation; import com.google.longrunning.stub.OperationsStub; import com.google.protobuf.Empty; @@ -82,6 +85,15 @@ public UnaryCallable trainFlowCallable() { throw new UnsupportedOperationException("Not implemented: trainFlowCallable()"); } + public UnaryCallable validateFlowCallable() { + throw new UnsupportedOperationException("Not implemented: validateFlowCallable()"); + } + + public UnaryCallable + getFlowValidationResultCallable() { + throw new UnsupportedOperationException("Not implemented: getFlowValidationResultCallable()"); + } + @Override public abstract void close(); } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/FlowsStubSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/FlowsStubSettings.java index 70165ad17..504d6718a 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/FlowsStubSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/FlowsStubSettings.java @@ -47,11 +47,14 @@ import com.google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest; import com.google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest; import com.google.cloud.dialogflow.cx.v3beta1.Flow; +import com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult; import com.google.cloud.dialogflow.cx.v3beta1.GetFlowRequest; +import com.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest; import com.google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest; import com.google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse; import com.google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest; import com.google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; @@ -113,6 +116,9 @@ public class FlowsStubSettings extends StubSettings { private final UnaryCallSettings updateFlowSettings; private final UnaryCallSettings trainFlowSettings; private final OperationCallSettings trainFlowOperationSettings; + private final UnaryCallSettings validateFlowSettings; + private final UnaryCallSettings + getFlowValidationResultSettings; private static final PagedListDescriptor LIST_FLOWS_PAGE_STR_DESC = @@ -203,6 +209,17 @@ public OperationCallSettings trainFlowOperation return trainFlowOperationSettings; } + /** Returns the object with the settings used for calls to validateFlow. */ + public UnaryCallSettings validateFlowSettings() { + return validateFlowSettings; + } + + /** Returns the object with the settings used for calls to getFlowValidationResult. */ + public UnaryCallSettings + getFlowValidationResultSettings() { + return getFlowValidationResultSettings; + } + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public FlowsStub createStub() throws IOException { if (getTransportChannelProvider() @@ -278,6 +295,8 @@ protected FlowsStubSettings(Builder settingsBuilder) throws IOException { updateFlowSettings = settingsBuilder.updateFlowSettings().build(); trainFlowSettings = settingsBuilder.trainFlowSettings().build(); trainFlowOperationSettings = settingsBuilder.trainFlowOperationSettings().build(); + validateFlowSettings = settingsBuilder.validateFlowSettings().build(); + getFlowValidationResultSettings = settingsBuilder.getFlowValidationResultSettings().build(); } /** Builder for FlowsStubSettings. */ @@ -293,6 +312,10 @@ public static class Builder extends StubSettings.Builder trainFlowSettings; private final OperationCallSettings.Builder trainFlowOperationSettings; + private final UnaryCallSettings.Builder + validateFlowSettings; + private final UnaryCallSettings.Builder + getFlowValidationResultSettings; private static final ImmutableMap> RETRYABLE_CODE_DEFINITIONS; @@ -338,6 +361,8 @@ protected Builder(ClientContext clientContext) { updateFlowSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); trainFlowSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); trainFlowOperationSettings = OperationCallSettings.newBuilder(); + validateFlowSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getFlowValidationResultSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -346,7 +371,9 @@ protected Builder(ClientContext clientContext) { listFlowsSettings, getFlowSettings, updateFlowSettings, - trainFlowSettings); + trainFlowSettings, + validateFlowSettings, + getFlowValidationResultSettings); initDefaults(this); } @@ -360,6 +387,8 @@ protected Builder(FlowsStubSettings settings) { updateFlowSettings = settings.updateFlowSettings.toBuilder(); trainFlowSettings = settings.trainFlowSettings.toBuilder(); trainFlowOperationSettings = settings.trainFlowOperationSettings.toBuilder(); + validateFlowSettings = settings.validateFlowSettings.toBuilder(); + getFlowValidationResultSettings = settings.getFlowValidationResultSettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -368,7 +397,9 @@ protected Builder(FlowsStubSettings settings) { listFlowsSettings, getFlowSettings, updateFlowSettings, - trainFlowSettings); + trainFlowSettings, + validateFlowSettings, + getFlowValidationResultSettings); } private static Builder createDefault() { @@ -413,6 +444,16 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + builder + .validateFlowSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getFlowValidationResultSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + builder .trainFlowOperationSettings() .setInitialCallSettings( @@ -494,6 +535,18 @@ public UnaryCallSettings.Builder trainFlowSettings( return trainFlowOperationSettings; } + /** Returns the builder for the settings used for calls to validateFlow. */ + public UnaryCallSettings.Builder + validateFlowSettings() { + return validateFlowSettings; + } + + /** Returns the builder for the settings used for calls to getFlowValidationResult. */ + public UnaryCallSettings.Builder + getFlowValidationResultSettings() { + return getFlowValidationResultSettings; + } + @Override public FlowsStubSettings build() throws IOException { return new FlowsStubSettings(this); diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcAgentsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcAgentsStub.java index 8f83a81df..3b7307504 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcAgentsStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcAgentsStub.java @@ -28,15 +28,18 @@ import com.google.api.gax.rpc.RequestParamsExtractor; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.cx.v3beta1.Agent; +import com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult; import com.google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest; import com.google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest; import com.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest; import com.google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse; import com.google.cloud.dialogflow.cx.v3beta1.GetAgentRequest; +import com.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest; import com.google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest; import com.google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse; import com.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest; import com.google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest; import com.google.common.collect.ImmutableMap; import com.google.longrunning.Operation; import com.google.longrunning.stub.GrpcOperationsStub; @@ -116,6 +119,29 @@ public class GrpcAgentsStub extends AgentsStub { .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); + private static final MethodDescriptor + validateAgentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Agents/ValidateAgent") + .setRequestMarshaller( + ProtoUtils.marshaller(ValidateAgentRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(AgentValidationResult.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getAgentValidationResultMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.dialogflow.cx.v3beta1.Agents/GetAgentValidationResult") + .setRequestMarshaller( + ProtoUtils.marshaller(GetAgentValidationResultRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(AgentValidationResult.getDefaultInstance())) + .build(); + private final UnaryCallable listAgentsCallable; private final UnaryCallable listAgentsPagedCallable; private final UnaryCallable getAgentCallable; @@ -127,6 +153,9 @@ public class GrpcAgentsStub extends AgentsStub { exportAgentOperationCallable; private final UnaryCallable restoreAgentCallable; private final OperationCallable restoreAgentOperationCallable; + private final UnaryCallable validateAgentCallable; + private final UnaryCallable + getAgentValidationResultCallable; private final BackgroundResource backgroundResources; private final GrpcOperationsStub operationsStub; @@ -258,6 +287,33 @@ public Map extract(RestoreAgentRequest request) { } }) .build(); + GrpcCallSettings validateAgentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(validateAgentMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ValidateAgentRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + getAgentValidationResultTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getAgentValidationResultMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetAgentValidationResultRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); this.listAgentsCallable = callableFactory.createUnaryCallable( @@ -295,6 +351,14 @@ public Map extract(RestoreAgentRequest request) { settings.restoreAgentOperationSettings(), clientContext, operationsStub); + this.validateAgentCallable = + callableFactory.createUnaryCallable( + validateAgentTransportSettings, settings.validateAgentSettings(), clientContext); + this.getAgentValidationResultCallable = + callableFactory.createUnaryCallable( + getAgentValidationResultTransportSettings, + settings.getAgentValidationResultSettings(), + clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); @@ -345,6 +409,15 @@ public OperationCallable restoreAgentOperati return restoreAgentOperationCallable; } + public UnaryCallable validateAgentCallable() { + return validateAgentCallable; + } + + public UnaryCallable + getAgentValidationResultCallable() { + return getAgentValidationResultCallable; + } + @Override public final void close() { shutdown(); diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcExperimentsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcExperimentsStub.java deleted file mode 100644 index 193b77840..000000000 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcExperimentsStub.java +++ /dev/null @@ -1,370 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.dialogflow.cx.v3beta1.stub; - -import static com.google.cloud.dialogflow.cx.v3beta1.ExperimentsClient.ListExperimentsPagedResponse; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.RequestParamsExtractor; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest; -import com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest; -import com.google.cloud.dialogflow.cx.v3beta1.Experiment; -import com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest; -import com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest; -import com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse; -import com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest; -import com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest; -import com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest; -import com.google.common.collect.ImmutableMap; -import com.google.longrunning.stub.GrpcOperationsStub; -import com.google.protobuf.Empty; -import io.grpc.MethodDescriptor; -import io.grpc.protobuf.ProtoUtils; -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC stub implementation for the Experiments service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class GrpcExperimentsStub extends ExperimentsStub { - private static final MethodDescriptor - listExperimentsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Experiments/ListExperiments") - .setRequestMarshaller( - ProtoUtils.marshaller(ListExperimentsRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListExperimentsResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - getExperimentMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Experiments/GetExperiment") - .setRequestMarshaller( - ProtoUtils.marshaller(GetExperimentRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Experiment.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - createExperimentMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Experiments/CreateExperiment") - .setRequestMarshaller( - ProtoUtils.marshaller(CreateExperimentRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Experiment.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - updateExperimentMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Experiments/UpdateExperiment") - .setRequestMarshaller( - ProtoUtils.marshaller(UpdateExperimentRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Experiment.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - deleteExperimentMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Experiments/DeleteExperiment") - .setRequestMarshaller( - ProtoUtils.marshaller(DeleteExperimentRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - startExperimentMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Experiments/StartExperiment") - .setRequestMarshaller( - ProtoUtils.marshaller(StartExperimentRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Experiment.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - stopExperimentMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Experiments/StopExperiment") - .setRequestMarshaller( - ProtoUtils.marshaller(StopExperimentRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Experiment.getDefaultInstance())) - .build(); - - private final UnaryCallable - listExperimentsCallable; - private final UnaryCallable - listExperimentsPagedCallable; - private final UnaryCallable getExperimentCallable; - private final UnaryCallable createExperimentCallable; - private final UnaryCallable updateExperimentCallable; - private final UnaryCallable deleteExperimentCallable; - private final UnaryCallable startExperimentCallable; - private final UnaryCallable stopExperimentCallable; - - private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - private final GrpcStubCallableFactory callableFactory; - - public static final GrpcExperimentsStub create(ExperimentsStubSettings settings) - throws IOException { - return new GrpcExperimentsStub(settings, ClientContext.create(settings)); - } - - public static final GrpcExperimentsStub create(ClientContext clientContext) throws IOException { - return new GrpcExperimentsStub(ExperimentsStubSettings.newBuilder().build(), clientContext); - } - - public static final GrpcExperimentsStub create( - ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { - return new GrpcExperimentsStub( - ExperimentsStubSettings.newBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of GrpcExperimentsStub, using the given settings. This is protected so - * that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected GrpcExperimentsStub(ExperimentsStubSettings settings, ClientContext clientContext) - throws IOException { - this(settings, clientContext, new GrpcExperimentsCallableFactory()); - } - - /** - * Constructs an instance of GrpcExperimentsStub, using the given settings. This is protected so - * that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected GrpcExperimentsStub( - ExperimentsStubSettings settings, - ClientContext clientContext, - GrpcStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); - - GrpcCallSettings - listExperimentsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listExperimentsMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(ListExperimentsRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } - }) - .build(); - GrpcCallSettings getExperimentTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getExperimentMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(GetExperimentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } - }) - .build(); - GrpcCallSettings createExperimentTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createExperimentMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(CreateExperimentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } - }) - .build(); - GrpcCallSettings updateExperimentTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateExperimentMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(UpdateExperimentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put( - "experiment.name", String.valueOf(request.getExperiment().getName())); - return params.build(); - } - }) - .build(); - GrpcCallSettings deleteExperimentTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteExperimentMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(DeleteExperimentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } - }) - .build(); - GrpcCallSettings startExperimentTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(startExperimentMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(StartExperimentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } - }) - .build(); - GrpcCallSettings stopExperimentTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(stopExperimentMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(StopExperimentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } - }) - .build(); - - this.listExperimentsCallable = - callableFactory.createUnaryCallable( - listExperimentsTransportSettings, settings.listExperimentsSettings(), clientContext); - this.listExperimentsPagedCallable = - callableFactory.createPagedCallable( - listExperimentsTransportSettings, settings.listExperimentsSettings(), clientContext); - this.getExperimentCallable = - callableFactory.createUnaryCallable( - getExperimentTransportSettings, settings.getExperimentSettings(), clientContext); - this.createExperimentCallable = - callableFactory.createUnaryCallable( - createExperimentTransportSettings, settings.createExperimentSettings(), clientContext); - this.updateExperimentCallable = - callableFactory.createUnaryCallable( - updateExperimentTransportSettings, settings.updateExperimentSettings(), clientContext); - this.deleteExperimentCallable = - callableFactory.createUnaryCallable( - deleteExperimentTransportSettings, settings.deleteExperimentSettings(), clientContext); - this.startExperimentCallable = - callableFactory.createUnaryCallable( - startExperimentTransportSettings, settings.startExperimentSettings(), clientContext); - this.stopExperimentCallable = - callableFactory.createUnaryCallable( - stopExperimentTransportSettings, settings.stopExperimentSettings(), clientContext); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - public GrpcOperationsStub getOperationsStub() { - return operationsStub; - } - - public UnaryCallable listExperimentsCallable() { - return listExperimentsCallable; - } - - public UnaryCallable - listExperimentsPagedCallable() { - return listExperimentsPagedCallable; - } - - public UnaryCallable getExperimentCallable() { - return getExperimentCallable; - } - - public UnaryCallable createExperimentCallable() { - return createExperimentCallable; - } - - public UnaryCallable updateExperimentCallable() { - return updateExperimentCallable; - } - - public UnaryCallable deleteExperimentCallable() { - return deleteExperimentCallable; - } - - public UnaryCallable startExperimentCallable() { - return startExperimentCallable; - } - - public UnaryCallable stopExperimentCallable() { - return stopExperimentCallable; - } - - @Override - public final void close() { - shutdown(); - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcFlowsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcFlowsStub.java index 5787fa14f..3d6e2b326 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcFlowsStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcFlowsStub.java @@ -30,11 +30,14 @@ import com.google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest; import com.google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest; import com.google.cloud.dialogflow.cx.v3beta1.Flow; +import com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult; import com.google.cloud.dialogflow.cx.v3beta1.GetFlowRequest; +import com.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest; import com.google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest; import com.google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse; import com.google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest; import com.google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest; import com.google.common.collect.ImmutableMap; import com.google.longrunning.Operation; import com.google.longrunning.stub.GrpcOperationsStub; @@ -105,6 +108,27 @@ public class GrpcFlowsStub extends FlowsStub { .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); + private static final MethodDescriptor + validateFlowMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Flows/ValidateFlow") + .setRequestMarshaller(ProtoUtils.marshaller(ValidateFlowRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(FlowValidationResult.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getFlowValidationResultMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Flows/GetFlowValidationResult") + .setRequestMarshaller( + ProtoUtils.marshaller(GetFlowValidationResultRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(FlowValidationResult.getDefaultInstance())) + .build(); + private final UnaryCallable createFlowCallable; private final UnaryCallable deleteFlowCallable; private final UnaryCallable listFlowsCallable; @@ -113,6 +137,9 @@ public class GrpcFlowsStub extends FlowsStub { private final UnaryCallable updateFlowCallable; private final UnaryCallable trainFlowCallable; private final OperationCallable trainFlowOperationCallable; + private final UnaryCallable validateFlowCallable; + private final UnaryCallable + getFlowValidationResultCallable; private final BackgroundResource backgroundResources; private final GrpcOperationsStub operationsStub; @@ -231,6 +258,33 @@ public Map extract(TrainFlowRequest request) { } }) .build(); + GrpcCallSettings validateFlowTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(validateFlowMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ValidateFlowRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + getFlowValidationResultTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getFlowValidationResultMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetFlowValidationResultRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); this.createFlowCallable = callableFactory.createUnaryCallable( @@ -259,6 +313,14 @@ public Map extract(TrainFlowRequest request) { settings.trainFlowOperationSettings(), clientContext, operationsStub); + this.validateFlowCallable = + callableFactory.createUnaryCallable( + validateFlowTransportSettings, settings.validateFlowSettings(), clientContext); + this.getFlowValidationResultCallable = + callableFactory.createUnaryCallable( + getFlowValidationResultTransportSettings, + settings.getFlowValidationResultSettings(), + clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); @@ -300,6 +362,15 @@ public OperationCallable trainFlowOperationCall return trainFlowOperationCallable; } + public UnaryCallable validateFlowCallable() { + return validateFlowCallable; + } + + public UnaryCallable + getFlowValidationResultCallable() { + return getFlowValidationResultCallable; + } + @Override public final void close() { shutdown(); diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcExperimentsCallableFactory.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcTestCasesCallableFactory.java similarity index 96% rename from google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcExperimentsCallableFactory.java rename to google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcTestCasesCallableFactory.java index a084001bd..d91edafd9 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcExperimentsCallableFactory.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcTestCasesCallableFactory.java @@ -38,13 +38,13 @@ // AUTO-GENERATED DOCUMENTATION AND CLASS. /** - * gRPC callable factory implementation for the Experiments service API. + * gRPC callable factory implementation for the TestCases service API. * *

This class is for advanced usage. */ @BetaApi @Generated("by gapic-generator-java") -public class GrpcExperimentsCallableFactory implements GrpcStubCallableFactory { +public class GrpcTestCasesCallableFactory implements GrpcStubCallableFactory { @Override public UnaryCallable createUnaryCallable( diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcTestCasesStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcTestCasesStub.java new file mode 100644 index 000000000..c60336668 --- /dev/null +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcTestCasesStub.java @@ -0,0 +1,579 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.cx.v3beta1.stub; + +import static com.google.cloud.dialogflow.cx.v3beta1.TestCasesClient.ListTestCaseResultsPagedResponse; +import static com.google.cloud.dialogflow.cx.v3beta1.TestCasesClient.ListTestCasesPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsExtractor; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest; +import com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadata; +import com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest; +import com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponse; +import com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest; +import com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse; +import com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata; +import com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse; +import com.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata; +import com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse; +import com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse; +import com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse; +import com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseMetadata; +import com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest; +import com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse; +import com.google.cloud.dialogflow.cx.v3beta1.TestCase; +import com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the TestCases service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcTestCasesStub extends TestCasesStub { + private static final MethodDescriptor + listTestCasesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.TestCases/ListTestCases") + .setRequestMarshaller( + ProtoUtils.marshaller(ListTestCasesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListTestCasesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + batchDeleteTestCasesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.dialogflow.cx.v3beta1.TestCases/BatchDeleteTestCases") + .setRequestMarshaller( + ProtoUtils.marshaller(BatchDeleteTestCasesRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getTestCaseMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.TestCases/GetTestCase") + .setRequestMarshaller(ProtoUtils.marshaller(GetTestCaseRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(TestCase.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createTestCaseMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.TestCases/CreateTestCase") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateTestCaseRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(TestCase.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateTestCaseMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.TestCases/UpdateTestCase") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateTestCaseRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(TestCase.getDefaultInstance())) + .build(); + + private static final MethodDescriptor runTestCaseMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.TestCases/RunTestCase") + .setRequestMarshaller(ProtoUtils.marshaller(RunTestCaseRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + batchRunTestCasesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.TestCases/BatchRunTestCases") + .setRequestMarshaller( + ProtoUtils.marshaller(BatchRunTestCasesRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + calculateCoverageMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.TestCases/CalculateCoverage") + .setRequestMarshaller( + ProtoUtils.marshaller(CalculateCoverageRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(CalculateCoverageResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + importTestCasesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.TestCases/ImportTestCases") + .setRequestMarshaller( + ProtoUtils.marshaller(ImportTestCasesRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + exportTestCasesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.TestCases/ExportTestCases") + .setRequestMarshaller( + ProtoUtils.marshaller(ExportTestCasesRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listTestCaseResultsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.TestCases/ListTestCaseResults") + .setRequestMarshaller( + ProtoUtils.marshaller(ListTestCaseResultsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListTestCaseResultsResponse.getDefaultInstance())) + .build(); + + private final UnaryCallable listTestCasesCallable; + private final UnaryCallable + listTestCasesPagedCallable; + private final UnaryCallable batchDeleteTestCasesCallable; + private final UnaryCallable getTestCaseCallable; + private final UnaryCallable createTestCaseCallable; + private final UnaryCallable updateTestCaseCallable; + private final UnaryCallable runTestCaseCallable; + private final OperationCallable + runTestCaseOperationCallable; + private final UnaryCallable batchRunTestCasesCallable; + private final OperationCallable< + BatchRunTestCasesRequest, BatchRunTestCasesResponse, BatchRunTestCasesMetadata> + batchRunTestCasesOperationCallable; + private final UnaryCallable + calculateCoverageCallable; + private final UnaryCallable importTestCasesCallable; + private final OperationCallable< + ImportTestCasesRequest, ImportTestCasesResponse, ImportTestCasesMetadata> + importTestCasesOperationCallable; + private final UnaryCallable exportTestCasesCallable; + private final OperationCallable< + ExportTestCasesRequest, ExportTestCasesResponse, ExportTestCasesMetadata> + exportTestCasesOperationCallable; + private final UnaryCallable + listTestCaseResultsCallable; + private final UnaryCallable + listTestCaseResultsPagedCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcTestCasesStub create(TestCasesStubSettings settings) throws IOException { + return new GrpcTestCasesStub(settings, ClientContext.create(settings)); + } + + public static final GrpcTestCasesStub create(ClientContext clientContext) throws IOException { + return new GrpcTestCasesStub(TestCasesStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcTestCasesStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcTestCasesStub( + TestCasesStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcTestCasesStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcTestCasesStub(TestCasesStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcTestCasesCallableFactory()); + } + + /** + * Constructs an instance of GrpcTestCasesStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcTestCasesStub( + TestCasesStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings listTestCasesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listTestCasesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListTestCasesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings batchDeleteTestCasesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(batchDeleteTestCasesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(BatchDeleteTestCasesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings getTestCaseTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getTestCaseMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetTestCaseRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings createTestCaseTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createTestCaseMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateTestCaseRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings updateTestCaseTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateTestCaseMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateTestCaseRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("test_case.name", String.valueOf(request.getTestCase().getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings runTestCaseTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(runTestCaseMethodDescriptor) + .build(); + GrpcCallSettings batchRunTestCasesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(batchRunTestCasesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(BatchRunTestCasesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + calculateCoverageTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(calculateCoverageMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CalculateCoverageRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("agent", String.valueOf(request.getAgent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings importTestCasesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(importTestCasesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ImportTestCasesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings exportTestCasesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(exportTestCasesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ExportTestCasesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + listTestCaseResultsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listTestCaseResultsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListTestCaseResultsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + + this.listTestCasesCallable = + callableFactory.createUnaryCallable( + listTestCasesTransportSettings, settings.listTestCasesSettings(), clientContext); + this.listTestCasesPagedCallable = + callableFactory.createPagedCallable( + listTestCasesTransportSettings, settings.listTestCasesSettings(), clientContext); + this.batchDeleteTestCasesCallable = + callableFactory.createUnaryCallable( + batchDeleteTestCasesTransportSettings, + settings.batchDeleteTestCasesSettings(), + clientContext); + this.getTestCaseCallable = + callableFactory.createUnaryCallable( + getTestCaseTransportSettings, settings.getTestCaseSettings(), clientContext); + this.createTestCaseCallable = + callableFactory.createUnaryCallable( + createTestCaseTransportSettings, settings.createTestCaseSettings(), clientContext); + this.updateTestCaseCallable = + callableFactory.createUnaryCallable( + updateTestCaseTransportSettings, settings.updateTestCaseSettings(), clientContext); + this.runTestCaseCallable = + callableFactory.createUnaryCallable( + runTestCaseTransportSettings, settings.runTestCaseSettings(), clientContext); + this.runTestCaseOperationCallable = + callableFactory.createOperationCallable( + runTestCaseTransportSettings, + settings.runTestCaseOperationSettings(), + clientContext, + operationsStub); + this.batchRunTestCasesCallable = + callableFactory.createUnaryCallable( + batchRunTestCasesTransportSettings, + settings.batchRunTestCasesSettings(), + clientContext); + this.batchRunTestCasesOperationCallable = + callableFactory.createOperationCallable( + batchRunTestCasesTransportSettings, + settings.batchRunTestCasesOperationSettings(), + clientContext, + operationsStub); + this.calculateCoverageCallable = + callableFactory.createUnaryCallable( + calculateCoverageTransportSettings, + settings.calculateCoverageSettings(), + clientContext); + this.importTestCasesCallable = + callableFactory.createUnaryCallable( + importTestCasesTransportSettings, settings.importTestCasesSettings(), clientContext); + this.importTestCasesOperationCallable = + callableFactory.createOperationCallable( + importTestCasesTransportSettings, + settings.importTestCasesOperationSettings(), + clientContext, + operationsStub); + this.exportTestCasesCallable = + callableFactory.createUnaryCallable( + exportTestCasesTransportSettings, settings.exportTestCasesSettings(), clientContext); + this.exportTestCasesOperationCallable = + callableFactory.createOperationCallable( + exportTestCasesTransportSettings, + settings.exportTestCasesOperationSettings(), + clientContext, + operationsStub); + this.listTestCaseResultsCallable = + callableFactory.createUnaryCallable( + listTestCaseResultsTransportSettings, + settings.listTestCaseResultsSettings(), + clientContext); + this.listTestCaseResultsPagedCallable = + callableFactory.createPagedCallable( + listTestCaseResultsTransportSettings, + settings.listTestCaseResultsSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + public UnaryCallable listTestCasesCallable() { + return listTestCasesCallable; + } + + public UnaryCallable + listTestCasesPagedCallable() { + return listTestCasesPagedCallable; + } + + public UnaryCallable batchDeleteTestCasesCallable() { + return batchDeleteTestCasesCallable; + } + + public UnaryCallable getTestCaseCallable() { + return getTestCaseCallable; + } + + public UnaryCallable createTestCaseCallable() { + return createTestCaseCallable; + } + + public UnaryCallable updateTestCaseCallable() { + return updateTestCaseCallable; + } + + public UnaryCallable runTestCaseCallable() { + return runTestCaseCallable; + } + + public OperationCallable + runTestCaseOperationCallable() { + return runTestCaseOperationCallable; + } + + public UnaryCallable batchRunTestCasesCallable() { + return batchRunTestCasesCallable; + } + + public OperationCallable< + BatchRunTestCasesRequest, BatchRunTestCasesResponse, BatchRunTestCasesMetadata> + batchRunTestCasesOperationCallable() { + return batchRunTestCasesOperationCallable; + } + + public UnaryCallable + calculateCoverageCallable() { + return calculateCoverageCallable; + } + + public UnaryCallable importTestCasesCallable() { + return importTestCasesCallable; + } + + public OperationCallable + importTestCasesOperationCallable() { + return importTestCasesOperationCallable; + } + + public UnaryCallable exportTestCasesCallable() { + return exportTestCasesCallable; + } + + public OperationCallable + exportTestCasesOperationCallable() { + return exportTestCasesOperationCallable; + } + + public UnaryCallable + listTestCaseResultsCallable() { + return listTestCaseResultsCallable; + } + + public UnaryCallable + listTestCaseResultsPagedCallable() { + return listTestCaseResultsPagedCallable; + } + + @Override + public final void close() { + shutdown(); + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/TestCasesStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/TestCasesStub.java new file mode 100644 index 000000000..e5d75620f --- /dev/null +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/TestCasesStub.java @@ -0,0 +1,148 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.cx.v3beta1.stub; + +import static com.google.cloud.dialogflow.cx.v3beta1.TestCasesClient.ListTestCaseResultsPagedResponse; +import static com.google.cloud.dialogflow.cx.v3beta1.TestCasesClient.ListTestCasesPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest; +import com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadata; +import com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest; +import com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponse; +import com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest; +import com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse; +import com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata; +import com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse; +import com.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata; +import com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse; +import com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse; +import com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse; +import com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseMetadata; +import com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest; +import com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse; +import com.google.cloud.dialogflow.cx.v3beta1.TestCase; +import com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the TestCases service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class TestCasesStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); + } + + public UnaryCallable + listTestCasesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listTestCasesPagedCallable()"); + } + + public UnaryCallable listTestCasesCallable() { + throw new UnsupportedOperationException("Not implemented: listTestCasesCallable()"); + } + + public UnaryCallable batchDeleteTestCasesCallable() { + throw new UnsupportedOperationException("Not implemented: batchDeleteTestCasesCallable()"); + } + + public UnaryCallable getTestCaseCallable() { + throw new UnsupportedOperationException("Not implemented: getTestCaseCallable()"); + } + + public UnaryCallable createTestCaseCallable() { + throw new UnsupportedOperationException("Not implemented: createTestCaseCallable()"); + } + + public UnaryCallable updateTestCaseCallable() { + throw new UnsupportedOperationException("Not implemented: updateTestCaseCallable()"); + } + + public OperationCallable + runTestCaseOperationCallable() { + throw new UnsupportedOperationException("Not implemented: runTestCaseOperationCallable()"); + } + + public UnaryCallable runTestCaseCallable() { + throw new UnsupportedOperationException("Not implemented: runTestCaseCallable()"); + } + + public OperationCallable< + BatchRunTestCasesRequest, BatchRunTestCasesResponse, BatchRunTestCasesMetadata> + batchRunTestCasesOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: batchRunTestCasesOperationCallable()"); + } + + public UnaryCallable batchRunTestCasesCallable() { + throw new UnsupportedOperationException("Not implemented: batchRunTestCasesCallable()"); + } + + public UnaryCallable + calculateCoverageCallable() { + throw new UnsupportedOperationException("Not implemented: calculateCoverageCallable()"); + } + + public OperationCallable + importTestCasesOperationCallable() { + throw new UnsupportedOperationException("Not implemented: importTestCasesOperationCallable()"); + } + + public UnaryCallable importTestCasesCallable() { + throw new UnsupportedOperationException("Not implemented: importTestCasesCallable()"); + } + + public OperationCallable + exportTestCasesOperationCallable() { + throw new UnsupportedOperationException("Not implemented: exportTestCasesOperationCallable()"); + } + + public UnaryCallable exportTestCasesCallable() { + throw new UnsupportedOperationException("Not implemented: exportTestCasesCallable()"); + } + + public UnaryCallable + listTestCaseResultsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listTestCaseResultsPagedCallable()"); + } + + public UnaryCallable + listTestCaseResultsCallable() { + throw new UnsupportedOperationException("Not implemented: listTestCaseResultsCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/TestCasesStubSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/TestCasesStubSettings.java new file mode 100644 index 000000000..d2023b72b --- /dev/null +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/TestCasesStubSettings.java @@ -0,0 +1,868 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.cx.v3beta1.stub; + +import static com.google.cloud.dialogflow.cx.v3beta1.TestCasesClient.ListTestCaseResultsPagedResponse; +import static com.google.cloud.dialogflow.cx.v3beta1.TestCasesClient.ListTestCasesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest; +import com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadata; +import com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest; +import com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponse; +import com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest; +import com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse; +import com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata; +import com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse; +import com.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata; +import com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse; +import com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse; +import com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse; +import com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseMetadata; +import com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest; +import com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse; +import com.google.cloud.dialogflow.cx.v3beta1.TestCase; +import com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult; +import com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link TestCasesStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (dialogflow.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of batchDeleteTestCases to 30 seconds: + * + *

{@code
+ * TestCasesStubSettings.Builder testCasesSettingsBuilder = TestCasesStubSettings.newBuilder();
+ * testCasesSettingsBuilder
+ *     .batchDeleteTestCasesSettings()
+ *     .setRetrySettings(
+ *         testCasesSettingsBuilder
+ *             .batchDeleteTestCasesSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * TestCasesStubSettings testCasesSettings = testCasesSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class TestCasesStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder() + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/dialogflow") + .build(); + + private final PagedCallSettings< + ListTestCasesRequest, ListTestCasesResponse, ListTestCasesPagedResponse> + listTestCasesSettings; + private final UnaryCallSettings batchDeleteTestCasesSettings; + private final UnaryCallSettings getTestCaseSettings; + private final UnaryCallSettings createTestCaseSettings; + private final UnaryCallSettings updateTestCaseSettings; + private final UnaryCallSettings runTestCaseSettings; + private final OperationCallSettings + runTestCaseOperationSettings; + private final UnaryCallSettings batchRunTestCasesSettings; + private final OperationCallSettings< + BatchRunTestCasesRequest, BatchRunTestCasesResponse, BatchRunTestCasesMetadata> + batchRunTestCasesOperationSettings; + private final UnaryCallSettings + calculateCoverageSettings; + private final UnaryCallSettings importTestCasesSettings; + private final OperationCallSettings< + ImportTestCasesRequest, ImportTestCasesResponse, ImportTestCasesMetadata> + importTestCasesOperationSettings; + private final UnaryCallSettings exportTestCasesSettings; + private final OperationCallSettings< + ExportTestCasesRequest, ExportTestCasesResponse, ExportTestCasesMetadata> + exportTestCasesOperationSettings; + private final PagedCallSettings< + ListTestCaseResultsRequest, ListTestCaseResultsResponse, ListTestCaseResultsPagedResponse> + listTestCaseResultsSettings; + + private static final PagedListDescriptor + LIST_TEST_CASES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListTestCasesRequest injectToken(ListTestCasesRequest payload, String token) { + return ListTestCasesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListTestCasesRequest injectPageSize(ListTestCasesRequest payload, int pageSize) { + return ListTestCasesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListTestCasesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListTestCasesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListTestCasesResponse payload) { + return payload.getTestCasesList() == null + ? ImmutableList.of() + : payload.getTestCasesList(); + } + }; + + private static final PagedListDescriptor< + ListTestCaseResultsRequest, ListTestCaseResultsResponse, TestCaseResult> + LIST_TEST_CASE_RESULTS_PAGE_STR_DESC = + new PagedListDescriptor< + ListTestCaseResultsRequest, ListTestCaseResultsResponse, TestCaseResult>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListTestCaseResultsRequest injectToken( + ListTestCaseResultsRequest payload, String token) { + return ListTestCaseResultsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListTestCaseResultsRequest injectPageSize( + ListTestCaseResultsRequest payload, int pageSize) { + return ListTestCaseResultsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListTestCaseResultsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListTestCaseResultsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListTestCaseResultsResponse payload) { + return payload.getTestCaseResultsList() == null + ? ImmutableList.of() + : payload.getTestCaseResultsList(); + } + }; + + private static final PagedListResponseFactory< + ListTestCasesRequest, ListTestCasesResponse, ListTestCasesPagedResponse> + LIST_TEST_CASES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListTestCasesRequest, ListTestCasesResponse, ListTestCasesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListTestCasesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_TEST_CASES_PAGE_STR_DESC, request, context); + return ListTestCasesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListTestCaseResultsRequest, ListTestCaseResultsResponse, ListTestCaseResultsPagedResponse> + LIST_TEST_CASE_RESULTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListTestCaseResultsRequest, + ListTestCaseResultsResponse, + ListTestCaseResultsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListTestCaseResultsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_TEST_CASE_RESULTS_PAGE_STR_DESC, request, context); + return ListTestCaseResultsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to listTestCases. */ + public PagedCallSettings + listTestCasesSettings() { + return listTestCasesSettings; + } + + /** Returns the object with the settings used for calls to batchDeleteTestCases. */ + public UnaryCallSettings batchDeleteTestCasesSettings() { + return batchDeleteTestCasesSettings; + } + + /** Returns the object with the settings used for calls to getTestCase. */ + public UnaryCallSettings getTestCaseSettings() { + return getTestCaseSettings; + } + + /** Returns the object with the settings used for calls to createTestCase. */ + public UnaryCallSettings createTestCaseSettings() { + return createTestCaseSettings; + } + + /** Returns the object with the settings used for calls to updateTestCase. */ + public UnaryCallSettings updateTestCaseSettings() { + return updateTestCaseSettings; + } + + /** Returns the object with the settings used for calls to runTestCase. */ + public UnaryCallSettings runTestCaseSettings() { + return runTestCaseSettings; + } + + /** Returns the object with the settings used for calls to runTestCase. */ + public OperationCallSettings + runTestCaseOperationSettings() { + return runTestCaseOperationSettings; + } + + /** Returns the object with the settings used for calls to batchRunTestCases. */ + public UnaryCallSettings batchRunTestCasesSettings() { + return batchRunTestCasesSettings; + } + + /** Returns the object with the settings used for calls to batchRunTestCases. */ + public OperationCallSettings< + BatchRunTestCasesRequest, BatchRunTestCasesResponse, BatchRunTestCasesMetadata> + batchRunTestCasesOperationSettings() { + return batchRunTestCasesOperationSettings; + } + + /** Returns the object with the settings used for calls to calculateCoverage. */ + public UnaryCallSettings + calculateCoverageSettings() { + return calculateCoverageSettings; + } + + /** Returns the object with the settings used for calls to importTestCases. */ + public UnaryCallSettings importTestCasesSettings() { + return importTestCasesSettings; + } + + /** Returns the object with the settings used for calls to importTestCases. */ + public OperationCallSettings< + ImportTestCasesRequest, ImportTestCasesResponse, ImportTestCasesMetadata> + importTestCasesOperationSettings() { + return importTestCasesOperationSettings; + } + + /** Returns the object with the settings used for calls to exportTestCases. */ + public UnaryCallSettings exportTestCasesSettings() { + return exportTestCasesSettings; + } + + /** Returns the object with the settings used for calls to exportTestCases. */ + public OperationCallSettings< + ExportTestCasesRequest, ExportTestCasesResponse, ExportTestCasesMetadata> + exportTestCasesOperationSettings() { + return exportTestCasesOperationSettings; + } + + /** Returns the object with the settings used for calls to listTestCaseResults. */ + public PagedCallSettings< + ListTestCaseResultsRequest, ListTestCaseResultsResponse, ListTestCaseResultsPagedResponse> + listTestCaseResultsSettings() { + return listTestCaseResultsSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public TestCasesStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcTestCasesStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "dialogflow.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken("gapic", GaxProperties.getLibraryVersion(TestCasesStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected TestCasesStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listTestCasesSettings = settingsBuilder.listTestCasesSettings().build(); + batchDeleteTestCasesSettings = settingsBuilder.batchDeleteTestCasesSettings().build(); + getTestCaseSettings = settingsBuilder.getTestCaseSettings().build(); + createTestCaseSettings = settingsBuilder.createTestCaseSettings().build(); + updateTestCaseSettings = settingsBuilder.updateTestCaseSettings().build(); + runTestCaseSettings = settingsBuilder.runTestCaseSettings().build(); + runTestCaseOperationSettings = settingsBuilder.runTestCaseOperationSettings().build(); + batchRunTestCasesSettings = settingsBuilder.batchRunTestCasesSettings().build(); + batchRunTestCasesOperationSettings = + settingsBuilder.batchRunTestCasesOperationSettings().build(); + calculateCoverageSettings = settingsBuilder.calculateCoverageSettings().build(); + importTestCasesSettings = settingsBuilder.importTestCasesSettings().build(); + importTestCasesOperationSettings = settingsBuilder.importTestCasesOperationSettings().build(); + exportTestCasesSettings = settingsBuilder.exportTestCasesSettings().build(); + exportTestCasesOperationSettings = settingsBuilder.exportTestCasesOperationSettings().build(); + listTestCaseResultsSettings = settingsBuilder.listTestCaseResultsSettings().build(); + } + + /** Builder for TestCasesStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + ListTestCasesRequest, ListTestCasesResponse, ListTestCasesPagedResponse> + listTestCasesSettings; + private final UnaryCallSettings.Builder + batchDeleteTestCasesSettings; + private final UnaryCallSettings.Builder getTestCaseSettings; + private final UnaryCallSettings.Builder createTestCaseSettings; + private final UnaryCallSettings.Builder updateTestCaseSettings; + private final UnaryCallSettings.Builder runTestCaseSettings; + private final OperationCallSettings.Builder< + RunTestCaseRequest, RunTestCaseResponse, RunTestCaseMetadata> + runTestCaseOperationSettings; + private final UnaryCallSettings.Builder + batchRunTestCasesSettings; + private final OperationCallSettings.Builder< + BatchRunTestCasesRequest, BatchRunTestCasesResponse, BatchRunTestCasesMetadata> + batchRunTestCasesOperationSettings; + private final UnaryCallSettings.Builder + calculateCoverageSettings; + private final UnaryCallSettings.Builder + importTestCasesSettings; + private final OperationCallSettings.Builder< + ImportTestCasesRequest, ImportTestCasesResponse, ImportTestCasesMetadata> + importTestCasesOperationSettings; + private final UnaryCallSettings.Builder + exportTestCasesSettings; + private final OperationCallSettings.Builder< + ExportTestCasesRequest, ExportTestCasesResponse, ExportTestCasesMetadata> + exportTestCasesOperationSettings; + private final PagedCallSettings.Builder< + ListTestCaseResultsRequest, + ListTestCaseResultsResponse, + ListTestCaseResultsPagedResponse> + listTestCaseResultsSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + listTestCasesSettings = PagedCallSettings.newBuilder(LIST_TEST_CASES_PAGE_STR_FACT); + batchDeleteTestCasesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getTestCaseSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createTestCaseSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateTestCaseSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + runTestCaseSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + runTestCaseOperationSettings = OperationCallSettings.newBuilder(); + batchRunTestCasesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + batchRunTestCasesOperationSettings = OperationCallSettings.newBuilder(); + calculateCoverageSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + importTestCasesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + importTestCasesOperationSettings = OperationCallSettings.newBuilder(); + exportTestCasesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + exportTestCasesOperationSettings = OperationCallSettings.newBuilder(); + listTestCaseResultsSettings = + PagedCallSettings.newBuilder(LIST_TEST_CASE_RESULTS_PAGE_STR_FACT); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listTestCasesSettings, + batchDeleteTestCasesSettings, + getTestCaseSettings, + createTestCaseSettings, + updateTestCaseSettings, + runTestCaseSettings, + batchRunTestCasesSettings, + calculateCoverageSettings, + importTestCasesSettings, + exportTestCasesSettings, + listTestCaseResultsSettings); + initDefaults(this); + } + + protected Builder(TestCasesStubSettings settings) { + super(settings); + + listTestCasesSettings = settings.listTestCasesSettings.toBuilder(); + batchDeleteTestCasesSettings = settings.batchDeleteTestCasesSettings.toBuilder(); + getTestCaseSettings = settings.getTestCaseSettings.toBuilder(); + createTestCaseSettings = settings.createTestCaseSettings.toBuilder(); + updateTestCaseSettings = settings.updateTestCaseSettings.toBuilder(); + runTestCaseSettings = settings.runTestCaseSettings.toBuilder(); + runTestCaseOperationSettings = settings.runTestCaseOperationSettings.toBuilder(); + batchRunTestCasesSettings = settings.batchRunTestCasesSettings.toBuilder(); + batchRunTestCasesOperationSettings = settings.batchRunTestCasesOperationSettings.toBuilder(); + calculateCoverageSettings = settings.calculateCoverageSettings.toBuilder(); + importTestCasesSettings = settings.importTestCasesSettings.toBuilder(); + importTestCasesOperationSettings = settings.importTestCasesOperationSettings.toBuilder(); + exportTestCasesSettings = settings.exportTestCasesSettings.toBuilder(); + exportTestCasesOperationSettings = settings.exportTestCasesOperationSettings.toBuilder(); + listTestCaseResultsSettings = settings.listTestCaseResultsSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listTestCasesSettings, + batchDeleteTestCasesSettings, + getTestCaseSettings, + createTestCaseSettings, + updateTestCaseSettings, + runTestCaseSettings, + batchRunTestCasesSettings, + calculateCoverageSettings, + importTestCasesSettings, + exportTestCasesSettings, + listTestCaseResultsSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .listTestCasesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .batchDeleteTestCasesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getTestCaseSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createTestCaseSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateTestCaseSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .runTestCaseSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .batchRunTestCasesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .calculateCoverageSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .importTestCasesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .exportTestCasesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listTestCaseResultsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .runTestCaseOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(RunTestCaseResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(RunTestCaseMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .batchRunTestCasesOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + BatchRunTestCasesResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + BatchRunTestCasesMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .importTestCasesOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(ImportTestCasesResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(ImportTestCasesMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .exportTestCasesOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(ExportTestCasesResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(ExportTestCasesMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + // NEXT_MAJOR_VER: remove 'throws Exception'. + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to listTestCases. */ + public PagedCallSettings.Builder< + ListTestCasesRequest, ListTestCasesResponse, ListTestCasesPagedResponse> + listTestCasesSettings() { + return listTestCasesSettings; + } + + /** Returns the builder for the settings used for calls to batchDeleteTestCases. */ + public UnaryCallSettings.Builder + batchDeleteTestCasesSettings() { + return batchDeleteTestCasesSettings; + } + + /** Returns the builder for the settings used for calls to getTestCase. */ + public UnaryCallSettings.Builder getTestCaseSettings() { + return getTestCaseSettings; + } + + /** Returns the builder for the settings used for calls to createTestCase. */ + public UnaryCallSettings.Builder createTestCaseSettings() { + return createTestCaseSettings; + } + + /** Returns the builder for the settings used for calls to updateTestCase. */ + public UnaryCallSettings.Builder updateTestCaseSettings() { + return updateTestCaseSettings; + } + + /** Returns the builder for the settings used for calls to runTestCase. */ + public UnaryCallSettings.Builder runTestCaseSettings() { + return runTestCaseSettings; + } + + /** Returns the builder for the settings used for calls to runTestCase. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + RunTestCaseRequest, RunTestCaseResponse, RunTestCaseMetadata> + runTestCaseOperationSettings() { + return runTestCaseOperationSettings; + } + + /** Returns the builder for the settings used for calls to batchRunTestCases. */ + public UnaryCallSettings.Builder + batchRunTestCasesSettings() { + return batchRunTestCasesSettings; + } + + /** Returns the builder for the settings used for calls to batchRunTestCases. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + BatchRunTestCasesRequest, BatchRunTestCasesResponse, BatchRunTestCasesMetadata> + batchRunTestCasesOperationSettings() { + return batchRunTestCasesOperationSettings; + } + + /** Returns the builder for the settings used for calls to calculateCoverage. */ + public UnaryCallSettings.Builder + calculateCoverageSettings() { + return calculateCoverageSettings; + } + + /** Returns the builder for the settings used for calls to importTestCases. */ + public UnaryCallSettings.Builder importTestCasesSettings() { + return importTestCasesSettings; + } + + /** Returns the builder for the settings used for calls to importTestCases. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + ImportTestCasesRequest, ImportTestCasesResponse, ImportTestCasesMetadata> + importTestCasesOperationSettings() { + return importTestCasesOperationSettings; + } + + /** Returns the builder for the settings used for calls to exportTestCases. */ + public UnaryCallSettings.Builder exportTestCasesSettings() { + return exportTestCasesSettings; + } + + /** Returns the builder for the settings used for calls to exportTestCases. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + ExportTestCasesRequest, ExportTestCasesResponse, ExportTestCasesMetadata> + exportTestCasesOperationSettings() { + return exportTestCasesOperationSettings; + } + + /** Returns the builder for the settings used for calls to listTestCaseResults. */ + public PagedCallSettings.Builder< + ListTestCaseResultsRequest, + ListTestCaseResultsResponse, + ListTestCaseResultsPagedResponse> + listTestCaseResultsSettings() { + return listTestCaseResultsSettings; + } + + @Override + public TestCasesStubSettings build() throws IOException { + return new TestCasesStubSettings(this); + } + } +} diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClientTest.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClientTest.java index 66d6dc0dd..62858101e 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClientTest.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClientTest.java @@ -34,6 +34,7 @@ import com.google.protobuf.FieldMask; import io.grpc.StatusRuntimeException; import java.io.IOException; +import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.UUID; @@ -184,6 +185,9 @@ public void getAgentTest() throws Exception { .setAvatarUri("avatarUri-428646061") .setSpeechToTextSettings(SpeechToTextSettings.newBuilder().build()) .setStartFlow(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString()) + .setSecuritySettings( + SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]") + .toString()) .setEnableStackdriverLogging(true) .setEnableSpellCorrection(true) .build(); @@ -231,6 +235,9 @@ public void getAgentTest2() throws Exception { .setAvatarUri("avatarUri-428646061") .setSpeechToTextSettings(SpeechToTextSettings.newBuilder().build()) .setStartFlow(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString()) + .setSecuritySettings( + SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]") + .toString()) .setEnableStackdriverLogging(true) .setEnableSpellCorrection(true) .build(); @@ -278,6 +285,9 @@ public void createAgentTest() throws Exception { .setAvatarUri("avatarUri-428646061") .setSpeechToTextSettings(SpeechToTextSettings.newBuilder().build()) .setStartFlow(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString()) + .setSecuritySettings( + SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]") + .toString()) .setEnableStackdriverLogging(true) .setEnableSpellCorrection(true) .build(); @@ -328,6 +338,9 @@ public void createAgentTest2() throws Exception { .setAvatarUri("avatarUri-428646061") .setSpeechToTextSettings(SpeechToTextSettings.newBuilder().build()) .setStartFlow(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString()) + .setSecuritySettings( + SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]") + .toString()) .setEnableStackdriverLogging(true) .setEnableSpellCorrection(true) .build(); @@ -378,6 +391,9 @@ public void updateAgentTest() throws Exception { .setAvatarUri("avatarUri-428646061") .setSpeechToTextSettings(SpeechToTextSettings.newBuilder().build()) .setStartFlow(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString()) + .setSecuritySettings( + SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]") + .toString()) .setEnableStackdriverLogging(true) .setEnableSpellCorrection(true) .build(); @@ -585,4 +601,134 @@ public void restoreAgentExceptionTest() throws Exception { Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } + + @Test + public void validateAgentTest() throws Exception { + AgentValidationResult expectedResponse = + AgentValidationResult.newBuilder() + .setName(AgentValidationResultName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .addAllFlowValidationResults(new ArrayList()) + .build(); + mockAgents.addResponse(expectedResponse); + + ValidateAgentRequest request = + ValidateAgentRequest.newBuilder() + .setName(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setLanguageCode("languageCode-2092349083") + .build(); + + AgentValidationResult actualResponse = client.validateAgent(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAgents.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ValidateAgentRequest actualRequest = ((ValidateAgentRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getLanguageCode(), actualRequest.getLanguageCode()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void validateAgentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAgents.addException(exception); + + try { + ValidateAgentRequest request = + ValidateAgentRequest.newBuilder() + .setName(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setLanguageCode("languageCode-2092349083") + .build(); + client.validateAgent(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAgentValidationResultTest() throws Exception { + AgentValidationResult expectedResponse = + AgentValidationResult.newBuilder() + .setName(AgentValidationResultName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .addAllFlowValidationResults(new ArrayList()) + .build(); + mockAgents.addResponse(expectedResponse); + + AgentValidationResultName name = + AgentValidationResultName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + + AgentValidationResult actualResponse = client.getAgentValidationResult(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAgents.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAgentValidationResultRequest actualRequest = + ((GetAgentValidationResultRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAgentValidationResultExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAgents.addException(exception); + + try { + AgentValidationResultName name = + AgentValidationResultName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + client.getAgentValidationResult(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAgentValidationResultTest2() throws Exception { + AgentValidationResult expectedResponse = + AgentValidationResult.newBuilder() + .setName(AgentValidationResultName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .addAllFlowValidationResults(new ArrayList()) + .build(); + mockAgents.addResponse(expectedResponse); + + String name = "name3373707"; + + AgentValidationResult actualResponse = client.getAgentValidationResult(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAgents.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAgentValidationResultRequest actualRequest = + ((GetAgentValidationResultRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAgentValidationResultExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAgents.addException(exception); + + try { + String name = "name3373707"; + client.getAgentValidationResult(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } } diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsClientTest.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsClientTest.java deleted file mode 100644 index ce993e9cc..000000000 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsClientTest.java +++ /dev/null @@ -1,721 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.dialogflow.cx.v3beta1; - -import static com.google.cloud.dialogflow.cx.v3beta1.ExperimentsClient.ListExperimentsPagedResponse; - -import com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.testing.LocalChannelProvider; -import com.google.api.gax.grpc.testing.MockGrpcService; -import com.google.api.gax.grpc.testing.MockServiceHelper; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.common.collect.Lists; -import com.google.protobuf.AbstractMessage; -import com.google.protobuf.Duration; -import com.google.protobuf.Empty; -import com.google.protobuf.FieldMask; -import com.google.protobuf.Timestamp; -import io.grpc.StatusRuntimeException; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import javax.annotation.Generated; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -@Generated("by gapic-generator-java") -public class ExperimentsClientTest { - private static MockExperiments mockExperiments; - private static MockServiceHelper mockServiceHelper; - private ExperimentsClient client; - private LocalChannelProvider channelProvider; - - @BeforeClass - public static void startStaticServer() { - mockExperiments = new MockExperiments(); - mockServiceHelper = - new MockServiceHelper( - UUID.randomUUID().toString(), Arrays.asList(mockExperiments)); - mockServiceHelper.start(); - } - - @AfterClass - public static void stopServer() { - mockServiceHelper.stop(); - } - - @Before - public void setUp() throws IOException { - mockServiceHelper.reset(); - channelProvider = mockServiceHelper.createChannelProvider(); - ExperimentsSettings settings = - ExperimentsSettings.newBuilder() - .setTransportChannelProvider(channelProvider) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = ExperimentsClient.create(settings); - } - - @After - public void tearDown() throws Exception { - client.close(); - } - - @Test - public void listExperimentsTest() throws Exception { - Experiment responsesElement = Experiment.newBuilder().build(); - ListExperimentsResponse expectedResponse = - ListExperimentsResponse.newBuilder() - .setNextPageToken("") - .addAllExperiments(Arrays.asList(responsesElement)) - .build(); - mockExperiments.addResponse(expectedResponse); - - EnvironmentName parent = - EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]"); - - ListExperimentsPagedResponse pagedListResponse = client.listExperiments(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getExperimentsList().get(0), resources.get(0)); - - List actualRequests = mockExperiments.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListExperimentsRequest actualRequest = ((ListExperimentsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listExperimentsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockExperiments.addException(exception); - - try { - EnvironmentName parent = - EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]"); - client.listExperiments(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listExperimentsTest2() throws Exception { - Experiment responsesElement = Experiment.newBuilder().build(); - ListExperimentsResponse expectedResponse = - ListExperimentsResponse.newBuilder() - .setNextPageToken("") - .addAllExperiments(Arrays.asList(responsesElement)) - .build(); - mockExperiments.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListExperimentsPagedResponse pagedListResponse = client.listExperiments(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getExperimentsList().get(0), resources.get(0)); - - List actualRequests = mockExperiments.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListExperimentsRequest actualRequest = ((ListExperimentsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listExperimentsExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockExperiments.addException(exception); - - try { - String parent = "parent-995424086"; - client.listExperiments(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getExperimentTest() throws Exception { - Experiment expectedResponse = - Experiment.newBuilder() - .setName( - ExperimentName.of( - "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setDefinition(Experiment.Definition.newBuilder().build()) - .setResult(Experiment.Result.newBuilder().build()) - .setCreateTime(Timestamp.newBuilder().build()) - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setLastUpdateTime(Timestamp.newBuilder().build()) - .setExperimentLength(Duration.newBuilder().build()) - .addAllVariantsHistory(new ArrayList()) - .build(); - mockExperiments.addResponse(expectedResponse); - - ExperimentName name = - ExperimentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]"); - - Experiment actualResponse = client.getExperiment(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockExperiments.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetExperimentRequest actualRequest = ((GetExperimentRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getExperimentExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockExperiments.addException(exception); - - try { - ExperimentName name = - ExperimentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]"); - client.getExperiment(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getExperimentTest2() throws Exception { - Experiment expectedResponse = - Experiment.newBuilder() - .setName( - ExperimentName.of( - "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setDefinition(Experiment.Definition.newBuilder().build()) - .setResult(Experiment.Result.newBuilder().build()) - .setCreateTime(Timestamp.newBuilder().build()) - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setLastUpdateTime(Timestamp.newBuilder().build()) - .setExperimentLength(Duration.newBuilder().build()) - .addAllVariantsHistory(new ArrayList()) - .build(); - mockExperiments.addResponse(expectedResponse); - - String name = "name3373707"; - - Experiment actualResponse = client.getExperiment(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockExperiments.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetExperimentRequest actualRequest = ((GetExperimentRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getExperimentExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockExperiments.addException(exception); - - try { - String name = "name3373707"; - client.getExperiment(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createExperimentTest() throws Exception { - Experiment expectedResponse = - Experiment.newBuilder() - .setName( - ExperimentName.of( - "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setDefinition(Experiment.Definition.newBuilder().build()) - .setResult(Experiment.Result.newBuilder().build()) - .setCreateTime(Timestamp.newBuilder().build()) - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setLastUpdateTime(Timestamp.newBuilder().build()) - .setExperimentLength(Duration.newBuilder().build()) - .addAllVariantsHistory(new ArrayList()) - .build(); - mockExperiments.addResponse(expectedResponse); - - EnvironmentName parent = - EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]"); - Experiment experiment = Experiment.newBuilder().build(); - - Experiment actualResponse = client.createExperiment(parent, experiment); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockExperiments.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateExperimentRequest actualRequest = ((CreateExperimentRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(experiment, actualRequest.getExperiment()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createExperimentExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockExperiments.addException(exception); - - try { - EnvironmentName parent = - EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]"); - Experiment experiment = Experiment.newBuilder().build(); - client.createExperiment(parent, experiment); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createExperimentTest2() throws Exception { - Experiment expectedResponse = - Experiment.newBuilder() - .setName( - ExperimentName.of( - "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setDefinition(Experiment.Definition.newBuilder().build()) - .setResult(Experiment.Result.newBuilder().build()) - .setCreateTime(Timestamp.newBuilder().build()) - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setLastUpdateTime(Timestamp.newBuilder().build()) - .setExperimentLength(Duration.newBuilder().build()) - .addAllVariantsHistory(new ArrayList()) - .build(); - mockExperiments.addResponse(expectedResponse); - - String parent = "parent-995424086"; - Experiment experiment = Experiment.newBuilder().build(); - - Experiment actualResponse = client.createExperiment(parent, experiment); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockExperiments.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateExperimentRequest actualRequest = ((CreateExperimentRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(experiment, actualRequest.getExperiment()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createExperimentExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockExperiments.addException(exception); - - try { - String parent = "parent-995424086"; - Experiment experiment = Experiment.newBuilder().build(); - client.createExperiment(parent, experiment); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateExperimentTest() throws Exception { - Experiment expectedResponse = - Experiment.newBuilder() - .setName( - ExperimentName.of( - "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setDefinition(Experiment.Definition.newBuilder().build()) - .setResult(Experiment.Result.newBuilder().build()) - .setCreateTime(Timestamp.newBuilder().build()) - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setLastUpdateTime(Timestamp.newBuilder().build()) - .setExperimentLength(Duration.newBuilder().build()) - .addAllVariantsHistory(new ArrayList()) - .build(); - mockExperiments.addResponse(expectedResponse); - - Experiment experiment = Experiment.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - Experiment actualResponse = client.updateExperiment(experiment, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockExperiments.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateExperimentRequest actualRequest = ((UpdateExperimentRequest) actualRequests.get(0)); - - Assert.assertEquals(experiment, actualRequest.getExperiment()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateExperimentExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockExperiments.addException(exception); - - try { - Experiment experiment = Experiment.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateExperiment(experiment, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteExperimentTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockExperiments.addResponse(expectedResponse); - - ExperimentName name = - ExperimentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]"); - - client.deleteExperiment(name); - - List actualRequests = mockExperiments.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteExperimentRequest actualRequest = ((DeleteExperimentRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteExperimentExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockExperiments.addException(exception); - - try { - ExperimentName name = - ExperimentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]"); - client.deleteExperiment(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteExperimentTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockExperiments.addResponse(expectedResponse); - - String name = "name3373707"; - - client.deleteExperiment(name); - - List actualRequests = mockExperiments.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteExperimentRequest actualRequest = ((DeleteExperimentRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteExperimentExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockExperiments.addException(exception); - - try { - String name = "name3373707"; - client.deleteExperiment(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void startExperimentTest() throws Exception { - Experiment expectedResponse = - Experiment.newBuilder() - .setName( - ExperimentName.of( - "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setDefinition(Experiment.Definition.newBuilder().build()) - .setResult(Experiment.Result.newBuilder().build()) - .setCreateTime(Timestamp.newBuilder().build()) - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setLastUpdateTime(Timestamp.newBuilder().build()) - .setExperimentLength(Duration.newBuilder().build()) - .addAllVariantsHistory(new ArrayList()) - .build(); - mockExperiments.addResponse(expectedResponse); - - ExperimentName name = - ExperimentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]"); - - Experiment actualResponse = client.startExperiment(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockExperiments.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - StartExperimentRequest actualRequest = ((StartExperimentRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void startExperimentExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockExperiments.addException(exception); - - try { - ExperimentName name = - ExperimentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]"); - client.startExperiment(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void startExperimentTest2() throws Exception { - Experiment expectedResponse = - Experiment.newBuilder() - .setName( - ExperimentName.of( - "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setDefinition(Experiment.Definition.newBuilder().build()) - .setResult(Experiment.Result.newBuilder().build()) - .setCreateTime(Timestamp.newBuilder().build()) - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setLastUpdateTime(Timestamp.newBuilder().build()) - .setExperimentLength(Duration.newBuilder().build()) - .addAllVariantsHistory(new ArrayList()) - .build(); - mockExperiments.addResponse(expectedResponse); - - String name = "name3373707"; - - Experiment actualResponse = client.startExperiment(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockExperiments.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - StartExperimentRequest actualRequest = ((StartExperimentRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void startExperimentExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockExperiments.addException(exception); - - try { - String name = "name3373707"; - client.startExperiment(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void stopExperimentTest() throws Exception { - Experiment expectedResponse = - Experiment.newBuilder() - .setName( - ExperimentName.of( - "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setDefinition(Experiment.Definition.newBuilder().build()) - .setResult(Experiment.Result.newBuilder().build()) - .setCreateTime(Timestamp.newBuilder().build()) - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setLastUpdateTime(Timestamp.newBuilder().build()) - .setExperimentLength(Duration.newBuilder().build()) - .addAllVariantsHistory(new ArrayList()) - .build(); - mockExperiments.addResponse(expectedResponse); - - ExperimentName name = - ExperimentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]"); - - Experiment actualResponse = client.stopExperiment(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockExperiments.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - StopExperimentRequest actualRequest = ((StopExperimentRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void stopExperimentExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockExperiments.addException(exception); - - try { - ExperimentName name = - ExperimentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]"); - client.stopExperiment(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void stopExperimentTest2() throws Exception { - Experiment expectedResponse = - Experiment.newBuilder() - .setName( - ExperimentName.of( - "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setDefinition(Experiment.Definition.newBuilder().build()) - .setResult(Experiment.Result.newBuilder().build()) - .setCreateTime(Timestamp.newBuilder().build()) - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setLastUpdateTime(Timestamp.newBuilder().build()) - .setExperimentLength(Duration.newBuilder().build()) - .addAllVariantsHistory(new ArrayList()) - .build(); - mockExperiments.addResponse(expectedResponse); - - String name = "name3373707"; - - Experiment actualResponse = client.stopExperiment(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockExperiments.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - StopExperimentRequest actualRequest = ((StopExperimentRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void stopExperimentExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockExperiments.addException(exception); - - try { - String name = "name3373707"; - client.stopExperiment(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } -} diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsClientTest.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsClientTest.java index 0d6a45d82..56a5daeb7 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsClientTest.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsClientTest.java @@ -32,6 +32,7 @@ import com.google.protobuf.Any; import com.google.protobuf.Empty; import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; import io.grpc.StatusRuntimeException; import java.io.IOException; import java.util.ArrayList; @@ -548,4 +549,143 @@ public void trainFlowExceptionTest2() throws Exception { Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } + + @Test + public void validateFlowTest() throws Exception { + FlowValidationResult expectedResponse = + FlowValidationResult.newBuilder() + .setName( + FlowValidationResultName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]") + .toString()) + .addAllValidationMessages(new ArrayList()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockFlows.addResponse(expectedResponse); + + ValidateFlowRequest request = + ValidateFlowRequest.newBuilder() + .setName(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString()) + .setLanguageCode("languageCode-2092349083") + .build(); + + FlowValidationResult actualResponse = client.validateFlow(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockFlows.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ValidateFlowRequest actualRequest = ((ValidateFlowRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getLanguageCode(), actualRequest.getLanguageCode()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void validateFlowExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFlows.addException(exception); + + try { + ValidateFlowRequest request = + ValidateFlowRequest.newBuilder() + .setName(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString()) + .setLanguageCode("languageCode-2092349083") + .build(); + client.validateFlow(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getFlowValidationResultTest() throws Exception { + FlowValidationResult expectedResponse = + FlowValidationResult.newBuilder() + .setName( + FlowValidationResultName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]") + .toString()) + .addAllValidationMessages(new ArrayList()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockFlows.addResponse(expectedResponse); + + FlowValidationResultName name = + FlowValidationResultName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"); + + FlowValidationResult actualResponse = client.getFlowValidationResult(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockFlows.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetFlowValidationResultRequest actualRequest = + ((GetFlowValidationResultRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getFlowValidationResultExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFlows.addException(exception); + + try { + FlowValidationResultName name = + FlowValidationResultName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"); + client.getFlowValidationResult(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getFlowValidationResultTest2() throws Exception { + FlowValidationResult expectedResponse = + FlowValidationResult.newBuilder() + .setName( + FlowValidationResultName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]") + .toString()) + .addAllValidationMessages(new ArrayList()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockFlows.addResponse(expectedResponse); + + String name = "name3373707"; + + FlowValidationResult actualResponse = client.getFlowValidationResult(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockFlows.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetFlowValidationResultRequest actualRequest = + ((GetFlowValidationResultRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getFlowValidationResultExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFlows.addException(exception); + + try { + String name = "name3373707"; + client.getFlowValidationResult(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } } diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockAgentsImpl.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockAgentsImpl.java index 491a3fa1a..88924e30e 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockAgentsImpl.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockAgentsImpl.java @@ -159,4 +159,35 @@ public void restoreAgent( responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } } + + @Override + public void validateAgent( + ValidateAgentRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof AgentValidationResult) { + requests.add(request); + responseObserver.onNext(((AgentValidationResult) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void getAgentValidationResult( + GetAgentValidationResultRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof AgentValidationResult) { + requests.add(request); + responseObserver.onNext(((AgentValidationResult) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } } diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockFlowsImpl.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockFlowsImpl.java index ab7b52e81..248139ec0 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockFlowsImpl.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockFlowsImpl.java @@ -144,4 +144,35 @@ public void trainFlow(TrainFlowRequest request, StreamObserver respon responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } } + + @Override + public void validateFlow( + ValidateFlowRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof FlowValidationResult) { + requests.add(request); + responseObserver.onNext(((FlowValidationResult) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void getFlowValidationResult( + GetFlowValidationResultRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof FlowValidationResult) { + requests.add(request); + responseObserver.onNext(((FlowValidationResult) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } } diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockExperiments.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockTestCases.java similarity index 88% rename from google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockExperiments.java rename to google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockTestCases.java index 6f017b132..f2f175197 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockExperiments.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockTestCases.java @@ -25,11 +25,11 @@ @BetaApi @Generated("by gapic-generator-java") -public class MockExperiments implements MockGrpcService { - private final MockExperimentsImpl serviceImpl; +public class MockTestCases implements MockGrpcService { + private final MockTestCasesImpl serviceImpl; - public MockExperiments() { - serviceImpl = new MockExperimentsImpl(); + public MockTestCases() { + serviceImpl = new MockTestCasesImpl(); } @Override diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockExperimentsImpl.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockTestCasesImpl.java similarity index 51% rename from google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockExperimentsImpl.java rename to google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockTestCasesImpl.java index dcb58f977..572f090f8 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockExperimentsImpl.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockTestCasesImpl.java @@ -17,7 +17,8 @@ package com.google.cloud.dialogflow.cx.v3beta1; import com.google.api.core.BetaApi; -import com.google.cloud.dialogflow.cx.v3beta1.ExperimentsGrpc.ExperimentsImplBase; +import com.google.cloud.dialogflow.cx.v3beta1.TestCasesGrpc.TestCasesImplBase; +import com.google.longrunning.Operation; import com.google.protobuf.AbstractMessage; import com.google.protobuf.Empty; import io.grpc.stub.StreamObserver; @@ -29,11 +30,11 @@ @BetaApi @Generated("by gapic-generator-java") -public class MockExperimentsImpl extends ExperimentsImplBase { +public class MockTestCasesImpl extends TestCasesImplBase { private List requests; private Queue responses; - public MockExperimentsImpl() { + public MockTestCasesImpl() { requests = new ArrayList<>(); responses = new LinkedList<>(); } @@ -60,12 +61,12 @@ public void reset() { } @Override - public void listExperiments( - ListExperimentsRequest request, StreamObserver responseObserver) { + public void listTestCases( + ListTestCasesRequest request, StreamObserver responseObserver) { Object response = responses.remove(); - if (response instanceof ListExperimentsResponse) { + if (response instanceof ListTestCasesResponse) { requests.add(request); - responseObserver.onNext(((ListExperimentsResponse) response)); + responseObserver.onNext(((ListTestCasesResponse) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); @@ -75,12 +76,12 @@ public void listExperiments( } @Override - public void getExperiment( - GetExperimentRequest request, StreamObserver responseObserver) { + public void batchDeleteTestCases( + BatchDeleteTestCasesRequest request, StreamObserver responseObserver) { Object response = responses.remove(); - if (response instanceof Experiment) { + if (response instanceof Empty) { requests.add(request); - responseObserver.onNext(((Experiment) response)); + responseObserver.onNext(((Empty) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); @@ -90,12 +91,11 @@ public void getExperiment( } @Override - public void createExperiment( - CreateExperimentRequest request, StreamObserver responseObserver) { + public void getTestCase(GetTestCaseRequest request, StreamObserver responseObserver) { Object response = responses.remove(); - if (response instanceof Experiment) { + if (response instanceof TestCase) { requests.add(request); - responseObserver.onNext(((Experiment) response)); + responseObserver.onNext(((TestCase) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); @@ -105,12 +105,12 @@ public void createExperiment( } @Override - public void updateExperiment( - UpdateExperimentRequest request, StreamObserver responseObserver) { + public void createTestCase( + CreateTestCaseRequest request, StreamObserver responseObserver) { Object response = responses.remove(); - if (response instanceof Experiment) { + if (response instanceof TestCase) { requests.add(request); - responseObserver.onNext(((Experiment) response)); + responseObserver.onNext(((TestCase) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); @@ -120,12 +120,72 @@ public void updateExperiment( } @Override - public void deleteExperiment( - DeleteExperimentRequest request, StreamObserver responseObserver) { + public void updateTestCase( + UpdateTestCaseRequest request, StreamObserver responseObserver) { Object response = responses.remove(); - if (response instanceof Empty) { + if (response instanceof TestCase) { requests.add(request); - responseObserver.onNext(((Empty) response)); + responseObserver.onNext(((TestCase) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void runTestCase(RunTestCaseRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void batchRunTestCases( + BatchRunTestCasesRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void calculateCoverage( + CalculateCoverageRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof CalculateCoverageResponse) { + requests.add(request); + responseObserver.onNext(((CalculateCoverageResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void importTestCases( + ImportTestCasesRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); @@ -135,12 +195,12 @@ public void deleteExperiment( } @Override - public void startExperiment( - StartExperimentRequest request, StreamObserver responseObserver) { + public void exportTestCases( + ExportTestCasesRequest request, StreamObserver responseObserver) { Object response = responses.remove(); - if (response instanceof Experiment) { + if (response instanceof Operation) { requests.add(request); - responseObserver.onNext(((Experiment) response)); + responseObserver.onNext(((Operation) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); @@ -150,12 +210,13 @@ public void startExperiment( } @Override - public void stopExperiment( - StopExperimentRequest request, StreamObserver responseObserver) { + public void listTestCaseResults( + ListTestCaseResultsRequest request, + StreamObserver responseObserver) { Object response = responses.remove(); - if (response instanceof Experiment) { + if (response instanceof ListTestCaseResultsResponse) { requests.add(request); - responseObserver.onNext(((Experiment) response)); + responseObserver.onNext(((ListTestCaseResultsResponse) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/TestCasesClientTest.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/TestCasesClientTest.java new file mode 100644 index 000000000..73bf5a59d --- /dev/null +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/TestCasesClientTest.java @@ -0,0 +1,852 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.cx.v3beta1; + +import static com.google.cloud.dialogflow.cx.v3beta1.TestCasesClient.ListTestCaseResultsPagedResponse; +import static com.google.cloud.dialogflow.cx.v3beta1.TestCasesClient.ListTestCasesPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class TestCasesClientTest { + private static MockServiceHelper mockServiceHelper; + private TestCasesClient client; + private static MockTestCases mockTestCases; + private LocalChannelProvider channelProvider; + + @BeforeClass + public static void startStaticServer() { + mockTestCases = new MockTestCases(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockTestCases)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + TestCasesSettings settings = + TestCasesSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = TestCasesClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void listTestCasesTest() throws Exception { + TestCase responsesElement = TestCase.newBuilder().build(); + ListTestCasesResponse expectedResponse = + ListTestCasesResponse.newBuilder() + .setNextPageToken("") + .addAllTestCases(Arrays.asList(responsesElement)) + .build(); + mockTestCases.addResponse(expectedResponse); + + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + + ListTestCasesPagedResponse pagedListResponse = client.listTestCases(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getTestCasesList().get(0), resources.get(0)); + + List actualRequests = mockTestCases.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListTestCasesRequest actualRequest = ((ListTestCasesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listTestCasesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTestCases.addException(exception); + + try { + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + client.listTestCases(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listTestCasesTest2() throws Exception { + TestCase responsesElement = TestCase.newBuilder().build(); + ListTestCasesResponse expectedResponse = + ListTestCasesResponse.newBuilder() + .setNextPageToken("") + .addAllTestCases(Arrays.asList(responsesElement)) + .build(); + mockTestCases.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListTestCasesPagedResponse pagedListResponse = client.listTestCases(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getTestCasesList().get(0), resources.get(0)); + + List actualRequests = mockTestCases.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListTestCasesRequest actualRequest = ((ListTestCasesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listTestCasesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTestCases.addException(exception); + + try { + String parent = "parent-995424086"; + client.listTestCases(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void batchDeleteTestCasesTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockTestCases.addResponse(expectedResponse); + + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + + client.batchDeleteTestCases(parent); + + List actualRequests = mockTestCases.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchDeleteTestCasesRequest actualRequest = + ((BatchDeleteTestCasesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void batchDeleteTestCasesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTestCases.addException(exception); + + try { + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + client.batchDeleteTestCases(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void batchDeleteTestCasesTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockTestCases.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + client.batchDeleteTestCases(parent); + + List actualRequests = mockTestCases.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchDeleteTestCasesRequest actualRequest = + ((BatchDeleteTestCasesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void batchDeleteTestCasesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTestCases.addException(exception); + + try { + String parent = "parent-995424086"; + client.batchDeleteTestCases(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getTestCaseTest() throws Exception { + TestCase expectedResponse = + TestCase.newBuilder() + .setName( + TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString()) + .addAllTags(new ArrayList()) + .setDisplayName("displayName1714148973") + .setNotes("notes105008833") + .setTestConfig(TestConfig.newBuilder().build()) + .addAllTestCaseConversationTurns(new ArrayList()) + .setCreationTime(Timestamp.newBuilder().build()) + .setLastTestResult(TestCaseResult.newBuilder().build()) + .build(); + mockTestCases.addResponse(expectedResponse); + + TestCaseName name = TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]"); + + TestCase actualResponse = client.getTestCase(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTestCases.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetTestCaseRequest actualRequest = ((GetTestCaseRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getTestCaseExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTestCases.addException(exception); + + try { + TestCaseName name = TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]"); + client.getTestCase(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getTestCaseTest2() throws Exception { + TestCase expectedResponse = + TestCase.newBuilder() + .setName( + TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString()) + .addAllTags(new ArrayList()) + .setDisplayName("displayName1714148973") + .setNotes("notes105008833") + .setTestConfig(TestConfig.newBuilder().build()) + .addAllTestCaseConversationTurns(new ArrayList()) + .setCreationTime(Timestamp.newBuilder().build()) + .setLastTestResult(TestCaseResult.newBuilder().build()) + .build(); + mockTestCases.addResponse(expectedResponse); + + String name = "name3373707"; + + TestCase actualResponse = client.getTestCase(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTestCases.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetTestCaseRequest actualRequest = ((GetTestCaseRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getTestCaseExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTestCases.addException(exception); + + try { + String name = "name3373707"; + client.getTestCase(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createTestCaseTest() throws Exception { + TestCase expectedResponse = + TestCase.newBuilder() + .setName( + TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString()) + .addAllTags(new ArrayList()) + .setDisplayName("displayName1714148973") + .setNotes("notes105008833") + .setTestConfig(TestConfig.newBuilder().build()) + .addAllTestCaseConversationTurns(new ArrayList()) + .setCreationTime(Timestamp.newBuilder().build()) + .setLastTestResult(TestCaseResult.newBuilder().build()) + .build(); + mockTestCases.addResponse(expectedResponse); + + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + TestCase testCase = TestCase.newBuilder().build(); + + TestCase actualResponse = client.createTestCase(parent, testCase); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTestCases.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateTestCaseRequest actualRequest = ((CreateTestCaseRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(testCase, actualRequest.getTestCase()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createTestCaseExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTestCases.addException(exception); + + try { + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + TestCase testCase = TestCase.newBuilder().build(); + client.createTestCase(parent, testCase); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createTestCaseTest2() throws Exception { + TestCase expectedResponse = + TestCase.newBuilder() + .setName( + TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString()) + .addAllTags(new ArrayList()) + .setDisplayName("displayName1714148973") + .setNotes("notes105008833") + .setTestConfig(TestConfig.newBuilder().build()) + .addAllTestCaseConversationTurns(new ArrayList()) + .setCreationTime(Timestamp.newBuilder().build()) + .setLastTestResult(TestCaseResult.newBuilder().build()) + .build(); + mockTestCases.addResponse(expectedResponse); + + String parent = "parent-995424086"; + TestCase testCase = TestCase.newBuilder().build(); + + TestCase actualResponse = client.createTestCase(parent, testCase); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTestCases.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateTestCaseRequest actualRequest = ((CreateTestCaseRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(testCase, actualRequest.getTestCase()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createTestCaseExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTestCases.addException(exception); + + try { + String parent = "parent-995424086"; + TestCase testCase = TestCase.newBuilder().build(); + client.createTestCase(parent, testCase); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateTestCaseTest() throws Exception { + TestCase expectedResponse = + TestCase.newBuilder() + .setName( + TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString()) + .addAllTags(new ArrayList()) + .setDisplayName("displayName1714148973") + .setNotes("notes105008833") + .setTestConfig(TestConfig.newBuilder().build()) + .addAllTestCaseConversationTurns(new ArrayList()) + .setCreationTime(Timestamp.newBuilder().build()) + .setLastTestResult(TestCaseResult.newBuilder().build()) + .build(); + mockTestCases.addResponse(expectedResponse); + + TestCase testCase = TestCase.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + TestCase actualResponse = client.updateTestCase(testCase, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTestCases.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateTestCaseRequest actualRequest = ((UpdateTestCaseRequest) actualRequests.get(0)); + + Assert.assertEquals(testCase, actualRequest.getTestCase()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateTestCaseExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTestCases.addException(exception); + + try { + TestCase testCase = TestCase.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateTestCase(testCase, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void runTestCaseTest() throws Exception { + RunTestCaseResponse expectedResponse = + RunTestCaseResponse.newBuilder().setResult(TestCaseResult.newBuilder().build()).build(); + Operation resultOperation = + Operation.newBuilder() + .setName("runTestCaseTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockTestCases.addResponse(resultOperation); + + RunTestCaseRequest request = + RunTestCaseRequest.newBuilder() + .setName( + TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString()) + .setEnvironment( + EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]") + .toString()) + .build(); + + RunTestCaseResponse actualResponse = client.runTestCaseAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTestCases.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RunTestCaseRequest actualRequest = ((RunTestCaseRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getEnvironment(), actualRequest.getEnvironment()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void runTestCaseExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTestCases.addException(exception); + + try { + RunTestCaseRequest request = + RunTestCaseRequest.newBuilder() + .setName( + TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString()) + .setEnvironment( + EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]") + .toString()) + .build(); + client.runTestCaseAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void batchRunTestCasesTest() throws Exception { + BatchRunTestCasesResponse expectedResponse = + BatchRunTestCasesResponse.newBuilder() + .addAllResults(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("batchRunTestCasesTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockTestCases.addResponse(resultOperation); + + BatchRunTestCasesRequest request = + BatchRunTestCasesRequest.newBuilder() + .setParent( + TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString()) + .setEnvironment( + EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]") + .toString()) + .addAllTestCases(new ArrayList()) + .build(); + + BatchRunTestCasesResponse actualResponse = client.batchRunTestCasesAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTestCases.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchRunTestCasesRequest actualRequest = ((BatchRunTestCasesRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getEnvironment(), actualRequest.getEnvironment()); + Assert.assertEquals(request.getTestCasesList(), actualRequest.getTestCasesList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void batchRunTestCasesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTestCases.addException(exception); + + try { + BatchRunTestCasesRequest request = + BatchRunTestCasesRequest.newBuilder() + .setParent( + TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString()) + .setEnvironment( + EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]") + .toString()) + .addAllTestCases(new ArrayList()) + .build(); + client.batchRunTestCasesAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void calculateCoverageTest() throws Exception { + CalculateCoverageResponse expectedResponse = + CalculateCoverageResponse.newBuilder() + .setAgent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .build(); + mockTestCases.addResponse(expectedResponse); + + CalculateCoverageRequest request = + CalculateCoverageRequest.newBuilder() + .setAgent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .build(); + + CalculateCoverageResponse actualResponse = client.calculateCoverage(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTestCases.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CalculateCoverageRequest actualRequest = ((CalculateCoverageRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getAgent(), actualRequest.getAgent()); + Assert.assertEquals(request.getType(), actualRequest.getType()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void calculateCoverageExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTestCases.addException(exception); + + try { + CalculateCoverageRequest request = + CalculateCoverageRequest.newBuilder() + .setAgent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .build(); + client.calculateCoverage(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void importTestCasesTest() throws Exception { + ImportTestCasesResponse expectedResponse = + ImportTestCasesResponse.newBuilder().addAllNames(new ArrayList()).build(); + Operation resultOperation = + Operation.newBuilder() + .setName("importTestCasesTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockTestCases.addResponse(resultOperation); + + ImportTestCasesRequest request = + ImportTestCasesRequest.newBuilder() + .setParent( + TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString()) + .build(); + + ImportTestCasesResponse actualResponse = client.importTestCasesAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTestCases.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ImportTestCasesRequest actualRequest = ((ImportTestCasesRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getGcsUri(), actualRequest.getGcsUri()); + Assert.assertEquals(request.getContent(), actualRequest.getContent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void importTestCasesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTestCases.addException(exception); + + try { + ImportTestCasesRequest request = + ImportTestCasesRequest.newBuilder() + .setParent( + TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString()) + .build(); + client.importTestCasesAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void exportTestCasesTest() throws Exception { + ExportTestCasesResponse expectedResponse = ExportTestCasesResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("exportTestCasesTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockTestCases.addResponse(resultOperation); + + ExportTestCasesRequest request = + ExportTestCasesRequest.newBuilder() + .setParent( + TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString()) + .setFilter("filter-1274492040") + .build(); + + ExportTestCasesResponse actualResponse = client.exportTestCasesAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTestCases.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ExportTestCasesRequest actualRequest = ((ExportTestCasesRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getGcsUri(), actualRequest.getGcsUri()); + Assert.assertEquals(request.getDataFormat(), actualRequest.getDataFormat()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void exportTestCasesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTestCases.addException(exception); + + try { + ExportTestCasesRequest request = + ExportTestCasesRequest.newBuilder() + .setParent( + TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString()) + .setFilter("filter-1274492040") + .build(); + client.exportTestCasesAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void listTestCaseResultsTest() throws Exception { + TestCaseResult responsesElement = TestCaseResult.newBuilder().build(); + ListTestCaseResultsResponse expectedResponse = + ListTestCaseResultsResponse.newBuilder() + .setNextPageToken("") + .addAllTestCaseResults(Arrays.asList(responsesElement)) + .build(); + mockTestCases.addResponse(expectedResponse); + + TestCaseName parent = TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]"); + + ListTestCaseResultsPagedResponse pagedListResponse = client.listTestCaseResults(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getTestCaseResultsList().get(0), resources.get(0)); + + List actualRequests = mockTestCases.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListTestCaseResultsRequest actualRequest = ((ListTestCaseResultsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listTestCaseResultsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTestCases.addException(exception); + + try { + TestCaseName parent = TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]"); + client.listTestCaseResults(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listTestCaseResultsTest2() throws Exception { + TestCaseResult responsesElement = TestCaseResult.newBuilder().build(); + ListTestCaseResultsResponse expectedResponse = + ListTestCaseResultsResponse.newBuilder() + .setNextPageToken("") + .addAllTestCaseResults(Arrays.asList(responsesElement)) + .build(); + mockTestCases.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListTestCaseResultsPagedResponse pagedListResponse = client.listTestCaseResults(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getTestCaseResultsList().get(0), resources.get(0)); + + List actualRequests = mockTestCases.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListTestCaseResultsRequest actualRequest = ((ListTestCaseResultsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listTestCaseResultsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTestCases.addException(exception); + + try { + String parent = "parent-995424086"; + client.listTestCaseResults(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsGrpc.java b/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsGrpc.java index b1ed19b8f..ce2384512 100644 --- a/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsGrpc.java +++ b/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsGrpc.java @@ -352,6 +352,102 @@ private AgentsGrpc() {} return getRestoreAgentMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest, + com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult> + getValidateAgentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ValidateAgent", + requestType = com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest, + com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult> + getValidateAgentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest, + com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult> + getValidateAgentMethod; + if ((getValidateAgentMethod = AgentsGrpc.getValidateAgentMethod) == null) { + synchronized (AgentsGrpc.class) { + if ((getValidateAgentMethod = AgentsGrpc.getValidateAgentMethod) == null) { + AgentsGrpc.getValidateAgentMethod = + getValidateAgentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ValidateAgent")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult + .getDefaultInstance())) + .setSchemaDescriptor(new AgentsMethodDescriptorSupplier("ValidateAgent")) + .build(); + } + } + } + return getValidateAgentMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest, + com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult> + getGetAgentValidationResultMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetAgentValidationResult", + requestType = com.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest, + com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult> + getGetAgentValidationResultMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest, + com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult> + getGetAgentValidationResultMethod; + if ((getGetAgentValidationResultMethod = AgentsGrpc.getGetAgentValidationResultMethod) + == null) { + synchronized (AgentsGrpc.class) { + if ((getGetAgentValidationResultMethod = AgentsGrpc.getGetAgentValidationResultMethod) + == null) { + AgentsGrpc.getGetAgentValidationResultMethod = + getGetAgentValidationResultMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetAgentValidationResult")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult + .getDefaultInstance())) + .setSchemaDescriptor( + new AgentsMethodDescriptorSupplier("GetAgentValidationResult")) + .build(); + } + } + } + return getGetAgentValidationResultMethod; + } + /** Creates a new async stub that supports all call types for the service */ public static AgentsStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = @@ -498,6 +594,37 @@ public void restoreAgent( asyncUnimplementedUnaryCall(getRestoreAgentMethod(), responseObserver); } + /** + * + * + *
+     * 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.
+     * 
+ */ + public void validateAgent( + com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getValidateAgentMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets the latest agent validation result. Agent validation is performed
+     * when ValidateAgent is called.
+     * 
+ */ + public void getAgentValidationResult( + com.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getGetAgentValidationResultMethod(), responseObserver); + } + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) @@ -544,6 +671,20 @@ public final io.grpc.ServerServiceDefinition bindService() { new MethodHandlers< com.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest, com.google.longrunning.Operation>(this, METHODID_RESTORE_AGENT))) + .addMethod( + getValidateAgentMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest, + com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult>( + this, METHODID_VALIDATE_AGENT))) + .addMethod( + getGetAgentValidationResultMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest, + com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult>( + this, METHODID_GET_AGENT_VALIDATION_RESULT))) .build(); } } @@ -678,6 +819,43 @@ public void restoreAgent( request, responseObserver); } + + /** + * + * + *
+     * 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.
+     * 
+ */ + public void validateAgent( + com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getValidateAgentMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets the latest agent validation result. Agent validation is performed
+     * when ValidateAgent is called.
+     * 
+ */ + public void getAgentValidationResult( + com.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetAgentValidationResultMethod(), getCallOptions()), + request, + responseObserver); + } } /** @@ -783,6 +961,34 @@ public com.google.longrunning.Operation restoreAgent( com.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest request) { return blockingUnaryCall(getChannel(), getRestoreAgentMethod(), getCallOptions(), request); } + + /** + * + * + *
+     * 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.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult validateAgent( + com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest request) { + return blockingUnaryCall(getChannel(), getValidateAgentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets the latest agent validation result. Agent validation is performed
+     * when ValidateAgent is called.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult getAgentValidationResult( + com.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest request) { + return blockingUnaryCall( + getChannel(), getGetAgentValidationResultMethod(), getCallOptions(), request); + } } /** @@ -898,6 +1104,38 @@ protected AgentsFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions ca return futureUnaryCall( getChannel().newCall(getRestoreAgentMethod(), getCallOptions()), request); } + + /** + * + * + *
+     * 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.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult> + validateAgent(com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest request) { + return futureUnaryCall( + getChannel().newCall(getValidateAgentMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets the latest agent validation result. Agent validation is performed
+     * when ValidateAgent is called.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult> + getAgentValidationResult( + com.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetAgentValidationResultMethod(), getCallOptions()), request); + } } private static final int METHODID_LIST_AGENTS = 0; @@ -907,6 +1145,8 @@ protected AgentsFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions ca private static final int METHODID_DELETE_AGENT = 4; private static final int METHODID_EXPORT_AGENT = 5; private static final int METHODID_RESTORE_AGENT = 6; + private static final int METHODID_VALIDATE_AGENT = 7; + private static final int METHODID_GET_AGENT_VALIDATION_RESULT = 8; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -965,6 +1205,20 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_VALIDATE_AGENT: + serviceImpl.validateAgent( + (com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult>) + responseObserver); + break; + case METHODID_GET_AGENT_VALIDATION_RESULT: + serviceImpl.getAgentValidationResult( + (com.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult>) + responseObserver); + break; default: throw new AssertionError(); } @@ -1034,6 +1288,8 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getDeleteAgentMethod()) .addMethod(getExportAgentMethod()) .addMethod(getRestoreAgentMethod()) + .addMethod(getValidateAgentMethod()) + .addMethod(getGetAgentValidationResultMethod()) .build(); } } diff --git a/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsGrpc.java b/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsGrpc.java deleted file mode 100644 index 3a8aed25d..000000000 --- a/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsGrpc.java +++ /dev/null @@ -1,1081 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.google.cloud.dialogflow.cx.v3beta1; - -import static io.grpc.MethodDescriptor.generateFullMethodName; -import static io.grpc.stub.ClientCalls.asyncUnaryCall; -import static io.grpc.stub.ClientCalls.blockingUnaryCall; -import static io.grpc.stub.ClientCalls.futureUnaryCall; -import static io.grpc.stub.ServerCalls.asyncUnaryCall; -import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; - -/** - * - * - *
- * Service for managing [Experiments][google.cloud.dialogflow.cx.v3beta1.Experiment].
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/cloud/dialogflow/cx/v3beta1/experiment.proto") -public final class ExperimentsGrpc { - - private ExperimentsGrpc() {} - - public static final String SERVICE_NAME = "google.cloud.dialogflow.cx.v3beta1.Experiments"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest, - com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse> - getListExperimentsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListExperiments", - requestType = com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest.class, - responseType = com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest, - com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse> - getListExperimentsMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest, - com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse> - getListExperimentsMethod; - if ((getListExperimentsMethod = ExperimentsGrpc.getListExperimentsMethod) == null) { - synchronized (ExperimentsGrpc.class) { - if ((getListExperimentsMethod = ExperimentsGrpc.getListExperimentsMethod) == null) { - ExperimentsGrpc.getListExperimentsMethod = - getListExperimentsMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListExperiments")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new ExperimentsMethodDescriptorSupplier("ListExperiments")) - .build(); - } - } - } - return getListExperimentsMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest, - com.google.cloud.dialogflow.cx.v3beta1.Experiment> - getGetExperimentMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetExperiment", - requestType = com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest.class, - responseType = com.google.cloud.dialogflow.cx.v3beta1.Experiment.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest, - com.google.cloud.dialogflow.cx.v3beta1.Experiment> - getGetExperimentMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest, - com.google.cloud.dialogflow.cx.v3beta1.Experiment> - getGetExperimentMethod; - if ((getGetExperimentMethod = ExperimentsGrpc.getGetExperimentMethod) == null) { - synchronized (ExperimentsGrpc.class) { - if ((getGetExperimentMethod = ExperimentsGrpc.getGetExperimentMethod) == null) { - ExperimentsGrpc.getGetExperimentMethod = - getGetExperimentMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetExperiment")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dialogflow.cx.v3beta1.Experiment - .getDefaultInstance())) - .setSchemaDescriptor(new ExperimentsMethodDescriptorSupplier("GetExperiment")) - .build(); - } - } - } - return getGetExperimentMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest, - com.google.cloud.dialogflow.cx.v3beta1.Experiment> - getCreateExperimentMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateExperiment", - requestType = com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest.class, - responseType = com.google.cloud.dialogflow.cx.v3beta1.Experiment.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest, - com.google.cloud.dialogflow.cx.v3beta1.Experiment> - getCreateExperimentMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest, - com.google.cloud.dialogflow.cx.v3beta1.Experiment> - getCreateExperimentMethod; - if ((getCreateExperimentMethod = ExperimentsGrpc.getCreateExperimentMethod) == null) { - synchronized (ExperimentsGrpc.class) { - if ((getCreateExperimentMethod = ExperimentsGrpc.getCreateExperimentMethod) == null) { - ExperimentsGrpc.getCreateExperimentMethod = - getCreateExperimentMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateExperiment")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dialogflow.cx.v3beta1.Experiment - .getDefaultInstance())) - .setSchemaDescriptor( - new ExperimentsMethodDescriptorSupplier("CreateExperiment")) - .build(); - } - } - } - return getCreateExperimentMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest, - com.google.cloud.dialogflow.cx.v3beta1.Experiment> - getUpdateExperimentMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateExperiment", - requestType = com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest.class, - responseType = com.google.cloud.dialogflow.cx.v3beta1.Experiment.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest, - com.google.cloud.dialogflow.cx.v3beta1.Experiment> - getUpdateExperimentMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest, - com.google.cloud.dialogflow.cx.v3beta1.Experiment> - getUpdateExperimentMethod; - if ((getUpdateExperimentMethod = ExperimentsGrpc.getUpdateExperimentMethod) == null) { - synchronized (ExperimentsGrpc.class) { - if ((getUpdateExperimentMethod = ExperimentsGrpc.getUpdateExperimentMethod) == null) { - ExperimentsGrpc.getUpdateExperimentMethod = - getUpdateExperimentMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateExperiment")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dialogflow.cx.v3beta1.Experiment - .getDefaultInstance())) - .setSchemaDescriptor( - new ExperimentsMethodDescriptorSupplier("UpdateExperiment")) - .build(); - } - } - } - return getUpdateExperimentMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest, com.google.protobuf.Empty> - getDeleteExperimentMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteExperiment", - requestType = com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest.class, - responseType = com.google.protobuf.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest, com.google.protobuf.Empty> - getDeleteExperimentMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest, - com.google.protobuf.Empty> - getDeleteExperimentMethod; - if ((getDeleteExperimentMethod = ExperimentsGrpc.getDeleteExperimentMethod) == null) { - synchronized (ExperimentsGrpc.class) { - if ((getDeleteExperimentMethod = ExperimentsGrpc.getDeleteExperimentMethod) == null) { - ExperimentsGrpc.getDeleteExperimentMethod = - getDeleteExperimentMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteExperiment")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protobuf.Empty.getDefaultInstance())) - .setSchemaDescriptor( - new ExperimentsMethodDescriptorSupplier("DeleteExperiment")) - .build(); - } - } - } - return getDeleteExperimentMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest, - com.google.cloud.dialogflow.cx.v3beta1.Experiment> - getStartExperimentMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "StartExperiment", - requestType = com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest.class, - responseType = com.google.cloud.dialogflow.cx.v3beta1.Experiment.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest, - com.google.cloud.dialogflow.cx.v3beta1.Experiment> - getStartExperimentMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest, - com.google.cloud.dialogflow.cx.v3beta1.Experiment> - getStartExperimentMethod; - if ((getStartExperimentMethod = ExperimentsGrpc.getStartExperimentMethod) == null) { - synchronized (ExperimentsGrpc.class) { - if ((getStartExperimentMethod = ExperimentsGrpc.getStartExperimentMethod) == null) { - ExperimentsGrpc.getStartExperimentMethod = - getStartExperimentMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "StartExperiment")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dialogflow.cx.v3beta1.Experiment - .getDefaultInstance())) - .setSchemaDescriptor( - new ExperimentsMethodDescriptorSupplier("StartExperiment")) - .build(); - } - } - } - return getStartExperimentMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest, - com.google.cloud.dialogflow.cx.v3beta1.Experiment> - getStopExperimentMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "StopExperiment", - requestType = com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest.class, - responseType = com.google.cloud.dialogflow.cx.v3beta1.Experiment.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest, - com.google.cloud.dialogflow.cx.v3beta1.Experiment> - getStopExperimentMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest, - com.google.cloud.dialogflow.cx.v3beta1.Experiment> - getStopExperimentMethod; - if ((getStopExperimentMethod = ExperimentsGrpc.getStopExperimentMethod) == null) { - synchronized (ExperimentsGrpc.class) { - if ((getStopExperimentMethod = ExperimentsGrpc.getStopExperimentMethod) == null) { - ExperimentsGrpc.getStopExperimentMethod = - getStopExperimentMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "StopExperiment")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dialogflow.cx.v3beta1.Experiment - .getDefaultInstance())) - .setSchemaDescriptor( - new ExperimentsMethodDescriptorSupplier("StopExperiment")) - .build(); - } - } - } - return getStopExperimentMethod; - } - - /** Creates a new async stub that supports all call types for the service */ - public static ExperimentsStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public ExperimentsStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ExperimentsStub(channel, callOptions); - } - }; - return ExperimentsStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static ExperimentsBlockingStub newBlockingStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public ExperimentsBlockingStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ExperimentsBlockingStub(channel, callOptions); - } - }; - return ExperimentsBlockingStub.newStub(factory, channel); - } - - /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ - public static ExperimentsFutureStub newFutureStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public ExperimentsFutureStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ExperimentsFutureStub(channel, callOptions); - } - }; - return ExperimentsFutureStub.newStub(factory, channel); - } - - /** - * - * - *
-   * Service for managing [Experiments][google.cloud.dialogflow.cx.v3beta1.Experiment].
-   * 
- */ - public abstract static class ExperimentsImplBase implements io.grpc.BindableService { - - /** - * - * - *
-     * Returns the list of all experiments in the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
-     * 
- */ - public void listExperiments( - com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnimplementedUnaryCall(getListExperimentsMethod(), responseObserver); - } - - /** - * - * - *
-     * Retrieves the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment].
-     * 
- */ - public void getExperiment( - com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnimplementedUnaryCall(getGetExperimentMethod(), responseObserver); - } - - /** - * - * - *
-     * Creates an [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment] in the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
-     * 
- */ - public void createExperiment( - com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnimplementedUnaryCall(getCreateExperimentMethod(), responseObserver); - } - - /** - * - * - *
-     * Updates the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment].
-     * 
- */ - public void updateExperiment( - com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnimplementedUnaryCall(getUpdateExperimentMethod(), responseObserver); - } - - /** - * - * - *
-     * Deletes the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment].
-     * 
- */ - public void deleteExperiment( - com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getDeleteExperimentMethod(), responseObserver); - } - - /** - * - * - *
-     * Starts the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only changes the state of
-     * experiment from PENDING to RUNNING.
-     * 
- */ - public void startExperiment( - com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnimplementedUnaryCall(getStartExperimentMethod(), responseObserver); - } - - /** - * - * - *
-     * Stops the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only changes the state of
-     * experiment from RUNNING to DONE.
-     * 
- */ - public void stopExperiment( - com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnimplementedUnaryCall(getStopExperimentMethod(), responseObserver); - } - - @java.lang.Override - public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getListExperimentsMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest, - com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse>( - this, METHODID_LIST_EXPERIMENTS))) - .addMethod( - getGetExperimentMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest, - com.google.cloud.dialogflow.cx.v3beta1.Experiment>( - this, METHODID_GET_EXPERIMENT))) - .addMethod( - getCreateExperimentMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest, - com.google.cloud.dialogflow.cx.v3beta1.Experiment>( - this, METHODID_CREATE_EXPERIMENT))) - .addMethod( - getUpdateExperimentMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest, - com.google.cloud.dialogflow.cx.v3beta1.Experiment>( - this, METHODID_UPDATE_EXPERIMENT))) - .addMethod( - getDeleteExperimentMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest, - com.google.protobuf.Empty>(this, METHODID_DELETE_EXPERIMENT))) - .addMethod( - getStartExperimentMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest, - com.google.cloud.dialogflow.cx.v3beta1.Experiment>( - this, METHODID_START_EXPERIMENT))) - .addMethod( - getStopExperimentMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest, - com.google.cloud.dialogflow.cx.v3beta1.Experiment>( - this, METHODID_STOP_EXPERIMENT))) - .build(); - } - } - - /** - * - * - *
-   * Service for managing [Experiments][google.cloud.dialogflow.cx.v3beta1.Experiment].
-   * 
- */ - public static final class ExperimentsStub - extends io.grpc.stub.AbstractAsyncStub { - private ExperimentsStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected ExperimentsStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ExperimentsStub(channel, callOptions); - } - - /** - * - * - *
-     * Returns the list of all experiments in the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
-     * 
- */ - public void listExperiments( - com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnaryCall( - getChannel().newCall(getListExperimentsMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Retrieves the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment].
-     * 
- */ - public void getExperiment( - com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnaryCall( - getChannel().newCall(getGetExperimentMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Creates an [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment] in the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
-     * 
- */ - public void createExperiment( - com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnaryCall( - getChannel().newCall(getCreateExperimentMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Updates the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment].
-     * 
- */ - public void updateExperiment( - com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnaryCall( - getChannel().newCall(getUpdateExperimentMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Deletes the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment].
-     * 
- */ - public void deleteExperiment( - com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( - getChannel().newCall(getDeleteExperimentMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Starts the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only changes the state of
-     * experiment from PENDING to RUNNING.
-     * 
- */ - public void startExperiment( - com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnaryCall( - getChannel().newCall(getStartExperimentMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Stops the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only changes the state of
-     * experiment from RUNNING to DONE.
-     * 
- */ - public void stopExperiment( - com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnaryCall( - getChannel().newCall(getStopExperimentMethod(), getCallOptions()), - request, - responseObserver); - } - } - - /** - * - * - *
-   * Service for managing [Experiments][google.cloud.dialogflow.cx.v3beta1.Experiment].
-   * 
- */ - public static final class ExperimentsBlockingStub - extends io.grpc.stub.AbstractBlockingStub { - private ExperimentsBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected ExperimentsBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ExperimentsBlockingStub(channel, callOptions); - } - - /** - * - * - *
-     * Returns the list of all experiments in the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
-     * 
- */ - public com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse listExperiments( - com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest request) { - return blockingUnaryCall(getChannel(), getListExperimentsMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Retrieves the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment].
-     * 
- */ - public com.google.cloud.dialogflow.cx.v3beta1.Experiment getExperiment( - com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest request) { - return blockingUnaryCall(getChannel(), getGetExperimentMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Creates an [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment] in the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
-     * 
- */ - public com.google.cloud.dialogflow.cx.v3beta1.Experiment createExperiment( - com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest request) { - return blockingUnaryCall( - getChannel(), getCreateExperimentMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Updates the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment].
-     * 
- */ - public com.google.cloud.dialogflow.cx.v3beta1.Experiment updateExperiment( - com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest request) { - return blockingUnaryCall( - getChannel(), getUpdateExperimentMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Deletes the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment].
-     * 
- */ - public com.google.protobuf.Empty deleteExperiment( - com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest request) { - return blockingUnaryCall( - getChannel(), getDeleteExperimentMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Starts the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only changes the state of
-     * experiment from PENDING to RUNNING.
-     * 
- */ - public com.google.cloud.dialogflow.cx.v3beta1.Experiment startExperiment( - com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest request) { - return blockingUnaryCall(getChannel(), getStartExperimentMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Stops the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only changes the state of
-     * experiment from RUNNING to DONE.
-     * 
- */ - public com.google.cloud.dialogflow.cx.v3beta1.Experiment stopExperiment( - com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest request) { - return blockingUnaryCall(getChannel(), getStopExperimentMethod(), getCallOptions(), request); - } - } - - /** - * - * - *
-   * Service for managing [Experiments][google.cloud.dialogflow.cx.v3beta1.Experiment].
-   * 
- */ - public static final class ExperimentsFutureStub - extends io.grpc.stub.AbstractFutureStub { - private ExperimentsFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected ExperimentsFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ExperimentsFutureStub(channel, callOptions); - } - - /** - * - * - *
-     * Returns the list of all experiments in the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse> - listExperiments(com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest request) { - return futureUnaryCall( - getChannel().newCall(getListExperimentsMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Retrieves the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment].
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.dialogflow.cx.v3beta1.Experiment> - getExperiment(com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest request) { - return futureUnaryCall( - getChannel().newCall(getGetExperimentMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Creates an [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment] in the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.dialogflow.cx.v3beta1.Experiment> - createExperiment(com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest request) { - return futureUnaryCall( - getChannel().newCall(getCreateExperimentMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Updates the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment].
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.dialogflow.cx.v3beta1.Experiment> - updateExperiment(com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest request) { - return futureUnaryCall( - getChannel().newCall(getUpdateExperimentMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Deletes the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment].
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - deleteExperiment(com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest request) { - return futureUnaryCall( - getChannel().newCall(getDeleteExperimentMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Starts the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only changes the state of
-     * experiment from PENDING to RUNNING.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.dialogflow.cx.v3beta1.Experiment> - startExperiment(com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest request) { - return futureUnaryCall( - getChannel().newCall(getStartExperimentMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Stops the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only changes the state of
-     * experiment from RUNNING to DONE.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.dialogflow.cx.v3beta1.Experiment> - stopExperiment(com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest request) { - return futureUnaryCall( - getChannel().newCall(getStopExperimentMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_LIST_EXPERIMENTS = 0; - private static final int METHODID_GET_EXPERIMENT = 1; - private static final int METHODID_CREATE_EXPERIMENT = 2; - private static final int METHODID_UPDATE_EXPERIMENT = 3; - private static final int METHODID_DELETE_EXPERIMENT = 4; - private static final int METHODID_START_EXPERIMENT = 5; - private static final int METHODID_STOP_EXPERIMENT = 6; - - private static final class MethodHandlers - implements io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final ExperimentsImplBase serviceImpl; - private final int methodId; - - MethodHandlers(ExperimentsImplBase serviceImpl, int methodId) { - this.serviceImpl = serviceImpl; - this.methodId = methodId; - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - case METHODID_LIST_EXPERIMENTS: - serviceImpl.listExperiments( - (com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest) request, - (io.grpc.stub.StreamObserver< - com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse>) - responseObserver); - break; - case METHODID_GET_EXPERIMENT: - serviceImpl.getExperiment( - (com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_CREATE_EXPERIMENT: - serviceImpl.createExperiment( - (com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_UPDATE_EXPERIMENT: - serviceImpl.updateExperiment( - (com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_DELETE_EXPERIMENT: - serviceImpl.deleteExperiment( - (com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_START_EXPERIMENT: - serviceImpl.startExperiment( - (com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_STOP_EXPERIMENT: - serviceImpl.stopExperiment( - (com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - default: - throw new AssertionError(); - } - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public io.grpc.stub.StreamObserver invoke( - io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - default: - throw new AssertionError(); - } - } - } - - private abstract static class ExperimentsBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, - io.grpc.protobuf.ProtoServiceDescriptorSupplier { - ExperimentsBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("Experiments"); - } - } - - private static final class ExperimentsFileDescriptorSupplier - extends ExperimentsBaseDescriptorSupplier { - ExperimentsFileDescriptorSupplier() {} - } - - private static final class ExperimentsMethodDescriptorSupplier - extends ExperimentsBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; - - ExperimentsMethodDescriptorSupplier(String methodName) { - this.methodName = methodName; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { - return getServiceDescriptor().findMethodByName(methodName); - } - } - - private static volatile io.grpc.ServiceDescriptor serviceDescriptor; - - public static io.grpc.ServiceDescriptor getServiceDescriptor() { - io.grpc.ServiceDescriptor result = serviceDescriptor; - if (result == null) { - synchronized (ExperimentsGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = - result = - io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new ExperimentsFileDescriptorSupplier()) - .addMethod(getListExperimentsMethod()) - .addMethod(getGetExperimentMethod()) - .addMethod(getCreateExperimentMethod()) - .addMethod(getUpdateExperimentMethod()) - .addMethod(getDeleteExperimentMethod()) - .addMethod(getStartExperimentMethod()) - .addMethod(getStopExperimentMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsGrpc.java b/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsGrpc.java index 02652bcb6..df7226d62 100644 --- a/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsGrpc.java +++ b/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsGrpc.java @@ -305,6 +305,101 @@ private FlowsGrpc() {} return getTrainFlowMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest, + com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult> + getValidateFlowMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ValidateFlow", + requestType = com.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest, + com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult> + getValidateFlowMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest, + com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult> + getValidateFlowMethod; + if ((getValidateFlowMethod = FlowsGrpc.getValidateFlowMethod) == null) { + synchronized (FlowsGrpc.class) { + if ((getValidateFlowMethod = FlowsGrpc.getValidateFlowMethod) == null) { + FlowsGrpc.getValidateFlowMethod = + getValidateFlowMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ValidateFlow")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult + .getDefaultInstance())) + .setSchemaDescriptor(new FlowsMethodDescriptorSupplier("ValidateFlow")) + .build(); + } + } + } + return getValidateFlowMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest, + com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult> + getGetFlowValidationResultMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetFlowValidationResult", + requestType = com.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest, + com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult> + getGetFlowValidationResultMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest, + com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult> + getGetFlowValidationResultMethod; + if ((getGetFlowValidationResultMethod = FlowsGrpc.getGetFlowValidationResultMethod) == null) { + synchronized (FlowsGrpc.class) { + if ((getGetFlowValidationResultMethod = FlowsGrpc.getGetFlowValidationResultMethod) + == null) { + FlowsGrpc.getGetFlowValidationResultMethod = + getGetFlowValidationResultMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetFlowValidationResult")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult + .getDefaultInstance())) + .setSchemaDescriptor( + new FlowsMethodDescriptorSupplier("GetFlowValidationResult")) + .build(); + } + } + } + return getGetFlowValidationResultMethod; + } + /** Creates a new async stub that supports all call types for the service */ public static FlowsStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = @@ -433,6 +528,37 @@ public void trainFlow( asyncUnimplementedUnaryCall(getTrainFlowMethod(), responseObserver); } + /** + * + * + *
+     * 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.
+     * 
+ */ + public void validateFlow( + com.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getValidateFlowMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets the latest flow validation result. Flow validation is performed
+     * when ValidateFlow is called.
+     * 
+ */ + public void getFlowValidationResult( + com.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getGetFlowValidationResultMethod(), responseObserver); + } + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) @@ -473,6 +599,20 @@ public final io.grpc.ServerServiceDefinition bindService() { new MethodHandlers< com.google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest, com.google.longrunning.Operation>(this, METHODID_TRAIN_FLOW))) + .addMethod( + getValidateFlowMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest, + com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult>( + this, METHODID_VALIDATE_FLOW))) + .addMethod( + getGetFlowValidationResultMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest, + com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult>( + this, METHODID_GET_FLOW_VALIDATION_RESULT))) .build(); } } @@ -579,6 +719,43 @@ public void trainFlow( asyncUnaryCall( getChannel().newCall(getTrainFlowMethod(), getCallOptions()), request, responseObserver); } + + /** + * + * + *
+     * 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.
+     * 
+ */ + public void validateFlow( + com.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getValidateFlowMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets the latest flow validation result. Flow validation is performed
+     * when ValidateFlow is called.
+     * 
+ */ + public void getFlowValidationResult( + com.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetFlowValidationResultMethod(), getCallOptions()), + request, + responseObserver); + } } /** @@ -671,6 +848,34 @@ public com.google.longrunning.Operation trainFlow( com.google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest request) { return blockingUnaryCall(getChannel(), getTrainFlowMethod(), getCallOptions(), request); } + + /** + * + * + *
+     * 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.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult validateFlow( + com.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest request) { + return blockingUnaryCall(getChannel(), getValidateFlowMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets the latest flow validation result. Flow validation is performed
+     * when ValidateFlow is called.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult getFlowValidationResult( + com.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest request) { + return blockingUnaryCall( + getChannel(), getGetFlowValidationResultMethod(), getCallOptions(), request); + } } /** @@ -770,6 +975,38 @@ public com.google.common.util.concurrent.ListenableFuture + * 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. + * + */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult> + validateFlow(com.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest request) { + return futureUnaryCall( + getChannel().newCall(getValidateFlowMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets the latest flow validation result. Flow validation is performed
+     * when ValidateFlow is called.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult> + getFlowValidationResult( + com.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetFlowValidationResultMethod(), getCallOptions()), request); + } } private static final int METHODID_CREATE_FLOW = 0; @@ -778,6 +1015,8 @@ public com.google.common.util.concurrent.ListenableFuture implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -831,6 +1070,20 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_VALIDATE_FLOW: + serviceImpl.validateFlow( + (com.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult>) + responseObserver); + break; + case METHODID_GET_FLOW_VALIDATION_RESULT: + serviceImpl.getFlowValidationResult( + (com.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult>) + responseObserver); + break; default: throw new AssertionError(); } @@ -899,6 +1152,8 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getGetFlowMethod()) .addMethod(getUpdateFlowMethod()) .addMethod(getTrainFlowMethod()) + .addMethod(getValidateFlowMethod()) + .addMethod(getGetFlowValidationResultMethod()) .build(); } } diff --git a/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCasesGrpc.java b/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCasesGrpc.java new file mode 100644 index 000000000..39f103d06 --- /dev/null +++ b/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCasesGrpc.java @@ -0,0 +1,1544 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.dialogflow.cx.v3beta1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; +import static io.grpc.stub.ClientCalls.asyncUnaryCall; +import static io.grpc.stub.ClientCalls.blockingUnaryCall; +import static io.grpc.stub.ClientCalls.futureUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; + +/** + * + * + *
+ * Service for managing [Test Cases][google.cloud.dialogflow.cx.v3beta1.TestCase] and
+ * [Test Case Results][google.cloud.dialogflow.cx.v3beta1.TestCaseResult].
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/dialogflow/cx/v3beta1/test_case.proto") +public final class TestCasesGrpc { + + private TestCasesGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.dialogflow.cx.v3beta1.TestCases"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest, + com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse> + getListTestCasesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListTestCases", + requestType = com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest, + com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse> + getListTestCasesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest, + com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse> + getListTestCasesMethod; + if ((getListTestCasesMethod = TestCasesGrpc.getListTestCasesMethod) == null) { + synchronized (TestCasesGrpc.class) { + if ((getListTestCasesMethod = TestCasesGrpc.getListTestCasesMethod) == null) { + TestCasesGrpc.getListTestCasesMethod = + getListTestCasesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListTestCases")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse + .getDefaultInstance())) + .setSchemaDescriptor(new TestCasesMethodDescriptorSupplier("ListTestCases")) + .build(); + } + } + } + return getListTestCasesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest, + com.google.protobuf.Empty> + getBatchDeleteTestCasesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "BatchDeleteTestCases", + requestType = com.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest, + com.google.protobuf.Empty> + getBatchDeleteTestCasesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest, + com.google.protobuf.Empty> + getBatchDeleteTestCasesMethod; + if ((getBatchDeleteTestCasesMethod = TestCasesGrpc.getBatchDeleteTestCasesMethod) == null) { + synchronized (TestCasesGrpc.class) { + if ((getBatchDeleteTestCasesMethod = TestCasesGrpc.getBatchDeleteTestCasesMethod) == null) { + TestCasesGrpc.getBatchDeleteTestCasesMethod = + getBatchDeleteTestCasesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "BatchDeleteTestCases")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new TestCasesMethodDescriptorSupplier("BatchDeleteTestCases")) + .build(); + } + } + } + return getBatchDeleteTestCasesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest, + com.google.cloud.dialogflow.cx.v3beta1.TestCase> + getGetTestCaseMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetTestCase", + requestType = com.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3beta1.TestCase.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest, + com.google.cloud.dialogflow.cx.v3beta1.TestCase> + getGetTestCaseMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest, + com.google.cloud.dialogflow.cx.v3beta1.TestCase> + getGetTestCaseMethod; + if ((getGetTestCaseMethod = TestCasesGrpc.getGetTestCaseMethod) == null) { + synchronized (TestCasesGrpc.class) { + if ((getGetTestCaseMethod = TestCasesGrpc.getGetTestCaseMethod) == null) { + TestCasesGrpc.getGetTestCaseMethod = + getGetTestCaseMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetTestCase")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.TestCase.getDefaultInstance())) + .setSchemaDescriptor(new TestCasesMethodDescriptorSupplier("GetTestCase")) + .build(); + } + } + } + return getGetTestCaseMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest, + com.google.cloud.dialogflow.cx.v3beta1.TestCase> + getCreateTestCaseMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateTestCase", + requestType = com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3beta1.TestCase.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest, + com.google.cloud.dialogflow.cx.v3beta1.TestCase> + getCreateTestCaseMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest, + com.google.cloud.dialogflow.cx.v3beta1.TestCase> + getCreateTestCaseMethod; + if ((getCreateTestCaseMethod = TestCasesGrpc.getCreateTestCaseMethod) == null) { + synchronized (TestCasesGrpc.class) { + if ((getCreateTestCaseMethod = TestCasesGrpc.getCreateTestCaseMethod) == null) { + TestCasesGrpc.getCreateTestCaseMethod = + getCreateTestCaseMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateTestCase")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.TestCase.getDefaultInstance())) + .setSchemaDescriptor(new TestCasesMethodDescriptorSupplier("CreateTestCase")) + .build(); + } + } + } + return getCreateTestCaseMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest, + com.google.cloud.dialogflow.cx.v3beta1.TestCase> + getUpdateTestCaseMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateTestCase", + requestType = com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3beta1.TestCase.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest, + com.google.cloud.dialogflow.cx.v3beta1.TestCase> + getUpdateTestCaseMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest, + com.google.cloud.dialogflow.cx.v3beta1.TestCase> + getUpdateTestCaseMethod; + if ((getUpdateTestCaseMethod = TestCasesGrpc.getUpdateTestCaseMethod) == null) { + synchronized (TestCasesGrpc.class) { + if ((getUpdateTestCaseMethod = TestCasesGrpc.getUpdateTestCaseMethod) == null) { + TestCasesGrpc.getUpdateTestCaseMethod = + getUpdateTestCaseMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateTestCase")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.TestCase.getDefaultInstance())) + .setSchemaDescriptor(new TestCasesMethodDescriptorSupplier("UpdateTestCase")) + .build(); + } + } + } + return getUpdateTestCaseMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest, + com.google.longrunning.Operation> + getRunTestCaseMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RunTestCase", + requestType = com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest, + com.google.longrunning.Operation> + getRunTestCaseMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest, + com.google.longrunning.Operation> + getRunTestCaseMethod; + if ((getRunTestCaseMethod = TestCasesGrpc.getRunTestCaseMethod) == null) { + synchronized (TestCasesGrpc.class) { + if ((getRunTestCaseMethod = TestCasesGrpc.getRunTestCaseMethod) == null) { + TestCasesGrpc.getRunTestCaseMethod = + getRunTestCaseMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RunTestCase")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new TestCasesMethodDescriptorSupplier("RunTestCase")) + .build(); + } + } + } + return getRunTestCaseMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest, + com.google.longrunning.Operation> + getBatchRunTestCasesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "BatchRunTestCases", + requestType = com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest, + com.google.longrunning.Operation> + getBatchRunTestCasesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest, + com.google.longrunning.Operation> + getBatchRunTestCasesMethod; + if ((getBatchRunTestCasesMethod = TestCasesGrpc.getBatchRunTestCasesMethod) == null) { + synchronized (TestCasesGrpc.class) { + if ((getBatchRunTestCasesMethod = TestCasesGrpc.getBatchRunTestCasesMethod) == null) { + TestCasesGrpc.getBatchRunTestCasesMethod = + getBatchRunTestCasesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BatchRunTestCases")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new TestCasesMethodDescriptorSupplier("BatchRunTestCases")) + .build(); + } + } + } + return getBatchRunTestCasesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest, + com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse> + getCalculateCoverageMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CalculateCoverage", + requestType = com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest, + com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse> + getCalculateCoverageMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest, + com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse> + getCalculateCoverageMethod; + if ((getCalculateCoverageMethod = TestCasesGrpc.getCalculateCoverageMethod) == null) { + synchronized (TestCasesGrpc.class) { + if ((getCalculateCoverageMethod = TestCasesGrpc.getCalculateCoverageMethod) == null) { + TestCasesGrpc.getCalculateCoverageMethod = + getCalculateCoverageMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CalculateCoverage")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new TestCasesMethodDescriptorSupplier("CalculateCoverage")) + .build(); + } + } + } + return getCalculateCoverageMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest, + com.google.longrunning.Operation> + getImportTestCasesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ImportTestCases", + requestType = com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest, + com.google.longrunning.Operation> + getImportTestCasesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest, + com.google.longrunning.Operation> + getImportTestCasesMethod; + if ((getImportTestCasesMethod = TestCasesGrpc.getImportTestCasesMethod) == null) { + synchronized (TestCasesGrpc.class) { + if ((getImportTestCasesMethod = TestCasesGrpc.getImportTestCasesMethod) == null) { + TestCasesGrpc.getImportTestCasesMethod = + getImportTestCasesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ImportTestCases")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new TestCasesMethodDescriptorSupplier("ImportTestCases")) + .build(); + } + } + } + return getImportTestCasesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest, + com.google.longrunning.Operation> + getExportTestCasesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ExportTestCases", + requestType = com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest, + com.google.longrunning.Operation> + getExportTestCasesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest, + com.google.longrunning.Operation> + getExportTestCasesMethod; + if ((getExportTestCasesMethod = TestCasesGrpc.getExportTestCasesMethod) == null) { + synchronized (TestCasesGrpc.class) { + if ((getExportTestCasesMethod = TestCasesGrpc.getExportTestCasesMethod) == null) { + TestCasesGrpc.getExportTestCasesMethod = + getExportTestCasesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ExportTestCases")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new TestCasesMethodDescriptorSupplier("ExportTestCases")) + .build(); + } + } + } + return getExportTestCasesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest, + com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse> + getListTestCaseResultsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListTestCaseResults", + requestType = com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest, + com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse> + getListTestCaseResultsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest, + com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse> + getListTestCaseResultsMethod; + if ((getListTestCaseResultsMethod = TestCasesGrpc.getListTestCaseResultsMethod) == null) { + synchronized (TestCasesGrpc.class) { + if ((getListTestCaseResultsMethod = TestCasesGrpc.getListTestCaseResultsMethod) == null) { + TestCasesGrpc.getListTestCaseResultsMethod = + getListTestCaseResultsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListTestCaseResults")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new TestCasesMethodDescriptorSupplier("ListTestCaseResults")) + .build(); + } + } + } + return getListTestCaseResultsMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static TestCasesStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public TestCasesStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TestCasesStub(channel, callOptions); + } + }; + return TestCasesStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static TestCasesBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public TestCasesBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TestCasesBlockingStub(channel, callOptions); + } + }; + return TestCasesBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static TestCasesFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public TestCasesFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TestCasesFutureStub(channel, callOptions); + } + }; + return TestCasesFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Service for managing [Test Cases][google.cloud.dialogflow.cx.v3beta1.TestCase] and
+   * [Test Case Results][google.cloud.dialogflow.cx.v3beta1.TestCaseResult].
+   * 
+ */ + public abstract static class TestCasesImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Fetches a list of test cases for a given agent.
+     * 
+ */ + public void listTestCases( + com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getListTestCasesMethod(), responseObserver); + } + + /** + * + * + *
+     * Batch deletes test cases.
+     * 
+ */ + public void batchDeleteTestCases( + com.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getBatchDeleteTestCasesMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets a test case.
+     * 
+ */ + public void getTestCase( + com.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getGetTestCaseMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a test case for the given agent.
+     * 
+ */ + public void createTestCase( + com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getCreateTestCaseMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the specified test case.
+     * 
+ */ + public void updateTestCase( + com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getUpdateTestCaseMethod(), responseObserver); + } + + /** + * + * + *
+     * Kicks off a test case run.
+     * 
+ */ + public void runTestCase( + com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getRunTestCaseMethod(), responseObserver); + } + + /** + * + * + *
+     * Kicks off a batch run of test cases.
+     * 
+ */ + public void batchRunTestCases( + com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getBatchRunTestCasesMethod(), responseObserver); + } + + /** + * + * + *
+     * Calculates the test coverage for an agent.
+     * 
+ */ + public void calculateCoverage( + com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse> + responseObserver) { + asyncUnimplementedUnaryCall(getCalculateCoverageMethod(), responseObserver); + } + + /** + * + * + *
+     * Imports the test cases from a Cloud Storage bucket or a local file. It
+     * always creates new test cases and won't overwite any existing ones. The
+     * provided ID in the imported test case is neglected.
+     * 
+ */ + public void importTestCases( + com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getImportTestCasesMethod(), responseObserver); + } + + /** + * + * + *
+     * 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.
+     * 
+ */ + public void exportTestCases( + com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getExportTestCasesMethod(), responseObserver); + } + + /** + * + * + *
+     * Fetches a list of results for a given test case.
+     * 
+ */ + public void listTestCaseResults( + com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse> + responseObserver) { + asyncUnimplementedUnaryCall(getListTestCaseResultsMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getListTestCasesMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest, + com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse>( + this, METHODID_LIST_TEST_CASES))) + .addMethod( + getBatchDeleteTestCasesMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest, + com.google.protobuf.Empty>(this, METHODID_BATCH_DELETE_TEST_CASES))) + .addMethod( + getGetTestCaseMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest, + com.google.cloud.dialogflow.cx.v3beta1.TestCase>( + this, METHODID_GET_TEST_CASE))) + .addMethod( + getCreateTestCaseMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest, + com.google.cloud.dialogflow.cx.v3beta1.TestCase>( + this, METHODID_CREATE_TEST_CASE))) + .addMethod( + getUpdateTestCaseMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest, + com.google.cloud.dialogflow.cx.v3beta1.TestCase>( + this, METHODID_UPDATE_TEST_CASE))) + .addMethod( + getRunTestCaseMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest, + com.google.longrunning.Operation>(this, METHODID_RUN_TEST_CASE))) + .addMethod( + getBatchRunTestCasesMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest, + com.google.longrunning.Operation>(this, METHODID_BATCH_RUN_TEST_CASES))) + .addMethod( + getCalculateCoverageMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest, + com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse>( + this, METHODID_CALCULATE_COVERAGE))) + .addMethod( + getImportTestCasesMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest, + com.google.longrunning.Operation>(this, METHODID_IMPORT_TEST_CASES))) + .addMethod( + getExportTestCasesMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest, + com.google.longrunning.Operation>(this, METHODID_EXPORT_TEST_CASES))) + .addMethod( + getListTestCaseResultsMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest, + com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse>( + this, METHODID_LIST_TEST_CASE_RESULTS))) + .build(); + } + } + + /** + * + * + *
+   * Service for managing [Test Cases][google.cloud.dialogflow.cx.v3beta1.TestCase] and
+   * [Test Case Results][google.cloud.dialogflow.cx.v3beta1.TestCaseResult].
+   * 
+ */ + public static final class TestCasesStub extends io.grpc.stub.AbstractAsyncStub { + private TestCasesStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected TestCasesStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TestCasesStub(channel, callOptions); + } + + /** + * + * + *
+     * Fetches a list of test cases for a given agent.
+     * 
+ */ + public void listTestCases( + com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListTestCasesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Batch deletes test cases.
+     * 
+ */ + public void batchDeleteTestCases( + com.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getBatchDeleteTestCasesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets a test case.
+     * 
+ */ + public void getTestCase( + com.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetTestCaseMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a test case for the given agent.
+     * 
+ */ + public void createTestCase( + com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getCreateTestCaseMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the specified test case.
+     * 
+ */ + public void updateTestCase( + com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getUpdateTestCaseMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Kicks off a test case run.
+     * 
+ */ + public void runTestCase( + com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getRunTestCaseMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Kicks off a batch run of test cases.
+     * 
+ */ + public void batchRunTestCases( + com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getBatchRunTestCasesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Calculates the test coverage for an agent.
+     * 
+ */ + public void calculateCoverage( + com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse> + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getCalculateCoverageMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Imports the test cases from a Cloud Storage bucket or a local file. It
+     * always creates new test cases and won't overwite any existing ones. The
+     * provided ID in the imported test case is neglected.
+     * 
+ */ + public void importTestCases( + com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getImportTestCasesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * 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.
+     * 
+ */ + public void exportTestCases( + com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getExportTestCasesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Fetches a list of results for a given test case.
+     * 
+ */ + public void listTestCaseResults( + com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse> + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListTestCaseResultsMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * Service for managing [Test Cases][google.cloud.dialogflow.cx.v3beta1.TestCase] and
+   * [Test Case Results][google.cloud.dialogflow.cx.v3beta1.TestCaseResult].
+   * 
+ */ + public static final class TestCasesBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private TestCasesBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected TestCasesBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TestCasesBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Fetches a list of test cases for a given agent.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse listTestCases( + com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest request) { + return blockingUnaryCall(getChannel(), getListTestCasesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Batch deletes test cases.
+     * 
+ */ + public com.google.protobuf.Empty batchDeleteTestCases( + com.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest request) { + return blockingUnaryCall( + getChannel(), getBatchDeleteTestCasesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a test case.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3beta1.TestCase getTestCase( + com.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest request) { + return blockingUnaryCall(getChannel(), getGetTestCaseMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a test case for the given agent.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3beta1.TestCase createTestCase( + com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest request) { + return blockingUnaryCall(getChannel(), getCreateTestCaseMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the specified test case.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3beta1.TestCase updateTestCase( + com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest request) { + return blockingUnaryCall(getChannel(), getUpdateTestCaseMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Kicks off a test case run.
+     * 
+ */ + public com.google.longrunning.Operation runTestCase( + com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest request) { + return blockingUnaryCall(getChannel(), getRunTestCaseMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Kicks off a batch run of test cases.
+     * 
+ */ + public com.google.longrunning.Operation batchRunTestCases( + com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest request) { + return blockingUnaryCall( + getChannel(), getBatchRunTestCasesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Calculates the test coverage for an agent.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse calculateCoverage( + com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest request) { + return blockingUnaryCall( + getChannel(), getCalculateCoverageMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Imports the test cases from a Cloud Storage bucket or a local file. It
+     * always creates new test cases and won't overwite any existing ones. The
+     * provided ID in the imported test case is neglected.
+     * 
+ */ + public com.google.longrunning.Operation importTestCases( + com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest request) { + return blockingUnaryCall(getChannel(), getImportTestCasesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * 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.
+     * 
+ */ + public com.google.longrunning.Operation exportTestCases( + com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest request) { + return blockingUnaryCall(getChannel(), getExportTestCasesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Fetches a list of results for a given test case.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse listTestCaseResults( + com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest request) { + return blockingUnaryCall( + getChannel(), getListTestCaseResultsMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * Service for managing [Test Cases][google.cloud.dialogflow.cx.v3beta1.TestCase] and
+   * [Test Case Results][google.cloud.dialogflow.cx.v3beta1.TestCaseResult].
+   * 
+ */ + public static final class TestCasesFutureStub + extends io.grpc.stub.AbstractFutureStub { + private TestCasesFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected TestCasesFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TestCasesFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Fetches a list of test cases for a given agent.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse> + listTestCases(com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest request) { + return futureUnaryCall( + getChannel().newCall(getListTestCasesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Batch deletes test cases.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + batchDeleteTestCases( + com.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest request) { + return futureUnaryCall( + getChannel().newCall(getBatchDeleteTestCasesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets a test case.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3beta1.TestCase> + getTestCase(com.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetTestCaseMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a test case for the given agent.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3beta1.TestCase> + createTestCase(com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest request) { + return futureUnaryCall( + getChannel().newCall(getCreateTestCaseMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the specified test case.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3beta1.TestCase> + updateTestCase(com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest request) { + return futureUnaryCall( + getChannel().newCall(getUpdateTestCaseMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Kicks off a test case run.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + runTestCase(com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest request) { + return futureUnaryCall( + getChannel().newCall(getRunTestCaseMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Kicks off a batch run of test cases.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + batchRunTestCases(com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest request) { + return futureUnaryCall( + getChannel().newCall(getBatchRunTestCasesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Calculates the test coverage for an agent.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse> + calculateCoverage(com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest request) { + return futureUnaryCall( + getChannel().newCall(getCalculateCoverageMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Imports the test cases from a Cloud Storage bucket or a local file. It
+     * always creates new test cases and won't overwite any existing ones. The
+     * provided ID in the imported test case is neglected.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + importTestCases(com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest request) { + return futureUnaryCall( + getChannel().newCall(getImportTestCasesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * 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.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + exportTestCases(com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest request) { + return futureUnaryCall( + getChannel().newCall(getExportTestCasesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Fetches a list of results for a given test case.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse> + listTestCaseResults( + com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest request) { + return futureUnaryCall( + getChannel().newCall(getListTestCaseResultsMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_TEST_CASES = 0; + private static final int METHODID_BATCH_DELETE_TEST_CASES = 1; + private static final int METHODID_GET_TEST_CASE = 2; + private static final int METHODID_CREATE_TEST_CASE = 3; + private static final int METHODID_UPDATE_TEST_CASE = 4; + private static final int METHODID_RUN_TEST_CASE = 5; + private static final int METHODID_BATCH_RUN_TEST_CASES = 6; + private static final int METHODID_CALCULATE_COVERAGE = 7; + private static final int METHODID_IMPORT_TEST_CASES = 8; + private static final int METHODID_EXPORT_TEST_CASES = 9; + private static final int METHODID_LIST_TEST_CASE_RESULTS = 10; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final TestCasesImplBase serviceImpl; + private final int methodId; + + MethodHandlers(TestCasesImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_LIST_TEST_CASES: + serviceImpl.listTestCases( + (com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse>) + responseObserver); + break; + case METHODID_BATCH_DELETE_TEST_CASES: + serviceImpl.batchDeleteTestCases( + (com.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_TEST_CASE: + serviceImpl.getTestCase( + (com.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_TEST_CASE: + serviceImpl.createTestCase( + (com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_TEST_CASE: + serviceImpl.updateTestCase( + (com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_RUN_TEST_CASE: + serviceImpl.runTestCase( + (com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_BATCH_RUN_TEST_CASES: + serviceImpl.batchRunTestCases( + (com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CALCULATE_COVERAGE: + serviceImpl.calculateCoverage( + (com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse>) + responseObserver); + break; + case METHODID_IMPORT_TEST_CASES: + serviceImpl.importTestCases( + (com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_EXPORT_TEST_CASES: + serviceImpl.exportTestCases( + (com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_TEST_CASE_RESULTS: + serviceImpl.listTestCaseResults( + (com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse>) + responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private abstract static class TestCasesBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + TestCasesBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("TestCases"); + } + } + + private static final class TestCasesFileDescriptorSupplier + extends TestCasesBaseDescriptorSupplier { + TestCasesFileDescriptorSupplier() {} + } + + private static final class TestCasesMethodDescriptorSupplier + extends TestCasesBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + TestCasesMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (TestCasesGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new TestCasesFileDescriptorSupplier()) + .addMethod(getListTestCasesMethod()) + .addMethod(getBatchDeleteTestCasesMethod()) + .addMethod(getGetTestCaseMethod()) + .addMethod(getCreateTestCaseMethod()) + .addMethod(getUpdateTestCaseMethod()) + .addMethod(getRunTestCaseMethod()) + .addMethod(getBatchRunTestCasesMethod()) + .addMethod(getCalculateCoverageMethod()) + .addMethod(getImportTestCasesMethod()) + .addMethod(getExportTestCasesMethod()) + .addMethod(getListTestCaseResultsMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Agent.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Agent.java index 277f6c0b9..69991c2f1 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Agent.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Agent.java @@ -26,13 +26,9 @@ * that transform user requests into actionable data. You can include agents * in your app, product, or service to determine user intent and respond to the * user in a natural way. - * After you create an agent, you can add - * [Intents][google.cloud.dialogflow.cx.v3beta1.Intent], [Entity - * Types][google.cloud.dialogflow.cx.v3beta1.EntityType], - * [Flows][google.cloud.dialogflow.cx.v3beta1.Flow], - * [Fulfillments][google.cloud.dialogflow.cx.v3beta1.Fulfillment], - * [Webhooks][google.cloud.dialogflow.cx.v3beta1.Webhook], and so on to manage - * the conversation flows.. + * After you create an agent, you can add [Intents][google.cloud.dialogflow.cx.v3beta1.Intent], + * [Entity Types][google.cloud.dialogflow.cx.v3beta1.EntityType], [Flows][google.cloud.dialogflow.cx.v3beta1.Flow], [Fulfillments][google.cloud.dialogflow.cx.v3beta1.Fulfillment], + * [Webhooks][google.cloud.dialogflow.cx.v3beta1.Webhook], and so on to manage the conversation flows.. * * * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Agent} @@ -55,6 +51,7 @@ private Agent() { description_ = ""; avatarUri_ = ""; startFlow_ = ""; + securitySettings_ = ""; } @java.lang.Override @@ -152,6 +149,13 @@ private Agent( startFlow_ = s; break; } + case 138: + { + java.lang.String s = input.readStringRequireUtf8(); + + securitySettings_ = s; + break; + } case 144: { enableStackdriverLogging_ = input.readBool(); @@ -203,10 +207,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
    * The unique identifier of the agent.
-   * Required for the
-   * [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent]
-   * method.
-   * [Agents.CreateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.CreateAgent]
+   * Required for the [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent] method. [Agents.CreateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.CreateAgent]
    * populates the name automatically.
    * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
    * 
@@ -232,10 +233,7 @@ public java.lang.String getName() { * *
    * The unique identifier of the agent.
-   * Required for the
-   * [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent]
-   * method.
-   * [Agents.CreateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.CreateAgent]
+   * Required for the [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent] method. [Agents.CreateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.CreateAgent]
    * populates the name automatically.
    * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
    * 
@@ -316,9 +314,7 @@ public com.google.protobuf.ByteString getDisplayNameBytes() { * See [Language * Support](https://cloud.google.com/dialogflow/docs/reference/language) * for a list of the currently supported language codes. - * This field cannot be set by the - * [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent] - * method. + * This field cannot be set by the [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent] method. * * * string default_language_code = 3 [(.google.api.field_behavior) = IMMUTABLE]; @@ -345,9 +341,7 @@ public java.lang.String getDefaultLanguageCode() { * See [Language * Support](https://cloud.google.com/dialogflow/docs/reference/language) * for a list of the currently supported language codes. - * This field cannot be set by the - * [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent] - * method. + * This field cannot be set by the [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent] method. * * * string default_language_code = 3 [(.google.api.field_behavior) = IMMUTABLE]; @@ -584,10 +578,11 @@ public com.google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings getSpeechToTe * * *
-   * 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/<Project ID>/locations/<Location
-   * ID>/agents/<Agent ID>/flows/<Flow ID>`.
+   * 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/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>`.
    * 
* * @@ -612,10 +607,11 @@ public java.lang.String getStartFlow() { * * *
-   * 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/<Project ID>/locations/<Location
-   * ID>/agents/<Agent ID>/flows/<Flow ID>`.
+   * 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/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>`.
    * 
* * @@ -637,6 +633,59 @@ public com.google.protobuf.ByteString getStartFlowBytes() { } } + public static final int SECURITY_SETTINGS_FIELD_NUMBER = 17; + private volatile java.lang.Object securitySettings_; + /** + * + * + *
+   * Name of the [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettings] reference for the agent.
+   * Format: `projects/<Project ID>/locations/<Location
+   * ID>/securitySettings/<Security Settings ID>`.
+   * 
+ * + * string security_settings = 17 [(.google.api.resource_reference) = { ... } + * + * @return The securitySettings. + */ + @java.lang.Override + public java.lang.String getSecuritySettings() { + java.lang.Object ref = securitySettings_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + securitySettings_ = s; + return s; + } + } + /** + * + * + *
+   * Name of the [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettings] reference for the agent.
+   * Format: `projects/<Project ID>/locations/<Location
+   * ID>/securitySettings/<Security Settings ID>`.
+   * 
+ * + * string security_settings = 17 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for securitySettings. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSecuritySettingsBytes() { + java.lang.Object ref = securitySettings_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + securitySettings_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int ENABLE_STACKDRIVER_LOGGING_FIELD_NUMBER = 18; private boolean enableStackdriverLogging_; /** @@ -712,6 +761,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!getStartFlowBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 16, startFlow_); } + if (!getSecuritySettingsBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 17, securitySettings_); + } if (enableStackdriverLogging_ != false) { output.writeBool(18, enableStackdriverLogging_); } @@ -752,6 +804,9 @@ public int getSerializedSize() { if (!getStartFlowBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, startFlow_); } + if (!getSecuritySettingsBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(17, securitySettings_); + } if (enableStackdriverLogging_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(18, enableStackdriverLogging_); } @@ -785,6 +840,7 @@ public boolean equals(final java.lang.Object obj) { if (!getSpeechToTextSettings().equals(other.getSpeechToTextSettings())) return false; } if (!getStartFlow().equals(other.getStartFlow())) return false; + if (!getSecuritySettings().equals(other.getSecuritySettings())) return false; if (getEnableStackdriverLogging() != other.getEnableStackdriverLogging()) return false; if (getEnableSpellCorrection() != other.getEnableSpellCorrection()) return false; if (!unknownFields.equals(other.unknownFields)) return false; @@ -816,6 +872,8 @@ public int hashCode() { } hash = (37 * hash) + START_FLOW_FIELD_NUMBER; hash = (53 * hash) + getStartFlow().hashCode(); + hash = (37 * hash) + SECURITY_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getSecuritySettings().hashCode(); hash = (37 * hash) + ENABLE_STACKDRIVER_LOGGING_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableStackdriverLogging()); hash = (37 * hash) + ENABLE_SPELL_CORRECTION_FIELD_NUMBER; @@ -928,13 +986,9 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * that transform user requests into actionable data. You can include agents * in your app, product, or service to determine user intent and respond to the * user in a natural way. - * After you create an agent, you can add - * [Intents][google.cloud.dialogflow.cx.v3beta1.Intent], [Entity - * Types][google.cloud.dialogflow.cx.v3beta1.EntityType], - * [Flows][google.cloud.dialogflow.cx.v3beta1.Flow], - * [Fulfillments][google.cloud.dialogflow.cx.v3beta1.Fulfillment], - * [Webhooks][google.cloud.dialogflow.cx.v3beta1.Webhook], and so on to manage - * the conversation flows.. + * After you create an agent, you can add [Intents][google.cloud.dialogflow.cx.v3beta1.Intent], + * [Entity Types][google.cloud.dialogflow.cx.v3beta1.EntityType], [Flows][google.cloud.dialogflow.cx.v3beta1.Flow], [Fulfillments][google.cloud.dialogflow.cx.v3beta1.Fulfillment], + * [Webhooks][google.cloud.dialogflow.cx.v3beta1.Webhook], and so on to manage the conversation flows.. * * * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Agent} @@ -995,6 +1049,8 @@ public Builder clear() { } startFlow_ = ""; + securitySettings_ = ""; + enableStackdriverLogging_ = false; enableSpellCorrection_ = false; @@ -1038,6 +1094,7 @@ public com.google.cloud.dialogflow.cx.v3beta1.Agent buildPartial() { result.speechToTextSettings_ = speechToTextSettingsBuilder_.build(); } result.startFlow_ = startFlow_; + result.securitySettings_ = securitySettings_; result.enableStackdriverLogging_ = enableStackdriverLogging_; result.enableSpellCorrection_ = enableSpellCorrection_; onBuilt(); @@ -1120,6 +1177,10 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.Agent other) { startFlow_ = other.startFlow_; onChanged(); } + if (!other.getSecuritySettings().isEmpty()) { + securitySettings_ = other.securitySettings_; + onChanged(); + } if (other.getEnableStackdriverLogging() != false) { setEnableStackdriverLogging(other.getEnableStackdriverLogging()); } @@ -1161,10 +1222,7 @@ public Builder mergeFrom( * *
      * The unique identifier of the agent.
-     * Required for the
-     * [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent]
-     * method.
-     * [Agents.CreateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.CreateAgent]
+     * Required for the [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent] method. [Agents.CreateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.CreateAgent]
      * populates the name automatically.
      * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
      * 
@@ -1189,10 +1247,7 @@ public java.lang.String getName() { * *
      * The unique identifier of the agent.
-     * Required for the
-     * [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent]
-     * method.
-     * [Agents.CreateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.CreateAgent]
+     * Required for the [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent] method. [Agents.CreateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.CreateAgent]
      * populates the name automatically.
      * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
      * 
@@ -1217,10 +1272,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
      * The unique identifier of the agent.
-     * Required for the
-     * [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent]
-     * method.
-     * [Agents.CreateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.CreateAgent]
+     * Required for the [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent] method. [Agents.CreateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.CreateAgent]
      * populates the name automatically.
      * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
      * 
@@ -1244,10 +1296,7 @@ public Builder setName(java.lang.String value) { * *
      * The unique identifier of the agent.
-     * Required for the
-     * [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent]
-     * method.
-     * [Agents.CreateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.CreateAgent]
+     * Required for the [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent] method. [Agents.CreateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.CreateAgent]
      * populates the name automatically.
      * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
      * 
@@ -1267,10 +1316,7 @@ public Builder clearName() { * *
      * The unique identifier of the agent.
-     * Required for the
-     * [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent]
-     * method.
-     * [Agents.CreateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.CreateAgent]
+     * Required for the [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent] method. [Agents.CreateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.CreateAgent]
      * populates the name automatically.
      * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
      * 
@@ -1406,9 +1452,7 @@ public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { * See [Language * Support](https://cloud.google.com/dialogflow/docs/reference/language) * for a list of the currently supported language codes. - * This field cannot be set by the - * [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent] - * method. + * This field cannot be set by the [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent] method. * * * string default_language_code = 3 [(.google.api.field_behavior) = IMMUTABLE]; @@ -1434,9 +1478,7 @@ public java.lang.String getDefaultLanguageCode() { * See [Language * Support](https://cloud.google.com/dialogflow/docs/reference/language) * for a list of the currently supported language codes. - * This field cannot be set by the - * [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent] - * method. + * This field cannot be set by the [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent] method. * * * string default_language_code = 3 [(.google.api.field_behavior) = IMMUTABLE]; @@ -1462,9 +1504,7 @@ public com.google.protobuf.ByteString getDefaultLanguageCodeBytes() { * See [Language * Support](https://cloud.google.com/dialogflow/docs/reference/language) * for a list of the currently supported language codes. - * This field cannot be set by the - * [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent] - * method. + * This field cannot be set by the [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent] method. * * * string default_language_code = 3 [(.google.api.field_behavior) = IMMUTABLE]; @@ -1489,9 +1529,7 @@ public Builder setDefaultLanguageCode(java.lang.String value) { * See [Language * Support](https://cloud.google.com/dialogflow/docs/reference/language) * for a list of the currently supported language codes. - * This field cannot be set by the - * [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent] - * method. + * This field cannot be set by the [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent] method. * * * string default_language_code = 3 [(.google.api.field_behavior) = IMMUTABLE]; @@ -1512,9 +1550,7 @@ public Builder clearDefaultLanguageCode() { * See [Language * Support](https://cloud.google.com/dialogflow/docs/reference/language) * for a list of the currently supported language codes. - * This field cannot be set by the - * [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent] - * method. + * This field cannot be set by the [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent] method. * * * string default_language_code = 3 [(.google.api.field_behavior) = IMMUTABLE]; @@ -2086,10 +2122,11 @@ public Builder clearSpeechToTextSettings() { * * *
-     * 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/<Project ID>/locations/<Location
-     * ID>/agents/<Agent ID>/flows/<Flow ID>`.
+     * 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/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>`.
      * 
* * @@ -2113,10 +2150,11 @@ public java.lang.String getStartFlow() { * * *
-     * 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/<Project ID>/locations/<Location
-     * ID>/agents/<Agent ID>/flows/<Flow ID>`.
+     * 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/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>`.
      * 
* * @@ -2140,10 +2178,11 @@ public com.google.protobuf.ByteString getStartFlowBytes() { * * *
-     * 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/<Project ID>/locations/<Location
-     * ID>/agents/<Agent ID>/flows/<Flow ID>`.
+     * 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/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>`.
      * 
* * @@ -2166,10 +2205,11 @@ public Builder setStartFlow(java.lang.String value) { * * *
-     * 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/<Project ID>/locations/<Location
-     * ID>/agents/<Agent ID>/flows/<Flow ID>`.
+     * 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/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>`.
      * 
* * @@ -2188,10 +2228,11 @@ public Builder clearStartFlow() { * * *
-     * 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/<Project ID>/locations/<Location
-     * ID>/agents/<Agent ID>/flows/<Flow ID>`.
+     * 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/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>`.
      * 
* * @@ -2212,6 +2253,122 @@ public Builder setStartFlowBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object securitySettings_ = ""; + /** + * + * + *
+     * Name of the [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettings] reference for the agent.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/securitySettings/<Security Settings ID>`.
+     * 
+ * + * string security_settings = 17 [(.google.api.resource_reference) = { ... } + * + * @return The securitySettings. + */ + public java.lang.String getSecuritySettings() { + java.lang.Object ref = securitySettings_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + securitySettings_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of the [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettings] reference for the agent.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/securitySettings/<Security Settings ID>`.
+     * 
+ * + * string security_settings = 17 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for securitySettings. + */ + public com.google.protobuf.ByteString getSecuritySettingsBytes() { + java.lang.Object ref = securitySettings_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + securitySettings_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of the [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettings] reference for the agent.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/securitySettings/<Security Settings ID>`.
+     * 
+ * + * string security_settings = 17 [(.google.api.resource_reference) = { ... } + * + * @param value The securitySettings to set. + * @return This builder for chaining. + */ + public Builder setSecuritySettings(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + securitySettings_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettings] reference for the agent.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/securitySettings/<Security Settings ID>`.
+     * 
+ * + * string security_settings = 17 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearSecuritySettings() { + + securitySettings_ = getDefaultInstance().getSecuritySettings(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettings] reference for the agent.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/securitySettings/<Security Settings ID>`.
+     * 
+ * + * string security_settings = 17 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for securitySettings to set. + * @return This builder for chaining. + */ + public Builder setSecuritySettingsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + securitySettings_ = value; + onChanged(); + return this; + } + private boolean enableStackdriverLogging_; /** * diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentOrBuilder.java index c5b313aea..400479b8a 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentOrBuilder.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentOrBuilder.java @@ -28,10 +28,7 @@ public interface AgentOrBuilder * *
    * The unique identifier of the agent.
-   * Required for the
-   * [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent]
-   * method.
-   * [Agents.CreateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.CreateAgent]
+   * Required for the [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent] method. [Agents.CreateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.CreateAgent]
    * populates the name automatically.
    * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
    * 
@@ -46,10 +43,7 @@ public interface AgentOrBuilder * *
    * The unique identifier of the agent.
-   * Required for the
-   * [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent]
-   * method.
-   * [Agents.CreateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.CreateAgent]
+   * Required for the [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent] method. [Agents.CreateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.CreateAgent]
    * populates the name automatically.
    * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
    * 
@@ -93,9 +87,7 @@ public interface AgentOrBuilder * See [Language * Support](https://cloud.google.com/dialogflow/docs/reference/language) * for a list of the currently supported language codes. - * This field cannot be set by the - * [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent] - * method. + * This field cannot be set by the [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent] method. * * * string default_language_code = 3 [(.google.api.field_behavior) = IMMUTABLE]; @@ -111,9 +103,7 @@ public interface AgentOrBuilder * See [Language * Support](https://cloud.google.com/dialogflow/docs/reference/language) * for a list of the currently supported language codes. - * This field cannot be set by the - * [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent] - * method. + * This field cannot be set by the [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent] method. * * * string default_language_code = 3 [(.google.api.field_behavior) = IMMUTABLE]; @@ -252,10 +242,11 @@ public interface AgentOrBuilder * * *
-   * 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/<Project ID>/locations/<Location
-   * ID>/agents/<Agent ID>/flows/<Flow ID>`.
+   * 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/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>`.
    * 
* * @@ -269,10 +260,11 @@ public interface AgentOrBuilder * * *
-   * 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/<Project ID>/locations/<Location
-   * ID>/agents/<Agent ID>/flows/<Flow ID>`.
+   * 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/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>`.
    * 
* * @@ -283,6 +275,35 @@ public interface AgentOrBuilder */ com.google.protobuf.ByteString getStartFlowBytes(); + /** + * + * + *
+   * Name of the [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettings] reference for the agent.
+   * Format: `projects/<Project ID>/locations/<Location
+   * ID>/securitySettings/<Security Settings ID>`.
+   * 
+ * + * string security_settings = 17 [(.google.api.resource_reference) = { ... } + * + * @return The securitySettings. + */ + java.lang.String getSecuritySettings(); + /** + * + * + *
+   * Name of the [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettings] reference for the agent.
+   * Format: `projects/<Project ID>/locations/<Location
+   * ID>/securitySettings/<Security Settings ID>`.
+   * 
+ * + * string security_settings = 17 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for securitySettings. + */ + com.google.protobuf.ByteString getSecuritySettingsBytes(); + /** * * diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentProto.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentProto.java index fe5e0b201..a28e69bbf 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentProto.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentProto.java @@ -71,6 +71,18 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dialogflow_cx_v3beta1_RestoreAgentRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_cx_v3beta1_RestoreAgentRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_ValidateAgentRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_ValidateAgentRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_GetAgentValidationResultRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_GetAgentValidationResultRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_AgentValidationResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_AgentValidationResult_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -91,7 +103,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "unning/operations.proto\032\033google/protobuf" + "/empty.proto\032 google/protobuf/field_mask" + ".proto\"8\n\024SpeechToTextSettings\022 \n\030enable" - + "_speech_adaptation\030\001 \001(\010\"\317\003\n\005Agent\022\014\n\004na" + + "_speech_adaptation\030\001 \001(\010\"\233\004\n\005Agent\022\014\n\004na" + "me\030\001 \001(\t\022\031\n\014display_name\030\002 \001(\tB\003\340A\002\022\"\n\025d" + "efault_language_code\030\003 \001(\tB\003\340A\005\022\026\n\ttime_" + "zone\030\005 \001(\tB\003\340A\002\022\023\n\013description\030\006 \001(\t\022\022\n\n" @@ -99,77 +111,102 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ngs\030\r \001(\01328.google.cloud.dialogflow.cx.v" + "3beta1.SpeechToTextSettings\022:\n\nstart_flo" + "w\030\020 \001(\tB&\340A\005\372A \n\036dialogflow.googleapis.c" - + "om/Flow\022\"\n\032enable_stackdriver_logging\030\022 " - + "\001(\010\022\037\n\027enable_spell_correction\030\024 \001(\010:\\\352A" - + "Y\n\037dialogflow.googleapis.com/Agent\0226proj" - + "ects/{project}/locations/{location}/agen" - + "ts/{agent}\"s\n\021ListAgentsRequest\0227\n\006paren" - + "t\030\001 \001(\tB\'\340A\002\372A!\022\037dialogflow.googleapis.c" - + "om/Agent\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_toke" - + "n\030\003 \001(\t\"h\n\022ListAgentsResponse\0229\n\006agents\030" - + "\001 \003(\0132).google.cloud.dialogflow.cx.v3bet" - + "a1.Agent\022\027\n\017next_page_token\030\002 \001(\t\"H\n\017Get" - + "AgentRequest\0225\n\004name\030\001 \001(\tB\'\340A\002\372A!\n\037dial" - + "ogflow.googleapis.com/Agent\"\214\001\n\022CreateAg" - + "entRequest\0227\n\006parent\030\001 \001(\tB\'\340A\002\372A!\022\037dial" - + "ogflow.googleapis.com/Agent\022=\n\005agent\030\002 \001" - + "(\0132).google.cloud.dialogflow.cx.v3beta1." - + "AgentB\003\340A\002\"\204\001\n\022UpdateAgentRequest\022=\n\005age" - + "nt\030\001 \001(\0132).google.cloud.dialogflow.cx.v3" - + "beta1.AgentB\003\340A\002\022/\n\013update_mask\030\002 \001(\0132\032." - + "google.protobuf.FieldMask\"K\n\022DeleteAgent" - + "Request\0225\n\004name\030\001 \001(\tB\'\340A\002\372A!\n\037dialogflo" - + "w.googleapis.com/Agent\"c\n\022ExportAgentReq" - + "uest\0225\n\004name\030\001 \001(\tB\'\340A\002\372A!\n\037dialogflow.g" - + "oogleapis.com/Agent\022\026\n\tagent_uri\030\002 \001(\tB\003" - + "\340A\001\"L\n\023ExportAgentResponse\022\023\n\tagent_uri\030" - + "\001 \001(\tH\000\022\027\n\ragent_content\030\002 \001(\014H\000B\007\n\005agen" - + "t\"\203\001\n\023RestoreAgentRequest\0225\n\004name\030\001 \001(\tB" - + "\'\340A\002\372A!\n\037dialogflow.googleapis.com/Agent" - + "\022\023\n\tagent_uri\030\002 \001(\tH\000\022\027\n\ragent_content\030\003" - + " \001(\014H\000B\007\n\005agent2\327\013\n\006Agents\022\275\001\n\nListAgent" - + "s\0225.google.cloud.dialogflow.cx.v3beta1.L" - + "istAgentsRequest\0326.google.cloud.dialogfl" - + "ow.cx.v3beta1.ListAgentsResponse\"@\202\323\344\223\0021" - + "\022//v3beta1/{parent=projects/*/locations/" - + "*}/agents\332A\006parent\022\252\001\n\010GetAgent\0223.google" - + ".cloud.dialogflow.cx.v3beta1.GetAgentReq" - + "uest\032).google.cloud.dialogflow.cx.v3beta" - + "1.Agent\">\202\323\344\223\0021\022//v3beta1/{name=projects" - + "/*/locations/*/agents/*}\332A\004name\022\277\001\n\013Crea" - + "teAgent\0226.google.cloud.dialogflow.cx.v3b" - + "eta1.CreateAgentRequest\032).google.cloud.d" - + "ialogflow.cx.v3beta1.Agent\"M\202\323\344\223\0028\"//v3b" - + "eta1/{parent=projects/*/locations/*}/age" - + "nts:\005agent\332A\014parent,agent\022\312\001\n\013UpdateAgen" - + "t\0226.google.cloud.dialogflow.cx.v3beta1.U" - + "pdateAgentRequest\032).google.cloud.dialogf" - + "low.cx.v3beta1.Agent\"X\202\323\344\223\002>25/v3beta1/{" - + "agent.name=projects/*/locations/*/agents" - + "/*}:\005agent\332A\021agent,update_mask\022\235\001\n\013Delet" + + "om/Flow\022J\n\021security_settings\030\021 \001(\tB/\372A,\n" + + "*dialogflow.googleapis.com/SecuritySetti" + + "ngs\022\"\n\032enable_stackdriver_logging\030\022 \001(\010\022" + + "\037\n\027enable_spell_correction\030\024 \001(\010:\\\352AY\n\037d" + + "ialogflow.googleapis.com/Agent\0226projects" + + "/{project}/locations/{location}/agents/{" + + "agent}\"s\n\021ListAgentsRequest\0227\n\006parent\030\001 " + + "\001(\tB\'\340A\002\372A!\022\037dialogflow.googleapis.com/A" + + "gent\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 " + + "\001(\t\"h\n\022ListAgentsResponse\0229\n\006agents\030\001 \003(" + + "\0132).google.cloud.dialogflow.cx.v3beta1.A" + + "gent\022\027\n\017next_page_token\030\002 \001(\t\"H\n\017GetAgen" + + "tRequest\0225\n\004name\030\001 \001(\tB\'\340A\002\372A!\n\037dialogfl" + + "ow.googleapis.com/Agent\"\214\001\n\022CreateAgentR" + + "equest\0227\n\006parent\030\001 \001(\tB\'\340A\002\372A!\022\037dialogfl" + + "ow.googleapis.com/Agent\022=\n\005agent\030\002 \001(\0132)" + + ".google.cloud.dialogflow.cx.v3beta1.Agen" + + "tB\003\340A\002\"\204\001\n\022UpdateAgentRequest\022=\n\005agent\030\001" + + " \001(\0132).google.cloud.dialogflow.cx.v3beta" + + "1.AgentB\003\340A\002\022/\n\013update_mask\030\002 \001(\0132\032.goog" + + "le.protobuf.FieldMask\"K\n\022DeleteAgentRequ" + + "est\0225\n\004name\030\001 \001(\tB\'\340A\002\372A!\n\037dialogflow.go" + + "ogleapis.com/Agent\"c\n\022ExportAgentRequest" + + "\0225\n\004name\030\001 \001(\tB\'\340A\002\372A!\n\037dialogflow.googl" + + "eapis.com/Agent\022\026\n\tagent_uri\030\002 \001(\tB\003\340A\001\"" + + "L\n\023ExportAgentResponse\022\023\n\tagent_uri\030\001 \001(" + + "\tH\000\022\027\n\ragent_content\030\002 \001(\014H\000B\007\n\005agent\"\203\001" + + "\n\023RestoreAgentRequest\0225\n\004name\030\001 \001(\tB\'\340A\002" + + "\372A!\n\037dialogflow.googleapis.com/Agent\022\023\n\t" + + "agent_uri\030\002 \001(\tH\000\022\027\n\ragent_content\030\003 \001(\014" + + "H\000B\007\n\005agent\"d\n\024ValidateAgentRequest\0225\n\004n" + + "ame\030\001 \001(\tB\'\340A\002\372A!\n\037dialogflow.googleapis" + + ".com/Agent\022\025\n\rlanguage_code\030\002 \001(\t\"\177\n\037Get" + + "AgentValidationResultRequest\022E\n\004name\030\001 \001" + + "(\tB7\340A\002\372A1\n/dialogflow.googleapis.com/Ag" + + "entValidationResult\022\025\n\rlanguage_code\030\002 \001" + + "(\t\"\377\001\n\025AgentValidationResult\022\014\n\004name\030\001 \001" + + "(\t\022Y\n\027flow_validation_results\030\002 \003(\01328.go" + + "ogle.cloud.dialogflow.cx.v3beta1.FlowVal" + + "idationResult:}\352Az\n/dialogflow.googleapi" + + "s.com/AgentValidationResult\022Gprojects/{p" + + "roject}/locations/{location}/agents/{age" + + "nt}/validationResult2\221\017\n\006Agents\022\275\001\n\nList" + + "Agents\0225.google.cloud.dialogflow.cx.v3be" + + "ta1.ListAgentsRequest\0326.google.cloud.dia" + + "logflow.cx.v3beta1.ListAgentsResponse\"@\202" + + "\323\344\223\0021\022//v3beta1/{parent=projects/*/locat" + + "ions/*}/agents\332A\006parent\022\252\001\n\010GetAgent\0223.g" + + "oogle.cloud.dialogflow.cx.v3beta1.GetAge" + + "ntRequest\032).google.cloud.dialogflow.cx.v" + + "3beta1.Agent\">\202\323\344\223\0021\022//v3beta1/{name=pro" + + "jects/*/locations/*/agents/*}\332A\004name\022\277\001\n" + + "\013CreateAgent\0226.google.cloud.dialogflow.c" + + "x.v3beta1.CreateAgentRequest\032).google.cl" + + "oud.dialogflow.cx.v3beta1.Agent\"M\202\323\344\223\0028\"" + + "//v3beta1/{parent=projects/*/locations/*" + + "}/agents:\005agent\332A\014parent,agent\022\312\001\n\013Updat" + "eAgent\0226.google.cloud.dialogflow.cx.v3be" - + "ta1.DeleteAgentRequest\032\026.google.protobuf" - + ".Empty\">\202\323\344\223\0021*//v3beta1/{name=projects/" - + "*/locations/*/agents/*}\332A\004name\022\327\001\n\013Expor" - + "tAgent\0226.google.cloud.dialogflow.cx.v3be" - + "ta1.ExportAgentRequest\032\035.google.longrunn" - + "ing.Operation\"q\202\323\344\223\002;\"6/v3beta1/{name=pr" - + "ojects/*/locations/*/agents/*}:export:\001*" - + "\312A-\n\023ExportAgentResponse\022\026google.protobu" - + "f.Struct\022\334\001\n\014RestoreAgent\0227.google.cloud" - + ".dialogflow.cx.v3beta1.RestoreAgentReque" - + "st\032\035.google.longrunning.Operation\"t\202\323\344\223\002" - + "<\"7/v3beta1/{name=projects/*/locations/*" - + "/agents/*}:restore:\001*\312A/\n\025google.protobu" - + "f.Empty\022\026google.protobuf.Struct\032x\312A\031dial" - + "ogflow.googleapis.com\322AYhttps://www.goog" - + "leapis.com/auth/cloud-platform,https://w" - + "ww.googleapis.com/auth/dialogflowB\251\001\n&co" - + "m.google.cloud.dialogflow.cx.v3beta1B\nAg" - + "entProtoP\001ZDgoogle.golang.org/genproto/g" - + "oogleapis/cloud/dialogflow/cx/v3beta1;cx" - + "\370\001\001\242\002\002DF\252\002\"Google.Cloud.Dialogflow.Cx.V3" - + "Beta1b\006proto3" + + "ta1.UpdateAgentRequest\032).google.cloud.di" + + "alogflow.cx.v3beta1.Agent\"X\202\323\344\223\002>25/v3be" + + "ta1/{agent.name=projects/*/locations/*/a" + + "gents/*}:\005agent\332A\021agent,update_mask\022\235\001\n\013" + + "DeleteAgent\0226.google.cloud.dialogflow.cx" + + ".v3beta1.DeleteAgentRequest\032\026.google.pro" + + "tobuf.Empty\">\202\323\344\223\0021*//v3beta1/{name=proj" + + "ects/*/locations/*/agents/*}\332A\004name\022\327\001\n\013" + + "ExportAgent\0226.google.cloud.dialogflow.cx" + + ".v3beta1.ExportAgentRequest\032\035.google.lon" + + "grunning.Operation\"q\202\323\344\223\002;\"6/v3beta1/{na" + + "me=projects/*/locations/*/agents/*}:expo" + + "rt:\001*\312A-\n\023ExportAgentResponse\022\026google.pr" + + "otobuf.Struct\022\334\001\n\014RestoreAgent\0227.google." + + "cloud.dialogflow.cx.v3beta1.RestoreAgent" + + "Request\032\035.google.longrunning.Operation\"t" + + "\202\323\344\223\002<\"7/v3beta1/{name=projects/*/locati" + + "ons/*/agents/*}:restore:\001*\312A/\n\025google.pr" + + "otobuf.Empty\022\026google.protobuf.Struct\022\311\001\n" + + "\rValidateAgent\0228.google.cloud.dialogflow" + + ".cx.v3beta1.ValidateAgentRequest\0329.googl" + + "e.cloud.dialogflow.cx.v3beta1.AgentValid" + + "ationResult\"C\202\323\344\223\002=\"8/v3beta1/{name=proj" + + "ects/*/locations/*/agents/*}:validate:\001*" + + "\022\353\001\n\030GetAgentValidationResult\022C.google.c" + + "loud.dialogflow.cx.v3beta1.GetAgentValid" + + "ationResultRequest\0329.google.cloud.dialog" + + "flow.cx.v3beta1.AgentValidationResult\"O\202" + + "\323\344\223\002B\022@/v3beta1/{name=projects/*/locatio" + + "ns/*/agents/*/validationResult}\332A\004name\032x" + + "\312A\031dialogflow.googleapis.com\322AYhttps://w" + + "ww.googleapis.com/auth/cloud-platform,ht" + + "tps://www.googleapis.com/auth/dialogflow" + + "B\251\001\n&com.google.cloud.dialogflow.cx.v3be" + + "ta1B\nAgentProtoP\001ZDgoogle.golang.org/gen" + + "proto/googleapis/cloud/dialogflow/cx/v3b" + + "eta1;cx\370\001\001\242\002\002DF\252\002\"Google.Cloud.Dialogflo" + + "w.Cx.V3Beta1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -207,6 +244,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "AvatarUri", "SpeechToTextSettings", "StartFlow", + "SecuritySettings", "EnableStackdriverLogging", "EnableSpellCorrection", }); @@ -282,6 +320,30 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Name", "AgentUri", "AgentContent", "Agent", }); + internal_static_google_cloud_dialogflow_cx_v3beta1_ValidateAgentRequest_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_dialogflow_cx_v3beta1_ValidateAgentRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_ValidateAgentRequest_descriptor, + new java.lang.String[] { + "Name", "LanguageCode", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_GetAgentValidationResultRequest_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_dialogflow_cx_v3beta1_GetAgentValidationResultRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_GetAgentValidationResultRequest_descriptor, + new java.lang.String[] { + "Name", "LanguageCode", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_AgentValidationResult_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_dialogflow_cx_v3beta1_AgentValidationResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_AgentValidationResult_descriptor, + new java.lang.String[] { + "Name", "FlowValidationResults", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.ClientProto.defaultHost); diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentValidationResult.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentValidationResult.java new file mode 100644 index 000000000..7737a6fef --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentValidationResult.java @@ -0,0 +1,1224 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/agent.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The response message for [Agents.GetAgentValidationResult][google.cloud.dialogflow.cx.v3beta1.Agents.GetAgentValidationResult].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.AgentValidationResult} + */ +public final class AgentValidationResult extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.AgentValidationResult) + AgentValidationResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use AgentValidationResult.newBuilder() to construct. + private AgentValidationResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AgentValidationResult() { + name_ = ""; + flowValidationResults_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AgentValidationResult(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AgentValidationResult( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + flowValidationResults_ = + new java.util.ArrayList< + com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult>(); + mutable_bitField0_ |= 0x00000001; + } + flowValidationResults_.add( + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + flowValidationResults_ = java.util.Collections.unmodifiableList(flowValidationResults_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.AgentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_AgentValidationResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.AgentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_AgentValidationResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult.class, + com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * The unique identifier of the agent validation result.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/validationResult`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * The unique identifier of the agent validation result.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/validationResult`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FLOW_VALIDATION_RESULTS_FIELD_NUMBER = 2; + private java.util.List + flowValidationResults_; + /** + * + * + *
+   * Contains all flow validation results.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.FlowValidationResult flow_validation_results = 2; + * + */ + @java.lang.Override + public java.util.List + getFlowValidationResultsList() { + return flowValidationResults_; + } + /** + * + * + *
+   * Contains all flow validation results.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.FlowValidationResult flow_validation_results = 2; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResultOrBuilder> + getFlowValidationResultsOrBuilderList() { + return flowValidationResults_; + } + /** + * + * + *
+   * Contains all flow validation results.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.FlowValidationResult flow_validation_results = 2; + * + */ + @java.lang.Override + public int getFlowValidationResultsCount() { + return flowValidationResults_.size(); + } + /** + * + * + *
+   * Contains all flow validation results.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.FlowValidationResult flow_validation_results = 2; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult getFlowValidationResults( + int index) { + return flowValidationResults_.get(index); + } + /** + * + * + *
+   * Contains all flow validation results.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.FlowValidationResult flow_validation_results = 2; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResultOrBuilder + getFlowValidationResultsOrBuilder(int index) { + return flowValidationResults_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + for (int i = 0; i < flowValidationResults_.size(); i++) { + output.writeMessage(2, flowValidationResults_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + for (int i = 0; i < flowValidationResults_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, flowValidationResults_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult other = + (com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult) obj; + + if (!getName().equals(other.getName())) return false; + if (!getFlowValidationResultsList().equals(other.getFlowValidationResultsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getFlowValidationResultsCount() > 0) { + hash = (37 * hash) + FLOW_VALIDATION_RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getFlowValidationResultsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The response message for [Agents.GetAgentValidationResult][google.cloud.dialogflow.cx.v3beta1.Agents.GetAgentValidationResult].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.AgentValidationResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.AgentValidationResult) + com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.AgentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_AgentValidationResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.AgentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_AgentValidationResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult.class, + com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getFlowValidationResultsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (flowValidationResultsBuilder_ == null) { + flowValidationResults_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + flowValidationResultsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.AgentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_AgentValidationResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult build() { + com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult result = + new com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + if (flowValidationResultsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + flowValidationResults_ = java.util.Collections.unmodifiableList(flowValidationResults_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.flowValidationResults_ = flowValidationResults_; + } else { + result.flowValidationResults_ = flowValidationResultsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (flowValidationResultsBuilder_ == null) { + if (!other.flowValidationResults_.isEmpty()) { + if (flowValidationResults_.isEmpty()) { + flowValidationResults_ = other.flowValidationResults_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFlowValidationResultsIsMutable(); + flowValidationResults_.addAll(other.flowValidationResults_); + } + onChanged(); + } + } else { + if (!other.flowValidationResults_.isEmpty()) { + if (flowValidationResultsBuilder_.isEmpty()) { + flowValidationResultsBuilder_.dispose(); + flowValidationResultsBuilder_ = null; + flowValidationResults_ = other.flowValidationResults_; + bitField0_ = (bitField0_ & ~0x00000001); + flowValidationResultsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getFlowValidationResultsFieldBuilder() + : null; + } else { + flowValidationResultsBuilder_.addAllMessages(other.flowValidationResults_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The unique identifier of the agent validation result.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/validationResult`.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The unique identifier of the agent validation result.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/validationResult`.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The unique identifier of the agent validation result.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/validationResult`.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The unique identifier of the agent validation result.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/validationResult`.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The unique identifier of the agent validation result.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/validationResult`.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.util.List + flowValidationResults_ = java.util.Collections.emptyList(); + + private void ensureFlowValidationResultsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + flowValidationResults_ = + new java.util.ArrayList( + flowValidationResults_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult, + com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.Builder, + com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResultOrBuilder> + flowValidationResultsBuilder_; + + /** + * + * + *
+     * Contains all flow validation results.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.FlowValidationResult flow_validation_results = 2; + * + */ + public java.util.List + getFlowValidationResultsList() { + if (flowValidationResultsBuilder_ == null) { + return java.util.Collections.unmodifiableList(flowValidationResults_); + } else { + return flowValidationResultsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Contains all flow validation results.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.FlowValidationResult flow_validation_results = 2; + * + */ + public int getFlowValidationResultsCount() { + if (flowValidationResultsBuilder_ == null) { + return flowValidationResults_.size(); + } else { + return flowValidationResultsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Contains all flow validation results.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.FlowValidationResult flow_validation_results = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult getFlowValidationResults( + int index) { + if (flowValidationResultsBuilder_ == null) { + return flowValidationResults_.get(index); + } else { + return flowValidationResultsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Contains all flow validation results.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.FlowValidationResult flow_validation_results = 2; + * + */ + public Builder setFlowValidationResults( + int index, com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult value) { + if (flowValidationResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFlowValidationResultsIsMutable(); + flowValidationResults_.set(index, value); + onChanged(); + } else { + flowValidationResultsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Contains all flow validation results.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.FlowValidationResult flow_validation_results = 2; + * + */ + public Builder setFlowValidationResults( + int index, + com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.Builder builderForValue) { + if (flowValidationResultsBuilder_ == null) { + ensureFlowValidationResultsIsMutable(); + flowValidationResults_.set(index, builderForValue.build()); + onChanged(); + } else { + flowValidationResultsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Contains all flow validation results.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.FlowValidationResult flow_validation_results = 2; + * + */ + public Builder addFlowValidationResults( + com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult value) { + if (flowValidationResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFlowValidationResultsIsMutable(); + flowValidationResults_.add(value); + onChanged(); + } else { + flowValidationResultsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Contains all flow validation results.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.FlowValidationResult flow_validation_results = 2; + * + */ + public Builder addFlowValidationResults( + int index, com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult value) { + if (flowValidationResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFlowValidationResultsIsMutable(); + flowValidationResults_.add(index, value); + onChanged(); + } else { + flowValidationResultsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Contains all flow validation results.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.FlowValidationResult flow_validation_results = 2; + * + */ + public Builder addFlowValidationResults( + com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.Builder builderForValue) { + if (flowValidationResultsBuilder_ == null) { + ensureFlowValidationResultsIsMutable(); + flowValidationResults_.add(builderForValue.build()); + onChanged(); + } else { + flowValidationResultsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Contains all flow validation results.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.FlowValidationResult flow_validation_results = 2; + * + */ + public Builder addFlowValidationResults( + int index, + com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.Builder builderForValue) { + if (flowValidationResultsBuilder_ == null) { + ensureFlowValidationResultsIsMutable(); + flowValidationResults_.add(index, builderForValue.build()); + onChanged(); + } else { + flowValidationResultsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Contains all flow validation results.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.FlowValidationResult flow_validation_results = 2; + * + */ + public Builder addAllFlowValidationResults( + java.lang.Iterable + values) { + if (flowValidationResultsBuilder_ == null) { + ensureFlowValidationResultsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, flowValidationResults_); + onChanged(); + } else { + flowValidationResultsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Contains all flow validation results.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.FlowValidationResult flow_validation_results = 2; + * + */ + public Builder clearFlowValidationResults() { + if (flowValidationResultsBuilder_ == null) { + flowValidationResults_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + flowValidationResultsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Contains all flow validation results.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.FlowValidationResult flow_validation_results = 2; + * + */ + public Builder removeFlowValidationResults(int index) { + if (flowValidationResultsBuilder_ == null) { + ensureFlowValidationResultsIsMutable(); + flowValidationResults_.remove(index); + onChanged(); + } else { + flowValidationResultsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Contains all flow validation results.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.FlowValidationResult flow_validation_results = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.Builder + getFlowValidationResultsBuilder(int index) { + return getFlowValidationResultsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Contains all flow validation results.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.FlowValidationResult flow_validation_results = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResultOrBuilder + getFlowValidationResultsOrBuilder(int index) { + if (flowValidationResultsBuilder_ == null) { + return flowValidationResults_.get(index); + } else { + return flowValidationResultsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Contains all flow validation results.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.FlowValidationResult flow_validation_results = 2; + * + */ + public java.util.List< + ? extends com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResultOrBuilder> + getFlowValidationResultsOrBuilderList() { + if (flowValidationResultsBuilder_ != null) { + return flowValidationResultsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(flowValidationResults_); + } + } + /** + * + * + *
+     * Contains all flow validation results.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.FlowValidationResult flow_validation_results = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.Builder + addFlowValidationResultsBuilder() { + return getFlowValidationResultsFieldBuilder() + .addBuilder( + com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.getDefaultInstance()); + } + /** + * + * + *
+     * Contains all flow validation results.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.FlowValidationResult flow_validation_results = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.Builder + addFlowValidationResultsBuilder(int index) { + return getFlowValidationResultsFieldBuilder() + .addBuilder( + index, + com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.getDefaultInstance()); + } + /** + * + * + *
+     * Contains all flow validation results.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.FlowValidationResult flow_validation_results = 2; + * + */ + public java.util.List + getFlowValidationResultsBuilderList() { + return getFlowValidationResultsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult, + com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.Builder, + com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResultOrBuilder> + getFlowValidationResultsFieldBuilder() { + if (flowValidationResultsBuilder_ == null) { + flowValidationResultsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult, + com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.Builder, + com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResultOrBuilder>( + flowValidationResults_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + flowValidationResults_ = null; + } + return flowValidationResultsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.AgentValidationResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.AgentValidationResult) + private static final com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AgentValidationResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AgentValidationResult(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentValidationResultName.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentValidationResultName.java new file mode 100644 index 000000000..0b65f672b --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentValidationResultName.java @@ -0,0 +1,224 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.cx.v3beta1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class AgentValidationResultName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_AGENT = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/agents/{agent}/validationResult"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String agent; + + @Deprecated + protected AgentValidationResultName() { + project = null; + location = null; + agent = null; + } + + private AgentValidationResultName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + agent = Preconditions.checkNotNull(builder.getAgent()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAgent() { + return agent; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static AgentValidationResultName of(String project, String location, String agent) { + return newBuilder().setProject(project).setLocation(location).setAgent(agent).build(); + } + + public static String format(String project, String location, String agent) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAgent(agent) + .build() + .toString(); + } + + public static AgentValidationResultName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_AGENT.validatedMatch( + formattedString, + "AgentValidationResultName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("agent")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (AgentValidationResultName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_AGENT.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (agent != null) { + fieldMapBuilder.put("agent", agent); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_AGENT.instantiate( + "project", project, "location", location, "agent", agent); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + AgentValidationResultName that = ((AgentValidationResultName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.agent, that.agent); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(agent); + return h; + } + + /** Builder for projects/{project}/locations/{location}/agents/{agent}/validationResult. */ + public static class Builder { + private String project; + private String location; + private String agent; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAgent() { + return agent; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setAgent(String agent) { + this.agent = agent; + return this; + } + + private Builder(AgentValidationResultName agentValidationResultName) { + project = agentValidationResultName.project; + location = agentValidationResultName.location; + agent = agentValidationResultName.agent; + } + + public AgentValidationResultName build() { + return new AgentValidationResultName(this); + } + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentValidationResultOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentValidationResultOrBuilder.java new file mode 100644 index 000000000..6886fa2a7 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentValidationResultOrBuilder.java @@ -0,0 +1,118 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/agent.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface AgentValidationResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.AgentValidationResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The unique identifier of the agent validation result.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/validationResult`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The unique identifier of the agent validation result.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/validationResult`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Contains all flow validation results.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.FlowValidationResult flow_validation_results = 2; + * + */ + java.util.List + getFlowValidationResultsList(); + /** + * + * + *
+   * Contains all flow validation results.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.FlowValidationResult flow_validation_results = 2; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult getFlowValidationResults(int index); + /** + * + * + *
+   * Contains all flow validation results.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.FlowValidationResult flow_validation_results = 2; + * + */ + int getFlowValidationResultsCount(); + /** + * + * + *
+   * Contains all flow validation results.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.FlowValidationResult flow_validation_results = 2; + * + */ + java.util.List + getFlowValidationResultsOrBuilderList(); + /** + * + * + *
+   * Contains all flow validation results.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.FlowValidationResult flow_validation_results = 2; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResultOrBuilder + getFlowValidationResultsOrBuilder(int index); +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BatchDeleteTestCasesRequest.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BatchDeleteTestCasesRequest.java new file mode 100644 index 000000000..77bb2c2d6 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BatchDeleteTestCasesRequest.java @@ -0,0 +1,988 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The request message for [TestCases.BatchDeleteTestCases][google.cloud.dialogflow.cx.v3beta1.TestCases.BatchDeleteTestCases].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest} + */ +public final class BatchDeleteTestCasesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest) + BatchDeleteTestCasesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchDeleteTestCasesRequest.newBuilder() to construct. + private BatchDeleteTestCasesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchDeleteTestCasesRequest() { + parent_ = ""; + names_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchDeleteTestCasesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BatchDeleteTestCasesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + names_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + names_.add(s); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + names_ = names_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_BatchDeleteTestCasesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_BatchDeleteTestCasesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The agent to delete test cases from.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The agent to delete test cases from.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAMES_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList names_; + /** + * + * + *
+   * Required. Format of test case names: `projects/<Project ID>/locations/
+   * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`.
+   * 
+ * + * + * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the names. + */ + public com.google.protobuf.ProtocolStringList getNamesList() { + return names_; + } + /** + * + * + *
+   * Required. Format of test case names: `projects/<Project ID>/locations/
+   * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`.
+   * 
+ * + * + * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The count of names. + */ + public int getNamesCount() { + return names_.size(); + } + /** + * + * + *
+   * Required. Format of test case names: `projects/<Project ID>/locations/
+   * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`.
+   * 
+ * + * + * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The names at the given index. + */ + public java.lang.String getNames(int index) { + return names_.get(index); + } + /** + * + * + *
+   * Required. Format of test case names: `projects/<Project ID>/locations/
+   * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`.
+   * 
+ * + * + * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the names at the given index. + */ + public com.google.protobuf.ByteString getNamesBytes(int index) { + return names_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + for (int i = 0; i < names_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, names_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + { + int dataSize = 0; + for (int i = 0; i < names_.size(); i++) { + dataSize += computeStringSizeNoTag(names_.getRaw(i)); + } + size += dataSize; + size += 1 * getNamesList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest other = + (com.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getNamesList().equals(other.getNamesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (getNamesCount() > 0) { + hash = (37 * hash) + NAMES_FIELD_NUMBER; + hash = (53 * hash) + getNamesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for [TestCases.BatchDeleteTestCases][google.cloud.dialogflow.cx.v3beta1.TestCases.BatchDeleteTestCases].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest) + com.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_BatchDeleteTestCasesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_BatchDeleteTestCasesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest.Builder.class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + names_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_BatchDeleteTestCasesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest build() { + com.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest result = + new com.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest(this); + int from_bitField0_ = bitField0_; + result.parent_ = parent_; + if (((bitField0_ & 0x00000001) != 0)) { + names_ = names_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.names_ = names_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.names_.isEmpty()) { + if (names_.isEmpty()) { + names_ = other.names_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureNamesIsMutable(); + names_.addAll(other.names_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The agent to delete test cases from.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The agent to delete test cases from.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The agent to delete test cases from.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The agent to delete test cases from.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The agent to delete test cases from.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList names_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureNamesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + names_ = new com.google.protobuf.LazyStringArrayList(names_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Required. Format of test case names: `projects/<Project ID>/locations/
+     * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`.
+     * 
+ * + * + * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the names. + */ + public com.google.protobuf.ProtocolStringList getNamesList() { + return names_.getUnmodifiableView(); + } + /** + * + * + *
+     * Required. Format of test case names: `projects/<Project ID>/locations/
+     * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`.
+     * 
+ * + * + * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The count of names. + */ + public int getNamesCount() { + return names_.size(); + } + /** + * + * + *
+     * Required. Format of test case names: `projects/<Project ID>/locations/
+     * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`.
+     * 
+ * + * + * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The names at the given index. + */ + public java.lang.String getNames(int index) { + return names_.get(index); + } + /** + * + * + *
+     * Required. Format of test case names: `projects/<Project ID>/locations/
+     * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`.
+     * 
+ * + * + * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the names at the given index. + */ + public com.google.protobuf.ByteString getNamesBytes(int index) { + return names_.getByteString(index); + } + /** + * + * + *
+     * Required. Format of test case names: `projects/<Project ID>/locations/
+     * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`.
+     * 
+ * + * + * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index to set the value at. + * @param value The names to set. + * @return This builder for chaining. + */ + public Builder setNames(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureNamesIsMutable(); + names_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format of test case names: `projects/<Project ID>/locations/
+     * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`.
+     * 
+ * + * + * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The names to add. + * @return This builder for chaining. + */ + public Builder addNames(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureNamesIsMutable(); + names_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format of test case names: `projects/<Project ID>/locations/
+     * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`.
+     * 
+ * + * + * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param values The names to add. + * @return This builder for chaining. + */ + public Builder addAllNames(java.lang.Iterable values) { + ensureNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, names_); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format of test case names: `projects/<Project ID>/locations/
+     * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`.
+     * 
+ * + * + * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearNames() { + names_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format of test case names: `projects/<Project ID>/locations/
+     * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`.
+     * 
+ * + * + * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes of the names to add. + * @return This builder for chaining. + */ + public Builder addNamesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureNamesIsMutable(); + names_.add(value); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest) + private static final com.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchDeleteTestCasesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BatchDeleteTestCasesRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BatchDeleteTestCasesRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BatchDeleteTestCasesRequestOrBuilder.java new file mode 100644 index 000000000..7f6de4f7e --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BatchDeleteTestCasesRequestOrBuilder.java @@ -0,0 +1,119 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface BatchDeleteTestCasesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The agent to delete test cases from.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The agent to delete test cases from.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. Format of test case names: `projects/<Project ID>/locations/
+   * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`.
+   * 
+ * + * + * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the names. + */ + java.util.List getNamesList(); + /** + * + * + *
+   * Required. Format of test case names: `projects/<Project ID>/locations/
+   * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`.
+   * 
+ * + * + * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The count of names. + */ + int getNamesCount(); + /** + * + * + *
+   * Required. Format of test case names: `projects/<Project ID>/locations/
+   * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`.
+   * 
+ * + * + * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The names at the given index. + */ + java.lang.String getNames(int index); + /** + * + * + *
+   * Required. Format of test case names: `projects/<Project ID>/locations/
+   * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`.
+   * 
+ * + * + * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the names at the given index. + */ + com.google.protobuf.ByteString getNamesBytes(int index); +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BatchRunTestCasesMetadata.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BatchRunTestCasesMetadata.java new file mode 100644 index 000000000..fb8fd989c --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BatchRunTestCasesMetadata.java @@ -0,0 +1,963 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * Metadata returned for the [TestCases.BatchRunTestCases][google.cloud.dialogflow.cx.v3beta1.TestCases.BatchRunTestCases] long running
+ * operation.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadata} + */ +public final class BatchRunTestCasesMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadata) + BatchRunTestCasesMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchRunTestCasesMetadata.newBuilder() to construct. + private BatchRunTestCasesMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchRunTestCasesMetadata() { + errors_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchRunTestCasesMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BatchRunTestCasesMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + errors_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + errors_.add( + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.TestError.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + errors_ = java.util.Collections.unmodifiableList(errors_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_BatchRunTestCasesMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_BatchRunTestCasesMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadata.class, + com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadata.Builder.class); + } + + public static final int ERRORS_FIELD_NUMBER = 1; + private java.util.List errors_; + /** + * + * + *
+   * The test errors.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestError errors = 1; + */ + @java.lang.Override + public java.util.List getErrorsList() { + return errors_; + } + /** + * + * + *
+   * The test errors.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestError errors = 1; + */ + @java.lang.Override + public java.util.List + getErrorsOrBuilderList() { + return errors_; + } + /** + * + * + *
+   * The test errors.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestError errors = 1; + */ + @java.lang.Override + public int getErrorsCount() { + return errors_.size(); + } + /** + * + * + *
+   * The test errors.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestError errors = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TestError getErrors(int index) { + return errors_.get(index); + } + /** + * + * + *
+   * The test errors.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestError errors = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TestErrorOrBuilder getErrorsOrBuilder(int index) { + return errors_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < errors_.size(); i++) { + output.writeMessage(1, errors_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < errors_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, errors_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadata)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadata other = + (com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadata) obj; + + if (!getErrorsList().equals(other.getErrorsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getErrorsCount() > 0) { + hash = (37 * hash) + ERRORS_FIELD_NUMBER; + hash = (53 * hash) + getErrorsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata returned for the [TestCases.BatchRunTestCases][google.cloud.dialogflow.cx.v3beta1.TestCases.BatchRunTestCases] long running
+   * operation.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadata) + com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_BatchRunTestCasesMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_BatchRunTestCasesMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadata.class, + com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadata.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getErrorsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (errorsBuilder_ == null) { + errors_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + errorsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_BatchRunTestCasesMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadata + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadata build() { + com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadata buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadata result = + new com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadata(this); + int from_bitField0_ = bitField0_; + if (errorsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + errors_ = java.util.Collections.unmodifiableList(errors_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.errors_ = errors_; + } else { + result.errors_ = errorsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadata) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadata other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadata.getDefaultInstance()) + return this; + if (errorsBuilder_ == null) { + if (!other.errors_.isEmpty()) { + if (errors_.isEmpty()) { + errors_ = other.errors_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureErrorsIsMutable(); + errors_.addAll(other.errors_); + } + onChanged(); + } + } else { + if (!other.errors_.isEmpty()) { + if (errorsBuilder_.isEmpty()) { + errorsBuilder_.dispose(); + errorsBuilder_ = null; + errors_ = other.errors_; + bitField0_ = (bitField0_ & ~0x00000001); + errorsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getErrorsFieldBuilder() + : null; + } else { + errorsBuilder_.addAllMessages(other.errors_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadata) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List errors_ = + java.util.Collections.emptyList(); + + private void ensureErrorsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + errors_ = + new java.util.ArrayList(errors_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TestError, + com.google.cloud.dialogflow.cx.v3beta1.TestError.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TestErrorOrBuilder> + errorsBuilder_; + + /** + * + * + *
+     * The test errors.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestError errors = 1; + */ + public java.util.List getErrorsList() { + if (errorsBuilder_ == null) { + return java.util.Collections.unmodifiableList(errors_); + } else { + return errorsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The test errors.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestError errors = 1; + */ + public int getErrorsCount() { + if (errorsBuilder_ == null) { + return errors_.size(); + } else { + return errorsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The test errors.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestError errors = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.TestError getErrors(int index) { + if (errorsBuilder_ == null) { + return errors_.get(index); + } else { + return errorsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The test errors.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestError errors = 1; + */ + public Builder setErrors(int index, com.google.cloud.dialogflow.cx.v3beta1.TestError value) { + if (errorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorsIsMutable(); + errors_.set(index, value); + onChanged(); + } else { + errorsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The test errors.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestError errors = 1; + */ + public Builder setErrors( + int index, com.google.cloud.dialogflow.cx.v3beta1.TestError.Builder builderForValue) { + if (errorsBuilder_ == null) { + ensureErrorsIsMutable(); + errors_.set(index, builderForValue.build()); + onChanged(); + } else { + errorsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The test errors.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestError errors = 1; + */ + public Builder addErrors(com.google.cloud.dialogflow.cx.v3beta1.TestError value) { + if (errorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorsIsMutable(); + errors_.add(value); + onChanged(); + } else { + errorsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The test errors.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestError errors = 1; + */ + public Builder addErrors(int index, com.google.cloud.dialogflow.cx.v3beta1.TestError value) { + if (errorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorsIsMutable(); + errors_.add(index, value); + onChanged(); + } else { + errorsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The test errors.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestError errors = 1; + */ + public Builder addErrors( + com.google.cloud.dialogflow.cx.v3beta1.TestError.Builder builderForValue) { + if (errorsBuilder_ == null) { + ensureErrorsIsMutable(); + errors_.add(builderForValue.build()); + onChanged(); + } else { + errorsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The test errors.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestError errors = 1; + */ + public Builder addErrors( + int index, com.google.cloud.dialogflow.cx.v3beta1.TestError.Builder builderForValue) { + if (errorsBuilder_ == null) { + ensureErrorsIsMutable(); + errors_.add(index, builderForValue.build()); + onChanged(); + } else { + errorsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The test errors.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestError errors = 1; + */ + public Builder addAllErrors( + java.lang.Iterable values) { + if (errorsBuilder_ == null) { + ensureErrorsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, errors_); + onChanged(); + } else { + errorsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The test errors.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestError errors = 1; + */ + public Builder clearErrors() { + if (errorsBuilder_ == null) { + errors_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + errorsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The test errors.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestError errors = 1; + */ + public Builder removeErrors(int index) { + if (errorsBuilder_ == null) { + ensureErrorsIsMutable(); + errors_.remove(index); + onChanged(); + } else { + errorsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The test errors.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestError errors = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.TestError.Builder getErrorsBuilder(int index) { + return getErrorsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The test errors.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestError errors = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.TestErrorOrBuilder getErrorsOrBuilder(int index) { + if (errorsBuilder_ == null) { + return errors_.get(index); + } else { + return errorsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The test errors.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestError errors = 1; + */ + public java.util.List + getErrorsOrBuilderList() { + if (errorsBuilder_ != null) { + return errorsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(errors_); + } + } + /** + * + * + *
+     * The test errors.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestError errors = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.TestError.Builder addErrorsBuilder() { + return getErrorsFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3beta1.TestError.getDefaultInstance()); + } + /** + * + * + *
+     * The test errors.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestError errors = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.TestError.Builder addErrorsBuilder(int index) { + return getErrorsFieldBuilder() + .addBuilder(index, com.google.cloud.dialogflow.cx.v3beta1.TestError.getDefaultInstance()); + } + /** + * + * + *
+     * The test errors.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestError errors = 1; + */ + public java.util.List + getErrorsBuilderList() { + return getErrorsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TestError, + com.google.cloud.dialogflow.cx.v3beta1.TestError.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TestErrorOrBuilder> + getErrorsFieldBuilder() { + if (errorsBuilder_ == null) { + errorsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TestError, + com.google.cloud.dialogflow.cx.v3beta1.TestError.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TestErrorOrBuilder>( + errors_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + errors_ = null; + } + return errorsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadata) + private static final com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadata(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchRunTestCasesMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BatchRunTestCasesMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BatchRunTestCasesMetadataOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BatchRunTestCasesMetadataOrBuilder.java new file mode 100644 index 000000000..84c18c6ca --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BatchRunTestCasesMetadataOrBuilder.java @@ -0,0 +1,77 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface BatchRunTestCasesMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The test errors.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestError errors = 1; + */ + java.util.List getErrorsList(); + /** + * + * + *
+   * The test errors.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestError errors = 1; + */ + com.google.cloud.dialogflow.cx.v3beta1.TestError getErrors(int index); + /** + * + * + *
+   * The test errors.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestError errors = 1; + */ + int getErrorsCount(); + /** + * + * + *
+   * The test errors.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestError errors = 1; + */ + java.util.List + getErrorsOrBuilderList(); + /** + * + * + *
+   * The test errors.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestError errors = 1; + */ + com.google.cloud.dialogflow.cx.v3beta1.TestErrorOrBuilder getErrorsOrBuilder(int index); +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BatchRunTestCasesRequest.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BatchRunTestCasesRequest.java new file mode 100644 index 000000000..56303b39c --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BatchRunTestCasesRequest.java @@ -0,0 +1,1191 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The request message for [TestCases.BatchRunTestCases][google.cloud.dialogflow.cx.v3beta1.TestCases.BatchRunTestCases].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest} + */ +public final class BatchRunTestCasesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest) + BatchRunTestCasesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchRunTestCasesRequest.newBuilder() to construct. + private BatchRunTestCasesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchRunTestCasesRequest() { + parent_ = ""; + environment_ = ""; + testCases_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchRunTestCasesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BatchRunTestCasesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + environment_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + testCases_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + testCases_.add(s); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + testCases_ = testCases_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_BatchRunTestCasesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_BatchRunTestCasesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. Agent name. Format: `projects/<Project ID>/locations/<Location ID>/agents/
+   * <AgentID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Agent name. Format: `projects/<Project ID>/locations/<Location ID>/agents/
+   * <AgentID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENVIRONMENT_FIELD_NUMBER = 2; + private volatile java.lang.Object environment_; + /** + * + * + *
+   * Optional. If not set, draft environment is assumed. Format: `projects/<Project
+   * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment
+   * ID>`.
+   * 
+ * + * + * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The environment. + */ + @java.lang.Override + public java.lang.String getEnvironment() { + java.lang.Object ref = environment_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + environment_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. If not set, draft environment is assumed. Format: `projects/<Project
+   * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment
+   * ID>`.
+   * 
+ * + * + * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for environment. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEnvironmentBytes() { + java.lang.Object ref = environment_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + environment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TEST_CASES_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList testCases_; + /** + * + * + *
+   * Required. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/testCases/<TestCase ID>`.
+   * 
+ * + * + * repeated string test_cases = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the testCases. + */ + public com.google.protobuf.ProtocolStringList getTestCasesList() { + return testCases_; + } + /** + * + * + *
+   * Required. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/testCases/<TestCase ID>`.
+   * 
+ * + * + * repeated string test_cases = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The count of testCases. + */ + public int getTestCasesCount() { + return testCases_.size(); + } + /** + * + * + *
+   * Required. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/testCases/<TestCase ID>`.
+   * 
+ * + * + * repeated string test_cases = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The testCases at the given index. + */ + public java.lang.String getTestCases(int index) { + return testCases_.get(index); + } + /** + * + * + *
+   * Required. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/testCases/<TestCase ID>`.
+   * 
+ * + * + * repeated string test_cases = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the testCases at the given index. + */ + public com.google.protobuf.ByteString getTestCasesBytes(int index) { + return testCases_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!getEnvironmentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, environment_); + } + for (int i = 0; i < testCases_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, testCases_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!getEnvironmentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, environment_); + } + { + int dataSize = 0; + for (int i = 0; i < testCases_.size(); i++) { + dataSize += computeStringSizeNoTag(testCases_.getRaw(i)); + } + size += dataSize; + size += 1 * getTestCasesList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest other = + (com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getEnvironment().equals(other.getEnvironment())) return false; + if (!getTestCasesList().equals(other.getTestCasesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER; + hash = (53 * hash) + getEnvironment().hashCode(); + if (getTestCasesCount() > 0) { + hash = (37 * hash) + TEST_CASES_FIELD_NUMBER; + hash = (53 * hash) + getTestCasesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for [TestCases.BatchRunTestCases][google.cloud.dialogflow.cx.v3beta1.TestCases.BatchRunTestCases].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest) + com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_BatchRunTestCasesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_BatchRunTestCasesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + environment_ = ""; + + testCases_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_BatchRunTestCasesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest build() { + com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest result = + new com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest(this); + int from_bitField0_ = bitField0_; + result.parent_ = parent_; + result.environment_ = environment_; + if (((bitField0_ & 0x00000001) != 0)) { + testCases_ = testCases_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.testCases_ = testCases_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getEnvironment().isEmpty()) { + environment_ = other.environment_; + onChanged(); + } + if (!other.testCases_.isEmpty()) { + if (testCases_.isEmpty()) { + testCases_ = other.testCases_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTestCasesIsMutable(); + testCases_.addAll(other.testCases_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Agent name. Format: `projects/<Project ID>/locations/<Location ID>/agents/
+     * <AgentID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Agent name. Format: `projects/<Project ID>/locations/<Location ID>/agents/
+     * <AgentID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Agent name. Format: `projects/<Project ID>/locations/<Location ID>/agents/
+     * <AgentID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Agent name. Format: `projects/<Project ID>/locations/<Location ID>/agents/
+     * <AgentID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Agent name. Format: `projects/<Project ID>/locations/<Location ID>/agents/
+     * <AgentID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object environment_ = ""; + /** + * + * + *
+     * Optional. If not set, draft environment is assumed. Format: `projects/<Project
+     * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment
+     * ID>`.
+     * 
+ * + * + * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The environment. + */ + public java.lang.String getEnvironment() { + java.lang.Object ref = environment_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + environment_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. If not set, draft environment is assumed. Format: `projects/<Project
+     * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment
+     * ID>`.
+     * 
+ * + * + * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for environment. + */ + public com.google.protobuf.ByteString getEnvironmentBytes() { + java.lang.Object ref = environment_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + environment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. If not set, draft environment is assumed. Format: `projects/<Project
+     * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment
+     * ID>`.
+     * 
+ * + * + * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The environment to set. + * @return This builder for chaining. + */ + public Builder setEnvironment(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + environment_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If not set, draft environment is assumed. Format: `projects/<Project
+     * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment
+     * ID>`.
+     * 
+ * + * + * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearEnvironment() { + + environment_ = getDefaultInstance().getEnvironment(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If not set, draft environment is assumed. Format: `projects/<Project
+     * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment
+     * ID>`.
+     * 
+ * + * + * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for environment to set. + * @return This builder for chaining. + */ + public Builder setEnvironmentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + environment_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList testCases_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureTestCasesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + testCases_ = new com.google.protobuf.LazyStringArrayList(testCases_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Required. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/testCases/<TestCase ID>`.
+     * 
+ * + * + * repeated string test_cases = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the testCases. + */ + public com.google.protobuf.ProtocolStringList getTestCasesList() { + return testCases_.getUnmodifiableView(); + } + /** + * + * + *
+     * Required. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/testCases/<TestCase ID>`.
+     * 
+ * + * + * repeated string test_cases = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The count of testCases. + */ + public int getTestCasesCount() { + return testCases_.size(); + } + /** + * + * + *
+     * Required. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/testCases/<TestCase ID>`.
+     * 
+ * + * + * repeated string test_cases = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The testCases at the given index. + */ + public java.lang.String getTestCases(int index) { + return testCases_.get(index); + } + /** + * + * + *
+     * Required. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/testCases/<TestCase ID>`.
+     * 
+ * + * + * repeated string test_cases = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the testCases at the given index. + */ + public com.google.protobuf.ByteString getTestCasesBytes(int index) { + return testCases_.getByteString(index); + } + /** + * + * + *
+     * Required. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/testCases/<TestCase ID>`.
+     * 
+ * + * + * repeated string test_cases = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index to set the value at. + * @param value The testCases to set. + * @return This builder for chaining. + */ + public Builder setTestCases(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTestCasesIsMutable(); + testCases_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/testCases/<TestCase ID>`.
+     * 
+ * + * + * repeated string test_cases = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The testCases to add. + * @return This builder for chaining. + */ + public Builder addTestCases(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTestCasesIsMutable(); + testCases_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/testCases/<TestCase ID>`.
+     * 
+ * + * + * repeated string test_cases = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param values The testCases to add. + * @return This builder for chaining. + */ + public Builder addAllTestCases(java.lang.Iterable values) { + ensureTestCasesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, testCases_); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/testCases/<TestCase ID>`.
+     * 
+ * + * + * repeated string test_cases = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearTestCases() { + testCases_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/testCases/<TestCase ID>`.
+     * 
+ * + * + * repeated string test_cases = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes of the testCases to add. + * @return This builder for chaining. + */ + public Builder addTestCasesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureTestCasesIsMutable(); + testCases_.add(value); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest) + private static final com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchRunTestCasesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BatchRunTestCasesRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BatchRunTestCasesRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BatchRunTestCasesRequestOrBuilder.java new file mode 100644 index 000000000..65916121f --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BatchRunTestCasesRequestOrBuilder.java @@ -0,0 +1,152 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface BatchRunTestCasesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Agent name. Format: `projects/<Project ID>/locations/<Location ID>/agents/
+   * <AgentID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Agent name. Format: `projects/<Project ID>/locations/<Location ID>/agents/
+   * <AgentID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. If not set, draft environment is assumed. Format: `projects/<Project
+   * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment
+   * ID>`.
+   * 
+ * + * + * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The environment. + */ + java.lang.String getEnvironment(); + /** + * + * + *
+   * Optional. If not set, draft environment is assumed. Format: `projects/<Project
+   * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment
+   * ID>`.
+   * 
+ * + * + * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for environment. + */ + com.google.protobuf.ByteString getEnvironmentBytes(); + + /** + * + * + *
+   * Required. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/testCases/<TestCase ID>`.
+   * 
+ * + * + * repeated string test_cases = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the testCases. + */ + java.util.List getTestCasesList(); + /** + * + * + *
+   * Required. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/testCases/<TestCase ID>`.
+   * 
+ * + * + * repeated string test_cases = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The count of testCases. + */ + int getTestCasesCount(); + /** + * + * + *
+   * Required. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/testCases/<TestCase ID>`.
+   * 
+ * + * + * repeated string test_cases = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The testCases at the given index. + */ + java.lang.String getTestCases(int index); + /** + * + * + *
+   * Required. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/testCases/<TestCase ID>`.
+   * 
+ * + * + * repeated string test_cases = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the testCases at the given index. + */ + com.google.protobuf.ByteString getTestCasesBytes(int index); +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BatchRunTestCasesResponse.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BatchRunTestCasesResponse.java new file mode 100644 index 000000000..11ed25253 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BatchRunTestCasesResponse.java @@ -0,0 +1,1017 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The response message for [TestCases.BatchRunTestCases][google.cloud.dialogflow.cx.v3beta1.TestCases.BatchRunTestCases].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponse} + */ +public final class BatchRunTestCasesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponse) + BatchRunTestCasesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchRunTestCasesResponse.newBuilder() to construct. + private BatchRunTestCasesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchRunTestCasesResponse() { + results_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchRunTestCasesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BatchRunTestCasesResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + results_ = + new java.util.ArrayList< + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult>(); + mutable_bitField0_ |= 0x00000001; + } + results_.add( + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + results_ = java.util.Collections.unmodifiableList(results_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_BatchRunTestCasesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_BatchRunTestCasesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponse.class, + com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponse.Builder.class); + } + + public static final int RESULTS_FIELD_NUMBER = 1; + private java.util.List results_; + /** + * + * + *
+   * The test case results. The detailed
+   * [conversation turns][google.cloud.dialogflow.cx.v3beta1.TestCaseResult.conversation_turns] are empty in this
+   * response.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseResult results = 1; + */ + @java.lang.Override + public java.util.List getResultsList() { + return results_; + } + /** + * + * + *
+   * The test case results. The detailed
+   * [conversation turns][google.cloud.dialogflow.cx.v3beta1.TestCaseResult.conversation_turns] are empty in this
+   * response.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseResult results = 1; + */ + @java.lang.Override + public java.util.List + getResultsOrBuilderList() { + return results_; + } + /** + * + * + *
+   * The test case results. The detailed
+   * [conversation turns][google.cloud.dialogflow.cx.v3beta1.TestCaseResult.conversation_turns] are empty in this
+   * response.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseResult results = 1; + */ + @java.lang.Override + public int getResultsCount() { + return results_.size(); + } + /** + * + * + *
+   * The test case results. The detailed
+   * [conversation turns][google.cloud.dialogflow.cx.v3beta1.TestCaseResult.conversation_turns] are empty in this
+   * response.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseResult results = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult getResults(int index) { + return results_.get(index); + } + /** + * + * + *
+   * The test case results. The detailed
+   * [conversation turns][google.cloud.dialogflow.cx.v3beta1.TestCaseResult.conversation_turns] are empty in this
+   * response.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseResult results = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TestCaseResultOrBuilder getResultsOrBuilder( + int index) { + return results_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < results_.size(); i++) { + output.writeMessage(1, results_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < results_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, results_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponse)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponse other = + (com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponse) obj; + + if (!getResultsList().equals(other.getResultsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getResultsCount() > 0) { + hash = (37 * hash) + RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getResultsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The response message for [TestCases.BatchRunTestCases][google.cloud.dialogflow.cx.v3beta1.TestCases.BatchRunTestCases].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponse) + com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_BatchRunTestCasesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_BatchRunTestCasesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponse.class, + com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponse.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getResultsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (resultsBuilder_ == null) { + results_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + resultsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_BatchRunTestCasesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponse + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponse build() { + com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponse buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponse result = + new com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponse(this); + int from_bitField0_ = bitField0_; + if (resultsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + results_ = java.util.Collections.unmodifiableList(results_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.results_ = results_; + } else { + result.results_ = resultsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponse) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponse other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponse.getDefaultInstance()) + return this; + if (resultsBuilder_ == null) { + if (!other.results_.isEmpty()) { + if (results_.isEmpty()) { + results_ = other.results_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureResultsIsMutable(); + results_.addAll(other.results_); + } + onChanged(); + } + } else { + if (!other.results_.isEmpty()) { + if (resultsBuilder_.isEmpty()) { + resultsBuilder_.dispose(); + resultsBuilder_ = null; + results_ = other.results_; + bitField0_ = (bitField0_ & ~0x00000001); + resultsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getResultsFieldBuilder() + : null; + } else { + resultsBuilder_.addAllMessages(other.results_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List results_ = + java.util.Collections.emptyList(); + + private void ensureResultsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + results_ = + new java.util.ArrayList( + results_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult, + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResultOrBuilder> + resultsBuilder_; + + /** + * + * + *
+     * The test case results. The detailed
+     * [conversation turns][google.cloud.dialogflow.cx.v3beta1.TestCaseResult.conversation_turns] are empty in this
+     * response.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseResult results = 1; + */ + public java.util.List getResultsList() { + if (resultsBuilder_ == null) { + return java.util.Collections.unmodifiableList(results_); + } else { + return resultsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The test case results. The detailed
+     * [conversation turns][google.cloud.dialogflow.cx.v3beta1.TestCaseResult.conversation_turns] are empty in this
+     * response.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseResult results = 1; + */ + public int getResultsCount() { + if (resultsBuilder_ == null) { + return results_.size(); + } else { + return resultsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The test case results. The detailed
+     * [conversation turns][google.cloud.dialogflow.cx.v3beta1.TestCaseResult.conversation_turns] are empty in this
+     * response.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseResult results = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult getResults(int index) { + if (resultsBuilder_ == null) { + return results_.get(index); + } else { + return resultsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The test case results. The detailed
+     * [conversation turns][google.cloud.dialogflow.cx.v3beta1.TestCaseResult.conversation_turns] are empty in this
+     * response.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseResult results = 1; + */ + public Builder setResults( + int index, com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.set(index, value); + onChanged(); + } else { + resultsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The test case results. The detailed
+     * [conversation turns][google.cloud.dialogflow.cx.v3beta1.TestCaseResult.conversation_turns] are empty in this
+     * response.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseResult results = 1; + */ + public Builder setResults( + int index, com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult.Builder builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.set(index, builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The test case results. The detailed
+     * [conversation turns][google.cloud.dialogflow.cx.v3beta1.TestCaseResult.conversation_turns] are empty in this
+     * response.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseResult results = 1; + */ + public Builder addResults(com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.add(value); + onChanged(); + } else { + resultsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The test case results. The detailed
+     * [conversation turns][google.cloud.dialogflow.cx.v3beta1.TestCaseResult.conversation_turns] are empty in this
+     * response.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseResult results = 1; + */ + public Builder addResults( + int index, com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.add(index, value); + onChanged(); + } else { + resultsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The test case results. The detailed
+     * [conversation turns][google.cloud.dialogflow.cx.v3beta1.TestCaseResult.conversation_turns] are empty in this
+     * response.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseResult results = 1; + */ + public Builder addResults( + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult.Builder builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The test case results. The detailed
+     * [conversation turns][google.cloud.dialogflow.cx.v3beta1.TestCaseResult.conversation_turns] are empty in this
+     * response.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseResult results = 1; + */ + public Builder addResults( + int index, com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult.Builder builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(index, builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The test case results. The detailed
+     * [conversation turns][google.cloud.dialogflow.cx.v3beta1.TestCaseResult.conversation_turns] are empty in this
+     * response.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseResult results = 1; + */ + public Builder addAllResults( + java.lang.Iterable + values) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, results_); + onChanged(); + } else { + resultsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The test case results. The detailed
+     * [conversation turns][google.cloud.dialogflow.cx.v3beta1.TestCaseResult.conversation_turns] are empty in this
+     * response.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseResult results = 1; + */ + public Builder clearResults() { + if (resultsBuilder_ == null) { + results_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + resultsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The test case results. The detailed
+     * [conversation turns][google.cloud.dialogflow.cx.v3beta1.TestCaseResult.conversation_turns] are empty in this
+     * response.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseResult results = 1; + */ + public Builder removeResults(int index) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.remove(index); + onChanged(); + } else { + resultsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The test case results. The detailed
+     * [conversation turns][google.cloud.dialogflow.cx.v3beta1.TestCaseResult.conversation_turns] are empty in this
+     * response.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseResult results = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult.Builder getResultsBuilder( + int index) { + return getResultsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The test case results. The detailed
+     * [conversation turns][google.cloud.dialogflow.cx.v3beta1.TestCaseResult.conversation_turns] are empty in this
+     * response.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseResult results = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.TestCaseResultOrBuilder getResultsOrBuilder( + int index) { + if (resultsBuilder_ == null) { + return results_.get(index); + } else { + return resultsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The test case results. The detailed
+     * [conversation turns][google.cloud.dialogflow.cx.v3beta1.TestCaseResult.conversation_turns] are empty in this
+     * response.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseResult results = 1; + */ + public java.util.List + getResultsOrBuilderList() { + if (resultsBuilder_ != null) { + return resultsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(results_); + } + } + /** + * + * + *
+     * The test case results. The detailed
+     * [conversation turns][google.cloud.dialogflow.cx.v3beta1.TestCaseResult.conversation_turns] are empty in this
+     * response.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseResult results = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult.Builder addResultsBuilder() { + return getResultsFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult.getDefaultInstance()); + } + /** + * + * + *
+     * The test case results. The detailed
+     * [conversation turns][google.cloud.dialogflow.cx.v3beta1.TestCaseResult.conversation_turns] are empty in this
+     * response.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseResult results = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult.Builder addResultsBuilder( + int index) { + return getResultsFieldBuilder() + .addBuilder( + index, com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult.getDefaultInstance()); + } + /** + * + * + *
+     * The test case results. The detailed
+     * [conversation turns][google.cloud.dialogflow.cx.v3beta1.TestCaseResult.conversation_turns] are empty in this
+     * response.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseResult results = 1; + */ + public java.util.List + getResultsBuilderList() { + return getResultsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult, + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResultOrBuilder> + getResultsFieldBuilder() { + if (resultsBuilder_ == null) { + resultsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult, + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResultOrBuilder>( + results_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + results_ = null; + } + return resultsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponse) + private static final com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponse(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchRunTestCasesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BatchRunTestCasesResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BatchRunTestCasesResponseOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BatchRunTestCasesResponseOrBuilder.java new file mode 100644 index 000000000..8374f3552 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BatchRunTestCasesResponseOrBuilder.java @@ -0,0 +1,87 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface BatchRunTestCasesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The test case results. The detailed
+   * [conversation turns][google.cloud.dialogflow.cx.v3beta1.TestCaseResult.conversation_turns] are empty in this
+   * response.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseResult results = 1; + */ + java.util.List getResultsList(); + /** + * + * + *
+   * The test case results. The detailed
+   * [conversation turns][google.cloud.dialogflow.cx.v3beta1.TestCaseResult.conversation_turns] are empty in this
+   * response.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseResult results = 1; + */ + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult getResults(int index); + /** + * + * + *
+   * The test case results. The detailed
+   * [conversation turns][google.cloud.dialogflow.cx.v3beta1.TestCaseResult.conversation_turns] are empty in this
+   * response.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseResult results = 1; + */ + int getResultsCount(); + /** + * + * + *
+   * The test case results. The detailed
+   * [conversation turns][google.cloud.dialogflow.cx.v3beta1.TestCaseResult.conversation_turns] are empty in this
+   * response.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseResult results = 1; + */ + java.util.List + getResultsOrBuilderList(); + /** + * + * + *
+   * The test case results. The detailed
+   * [conversation turns][google.cloud.dialogflow.cx.v3beta1.TestCaseResult.conversation_turns] are empty in this
+   * response.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseResult results = 1; + */ + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResultOrBuilder getResultsOrBuilder(int index); +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CalculateCoverageRequest.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CalculateCoverageRequest.java new file mode 100644 index 000000000..bbaf02c22 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CalculateCoverageRequest.java @@ -0,0 +1,1001 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The request message for [TestCases.CalculateCoverage][google.cloud.dialogflow.cx.v3beta1.TestCases.CalculateCoverage].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest} + */ +public final class CalculateCoverageRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest) + CalculateCoverageRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CalculateCoverageRequest.newBuilder() to construct. + private CalculateCoverageRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CalculateCoverageRequest() { + agent_ = ""; + type_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CalculateCoverageRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CalculateCoverageRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 16: + { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + agent_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_CalculateCoverageRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_CalculateCoverageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest.Builder.class); + } + + /** + * + * + *
+   * The type of coverage score requested.
+   * 
+ * + * Protobuf enum {@code google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest.CoverageType} + */ + public enum CoverageType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Should never be used.
+     * 
+ * + * COVERAGE_TYPE_UNSPECIFIED = 0; + */ + COVERAGE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Intent coverage.
+     * 
+ * + * INTENT = 1; + */ + INTENT(1), + /** + * + * + *
+     * Page transition coverage
+     * 
+ * + * PAGE_TRANSITION = 2; + */ + PAGE_TRANSITION(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Should never be used.
+     * 
+ * + * COVERAGE_TYPE_UNSPECIFIED = 0; + */ + public static final int COVERAGE_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Intent coverage.
+     * 
+ * + * INTENT = 1; + */ + public static final int INTENT_VALUE = 1; + /** + * + * + *
+     * Page transition coverage
+     * 
+ * + * PAGE_TRANSITION = 2; + */ + public static final int PAGE_TRANSITION_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static CoverageType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static CoverageType forNumber(int value) { + switch (value) { + case 0: + return COVERAGE_TYPE_UNSPECIFIED; + case 1: + return INTENT; + case 2: + return PAGE_TRANSITION; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public CoverageType findValueByNumber(int number) { + return CoverageType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final CoverageType[] VALUES = values(); + + public static CoverageType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private CoverageType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest.CoverageType) + } + + public static final int AGENT_FIELD_NUMBER = 3; + private volatile java.lang.Object agent_; + /** + * + * + *
+   * Required. The agent to calculate coverage for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string agent = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The agent. + */ + @java.lang.Override + public java.lang.String getAgent() { + java.lang.Object ref = agent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + agent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The agent to calculate coverage for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string agent = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for agent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAgentBytes() { + java.lang.Object ref = agent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + agent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 2; + private int type_; + /** + * + * + *
+   * Required. The type of coverage requested.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest.CoverageType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+   * Required. The type of coverage requested.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest.CoverageType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest.CoverageType getType() { + @SuppressWarnings("deprecation") + com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest.CoverageType result = + com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest.CoverageType.valueOf(type_); + return result == null + ? com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest.CoverageType.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (type_ + != com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest.CoverageType + .COVERAGE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, type_); + } + if (!getAgentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, agent_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (type_ + != com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest.CoverageType + .COVERAGE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, type_); + } + if (!getAgentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, agent_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest other = + (com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest) obj; + + if (!getAgent().equals(other.getAgent())) return false; + if (type_ != other.type_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + AGENT_FIELD_NUMBER; + hash = (53 * hash) + getAgent().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for [TestCases.CalculateCoverage][google.cloud.dialogflow.cx.v3beta1.TestCases.CalculateCoverage].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest) + com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_CalculateCoverageRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_CalculateCoverageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + agent_ = ""; + + type_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_CalculateCoverageRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest build() { + com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest result = + new com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest(this); + result.agent_ = agent_; + result.type_ = type_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest.getDefaultInstance()) + return this; + if (!other.getAgent().isEmpty()) { + agent_ = other.agent_; + onChanged(); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object agent_ = ""; + /** + * + * + *
+     * Required. The agent to calculate coverage for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string agent = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The agent. + */ + public java.lang.String getAgent() { + java.lang.Object ref = agent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + agent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The agent to calculate coverage for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string agent = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for agent. + */ + public com.google.protobuf.ByteString getAgentBytes() { + java.lang.Object ref = agent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + agent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The agent to calculate coverage for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string agent = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The agent to set. + * @return This builder for chaining. + */ + public Builder setAgent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + agent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The agent to calculate coverage for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string agent = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearAgent() { + + agent_ = getDefaultInstance().getAgent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The agent to calculate coverage for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string agent = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for agent to set. + * @return This builder for chaining. + */ + public Builder setAgentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + agent_ = value; + onChanged(); + return this; + } + + private int type_ = 0; + /** + * + * + *
+     * Required. The type of coverage requested.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest.CoverageType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+     * Required. The type of coverage requested.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest.CoverageType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + + type_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The type of coverage requested.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest.CoverageType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest.CoverageType getType() { + @SuppressWarnings("deprecation") + com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest.CoverageType result = + com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest.CoverageType.valueOf( + type_); + return result == null + ? com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest.CoverageType + .UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Required. The type of coverage requested.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest.CoverageType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType( + com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest.CoverageType value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The type of coverage requested.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest.CoverageType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest) + private static final com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CalculateCoverageRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CalculateCoverageRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CalculateCoverageRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CalculateCoverageRequestOrBuilder.java new file mode 100644 index 000000000..35dd307c7 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CalculateCoverageRequestOrBuilder.java @@ -0,0 +1,85 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface CalculateCoverageRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The agent to calculate coverage for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string agent = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The agent. + */ + java.lang.String getAgent(); + /** + * + * + *
+   * Required. The agent to calculate coverage for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string agent = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for agent. + */ + com.google.protobuf.ByteString getAgentBytes(); + + /** + * + * + *
+   * Required. The type of coverage requested.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest.CoverageType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
+   * Required. The type of coverage requested.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest.CoverageType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The type. + */ + com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest.CoverageType getType(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CalculateCoverageResponse.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CalculateCoverageResponse.java new file mode 100644 index 000000000..04f1edb25 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CalculateCoverageResponse.java @@ -0,0 +1,1358 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The response message for [TestCases.CalculateCoverage][google.cloud.dialogflow.cx.v3beta1.TestCases.CalculateCoverage].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse} + */ +public final class CalculateCoverageResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse) + CalculateCoverageResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use CalculateCoverageResponse.newBuilder() to construct. + private CalculateCoverageResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CalculateCoverageResponse() { + agent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CalculateCoverageResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CalculateCoverageResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Builder subBuilder = null; + if (coverageTypeCase_ == 2) { + subBuilder = + ((com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage) coverageType_) + .toBuilder(); + } + coverageType_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage) coverageType_); + coverageType_ = subBuilder.buildPartial(); + } + coverageTypeCase_ = 2; + break; + } + case 34: + { + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Builder subBuilder = null; + if (coverageTypeCase_ == 4) { + subBuilder = + ((com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage) coverageType_) + .toBuilder(); + } + coverageType_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage) coverageType_); + coverageType_ = subBuilder.buildPartial(); + } + coverageTypeCase_ = 4; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + agent_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_CalculateCoverageResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_CalculateCoverageResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse.class, + com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse.Builder.class); + } + + private int coverageTypeCase_ = 0; + private java.lang.Object coverageType_; + + public enum CoverageTypeCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + INTENT_COVERAGE(2), + TRANSITION_COVERAGE(4), + COVERAGETYPE_NOT_SET(0); + private final int value; + + private CoverageTypeCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static CoverageTypeCase valueOf(int value) { + return forNumber(value); + } + + public static CoverageTypeCase forNumber(int value) { + switch (value) { + case 2: + return INTENT_COVERAGE; + case 4: + return TRANSITION_COVERAGE; + case 0: + return COVERAGETYPE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public CoverageTypeCase getCoverageTypeCase() { + return CoverageTypeCase.forNumber(coverageTypeCase_); + } + + public static final int AGENT_FIELD_NUMBER = 5; + private volatile java.lang.Object agent_; + /** + * + * + *
+   * The agent to calculate coverage for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * string agent = 5 [(.google.api.resource_reference) = { ... } + * + * @return The agent. + */ + @java.lang.Override + public java.lang.String getAgent() { + java.lang.Object ref = agent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + agent_ = s; + return s; + } + } + /** + * + * + *
+   * The agent to calculate coverage for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * string agent = 5 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for agent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAgentBytes() { + java.lang.Object ref = agent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + agent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INTENT_COVERAGE_FIELD_NUMBER = 2; + /** + * + * + *
+   * Intent coverage.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.IntentCoverage intent_coverage = 2; + * + * @return Whether the intentCoverage field is set. + */ + @java.lang.Override + public boolean hasIntentCoverage() { + return coverageTypeCase_ == 2; + } + /** + * + * + *
+   * Intent coverage.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.IntentCoverage intent_coverage = 2; + * + * @return The intentCoverage. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage getIntentCoverage() { + if (coverageTypeCase_ == 2) { + return (com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage) coverageType_; + } + return com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.getDefaultInstance(); + } + /** + * + * + *
+   * Intent coverage.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.IntentCoverage intent_coverage = 2; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.IntentCoverageOrBuilder + getIntentCoverageOrBuilder() { + if (coverageTypeCase_ == 2) { + return (com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage) coverageType_; + } + return com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.getDefaultInstance(); + } + + public static final int TRANSITION_COVERAGE_FIELD_NUMBER = 4; + /** + * + * + *
+   * Transition coverage.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage transition_coverage = 4; + * + * @return Whether the transitionCoverage field is set. + */ + @java.lang.Override + public boolean hasTransitionCoverage() { + return coverageTypeCase_ == 4; + } + /** + * + * + *
+   * Transition coverage.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage transition_coverage = 4; + * + * @return The transitionCoverage. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage getTransitionCoverage() { + if (coverageTypeCase_ == 4) { + return (com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage) coverageType_; + } + return com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.getDefaultInstance(); + } + /** + * + * + *
+   * Transition coverage.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage transition_coverage = 4; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverageOrBuilder + getTransitionCoverageOrBuilder() { + if (coverageTypeCase_ == 4) { + return (com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage) coverageType_; + } + return com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (coverageTypeCase_ == 2) { + output.writeMessage(2, (com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage) coverageType_); + } + if (coverageTypeCase_ == 4) { + output.writeMessage( + 4, (com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage) coverageType_); + } + if (!getAgentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, agent_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (coverageTypeCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage) coverageType_); + } + if (coverageTypeCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage) coverageType_); + } + if (!getAgentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, agent_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse other = + (com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse) obj; + + if (!getAgent().equals(other.getAgent())) return false; + if (!getCoverageTypeCase().equals(other.getCoverageTypeCase())) return false; + switch (coverageTypeCase_) { + case 2: + if (!getIntentCoverage().equals(other.getIntentCoverage())) return false; + break; + case 4: + if (!getTransitionCoverage().equals(other.getTransitionCoverage())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + AGENT_FIELD_NUMBER; + hash = (53 * hash) + getAgent().hashCode(); + switch (coverageTypeCase_) { + case 2: + hash = (37 * hash) + INTENT_COVERAGE_FIELD_NUMBER; + hash = (53 * hash) + getIntentCoverage().hashCode(); + break; + case 4: + hash = (37 * hash) + TRANSITION_COVERAGE_FIELD_NUMBER; + hash = (53 * hash) + getTransitionCoverage().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The response message for [TestCases.CalculateCoverage][google.cloud.dialogflow.cx.v3beta1.TestCases.CalculateCoverage].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse) + com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_CalculateCoverageResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_CalculateCoverageResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse.class, + com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + agent_ = ""; + + coverageTypeCase_ = 0; + coverageType_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_CalculateCoverageResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse build() { + com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse result = + new com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse(this); + result.agent_ = agent_; + if (coverageTypeCase_ == 2) { + if (intentCoverageBuilder_ == null) { + result.coverageType_ = coverageType_; + } else { + result.coverageType_ = intentCoverageBuilder_.build(); + } + } + if (coverageTypeCase_ == 4) { + if (transitionCoverageBuilder_ == null) { + result.coverageType_ = coverageType_; + } else { + result.coverageType_ = transitionCoverageBuilder_.build(); + } + } + result.coverageTypeCase_ = coverageTypeCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse.getDefaultInstance()) + return this; + if (!other.getAgent().isEmpty()) { + agent_ = other.agent_; + onChanged(); + } + switch (other.getCoverageTypeCase()) { + case INTENT_COVERAGE: + { + mergeIntentCoverage(other.getIntentCoverage()); + break; + } + case TRANSITION_COVERAGE: + { + mergeTransitionCoverage(other.getTransitionCoverage()); + break; + } + case COVERAGETYPE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int coverageTypeCase_ = 0; + private java.lang.Object coverageType_; + + public CoverageTypeCase getCoverageTypeCase() { + return CoverageTypeCase.forNumber(coverageTypeCase_); + } + + public Builder clearCoverageType() { + coverageTypeCase_ = 0; + coverageType_ = null; + onChanged(); + return this; + } + + private java.lang.Object agent_ = ""; + /** + * + * + *
+     * The agent to calculate coverage for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * string agent = 5 [(.google.api.resource_reference) = { ... } + * + * @return The agent. + */ + public java.lang.String getAgent() { + java.lang.Object ref = agent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + agent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The agent to calculate coverage for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * string agent = 5 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for agent. + */ + public com.google.protobuf.ByteString getAgentBytes() { + java.lang.Object ref = agent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + agent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The agent to calculate coverage for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * string agent = 5 [(.google.api.resource_reference) = { ... } + * + * @param value The agent to set. + * @return This builder for chaining. + */ + public Builder setAgent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + agent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The agent to calculate coverage for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * string agent = 5 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearAgent() { + + agent_ = getDefaultInstance().getAgent(); + onChanged(); + return this; + } + /** + * + * + *
+     * The agent to calculate coverage for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * string agent = 5 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for agent to set. + * @return This builder for chaining. + */ + public Builder setAgentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + agent_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage, + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Builder, + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverageOrBuilder> + intentCoverageBuilder_; + /** + * + * + *
+     * Intent coverage.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.IntentCoverage intent_coverage = 2; + * + * @return Whether the intentCoverage field is set. + */ + @java.lang.Override + public boolean hasIntentCoverage() { + return coverageTypeCase_ == 2; + } + /** + * + * + *
+     * Intent coverage.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.IntentCoverage intent_coverage = 2; + * + * @return The intentCoverage. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage getIntentCoverage() { + if (intentCoverageBuilder_ == null) { + if (coverageTypeCase_ == 2) { + return (com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage) coverageType_; + } + return com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.getDefaultInstance(); + } else { + if (coverageTypeCase_ == 2) { + return intentCoverageBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.getDefaultInstance(); + } + } + /** + * + * + *
+     * Intent coverage.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.IntentCoverage intent_coverage = 2; + */ + public Builder setIntentCoverage(com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage value) { + if (intentCoverageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + coverageType_ = value; + onChanged(); + } else { + intentCoverageBuilder_.setMessage(value); + } + coverageTypeCase_ = 2; + return this; + } + /** + * + * + *
+     * Intent coverage.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.IntentCoverage intent_coverage = 2; + */ + public Builder setIntentCoverage( + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Builder builderForValue) { + if (intentCoverageBuilder_ == null) { + coverageType_ = builderForValue.build(); + onChanged(); + } else { + intentCoverageBuilder_.setMessage(builderForValue.build()); + } + coverageTypeCase_ = 2; + return this; + } + /** + * + * + *
+     * Intent coverage.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.IntentCoverage intent_coverage = 2; + */ + public Builder mergeIntentCoverage( + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage value) { + if (intentCoverageBuilder_ == null) { + if (coverageTypeCase_ == 2 + && coverageType_ + != com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.getDefaultInstance()) { + coverageType_ = + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.newBuilder( + (com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage) coverageType_) + .mergeFrom(value) + .buildPartial(); + } else { + coverageType_ = value; + } + onChanged(); + } else { + if (coverageTypeCase_ == 2) { + intentCoverageBuilder_.mergeFrom(value); + } + intentCoverageBuilder_.setMessage(value); + } + coverageTypeCase_ = 2; + return this; + } + /** + * + * + *
+     * Intent coverage.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.IntentCoverage intent_coverage = 2; + */ + public Builder clearIntentCoverage() { + if (intentCoverageBuilder_ == null) { + if (coverageTypeCase_ == 2) { + coverageTypeCase_ = 0; + coverageType_ = null; + onChanged(); + } + } else { + if (coverageTypeCase_ == 2) { + coverageTypeCase_ = 0; + coverageType_ = null; + } + intentCoverageBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Intent coverage.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.IntentCoverage intent_coverage = 2; + */ + public com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Builder + getIntentCoverageBuilder() { + return getIntentCoverageFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Intent coverage.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.IntentCoverage intent_coverage = 2; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.IntentCoverageOrBuilder + getIntentCoverageOrBuilder() { + if ((coverageTypeCase_ == 2) && (intentCoverageBuilder_ != null)) { + return intentCoverageBuilder_.getMessageOrBuilder(); + } else { + if (coverageTypeCase_ == 2) { + return (com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage) coverageType_; + } + return com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.getDefaultInstance(); + } + } + /** + * + * + *
+     * Intent coverage.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.IntentCoverage intent_coverage = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage, + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Builder, + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverageOrBuilder> + getIntentCoverageFieldBuilder() { + if (intentCoverageBuilder_ == null) { + if (!(coverageTypeCase_ == 2)) { + coverageType_ = + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.getDefaultInstance(); + } + intentCoverageBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage, + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Builder, + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverageOrBuilder>( + (com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage) coverageType_, + getParentForChildren(), + isClean()); + coverageType_ = null; + } + coverageTypeCase_ = 2; + onChanged(); + ; + return intentCoverageBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage, + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverageOrBuilder> + transitionCoverageBuilder_; + /** + * + * + *
+     * Transition coverage.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage transition_coverage = 4; + * + * @return Whether the transitionCoverage field is set. + */ + @java.lang.Override + public boolean hasTransitionCoverage() { + return coverageTypeCase_ == 4; + } + /** + * + * + *
+     * Transition coverage.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage transition_coverage = 4; + * + * @return The transitionCoverage. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage getTransitionCoverage() { + if (transitionCoverageBuilder_ == null) { + if (coverageTypeCase_ == 4) { + return (com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage) coverageType_; + } + return com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.getDefaultInstance(); + } else { + if (coverageTypeCase_ == 4) { + return transitionCoverageBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.getDefaultInstance(); + } + } + /** + * + * + *
+     * Transition coverage.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage transition_coverage = 4; + */ + public Builder setTransitionCoverage( + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage value) { + if (transitionCoverageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + coverageType_ = value; + onChanged(); + } else { + transitionCoverageBuilder_.setMessage(value); + } + coverageTypeCase_ = 4; + return this; + } + /** + * + * + *
+     * Transition coverage.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage transition_coverage = 4; + */ + public Builder setTransitionCoverage( + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Builder builderForValue) { + if (transitionCoverageBuilder_ == null) { + coverageType_ = builderForValue.build(); + onChanged(); + } else { + transitionCoverageBuilder_.setMessage(builderForValue.build()); + } + coverageTypeCase_ = 4; + return this; + } + /** + * + * + *
+     * Transition coverage.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage transition_coverage = 4; + */ + public Builder mergeTransitionCoverage( + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage value) { + if (transitionCoverageBuilder_ == null) { + if (coverageTypeCase_ == 4 + && coverageType_ + != com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.getDefaultInstance()) { + coverageType_ = + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.newBuilder( + (com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage) coverageType_) + .mergeFrom(value) + .buildPartial(); + } else { + coverageType_ = value; + } + onChanged(); + } else { + if (coverageTypeCase_ == 4) { + transitionCoverageBuilder_.mergeFrom(value); + } + transitionCoverageBuilder_.setMessage(value); + } + coverageTypeCase_ = 4; + return this; + } + /** + * + * + *
+     * Transition coverage.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage transition_coverage = 4; + */ + public Builder clearTransitionCoverage() { + if (transitionCoverageBuilder_ == null) { + if (coverageTypeCase_ == 4) { + coverageTypeCase_ = 0; + coverageType_ = null; + onChanged(); + } + } else { + if (coverageTypeCase_ == 4) { + coverageTypeCase_ = 0; + coverageType_ = null; + } + transitionCoverageBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Transition coverage.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage transition_coverage = 4; + */ + public com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Builder + getTransitionCoverageBuilder() { + return getTransitionCoverageFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Transition coverage.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage transition_coverage = 4; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverageOrBuilder + getTransitionCoverageOrBuilder() { + if ((coverageTypeCase_ == 4) && (transitionCoverageBuilder_ != null)) { + return transitionCoverageBuilder_.getMessageOrBuilder(); + } else { + if (coverageTypeCase_ == 4) { + return (com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage) coverageType_; + } + return com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.getDefaultInstance(); + } + } + /** + * + * + *
+     * Transition coverage.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage transition_coverage = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage, + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverageOrBuilder> + getTransitionCoverageFieldBuilder() { + if (transitionCoverageBuilder_ == null) { + if (!(coverageTypeCase_ == 4)) { + coverageType_ = + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.getDefaultInstance(); + } + transitionCoverageBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage, + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverageOrBuilder>( + (com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage) coverageType_, + getParentForChildren(), + isClean()); + coverageType_ = null; + } + coverageTypeCase_ = 4; + onChanged(); + ; + return transitionCoverageBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse) + private static final com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CalculateCoverageResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CalculateCoverageResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CalculateCoverageResponseOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CalculateCoverageResponseOrBuilder.java new file mode 100644 index 000000000..5775a9d31 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CalculateCoverageResponseOrBuilder.java @@ -0,0 +1,126 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface CalculateCoverageResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The agent to calculate coverage for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * string agent = 5 [(.google.api.resource_reference) = { ... } + * + * @return The agent. + */ + java.lang.String getAgent(); + /** + * + * + *
+   * The agent to calculate coverage for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * string agent = 5 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for agent. + */ + com.google.protobuf.ByteString getAgentBytes(); + + /** + * + * + *
+   * Intent coverage.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.IntentCoverage intent_coverage = 2; + * + * @return Whether the intentCoverage field is set. + */ + boolean hasIntentCoverage(); + /** + * + * + *
+   * Intent coverage.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.IntentCoverage intent_coverage = 2; + * + * @return The intentCoverage. + */ + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage getIntentCoverage(); + /** + * + * + *
+   * Intent coverage.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.IntentCoverage intent_coverage = 2; + */ + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverageOrBuilder getIntentCoverageOrBuilder(); + + /** + * + * + *
+   * Transition coverage.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage transition_coverage = 4; + * + * @return Whether the transitionCoverage field is set. + */ + boolean hasTransitionCoverage(); + /** + * + * + *
+   * Transition coverage.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage transition_coverage = 4; + * + * @return The transitionCoverage. + */ + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage getTransitionCoverage(); + /** + * + * + *
+   * Transition coverage.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage transition_coverage = 4; + */ + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverageOrBuilder + getTransitionCoverageOrBuilder(); + + public com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse.CoverageTypeCase + getCoverageTypeCase(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ConversationTurn.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ConversationTurn.java new file mode 100644 index 000000000..5fb0a24ee --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ConversationTurn.java @@ -0,0 +1,5697 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * One interaction between a human and virtual agent. The human provides some
+ * input and the virtual agent provides a response.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ConversationTurn} + */ +public final class ConversationTurn extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ConversationTurn) + ConversationTurnOrBuilder { + private static final long serialVersionUID = 0L; + // Use ConversationTurn.newBuilder() to construct. + private ConversationTurn(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ConversationTurn() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ConversationTurn(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ConversationTurn( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput.Builder subBuilder = + null; + if (userInput_ != null) { + subBuilder = userInput_.toBuilder(); + } + userInput_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(userInput_); + userInput_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput.Builder + subBuilder = null; + if (virtualAgentOutput_ != null) { + subBuilder = virtualAgentOutput_.toBuilder(); + } + virtualAgentOutput_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(virtualAgentOutput_); + virtualAgentOutput_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ConversationTurn_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ConversationTurn_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.class, + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.Builder.class); + } + + public interface UserInputOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Supports [text input][google.cloud.dialogflow.cx.v3beta1.QueryInput.text], [event input][google.cloud.dialogflow.cx.v3beta1.QueryInput.event],
+     * [dtmf input][google.cloud.dialogflow.cx.v3beta1.QueryInput.dtmf] in the test case.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.QueryInput input = 5; + * + * @return Whether the input field is set. + */ + boolean hasInput(); + /** + * + * + *
+     * Supports [text input][google.cloud.dialogflow.cx.v3beta1.QueryInput.text], [event input][google.cloud.dialogflow.cx.v3beta1.QueryInput.event],
+     * [dtmf input][google.cloud.dialogflow.cx.v3beta1.QueryInput.dtmf] in the test case.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.QueryInput input = 5; + * + * @return The input. + */ + com.google.cloud.dialogflow.cx.v3beta1.QueryInput getInput(); + /** + * + * + *
+     * Supports [text input][google.cloud.dialogflow.cx.v3beta1.QueryInput.text], [event input][google.cloud.dialogflow.cx.v3beta1.QueryInput.event],
+     * [dtmf input][google.cloud.dialogflow.cx.v3beta1.QueryInput.dtmf] in the test case.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.QueryInput input = 5; + */ + com.google.cloud.dialogflow.cx.v3beta1.QueryInputOrBuilder getInputOrBuilder(); + + /** + * + * + *
+     * Parameters that need to be injected into the conversation during intent
+     * detection.
+     * 
+ * + * .google.protobuf.Struct injected_parameters = 2; + * + * @return Whether the injectedParameters field is set. + */ + boolean hasInjectedParameters(); + /** + * + * + *
+     * Parameters that need to be injected into the conversation during intent
+     * detection.
+     * 
+ * + * .google.protobuf.Struct injected_parameters = 2; + * + * @return The injectedParameters. + */ + com.google.protobuf.Struct getInjectedParameters(); + /** + * + * + *
+     * Parameters that need to be injected into the conversation during intent
+     * detection.
+     * 
+ * + * .google.protobuf.Struct injected_parameters = 2; + */ + com.google.protobuf.StructOrBuilder getInjectedParametersOrBuilder(); + + /** + * + * + *
+     * If webhooks should be allowed to trigger in response to the user
+     * utterance. Often if parameters are injected, webhooks should not be
+     * enabled.
+     * 
+ * + * bool is_webhook_enabled = 3; + * + * @return The isWebhookEnabled. + */ + boolean getIsWebhookEnabled(); + } + /** + * + * + *
+   * The input from the human user.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput} + */ + public static final class UserInput extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput) + UserInputOrBuilder { + private static final long serialVersionUID = 0L; + // Use UserInput.newBuilder() to construct. + private UserInput(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UserInput() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UserInput(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UserInput( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + com.google.protobuf.Struct.Builder subBuilder = null; + if (injectedParameters_ != null) { + subBuilder = injectedParameters_.toBuilder(); + } + injectedParameters_ = + input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(injectedParameters_); + injectedParameters_ = subBuilder.buildPartial(); + } + + break; + } + case 24: + { + isWebhookEnabled_ = input.readBool(); + break; + } + case 42: + { + com.google.cloud.dialogflow.cx.v3beta1.QueryInput.Builder subBuilder = null; + if (input_ != null) { + subBuilder = input_.toBuilder(); + } + input_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.QueryInput.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(input_); + input_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ConversationTurn_UserInput_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ConversationTurn_UserInput_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput.class, + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput.Builder.class); + } + + public static final int INPUT_FIELD_NUMBER = 5; + private com.google.cloud.dialogflow.cx.v3beta1.QueryInput input_; + /** + * + * + *
+     * Supports [text input][google.cloud.dialogflow.cx.v3beta1.QueryInput.text], [event input][google.cloud.dialogflow.cx.v3beta1.QueryInput.event],
+     * [dtmf input][google.cloud.dialogflow.cx.v3beta1.QueryInput.dtmf] in the test case.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.QueryInput input = 5; + * + * @return Whether the input field is set. + */ + @java.lang.Override + public boolean hasInput() { + return input_ != null; + } + /** + * + * + *
+     * Supports [text input][google.cloud.dialogflow.cx.v3beta1.QueryInput.text], [event input][google.cloud.dialogflow.cx.v3beta1.QueryInput.event],
+     * [dtmf input][google.cloud.dialogflow.cx.v3beta1.QueryInput.dtmf] in the test case.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.QueryInput input = 5; + * + * @return The input. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.QueryInput getInput() { + return input_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.QueryInput.getDefaultInstance() + : input_; + } + /** + * + * + *
+     * Supports [text input][google.cloud.dialogflow.cx.v3beta1.QueryInput.text], [event input][google.cloud.dialogflow.cx.v3beta1.QueryInput.event],
+     * [dtmf input][google.cloud.dialogflow.cx.v3beta1.QueryInput.dtmf] in the test case.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.QueryInput input = 5; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.QueryInputOrBuilder getInputOrBuilder() { + return getInput(); + } + + public static final int INJECTED_PARAMETERS_FIELD_NUMBER = 2; + private com.google.protobuf.Struct injectedParameters_; + /** + * + * + *
+     * Parameters that need to be injected into the conversation during intent
+     * detection.
+     * 
+ * + * .google.protobuf.Struct injected_parameters = 2; + * + * @return Whether the injectedParameters field is set. + */ + @java.lang.Override + public boolean hasInjectedParameters() { + return injectedParameters_ != null; + } + /** + * + * + *
+     * Parameters that need to be injected into the conversation during intent
+     * detection.
+     * 
+ * + * .google.protobuf.Struct injected_parameters = 2; + * + * @return The injectedParameters. + */ + @java.lang.Override + public com.google.protobuf.Struct getInjectedParameters() { + return injectedParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : injectedParameters_; + } + /** + * + * + *
+     * Parameters that need to be injected into the conversation during intent
+     * detection.
+     * 
+ * + * .google.protobuf.Struct injected_parameters = 2; + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getInjectedParametersOrBuilder() { + return getInjectedParameters(); + } + + public static final int IS_WEBHOOK_ENABLED_FIELD_NUMBER = 3; + private boolean isWebhookEnabled_; + /** + * + * + *
+     * If webhooks should be allowed to trigger in response to the user
+     * utterance. Often if parameters are injected, webhooks should not be
+     * enabled.
+     * 
+ * + * bool is_webhook_enabled = 3; + * + * @return The isWebhookEnabled. + */ + @java.lang.Override + public boolean getIsWebhookEnabled() { + return isWebhookEnabled_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (injectedParameters_ != null) { + output.writeMessage(2, getInjectedParameters()); + } + if (isWebhookEnabled_ != false) { + output.writeBool(3, isWebhookEnabled_); + } + if (input_ != null) { + output.writeMessage(5, getInput()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (injectedParameters_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, getInjectedParameters()); + } + if (isWebhookEnabled_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, isWebhookEnabled_); + } + if (input_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getInput()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput other = + (com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput) obj; + + if (hasInput() != other.hasInput()) return false; + if (hasInput()) { + if (!getInput().equals(other.getInput())) return false; + } + if (hasInjectedParameters() != other.hasInjectedParameters()) return false; + if (hasInjectedParameters()) { + if (!getInjectedParameters().equals(other.getInjectedParameters())) return false; + } + if (getIsWebhookEnabled() != other.getIsWebhookEnabled()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInput()) { + hash = (37 * hash) + INPUT_FIELD_NUMBER; + hash = (53 * hash) + getInput().hashCode(); + } + if (hasInjectedParameters()) { + hash = (37 * hash) + INJECTED_PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + getInjectedParameters().hashCode(); + } + hash = (37 * hash) + IS_WEBHOOK_ENABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsWebhookEnabled()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * The input from the human user.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput) + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInputOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ConversationTurn_UserInput_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ConversationTurn_UserInput_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput.class, + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput.Builder.class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (inputBuilder_ == null) { + input_ = null; + } else { + input_ = null; + inputBuilder_ = null; + } + if (injectedParametersBuilder_ == null) { + injectedParameters_ = null; + } else { + injectedParameters_ = null; + injectedParametersBuilder_ = null; + } + isWebhookEnabled_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ConversationTurn_UserInput_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput build() { + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput result = + new com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput(this); + if (inputBuilder_ == null) { + result.input_ = input_; + } else { + result.input_ = inputBuilder_.build(); + } + if (injectedParametersBuilder_ == null) { + result.injectedParameters_ = injectedParameters_; + } else { + result.injectedParameters_ = injectedParametersBuilder_.build(); + } + result.isWebhookEnabled_ = isWebhookEnabled_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput + .getDefaultInstance()) return this; + if (other.hasInput()) { + mergeInput(other.getInput()); + } + if (other.hasInjectedParameters()) { + mergeInjectedParameters(other.getInjectedParameters()); + } + if (other.getIsWebhookEnabled() != false) { + setIsWebhookEnabled(other.getIsWebhookEnabled()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.dialogflow.cx.v3beta1.QueryInput input_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.QueryInput, + com.google.cloud.dialogflow.cx.v3beta1.QueryInput.Builder, + com.google.cloud.dialogflow.cx.v3beta1.QueryInputOrBuilder> + inputBuilder_; + /** + * + * + *
+       * Supports [text input][google.cloud.dialogflow.cx.v3beta1.QueryInput.text], [event input][google.cloud.dialogflow.cx.v3beta1.QueryInput.event],
+       * [dtmf input][google.cloud.dialogflow.cx.v3beta1.QueryInput.dtmf] in the test case.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.QueryInput input = 5; + * + * @return Whether the input field is set. + */ + public boolean hasInput() { + return inputBuilder_ != null || input_ != null; + } + /** + * + * + *
+       * Supports [text input][google.cloud.dialogflow.cx.v3beta1.QueryInput.text], [event input][google.cloud.dialogflow.cx.v3beta1.QueryInput.event],
+       * [dtmf input][google.cloud.dialogflow.cx.v3beta1.QueryInput.dtmf] in the test case.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.QueryInput input = 5; + * + * @return The input. + */ + public com.google.cloud.dialogflow.cx.v3beta1.QueryInput getInput() { + if (inputBuilder_ == null) { + return input_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.QueryInput.getDefaultInstance() + : input_; + } else { + return inputBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Supports [text input][google.cloud.dialogflow.cx.v3beta1.QueryInput.text], [event input][google.cloud.dialogflow.cx.v3beta1.QueryInput.event],
+       * [dtmf input][google.cloud.dialogflow.cx.v3beta1.QueryInput.dtmf] in the test case.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.QueryInput input = 5; + */ + public Builder setInput(com.google.cloud.dialogflow.cx.v3beta1.QueryInput value) { + if (inputBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + input_ = value; + onChanged(); + } else { + inputBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Supports [text input][google.cloud.dialogflow.cx.v3beta1.QueryInput.text], [event input][google.cloud.dialogflow.cx.v3beta1.QueryInput.event],
+       * [dtmf input][google.cloud.dialogflow.cx.v3beta1.QueryInput.dtmf] in the test case.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.QueryInput input = 5; + */ + public Builder setInput( + com.google.cloud.dialogflow.cx.v3beta1.QueryInput.Builder builderForValue) { + if (inputBuilder_ == null) { + input_ = builderForValue.build(); + onChanged(); + } else { + inputBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Supports [text input][google.cloud.dialogflow.cx.v3beta1.QueryInput.text], [event input][google.cloud.dialogflow.cx.v3beta1.QueryInput.event],
+       * [dtmf input][google.cloud.dialogflow.cx.v3beta1.QueryInput.dtmf] in the test case.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.QueryInput input = 5; + */ + public Builder mergeInput(com.google.cloud.dialogflow.cx.v3beta1.QueryInput value) { + if (inputBuilder_ == null) { + if (input_ != null) { + input_ = + com.google.cloud.dialogflow.cx.v3beta1.QueryInput.newBuilder(input_) + .mergeFrom(value) + .buildPartial(); + } else { + input_ = value; + } + onChanged(); + } else { + inputBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Supports [text input][google.cloud.dialogflow.cx.v3beta1.QueryInput.text], [event input][google.cloud.dialogflow.cx.v3beta1.QueryInput.event],
+       * [dtmf input][google.cloud.dialogflow.cx.v3beta1.QueryInput.dtmf] in the test case.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.QueryInput input = 5; + */ + public Builder clearInput() { + if (inputBuilder_ == null) { + input_ = null; + onChanged(); + } else { + input_ = null; + inputBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Supports [text input][google.cloud.dialogflow.cx.v3beta1.QueryInput.text], [event input][google.cloud.dialogflow.cx.v3beta1.QueryInput.event],
+       * [dtmf input][google.cloud.dialogflow.cx.v3beta1.QueryInput.dtmf] in the test case.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.QueryInput input = 5; + */ + public com.google.cloud.dialogflow.cx.v3beta1.QueryInput.Builder getInputBuilder() { + + onChanged(); + return getInputFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Supports [text input][google.cloud.dialogflow.cx.v3beta1.QueryInput.text], [event input][google.cloud.dialogflow.cx.v3beta1.QueryInput.event],
+       * [dtmf input][google.cloud.dialogflow.cx.v3beta1.QueryInput.dtmf] in the test case.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.QueryInput input = 5; + */ + public com.google.cloud.dialogflow.cx.v3beta1.QueryInputOrBuilder getInputOrBuilder() { + if (inputBuilder_ != null) { + return inputBuilder_.getMessageOrBuilder(); + } else { + return input_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.QueryInput.getDefaultInstance() + : input_; + } + } + /** + * + * + *
+       * Supports [text input][google.cloud.dialogflow.cx.v3beta1.QueryInput.text], [event input][google.cloud.dialogflow.cx.v3beta1.QueryInput.event],
+       * [dtmf input][google.cloud.dialogflow.cx.v3beta1.QueryInput.dtmf] in the test case.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.QueryInput input = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.QueryInput, + com.google.cloud.dialogflow.cx.v3beta1.QueryInput.Builder, + com.google.cloud.dialogflow.cx.v3beta1.QueryInputOrBuilder> + getInputFieldBuilder() { + if (inputBuilder_ == null) { + inputBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.QueryInput, + com.google.cloud.dialogflow.cx.v3beta1.QueryInput.Builder, + com.google.cloud.dialogflow.cx.v3beta1.QueryInputOrBuilder>( + getInput(), getParentForChildren(), isClean()); + input_ = null; + } + return inputBuilder_; + } + + private com.google.protobuf.Struct injectedParameters_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + injectedParametersBuilder_; + /** + * + * + *
+       * Parameters that need to be injected into the conversation during intent
+       * detection.
+       * 
+ * + * .google.protobuf.Struct injected_parameters = 2; + * + * @return Whether the injectedParameters field is set. + */ + public boolean hasInjectedParameters() { + return injectedParametersBuilder_ != null || injectedParameters_ != null; + } + /** + * + * + *
+       * Parameters that need to be injected into the conversation during intent
+       * detection.
+       * 
+ * + * .google.protobuf.Struct injected_parameters = 2; + * + * @return The injectedParameters. + */ + public com.google.protobuf.Struct getInjectedParameters() { + if (injectedParametersBuilder_ == null) { + return injectedParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : injectedParameters_; + } else { + return injectedParametersBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Parameters that need to be injected into the conversation during intent
+       * detection.
+       * 
+ * + * .google.protobuf.Struct injected_parameters = 2; + */ + public Builder setInjectedParameters(com.google.protobuf.Struct value) { + if (injectedParametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + injectedParameters_ = value; + onChanged(); + } else { + injectedParametersBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Parameters that need to be injected into the conversation during intent
+       * detection.
+       * 
+ * + * .google.protobuf.Struct injected_parameters = 2; + */ + public Builder setInjectedParameters(com.google.protobuf.Struct.Builder builderForValue) { + if (injectedParametersBuilder_ == null) { + injectedParameters_ = builderForValue.build(); + onChanged(); + } else { + injectedParametersBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Parameters that need to be injected into the conversation during intent
+       * detection.
+       * 
+ * + * .google.protobuf.Struct injected_parameters = 2; + */ + public Builder mergeInjectedParameters(com.google.protobuf.Struct value) { + if (injectedParametersBuilder_ == null) { + if (injectedParameters_ != null) { + injectedParameters_ = + com.google.protobuf.Struct.newBuilder(injectedParameters_) + .mergeFrom(value) + .buildPartial(); + } else { + injectedParameters_ = value; + } + onChanged(); + } else { + injectedParametersBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Parameters that need to be injected into the conversation during intent
+       * detection.
+       * 
+ * + * .google.protobuf.Struct injected_parameters = 2; + */ + public Builder clearInjectedParameters() { + if (injectedParametersBuilder_ == null) { + injectedParameters_ = null; + onChanged(); + } else { + injectedParameters_ = null; + injectedParametersBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Parameters that need to be injected into the conversation during intent
+       * detection.
+       * 
+ * + * .google.protobuf.Struct injected_parameters = 2; + */ + public com.google.protobuf.Struct.Builder getInjectedParametersBuilder() { + + onChanged(); + return getInjectedParametersFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Parameters that need to be injected into the conversation during intent
+       * detection.
+       * 
+ * + * .google.protobuf.Struct injected_parameters = 2; + */ + public com.google.protobuf.StructOrBuilder getInjectedParametersOrBuilder() { + if (injectedParametersBuilder_ != null) { + return injectedParametersBuilder_.getMessageOrBuilder(); + } else { + return injectedParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : injectedParameters_; + } + } + /** + * + * + *
+       * Parameters that need to be injected into the conversation during intent
+       * detection.
+       * 
+ * + * .google.protobuf.Struct injected_parameters = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + getInjectedParametersFieldBuilder() { + if (injectedParametersBuilder_ == null) { + injectedParametersBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder>( + getInjectedParameters(), getParentForChildren(), isClean()); + injectedParameters_ = null; + } + return injectedParametersBuilder_; + } + + private boolean isWebhookEnabled_; + /** + * + * + *
+       * If webhooks should be allowed to trigger in response to the user
+       * utterance. Often if parameters are injected, webhooks should not be
+       * enabled.
+       * 
+ * + * bool is_webhook_enabled = 3; + * + * @return The isWebhookEnabled. + */ + @java.lang.Override + public boolean getIsWebhookEnabled() { + return isWebhookEnabled_; + } + /** + * + * + *
+       * If webhooks should be allowed to trigger in response to the user
+       * utterance. Often if parameters are injected, webhooks should not be
+       * enabled.
+       * 
+ * + * bool is_webhook_enabled = 3; + * + * @param value The isWebhookEnabled to set. + * @return This builder for chaining. + */ + public Builder setIsWebhookEnabled(boolean value) { + + isWebhookEnabled_ = value; + onChanged(); + 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.
+       * 
+ * + * bool is_webhook_enabled = 3; + * + * @return This builder for chaining. + */ + public Builder clearIsWebhookEnabled() { + + isWebhookEnabled_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput) + private static final com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UserInput parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UserInput(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface VirtualAgentOutputOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The session parameters available to the bot at this point.
+     * 
+ * + * .google.protobuf.Struct session_parameters = 4; + * + * @return Whether the sessionParameters field is set. + */ + boolean hasSessionParameters(); + /** + * + * + *
+     * The session parameters available to the bot at this point.
+     * 
+ * + * .google.protobuf.Struct session_parameters = 4; + * + * @return The sessionParameters. + */ + com.google.protobuf.Struct getSessionParameters(); + /** + * + * + *
+     * The session parameters available to the bot at this point.
+     * 
+ * + * .google.protobuf.Struct session_parameters = 4; + */ + com.google.protobuf.StructOrBuilder getSessionParametersOrBuilder(); + + /** + * + * + *
+     * 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.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getDifferencesList(); + /** + * + * + *
+     * 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.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference getDifferences(int index); + /** + * + * + *
+     * 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.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getDifferencesCount(); + /** + * + * + *
+     * 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.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getDifferencesOrBuilderList(); + /** + * + * + *
+     * 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.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.TestRunDifferenceOrBuilder getDifferencesOrBuilder( + int index); + + /** + * + * + *
+     * Required. Input only. The diagnostic
+     * [info][Session.DetectIntentResponse.QueryResult.diagnostic_info]
+     * output for the turn.
+     * 
+ * + * + * .google.protobuf.Struct diagnostic_info = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return Whether the diagnosticInfo field is set. + */ + boolean hasDiagnosticInfo(); + /** + * + * + *
+     * Required. Input only. The diagnostic
+     * [info][Session.DetectIntentResponse.QueryResult.diagnostic_info]
+     * output for the turn.
+     * 
+ * + * + * .google.protobuf.Struct diagnostic_info = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The diagnosticInfo. + */ + com.google.protobuf.Struct getDiagnosticInfo(); + /** + * + * + *
+     * Required. Input only. The diagnostic
+     * [info][Session.DetectIntentResponse.QueryResult.diagnostic_info]
+     * output for the turn.
+     * 
+ * + * + * .google.protobuf.Struct diagnostic_info = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * + */ + com.google.protobuf.StructOrBuilder getDiagnosticInfoOrBuilder(); + + /** + * + * + *
+     * The [Intent][google.cloud.dialogflow.cx.v3beta1.Intent] that triggered the response. Only some fields such as
+     * name and displayname will be set.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Intent triggered_intent = 7; + * + * @return Whether the triggeredIntent field is set. + */ + boolean hasTriggeredIntent(); + /** + * + * + *
+     * The [Intent][google.cloud.dialogflow.cx.v3beta1.Intent] that triggered the response. Only some fields such as
+     * name and displayname will be set.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Intent triggered_intent = 7; + * + * @return The triggeredIntent. + */ + com.google.cloud.dialogflow.cx.v3beta1.Intent getTriggeredIntent(); + /** + * + * + *
+     * The [Intent][google.cloud.dialogflow.cx.v3beta1.Intent] that triggered the response. Only some fields such as
+     * name and displayname will be set.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Intent triggered_intent = 7; + */ + com.google.cloud.dialogflow.cx.v3beta1.IntentOrBuilder getTriggeredIntentOrBuilder(); + + /** + * + * + *
+     * The [Page][google.cloud.dialogflow.cx.v3beta1.Page] on which the utterance was spoken. Only some fields such as
+     * name and displayname will be set.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Page current_page = 8; + * + * @return Whether the currentPage field is set. + */ + boolean hasCurrentPage(); + /** + * + * + *
+     * The [Page][google.cloud.dialogflow.cx.v3beta1.Page] on which the utterance was spoken. Only some fields such as
+     * name and displayname will be set.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Page current_page = 8; + * + * @return The currentPage. + */ + com.google.cloud.dialogflow.cx.v3beta1.Page getCurrentPage(); + /** + * + * + *
+     * The [Page][google.cloud.dialogflow.cx.v3beta1.Page] on which the utterance was spoken. Only some fields such as
+     * name and displayname will be set.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Page current_page = 8; + */ + com.google.cloud.dialogflow.cx.v3beta1.PageOrBuilder getCurrentPageOrBuilder(); + + /** + * + * + *
+     * The [text][google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text] responses from the agent for the turn.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text text_responses = 9; + * + */ + java.util.List + getTextResponsesList(); + /** + * + * + *
+     * The [text][google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text] responses from the agent for the turn.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text text_responses = 9; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text getTextResponses(int index); + /** + * + * + *
+     * The [text][google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text] responses from the agent for the turn.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text text_responses = 9; + * + */ + int getTextResponsesCount(); + /** + * + * + *
+     * The [text][google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text] responses from the agent for the turn.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text text_responses = 9; + * + */ + java.util.List + getTextResponsesOrBuilderList(); + /** + * + * + *
+     * The [text][google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text] responses from the agent for the turn.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text text_responses = 9; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TextOrBuilder getTextResponsesOrBuilder( + int index); + + /** + * + * + *
+     * Response error from the agent in the test result. If set, other output
+     * is empty.
+     * 
+ * + * .google.rpc.Status status = 10; + * + * @return Whether the status field is set. + */ + boolean hasStatus(); + /** + * + * + *
+     * Response error from the agent in the test result. If set, other output
+     * is empty.
+     * 
+ * + * .google.rpc.Status status = 10; + * + * @return The status. + */ + com.google.rpc.Status getStatus(); + /** + * + * + *
+     * Response error from the agent in the test result. If set, other output
+     * is empty.
+     * 
+ * + * .google.rpc.Status status = 10; + */ + com.google.rpc.StatusOrBuilder getStatusOrBuilder(); + } + /** + * + * + *
+   * The output from the virtual agent.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput} + */ + public static final class VirtualAgentOutput extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput) + VirtualAgentOutputOrBuilder { + private static final long serialVersionUID = 0L; + // Use VirtualAgentOutput.newBuilder() to construct. + private VirtualAgentOutput(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VirtualAgentOutput() { + differences_ = java.util.Collections.emptyList(); + textResponses_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VirtualAgentOutput(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private VirtualAgentOutput( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 34: + { + com.google.protobuf.Struct.Builder subBuilder = null; + if (sessionParameters_ != null) { + subBuilder = sessionParameters_.toBuilder(); + } + sessionParameters_ = + input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(sessionParameters_); + sessionParameters_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + differences_ = + new java.util.ArrayList< + com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference>(); + mutable_bitField0_ |= 0x00000001; + } + differences_.add( + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference.parser(), + extensionRegistry)); + break; + } + case 50: + { + com.google.protobuf.Struct.Builder subBuilder = null; + if (diagnosticInfo_ != null) { + subBuilder = diagnosticInfo_.toBuilder(); + } + diagnosticInfo_ = + input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(diagnosticInfo_); + diagnosticInfo_ = subBuilder.buildPartial(); + } + + break; + } + case 58: + { + com.google.cloud.dialogflow.cx.v3beta1.Intent.Builder subBuilder = null; + if (triggeredIntent_ != null) { + subBuilder = triggeredIntent_.toBuilder(); + } + triggeredIntent_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.Intent.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(triggeredIntent_); + triggeredIntent_ = subBuilder.buildPartial(); + } + + break; + } + case 66: + { + com.google.cloud.dialogflow.cx.v3beta1.Page.Builder subBuilder = null; + if (currentPage_ != null) { + subBuilder = currentPage_.toBuilder(); + } + currentPage_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.Page.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(currentPage_); + currentPage_ = subBuilder.buildPartial(); + } + + break; + } + case 74: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + textResponses_ = + new java.util.ArrayList< + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text>(); + mutable_bitField0_ |= 0x00000002; + } + textResponses_.add( + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.parser(), + extensionRegistry)); + break; + } + case 82: + { + com.google.rpc.Status.Builder subBuilder = null; + if (status_ != null) { + subBuilder = status_.toBuilder(); + } + status_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(status_); + status_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + differences_ = java.util.Collections.unmodifiableList(differences_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + textResponses_ = java.util.Collections.unmodifiableList(textResponses_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ConversationTurn_VirtualAgentOutput_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ConversationTurn_VirtualAgentOutput_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput.class, + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput.Builder + .class); + } + + public static final int SESSION_PARAMETERS_FIELD_NUMBER = 4; + private com.google.protobuf.Struct sessionParameters_; + /** + * + * + *
+     * The session parameters available to the bot at this point.
+     * 
+ * + * .google.protobuf.Struct session_parameters = 4; + * + * @return Whether the sessionParameters field is set. + */ + @java.lang.Override + public boolean hasSessionParameters() { + return sessionParameters_ != null; + } + /** + * + * + *
+     * The session parameters available to the bot at this point.
+     * 
+ * + * .google.protobuf.Struct session_parameters = 4; + * + * @return The sessionParameters. + */ + @java.lang.Override + public com.google.protobuf.Struct getSessionParameters() { + return sessionParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : sessionParameters_; + } + /** + * + * + *
+     * The session parameters available to the bot at this point.
+     * 
+ * + * .google.protobuf.Struct session_parameters = 4; + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getSessionParametersOrBuilder() { + return getSessionParameters(); + } + + public static final int DIFFERENCES_FIELD_NUMBER = 5; + private java.util.List 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.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getDifferencesList() { + return 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.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.dialogflow.cx.v3beta1.TestRunDifferenceOrBuilder> + getDifferencesOrBuilderList() { + return 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.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getDifferencesCount() { + return differences_.size(); + } + /** + * + * + *
+     * 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.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference getDifferences(int index) { + return differences_.get(index); + } + /** + * + * + *
+     * 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.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TestRunDifferenceOrBuilder + getDifferencesOrBuilder(int index) { + return differences_.get(index); + } + + public static final int DIAGNOSTIC_INFO_FIELD_NUMBER = 6; + private com.google.protobuf.Struct diagnosticInfo_; + /** + * + * + *
+     * Required. Input only. The diagnostic
+     * [info][Session.DetectIntentResponse.QueryResult.diagnostic_info]
+     * output for the turn.
+     * 
+ * + * + * .google.protobuf.Struct diagnostic_info = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return Whether the diagnosticInfo field is set. + */ + @java.lang.Override + public boolean hasDiagnosticInfo() { + return diagnosticInfo_ != null; + } + /** + * + * + *
+     * Required. Input only. The diagnostic
+     * [info][Session.DetectIntentResponse.QueryResult.diagnostic_info]
+     * output for the turn.
+     * 
+ * + * + * .google.protobuf.Struct diagnostic_info = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The diagnosticInfo. + */ + @java.lang.Override + public com.google.protobuf.Struct getDiagnosticInfo() { + return diagnosticInfo_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : diagnosticInfo_; + } + /** + * + * + *
+     * Required. Input only. The diagnostic
+     * [info][Session.DetectIntentResponse.QueryResult.diagnostic_info]
+     * output for the turn.
+     * 
+ * + * + * .google.protobuf.Struct diagnostic_info = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getDiagnosticInfoOrBuilder() { + return getDiagnosticInfo(); + } + + public static final int TRIGGERED_INTENT_FIELD_NUMBER = 7; + private com.google.cloud.dialogflow.cx.v3beta1.Intent triggeredIntent_; + /** + * + * + *
+     * The [Intent][google.cloud.dialogflow.cx.v3beta1.Intent] that triggered the response. Only some fields such as
+     * name and displayname will be set.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Intent triggered_intent = 7; + * + * @return Whether the triggeredIntent field is set. + */ + @java.lang.Override + public boolean hasTriggeredIntent() { + return triggeredIntent_ != null; + } + /** + * + * + *
+     * The [Intent][google.cloud.dialogflow.cx.v3beta1.Intent] that triggered the response. Only some fields such as
+     * name and displayname will be set.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Intent triggered_intent = 7; + * + * @return The triggeredIntent. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Intent getTriggeredIntent() { + return triggeredIntent_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Intent.getDefaultInstance() + : triggeredIntent_; + } + /** + * + * + *
+     * The [Intent][google.cloud.dialogflow.cx.v3beta1.Intent] that triggered the response. Only some fields such as
+     * name and displayname will be set.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Intent triggered_intent = 7; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.IntentOrBuilder getTriggeredIntentOrBuilder() { + return getTriggeredIntent(); + } + + public static final int CURRENT_PAGE_FIELD_NUMBER = 8; + private com.google.cloud.dialogflow.cx.v3beta1.Page currentPage_; + /** + * + * + *
+     * The [Page][google.cloud.dialogflow.cx.v3beta1.Page] on which the utterance was spoken. Only some fields such as
+     * name and displayname will be set.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Page current_page = 8; + * + * @return Whether the currentPage field is set. + */ + @java.lang.Override + public boolean hasCurrentPage() { + return currentPage_ != null; + } + /** + * + * + *
+     * The [Page][google.cloud.dialogflow.cx.v3beta1.Page] on which the utterance was spoken. Only some fields such as
+     * name and displayname will be set.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Page current_page = 8; + * + * @return The currentPage. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Page getCurrentPage() { + return currentPage_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Page.getDefaultInstance() + : currentPage_; + } + /** + * + * + *
+     * The [Page][google.cloud.dialogflow.cx.v3beta1.Page] on which the utterance was spoken. Only some fields such as
+     * name and displayname will be set.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Page current_page = 8; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.PageOrBuilder getCurrentPageOrBuilder() { + return getCurrentPage(); + } + + public static final int TEXT_RESPONSES_FIELD_NUMBER = 9; + private java.util.List + textResponses_; + /** + * + * + *
+     * The [text][google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text] responses from the agent for the turn.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text text_responses = 9; + * + */ + @java.lang.Override + public java.util.List + getTextResponsesList() { + return textResponses_; + } + /** + * + * + *
+     * The [text][google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text] responses from the agent for the turn.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text text_responses = 9; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TextOrBuilder> + getTextResponsesOrBuilderList() { + return textResponses_; + } + /** + * + * + *
+     * The [text][google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text] responses from the agent for the turn.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text text_responses = 9; + * + */ + @java.lang.Override + public int getTextResponsesCount() { + return textResponses_.size(); + } + /** + * + * + *
+     * The [text][google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text] responses from the agent for the turn.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text text_responses = 9; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text getTextResponses(int index) { + return textResponses_.get(index); + } + /** + * + * + *
+     * The [text][google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text] responses from the agent for the turn.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text text_responses = 9; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TextOrBuilder + getTextResponsesOrBuilder(int index) { + return textResponses_.get(index); + } + + public static final int STATUS_FIELD_NUMBER = 10; + private com.google.rpc.Status status_; + /** + * + * + *
+     * Response error from the agent in the test result. If set, other output
+     * is empty.
+     * 
+ * + * .google.rpc.Status status = 10; + * + * @return Whether the status field is set. + */ + @java.lang.Override + public boolean hasStatus() { + return status_ != null; + } + /** + * + * + *
+     * Response error from the agent in the test result. If set, other output
+     * is empty.
+     * 
+ * + * .google.rpc.Status status = 10; + * + * @return The status. + */ + @java.lang.Override + public com.google.rpc.Status getStatus() { + return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; + } + /** + * + * + *
+     * Response error from the agent in the test result. If set, other output
+     * is empty.
+     * 
+ * + * .google.rpc.Status status = 10; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { + return getStatus(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (sessionParameters_ != null) { + output.writeMessage(4, getSessionParameters()); + } + for (int i = 0; i < differences_.size(); i++) { + output.writeMessage(5, differences_.get(i)); + } + if (diagnosticInfo_ != null) { + output.writeMessage(6, getDiagnosticInfo()); + } + if (triggeredIntent_ != null) { + output.writeMessage(7, getTriggeredIntent()); + } + if (currentPage_ != null) { + output.writeMessage(8, getCurrentPage()); + } + for (int i = 0; i < textResponses_.size(); i++) { + output.writeMessage(9, textResponses_.get(i)); + } + if (status_ != null) { + output.writeMessage(10, getStatus()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (sessionParameters_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getSessionParameters()); + } + for (int i = 0; i < differences_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, differences_.get(i)); + } + if (diagnosticInfo_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getDiagnosticInfo()); + } + if (triggeredIntent_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getTriggeredIntent()); + } + if (currentPage_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getCurrentPage()); + } + for (int i = 0; i < textResponses_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, textResponses_.get(i)); + } + if (status_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getStatus()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput other = + (com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput) obj; + + if (hasSessionParameters() != other.hasSessionParameters()) return false; + if (hasSessionParameters()) { + if (!getSessionParameters().equals(other.getSessionParameters())) return false; + } + if (!getDifferencesList().equals(other.getDifferencesList())) return false; + if (hasDiagnosticInfo() != other.hasDiagnosticInfo()) return false; + if (hasDiagnosticInfo()) { + if (!getDiagnosticInfo().equals(other.getDiagnosticInfo())) return false; + } + if (hasTriggeredIntent() != other.hasTriggeredIntent()) return false; + if (hasTriggeredIntent()) { + if (!getTriggeredIntent().equals(other.getTriggeredIntent())) return false; + } + if (hasCurrentPage() != other.hasCurrentPage()) return false; + if (hasCurrentPage()) { + if (!getCurrentPage().equals(other.getCurrentPage())) return false; + } + if (!getTextResponsesList().equals(other.getTextResponsesList())) return false; + if (hasStatus() != other.hasStatus()) return false; + if (hasStatus()) { + if (!getStatus().equals(other.getStatus())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasSessionParameters()) { + hash = (37 * hash) + SESSION_PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + getSessionParameters().hashCode(); + } + if (getDifferencesCount() > 0) { + hash = (37 * hash) + DIFFERENCES_FIELD_NUMBER; + hash = (53 * hash) + getDifferencesList().hashCode(); + } + if (hasDiagnosticInfo()) { + hash = (37 * hash) + DIAGNOSTIC_INFO_FIELD_NUMBER; + hash = (53 * hash) + getDiagnosticInfo().hashCode(); + } + if (hasTriggeredIntent()) { + hash = (37 * hash) + TRIGGERED_INTENT_FIELD_NUMBER; + hash = (53 * hash) + getTriggeredIntent().hashCode(); + } + if (hasCurrentPage()) { + hash = (37 * hash) + CURRENT_PAGE_FIELD_NUMBER; + hash = (53 * hash) + getCurrentPage().hashCode(); + } + if (getTextResponsesCount() > 0) { + hash = (37 * hash) + TEXT_RESPONSES_FIELD_NUMBER; + hash = (53 * hash) + getTextResponsesList().hashCode(); + } + if (hasStatus()) { + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + getStatus().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * The output from the virtual agent.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput) + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutputOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ConversationTurn_VirtualAgentOutput_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ConversationTurn_VirtualAgentOutput_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput.class, + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput.Builder + .class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDifferencesFieldBuilder(); + getTextResponsesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (sessionParametersBuilder_ == null) { + sessionParameters_ = null; + } else { + sessionParameters_ = null; + sessionParametersBuilder_ = null; + } + if (differencesBuilder_ == null) { + differences_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + differencesBuilder_.clear(); + } + if (diagnosticInfoBuilder_ == null) { + diagnosticInfo_ = null; + } else { + diagnosticInfo_ = null; + diagnosticInfoBuilder_ = null; + } + if (triggeredIntentBuilder_ == null) { + triggeredIntent_ = null; + } else { + triggeredIntent_ = null; + triggeredIntentBuilder_ = null; + } + if (currentPageBuilder_ == null) { + currentPage_ = null; + } else { + currentPage_ = null; + currentPageBuilder_ = null; + } + if (textResponsesBuilder_ == null) { + textResponses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + textResponsesBuilder_.clear(); + } + if (statusBuilder_ == null) { + status_ = null; + } else { + status_ = null; + statusBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ConversationTurn_VirtualAgentOutput_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput build() { + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput + buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput result = + new com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput(this); + int from_bitField0_ = bitField0_; + if (sessionParametersBuilder_ == null) { + result.sessionParameters_ = sessionParameters_; + } else { + result.sessionParameters_ = sessionParametersBuilder_.build(); + } + if (differencesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + differences_ = java.util.Collections.unmodifiableList(differences_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.differences_ = differences_; + } else { + result.differences_ = differencesBuilder_.build(); + } + if (diagnosticInfoBuilder_ == null) { + result.diagnosticInfo_ = diagnosticInfo_; + } else { + result.diagnosticInfo_ = diagnosticInfoBuilder_.build(); + } + if (triggeredIntentBuilder_ == null) { + result.triggeredIntent_ = triggeredIntent_; + } else { + result.triggeredIntent_ = triggeredIntentBuilder_.build(); + } + if (currentPageBuilder_ == null) { + result.currentPage_ = currentPage_; + } else { + result.currentPage_ = currentPageBuilder_.build(); + } + if (textResponsesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + textResponses_ = java.util.Collections.unmodifiableList(textResponses_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.textResponses_ = textResponses_; + } else { + result.textResponses_ = textResponsesBuilder_.build(); + } + if (statusBuilder_ == null) { + result.status_ = status_; + } else { + result.status_ = statusBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput + .getDefaultInstance()) return this; + if (other.hasSessionParameters()) { + mergeSessionParameters(other.getSessionParameters()); + } + if (differencesBuilder_ == null) { + if (!other.differences_.isEmpty()) { + if (differences_.isEmpty()) { + differences_ = other.differences_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDifferencesIsMutable(); + differences_.addAll(other.differences_); + } + onChanged(); + } + } else { + if (!other.differences_.isEmpty()) { + if (differencesBuilder_.isEmpty()) { + differencesBuilder_.dispose(); + differencesBuilder_ = null; + differences_ = other.differences_; + bitField0_ = (bitField0_ & ~0x00000001); + differencesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDifferencesFieldBuilder() + : null; + } else { + differencesBuilder_.addAllMessages(other.differences_); + } + } + } + if (other.hasDiagnosticInfo()) { + mergeDiagnosticInfo(other.getDiagnosticInfo()); + } + if (other.hasTriggeredIntent()) { + mergeTriggeredIntent(other.getTriggeredIntent()); + } + if (other.hasCurrentPage()) { + mergeCurrentPage(other.getCurrentPage()); + } + if (textResponsesBuilder_ == null) { + if (!other.textResponses_.isEmpty()) { + if (textResponses_.isEmpty()) { + textResponses_ = other.textResponses_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureTextResponsesIsMutable(); + textResponses_.addAll(other.textResponses_); + } + onChanged(); + } + } else { + if (!other.textResponses_.isEmpty()) { + if (textResponsesBuilder_.isEmpty()) { + textResponsesBuilder_.dispose(); + textResponsesBuilder_ = null; + textResponses_ = other.textResponses_; + bitField0_ = (bitField0_ & ~0x00000002); + textResponsesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTextResponsesFieldBuilder() + : null; + } else { + textResponsesBuilder_.addAllMessages(other.textResponses_); + } + } + } + if (other.hasStatus()) { + mergeStatus(other.getStatus()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.protobuf.Struct sessionParameters_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + sessionParametersBuilder_; + /** + * + * + *
+       * The session parameters available to the bot at this point.
+       * 
+ * + * .google.protobuf.Struct session_parameters = 4; + * + * @return Whether the sessionParameters field is set. + */ + public boolean hasSessionParameters() { + return sessionParametersBuilder_ != null || sessionParameters_ != null; + } + /** + * + * + *
+       * The session parameters available to the bot at this point.
+       * 
+ * + * .google.protobuf.Struct session_parameters = 4; + * + * @return The sessionParameters. + */ + public com.google.protobuf.Struct getSessionParameters() { + if (sessionParametersBuilder_ == null) { + return sessionParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : sessionParameters_; + } else { + return sessionParametersBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The session parameters available to the bot at this point.
+       * 
+ * + * .google.protobuf.Struct session_parameters = 4; + */ + public Builder setSessionParameters(com.google.protobuf.Struct value) { + if (sessionParametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sessionParameters_ = value; + onChanged(); + } else { + sessionParametersBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * The session parameters available to the bot at this point.
+       * 
+ * + * .google.protobuf.Struct session_parameters = 4; + */ + public Builder setSessionParameters(com.google.protobuf.Struct.Builder builderForValue) { + if (sessionParametersBuilder_ == null) { + sessionParameters_ = builderForValue.build(); + onChanged(); + } else { + sessionParametersBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * The session parameters available to the bot at this point.
+       * 
+ * + * .google.protobuf.Struct session_parameters = 4; + */ + public Builder mergeSessionParameters(com.google.protobuf.Struct value) { + if (sessionParametersBuilder_ == null) { + if (sessionParameters_ != null) { + sessionParameters_ = + com.google.protobuf.Struct.newBuilder(sessionParameters_) + .mergeFrom(value) + .buildPartial(); + } else { + sessionParameters_ = value; + } + onChanged(); + } else { + sessionParametersBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * The session parameters available to the bot at this point.
+       * 
+ * + * .google.protobuf.Struct session_parameters = 4; + */ + public Builder clearSessionParameters() { + if (sessionParametersBuilder_ == null) { + sessionParameters_ = null; + onChanged(); + } else { + sessionParameters_ = null; + sessionParametersBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * The session parameters available to the bot at this point.
+       * 
+ * + * .google.protobuf.Struct session_parameters = 4; + */ + public com.google.protobuf.Struct.Builder getSessionParametersBuilder() { + + onChanged(); + return getSessionParametersFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The session parameters available to the bot at this point.
+       * 
+ * + * .google.protobuf.Struct session_parameters = 4; + */ + public com.google.protobuf.StructOrBuilder getSessionParametersOrBuilder() { + if (sessionParametersBuilder_ != null) { + return sessionParametersBuilder_.getMessageOrBuilder(); + } else { + return sessionParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : sessionParameters_; + } + } + /** + * + * + *
+       * The session parameters available to the bot at this point.
+       * 
+ * + * .google.protobuf.Struct session_parameters = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + getSessionParametersFieldBuilder() { + if (sessionParametersBuilder_ == null) { + sessionParametersBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder>( + getSessionParameters(), getParentForChildren(), isClean()); + sessionParameters_ = null; + } + return sessionParametersBuilder_; + } + + private java.util.List + differences_ = java.util.Collections.emptyList(); + + private void ensureDifferencesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + differences_ = + new java.util.ArrayList( + differences_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference, + com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TestRunDifferenceOrBuilder> + differencesBuilder_; + + /** + * + * + *
+       * 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.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getDifferencesList() { + if (differencesBuilder_ == null) { + return java.util.Collections.unmodifiableList(differences_); + } else { + return differencesBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * 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.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getDifferencesCount() { + if (differencesBuilder_ == null) { + return differences_.size(); + } else { + return differencesBuilder_.getCount(); + } + } + /** + * + * + *
+       * 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.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference getDifferences(int index) { + if (differencesBuilder_ == null) { + return differences_.get(index); + } else { + return differencesBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * 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.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDifferences( + int index, com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference value) { + if (differencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDifferencesIsMutable(); + differences_.set(index, value); + onChanged(); + } else { + differencesBuilder_.setMessage(index, value); + } + 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.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDifferences( + int index, + com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference.Builder builderForValue) { + if (differencesBuilder_ == null) { + ensureDifferencesIsMutable(); + differences_.set(index, builderForValue.build()); + onChanged(); + } else { + differencesBuilder_.setMessage(index, builderForValue.build()); + } + 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.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addDifferences( + com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference value) { + if (differencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDifferencesIsMutable(); + differences_.add(value); + onChanged(); + } else { + differencesBuilder_.addMessage(value); + } + 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.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addDifferences( + int index, com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference value) { + if (differencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDifferencesIsMutable(); + differences_.add(index, value); + onChanged(); + } else { + differencesBuilder_.addMessage(index, value); + } + 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.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addDifferences( + com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference.Builder builderForValue) { + if (differencesBuilder_ == null) { + ensureDifferencesIsMutable(); + differences_.add(builderForValue.build()); + onChanged(); + } else { + differencesBuilder_.addMessage(builderForValue.build()); + } + 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.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addDifferences( + int index, + com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference.Builder builderForValue) { + if (differencesBuilder_ == null) { + ensureDifferencesIsMutable(); + differences_.add(index, builderForValue.build()); + onChanged(); + } else { + differencesBuilder_.addMessage(index, builderForValue.build()); + } + 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.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllDifferences( + java.lang.Iterable + values) { + if (differencesBuilder_ == null) { + ensureDifferencesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, differences_); + onChanged(); + } else { + differencesBuilder_.addAllMessages(values); + } + 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.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearDifferences() { + if (differencesBuilder_ == null) { + differences_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + differencesBuilder_.clear(); + } + 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.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeDifferences(int index) { + if (differencesBuilder_ == null) { + ensureDifferencesIsMutable(); + differences_.remove(index); + onChanged(); + } else { + differencesBuilder_.remove(index); + } + 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.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference.Builder getDifferencesBuilder( + int index) { + return getDifferencesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * 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.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.TestRunDifferenceOrBuilder + getDifferencesOrBuilder(int index) { + if (differencesBuilder_ == null) { + return differences_.get(index); + } else { + return differencesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * 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.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + ? extends com.google.cloud.dialogflow.cx.v3beta1.TestRunDifferenceOrBuilder> + getDifferencesOrBuilderList() { + if (differencesBuilder_ != null) { + return differencesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(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.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference.Builder + addDifferencesBuilder() { + return getDifferencesFieldBuilder() + .addBuilder( + com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference.getDefaultInstance()); + } + /** + * + * + *
+       * 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.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference.Builder addDifferencesBuilder( + int index) { + return getDifferencesFieldBuilder() + .addBuilder( + index, + com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference.getDefaultInstance()); + } + /** + * + * + *
+       * 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.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getDifferencesBuilderList() { + return getDifferencesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference, + com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TestRunDifferenceOrBuilder> + getDifferencesFieldBuilder() { + if (differencesBuilder_ == null) { + differencesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference, + com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TestRunDifferenceOrBuilder>( + differences_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + differences_ = null; + } + return differencesBuilder_; + } + + private com.google.protobuf.Struct diagnosticInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + diagnosticInfoBuilder_; + /** + * + * + *
+       * Required. Input only. The diagnostic
+       * [info][Session.DetectIntentResponse.QueryResult.diagnostic_info]
+       * output for the turn.
+       * 
+ * + * + * .google.protobuf.Struct diagnostic_info = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return Whether the diagnosticInfo field is set. + */ + public boolean hasDiagnosticInfo() { + return diagnosticInfoBuilder_ != null || diagnosticInfo_ != null; + } + /** + * + * + *
+       * Required. Input only. The diagnostic
+       * [info][Session.DetectIntentResponse.QueryResult.diagnostic_info]
+       * output for the turn.
+       * 
+ * + * + * .google.protobuf.Struct diagnostic_info = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The diagnosticInfo. + */ + public com.google.protobuf.Struct getDiagnosticInfo() { + if (diagnosticInfoBuilder_ == null) { + return diagnosticInfo_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : diagnosticInfo_; + } else { + return diagnosticInfoBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Required. Input only. The diagnostic
+       * [info][Session.DetectIntentResponse.QueryResult.diagnostic_info]
+       * output for the turn.
+       * 
+ * + * + * .google.protobuf.Struct diagnostic_info = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder setDiagnosticInfo(com.google.protobuf.Struct value) { + if (diagnosticInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + diagnosticInfo_ = value; + onChanged(); + } else { + diagnosticInfoBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Required. Input only. The diagnostic
+       * [info][Session.DetectIntentResponse.QueryResult.diagnostic_info]
+       * output for the turn.
+       * 
+ * + * + * .google.protobuf.Struct diagnostic_info = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder setDiagnosticInfo(com.google.protobuf.Struct.Builder builderForValue) { + if (diagnosticInfoBuilder_ == null) { + diagnosticInfo_ = builderForValue.build(); + onChanged(); + } else { + diagnosticInfoBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Required. Input only. The diagnostic
+       * [info][Session.DetectIntentResponse.QueryResult.diagnostic_info]
+       * output for the turn.
+       * 
+ * + * + * .google.protobuf.Struct diagnostic_info = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder mergeDiagnosticInfo(com.google.protobuf.Struct value) { + if (diagnosticInfoBuilder_ == null) { + if (diagnosticInfo_ != null) { + diagnosticInfo_ = + com.google.protobuf.Struct.newBuilder(diagnosticInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + diagnosticInfo_ = value; + } + onChanged(); + } else { + diagnosticInfoBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Required. Input only. The diagnostic
+       * [info][Session.DetectIntentResponse.QueryResult.diagnostic_info]
+       * output for the turn.
+       * 
+ * + * + * .google.protobuf.Struct diagnostic_info = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder clearDiagnosticInfo() { + if (diagnosticInfoBuilder_ == null) { + diagnosticInfo_ = null; + onChanged(); + } else { + diagnosticInfo_ = null; + diagnosticInfoBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Required. Input only. The diagnostic
+       * [info][Session.DetectIntentResponse.QueryResult.diagnostic_info]
+       * output for the turn.
+       * 
+ * + * + * .google.protobuf.Struct diagnostic_info = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public com.google.protobuf.Struct.Builder getDiagnosticInfoBuilder() { + + onChanged(); + return getDiagnosticInfoFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Required. Input only. The diagnostic
+       * [info][Session.DetectIntentResponse.QueryResult.diagnostic_info]
+       * output for the turn.
+       * 
+ * + * + * .google.protobuf.Struct diagnostic_info = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public com.google.protobuf.StructOrBuilder getDiagnosticInfoOrBuilder() { + if (diagnosticInfoBuilder_ != null) { + return diagnosticInfoBuilder_.getMessageOrBuilder(); + } else { + return diagnosticInfo_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : diagnosticInfo_; + } + } + /** + * + * + *
+       * Required. Input only. The diagnostic
+       * [info][Session.DetectIntentResponse.QueryResult.diagnostic_info]
+       * output for the turn.
+       * 
+ * + * + * .google.protobuf.Struct diagnostic_info = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + getDiagnosticInfoFieldBuilder() { + if (diagnosticInfoBuilder_ == null) { + diagnosticInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder>( + getDiagnosticInfo(), getParentForChildren(), isClean()); + diagnosticInfo_ = null; + } + return diagnosticInfoBuilder_; + } + + private com.google.cloud.dialogflow.cx.v3beta1.Intent triggeredIntent_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Intent, + com.google.cloud.dialogflow.cx.v3beta1.Intent.Builder, + com.google.cloud.dialogflow.cx.v3beta1.IntentOrBuilder> + triggeredIntentBuilder_; + /** + * + * + *
+       * The [Intent][google.cloud.dialogflow.cx.v3beta1.Intent] that triggered the response. Only some fields such as
+       * name and displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Intent triggered_intent = 7; + * + * @return Whether the triggeredIntent field is set. + */ + public boolean hasTriggeredIntent() { + return triggeredIntentBuilder_ != null || triggeredIntent_ != null; + } + /** + * + * + *
+       * The [Intent][google.cloud.dialogflow.cx.v3beta1.Intent] that triggered the response. Only some fields such as
+       * name and displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Intent triggered_intent = 7; + * + * @return The triggeredIntent. + */ + public com.google.cloud.dialogflow.cx.v3beta1.Intent getTriggeredIntent() { + if (triggeredIntentBuilder_ == null) { + return triggeredIntent_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Intent.getDefaultInstance() + : triggeredIntent_; + } else { + return triggeredIntentBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The [Intent][google.cloud.dialogflow.cx.v3beta1.Intent] that triggered the response. Only some fields such as
+       * name and displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Intent triggered_intent = 7; + */ + public Builder setTriggeredIntent(com.google.cloud.dialogflow.cx.v3beta1.Intent value) { + if (triggeredIntentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + triggeredIntent_ = value; + onChanged(); + } else { + triggeredIntentBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * The [Intent][google.cloud.dialogflow.cx.v3beta1.Intent] that triggered the response. Only some fields such as
+       * name and displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Intent triggered_intent = 7; + */ + public Builder setTriggeredIntent( + com.google.cloud.dialogflow.cx.v3beta1.Intent.Builder builderForValue) { + if (triggeredIntentBuilder_ == null) { + triggeredIntent_ = builderForValue.build(); + onChanged(); + } else { + triggeredIntentBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * The [Intent][google.cloud.dialogflow.cx.v3beta1.Intent] that triggered the response. Only some fields such as
+       * name and displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Intent triggered_intent = 7; + */ + public Builder mergeTriggeredIntent(com.google.cloud.dialogflow.cx.v3beta1.Intent value) { + if (triggeredIntentBuilder_ == null) { + if (triggeredIntent_ != null) { + triggeredIntent_ = + com.google.cloud.dialogflow.cx.v3beta1.Intent.newBuilder(triggeredIntent_) + .mergeFrom(value) + .buildPartial(); + } else { + triggeredIntent_ = value; + } + onChanged(); + } else { + triggeredIntentBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * The [Intent][google.cloud.dialogflow.cx.v3beta1.Intent] that triggered the response. Only some fields such as
+       * name and displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Intent triggered_intent = 7; + */ + public Builder clearTriggeredIntent() { + if (triggeredIntentBuilder_ == null) { + triggeredIntent_ = null; + onChanged(); + } else { + triggeredIntent_ = null; + triggeredIntentBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * The [Intent][google.cloud.dialogflow.cx.v3beta1.Intent] that triggered the response. Only some fields such as
+       * name and displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Intent triggered_intent = 7; + */ + public com.google.cloud.dialogflow.cx.v3beta1.Intent.Builder getTriggeredIntentBuilder() { + + onChanged(); + return getTriggeredIntentFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The [Intent][google.cloud.dialogflow.cx.v3beta1.Intent] that triggered the response. Only some fields such as
+       * name and displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Intent triggered_intent = 7; + */ + public com.google.cloud.dialogflow.cx.v3beta1.IntentOrBuilder getTriggeredIntentOrBuilder() { + if (triggeredIntentBuilder_ != null) { + return triggeredIntentBuilder_.getMessageOrBuilder(); + } else { + return triggeredIntent_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Intent.getDefaultInstance() + : triggeredIntent_; + } + } + /** + * + * + *
+       * The [Intent][google.cloud.dialogflow.cx.v3beta1.Intent] that triggered the response. Only some fields such as
+       * name and displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Intent triggered_intent = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Intent, + com.google.cloud.dialogflow.cx.v3beta1.Intent.Builder, + com.google.cloud.dialogflow.cx.v3beta1.IntentOrBuilder> + getTriggeredIntentFieldBuilder() { + if (triggeredIntentBuilder_ == null) { + triggeredIntentBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Intent, + com.google.cloud.dialogflow.cx.v3beta1.Intent.Builder, + com.google.cloud.dialogflow.cx.v3beta1.IntentOrBuilder>( + getTriggeredIntent(), getParentForChildren(), isClean()); + triggeredIntent_ = null; + } + return triggeredIntentBuilder_; + } + + private com.google.cloud.dialogflow.cx.v3beta1.Page currentPage_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Page, + com.google.cloud.dialogflow.cx.v3beta1.Page.Builder, + com.google.cloud.dialogflow.cx.v3beta1.PageOrBuilder> + currentPageBuilder_; + /** + * + * + *
+       * The [Page][google.cloud.dialogflow.cx.v3beta1.Page] on which the utterance was spoken. Only some fields such as
+       * name and displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Page current_page = 8; + * + * @return Whether the currentPage field is set. + */ + public boolean hasCurrentPage() { + return currentPageBuilder_ != null || currentPage_ != null; + } + /** + * + * + *
+       * The [Page][google.cloud.dialogflow.cx.v3beta1.Page] on which the utterance was spoken. Only some fields such as
+       * name and displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Page current_page = 8; + * + * @return The currentPage. + */ + public com.google.cloud.dialogflow.cx.v3beta1.Page getCurrentPage() { + if (currentPageBuilder_ == null) { + return currentPage_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Page.getDefaultInstance() + : currentPage_; + } else { + return currentPageBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The [Page][google.cloud.dialogflow.cx.v3beta1.Page] on which the utterance was spoken. Only some fields such as
+       * name and displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Page current_page = 8; + */ + public Builder setCurrentPage(com.google.cloud.dialogflow.cx.v3beta1.Page value) { + if (currentPageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + currentPage_ = value; + onChanged(); + } else { + currentPageBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * The [Page][google.cloud.dialogflow.cx.v3beta1.Page] on which the utterance was spoken. Only some fields such as
+       * name and displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Page current_page = 8; + */ + public Builder setCurrentPage( + com.google.cloud.dialogflow.cx.v3beta1.Page.Builder builderForValue) { + if (currentPageBuilder_ == null) { + currentPage_ = builderForValue.build(); + onChanged(); + } else { + currentPageBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * The [Page][google.cloud.dialogflow.cx.v3beta1.Page] on which the utterance was spoken. Only some fields such as
+       * name and displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Page current_page = 8; + */ + public Builder mergeCurrentPage(com.google.cloud.dialogflow.cx.v3beta1.Page value) { + if (currentPageBuilder_ == null) { + if (currentPage_ != null) { + currentPage_ = + com.google.cloud.dialogflow.cx.v3beta1.Page.newBuilder(currentPage_) + .mergeFrom(value) + .buildPartial(); + } else { + currentPage_ = value; + } + onChanged(); + } else { + currentPageBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * The [Page][google.cloud.dialogflow.cx.v3beta1.Page] on which the utterance was spoken. Only some fields such as
+       * name and displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Page current_page = 8; + */ + public Builder clearCurrentPage() { + if (currentPageBuilder_ == null) { + currentPage_ = null; + onChanged(); + } else { + currentPage_ = null; + currentPageBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * The [Page][google.cloud.dialogflow.cx.v3beta1.Page] on which the utterance was spoken. Only some fields such as
+       * name and displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Page current_page = 8; + */ + public com.google.cloud.dialogflow.cx.v3beta1.Page.Builder getCurrentPageBuilder() { + + onChanged(); + return getCurrentPageFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The [Page][google.cloud.dialogflow.cx.v3beta1.Page] on which the utterance was spoken. Only some fields such as
+       * name and displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Page current_page = 8; + */ + public com.google.cloud.dialogflow.cx.v3beta1.PageOrBuilder getCurrentPageOrBuilder() { + if (currentPageBuilder_ != null) { + return currentPageBuilder_.getMessageOrBuilder(); + } else { + return currentPage_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Page.getDefaultInstance() + : currentPage_; + } + } + /** + * + * + *
+       * The [Page][google.cloud.dialogflow.cx.v3beta1.Page] on which the utterance was spoken. Only some fields such as
+       * name and displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Page current_page = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Page, + com.google.cloud.dialogflow.cx.v3beta1.Page.Builder, + com.google.cloud.dialogflow.cx.v3beta1.PageOrBuilder> + getCurrentPageFieldBuilder() { + if (currentPageBuilder_ == null) { + currentPageBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Page, + com.google.cloud.dialogflow.cx.v3beta1.Page.Builder, + com.google.cloud.dialogflow.cx.v3beta1.PageOrBuilder>( + getCurrentPage(), getParentForChildren(), isClean()); + currentPage_ = null; + } + return currentPageBuilder_; + } + + private java.util.List + textResponses_ = java.util.Collections.emptyList(); + + private void ensureTextResponsesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + textResponses_ = + new java.util.ArrayList( + textResponses_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text, + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TextOrBuilder> + textResponsesBuilder_; + + /** + * + * + *
+       * The [text][google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text] responses from the agent for the turn.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text text_responses = 9; + * + */ + public java.util.List + getTextResponsesList() { + if (textResponsesBuilder_ == null) { + return java.util.Collections.unmodifiableList(textResponses_); + } else { + return textResponsesBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * The [text][google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text] responses from the agent for the turn.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text text_responses = 9; + * + */ + public int getTextResponsesCount() { + if (textResponsesBuilder_ == null) { + return textResponses_.size(); + } else { + return textResponsesBuilder_.getCount(); + } + } + /** + * + * + *
+       * The [text][google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text] responses from the agent for the turn.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text text_responses = 9; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text getTextResponses( + int index) { + if (textResponsesBuilder_ == null) { + return textResponses_.get(index); + } else { + return textResponsesBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * The [text][google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text] responses from the agent for the turn.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text text_responses = 9; + * + */ + public Builder setTextResponses( + int index, com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text value) { + if (textResponsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTextResponsesIsMutable(); + textResponses_.set(index, value); + onChanged(); + } else { + textResponsesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * The [text][google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text] responses from the agent for the turn.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text text_responses = 9; + * + */ + public Builder setTextResponses( + int index, + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.Builder builderForValue) { + if (textResponsesBuilder_ == null) { + ensureTextResponsesIsMutable(); + textResponses_.set(index, builderForValue.build()); + onChanged(); + } else { + textResponsesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The [text][google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text] responses from the agent for the turn.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text text_responses = 9; + * + */ + public Builder addTextResponses( + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text value) { + if (textResponsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTextResponsesIsMutable(); + textResponses_.add(value); + onChanged(); + } else { + textResponsesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * The [text][google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text] responses from the agent for the turn.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text text_responses = 9; + * + */ + public Builder addTextResponses( + int index, com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text value) { + if (textResponsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTextResponsesIsMutable(); + textResponses_.add(index, value); + onChanged(); + } else { + textResponsesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * The [text][google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text] responses from the agent for the turn.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text text_responses = 9; + * + */ + public Builder addTextResponses( + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.Builder builderForValue) { + if (textResponsesBuilder_ == null) { + ensureTextResponsesIsMutable(); + textResponses_.add(builderForValue.build()); + onChanged(); + } else { + textResponsesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The [text][google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text] responses from the agent for the turn.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text text_responses = 9; + * + */ + public Builder addTextResponses( + int index, + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.Builder builderForValue) { + if (textResponsesBuilder_ == null) { + ensureTextResponsesIsMutable(); + textResponses_.add(index, builderForValue.build()); + onChanged(); + } else { + textResponsesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The [text][google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text] responses from the agent for the turn.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text text_responses = 9; + * + */ + public Builder addAllTextResponses( + java.lang.Iterable + values) { + if (textResponsesBuilder_ == null) { + ensureTextResponsesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, textResponses_); + onChanged(); + } else { + textResponsesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * The [text][google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text] responses from the agent for the turn.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text text_responses = 9; + * + */ + public Builder clearTextResponses() { + if (textResponsesBuilder_ == null) { + textResponses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + textResponsesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * The [text][google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text] responses from the agent for the turn.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text text_responses = 9; + * + */ + public Builder removeTextResponses(int index) { + if (textResponsesBuilder_ == null) { + ensureTextResponsesIsMutable(); + textResponses_.remove(index); + onChanged(); + } else { + textResponsesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * The [text][google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text] responses from the agent for the turn.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text text_responses = 9; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.Builder + getTextResponsesBuilder(int index) { + return getTextResponsesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * The [text][google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text] responses from the agent for the turn.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text text_responses = 9; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TextOrBuilder + getTextResponsesOrBuilder(int index) { + if (textResponsesBuilder_ == null) { + return textResponses_.get(index); + } else { + return textResponsesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * The [text][google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text] responses from the agent for the turn.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text text_responses = 9; + * + */ + public java.util.List< + ? extends com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TextOrBuilder> + getTextResponsesOrBuilderList() { + if (textResponsesBuilder_ != null) { + return textResponsesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(textResponses_); + } + } + /** + * + * + *
+       * The [text][google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text] responses from the agent for the turn.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text text_responses = 9; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.Builder + addTextResponsesBuilder() { + return getTextResponsesFieldBuilder() + .addBuilder( + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.getDefaultInstance()); + } + /** + * + * + *
+       * The [text][google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text] responses from the agent for the turn.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text text_responses = 9; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.Builder + addTextResponsesBuilder(int index) { + return getTextResponsesFieldBuilder() + .addBuilder( + index, + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.getDefaultInstance()); + } + /** + * + * + *
+       * The [text][google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text] responses from the agent for the turn.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text text_responses = 9; + * + */ + public java.util.List + getTextResponsesBuilderList() { + return getTextResponsesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text, + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TextOrBuilder> + getTextResponsesFieldBuilder() { + if (textResponsesBuilder_ == null) { + textResponsesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text, + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TextOrBuilder>( + textResponses_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + textResponses_ = null; + } + return textResponsesBuilder_; + } + + private com.google.rpc.Status status_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + statusBuilder_; + /** + * + * + *
+       * Response error from the agent in the test result. If set, other output
+       * is empty.
+       * 
+ * + * .google.rpc.Status status = 10; + * + * @return Whether the status field is set. + */ + public boolean hasStatus() { + return statusBuilder_ != null || status_ != null; + } + /** + * + * + *
+       * Response error from the agent in the test result. If set, other output
+       * is empty.
+       * 
+ * + * .google.rpc.Status status = 10; + * + * @return The status. + */ + public com.google.rpc.Status getStatus() { + if (statusBuilder_ == null) { + return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; + } else { + return statusBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Response error from the agent in the test result. If set, other output
+       * is empty.
+       * 
+ * + * .google.rpc.Status status = 10; + */ + public Builder setStatus(com.google.rpc.Status value) { + if (statusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + status_ = value; + onChanged(); + } else { + statusBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Response error from the agent in the test result. If set, other output
+       * is empty.
+       * 
+ * + * .google.rpc.Status status = 10; + */ + public Builder setStatus(com.google.rpc.Status.Builder builderForValue) { + if (statusBuilder_ == null) { + status_ = builderForValue.build(); + onChanged(); + } else { + statusBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Response error from the agent in the test result. If set, other output
+       * is empty.
+       * 
+ * + * .google.rpc.Status status = 10; + */ + public Builder mergeStatus(com.google.rpc.Status value) { + if (statusBuilder_ == null) { + if (status_ != null) { + status_ = com.google.rpc.Status.newBuilder(status_).mergeFrom(value).buildPartial(); + } else { + status_ = value; + } + onChanged(); + } else { + statusBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Response error from the agent in the test result. If set, other output
+       * is empty.
+       * 
+ * + * .google.rpc.Status status = 10; + */ + public Builder clearStatus() { + if (statusBuilder_ == null) { + status_ = null; + onChanged(); + } else { + status_ = null; + statusBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Response error from the agent in the test result. If set, other output
+       * is empty.
+       * 
+ * + * .google.rpc.Status status = 10; + */ + public com.google.rpc.Status.Builder getStatusBuilder() { + + onChanged(); + return getStatusFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Response error from the agent in the test result. If set, other output
+       * is empty.
+       * 
+ * + * .google.rpc.Status status = 10; + */ + public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { + if (statusBuilder_ != null) { + return statusBuilder_.getMessageOrBuilder(); + } else { + return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; + } + } + /** + * + * + *
+       * Response error from the agent in the test result. If set, other output
+       * is empty.
+       * 
+ * + * .google.rpc.Status status = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getStatusFieldBuilder() { + if (statusBuilder_ == null) { + statusBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>(getStatus(), getParentForChildren(), isClean()); + status_ = null; + } + return statusBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput) + private static final com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VirtualAgentOutput parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new VirtualAgentOutput(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int USER_INPUT_FIELD_NUMBER = 1; + private com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput userInput_; + /** + * + * + *
+   * The user input.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput user_input = 1; + * + * @return Whether the userInput field is set. + */ + @java.lang.Override + public boolean hasUserInput() { + return userInput_ != null; + } + /** + * + * + *
+   * The user input.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput user_input = 1; + * + * @return The userInput. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput getUserInput() { + return userInput_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput.getDefaultInstance() + : userInput_; + } + /** + * + * + *
+   * The user input.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput user_input = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInputOrBuilder + getUserInputOrBuilder() { + return getUserInput(); + } + + public static final int VIRTUAL_AGENT_OUTPUT_FIELD_NUMBER = 2; + private com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput + virtualAgentOutput_; + /** + * + * + *
+   * The virtual agent output.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput virtual_agent_output = 2; + * + * + * @return Whether the virtualAgentOutput field is set. + */ + @java.lang.Override + public boolean hasVirtualAgentOutput() { + return virtualAgentOutput_ != null; + } + /** + * + * + *
+   * The virtual agent output.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput virtual_agent_output = 2; + * + * + * @return The virtualAgentOutput. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput + getVirtualAgentOutput() { + return virtualAgentOutput_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput + .getDefaultInstance() + : virtualAgentOutput_; + } + /** + * + * + *
+   * The virtual agent output.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput virtual_agent_output = 2; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutputOrBuilder + getVirtualAgentOutputOrBuilder() { + return getVirtualAgentOutput(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (userInput_ != null) { + output.writeMessage(1, getUserInput()); + } + if (virtualAgentOutput_ != null) { + output.writeMessage(2, getVirtualAgentOutput()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (userInput_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUserInput()); + } + if (virtualAgentOutput_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getVirtualAgentOutput()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn other = + (com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn) obj; + + if (hasUserInput() != other.hasUserInput()) return false; + if (hasUserInput()) { + if (!getUserInput().equals(other.getUserInput())) return false; + } + if (hasVirtualAgentOutput() != other.hasVirtualAgentOutput()) return false; + if (hasVirtualAgentOutput()) { + if (!getVirtualAgentOutput().equals(other.getVirtualAgentOutput())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUserInput()) { + hash = (37 * hash) + USER_INPUT_FIELD_NUMBER; + hash = (53 * hash) + getUserInput().hashCode(); + } + if (hasVirtualAgentOutput()) { + hash = (37 * hash) + VIRTUAL_AGENT_OUTPUT_FIELD_NUMBER; + hash = (53 * hash) + getVirtualAgentOutput().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * One interaction between a human and virtual agent. The human provides some
+   * input and the virtual agent provides a response.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ConversationTurn} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ConversationTurn) + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurnOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ConversationTurn_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ConversationTurn_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.class, + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (userInputBuilder_ == null) { + userInput_ = null; + } else { + userInput_ = null; + userInputBuilder_ = null; + } + if (virtualAgentOutputBuilder_ == null) { + virtualAgentOutput_ = null; + } else { + virtualAgentOutput_ = null; + virtualAgentOutputBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ConversationTurn_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn build() { + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn result = + new com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn(this); + if (userInputBuilder_ == null) { + result.userInput_ = userInput_; + } else { + result.userInput_ = userInputBuilder_.build(); + } + if (virtualAgentOutputBuilder_ == null) { + result.virtualAgentOutput_ = virtualAgentOutput_; + } else { + result.virtualAgentOutput_ = virtualAgentOutputBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.getDefaultInstance()) + return this; + if (other.hasUserInput()) { + mergeUserInput(other.getUserInput()); + } + if (other.hasVirtualAgentOutput()) { + mergeVirtualAgentOutput(other.getVirtualAgentOutput()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput userInput_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput, + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInputOrBuilder> + userInputBuilder_; + /** + * + * + *
+     * The user input.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput user_input = 1; + * + * @return Whether the userInput field is set. + */ + public boolean hasUserInput() { + return userInputBuilder_ != null || userInput_ != null; + } + /** + * + * + *
+     * The user input.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput user_input = 1; + * + * @return The userInput. + */ + public com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput getUserInput() { + if (userInputBuilder_ == null) { + return userInput_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput.getDefaultInstance() + : userInput_; + } else { + return userInputBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The user input.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput user_input = 1; + */ + public Builder setUserInput( + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput value) { + if (userInputBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + userInput_ = value; + onChanged(); + } else { + userInputBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The user input.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput user_input = 1; + */ + public Builder setUserInput( + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput.Builder builderForValue) { + if (userInputBuilder_ == null) { + userInput_ = builderForValue.build(); + onChanged(); + } else { + userInputBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The user input.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput user_input = 1; + */ + public Builder mergeUserInput( + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput value) { + if (userInputBuilder_ == null) { + if (userInput_ != null) { + userInput_ = + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput.newBuilder( + userInput_) + .mergeFrom(value) + .buildPartial(); + } else { + userInput_ = value; + } + onChanged(); + } else { + userInputBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The user input.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput user_input = 1; + */ + public Builder clearUserInput() { + if (userInputBuilder_ == null) { + userInput_ = null; + onChanged(); + } else { + userInput_ = null; + userInputBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The user input.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput user_input = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput.Builder + getUserInputBuilder() { + + onChanged(); + return getUserInputFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The user input.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput user_input = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInputOrBuilder + getUserInputOrBuilder() { + if (userInputBuilder_ != null) { + return userInputBuilder_.getMessageOrBuilder(); + } else { + return userInput_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput.getDefaultInstance() + : userInput_; + } + } + /** + * + * + *
+     * The user input.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput user_input = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput, + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInputOrBuilder> + getUserInputFieldBuilder() { + if (userInputBuilder_ == null) { + userInputBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput, + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInputOrBuilder>( + getUserInput(), getParentForChildren(), isClean()); + userInput_ = null; + } + return userInputBuilder_; + } + + private com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput + virtualAgentOutput_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput, + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutputOrBuilder> + virtualAgentOutputBuilder_; + /** + * + * + *
+     * The virtual agent output.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput virtual_agent_output = 2; + * + * + * @return Whether the virtualAgentOutput field is set. + */ + public boolean hasVirtualAgentOutput() { + return virtualAgentOutputBuilder_ != null || virtualAgentOutput_ != null; + } + /** + * + * + *
+     * The virtual agent output.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput virtual_agent_output = 2; + * + * + * @return The virtualAgentOutput. + */ + public com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput + getVirtualAgentOutput() { + if (virtualAgentOutputBuilder_ == null) { + return virtualAgentOutput_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput + .getDefaultInstance() + : virtualAgentOutput_; + } else { + return virtualAgentOutputBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The virtual agent output.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput virtual_agent_output = 2; + * + */ + public Builder setVirtualAgentOutput( + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput value) { + if (virtualAgentOutputBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + virtualAgentOutput_ = value; + onChanged(); + } else { + virtualAgentOutputBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The virtual agent output.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput virtual_agent_output = 2; + * + */ + public Builder setVirtualAgentOutput( + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput.Builder + builderForValue) { + if (virtualAgentOutputBuilder_ == null) { + virtualAgentOutput_ = builderForValue.build(); + onChanged(); + } else { + virtualAgentOutputBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The virtual agent output.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput virtual_agent_output = 2; + * + */ + public Builder mergeVirtualAgentOutput( + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput value) { + if (virtualAgentOutputBuilder_ == null) { + if (virtualAgentOutput_ != null) { + virtualAgentOutput_ = + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput.newBuilder( + virtualAgentOutput_) + .mergeFrom(value) + .buildPartial(); + } else { + virtualAgentOutput_ = value; + } + onChanged(); + } else { + virtualAgentOutputBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The virtual agent output.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput virtual_agent_output = 2; + * + */ + public Builder clearVirtualAgentOutput() { + if (virtualAgentOutputBuilder_ == null) { + virtualAgentOutput_ = null; + onChanged(); + } else { + virtualAgentOutput_ = null; + virtualAgentOutputBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The virtual agent output.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput virtual_agent_output = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput.Builder + getVirtualAgentOutputBuilder() { + + onChanged(); + return getVirtualAgentOutputFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The virtual agent output.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput virtual_agent_output = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutputOrBuilder + getVirtualAgentOutputOrBuilder() { + if (virtualAgentOutputBuilder_ != null) { + return virtualAgentOutputBuilder_.getMessageOrBuilder(); + } else { + return virtualAgentOutput_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput + .getDefaultInstance() + : virtualAgentOutput_; + } + } + /** + * + * + *
+     * The virtual agent output.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput virtual_agent_output = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput, + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutputOrBuilder> + getVirtualAgentOutputFieldBuilder() { + if (virtualAgentOutputBuilder_ == null) { + virtualAgentOutputBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput, + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn + .VirtualAgentOutputOrBuilder>( + getVirtualAgentOutput(), getParentForChildren(), isClean()); + virtualAgentOutput_ = null; + } + return virtualAgentOutputBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ConversationTurn) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ConversationTurn) + private static final com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ConversationTurn parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ConversationTurn(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ConversationTurnOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ConversationTurnOrBuilder.java new file mode 100644 index 000000000..8bcb9d7f3 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ConversationTurnOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface ConversationTurnOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ConversationTurn) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The user input.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput user_input = 1; + * + * @return Whether the userInput field is set. + */ + boolean hasUserInput(); + /** + * + * + *
+   * The user input.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput user_input = 1; + * + * @return The userInput. + */ + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput getUserInput(); + /** + * + * + *
+   * The user input.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput user_input = 1; + */ + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInputOrBuilder + getUserInputOrBuilder(); + + /** + * + * + *
+   * The virtual agent output.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput virtual_agent_output = 2; + * + * + * @return Whether the virtualAgentOutput field is set. + */ + boolean hasVirtualAgentOutput(); + /** + * + * + *
+   * The virtual agent output.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput virtual_agent_output = 2; + * + * + * @return The virtualAgentOutput. + */ + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput + getVirtualAgentOutput(); + /** + * + * + *
+   * The virtual agent output.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput virtual_agent_output = 2; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutputOrBuilder + getVirtualAgentOutputOrBuilder(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateAgentRequest.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateAgentRequest.java index fca7fde9a..49e2bf107 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateAgentRequest.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateAgentRequest.java @@ -22,8 +22,7 @@ * * *
- * The request message for
- * [Agents.CreateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.CreateAgent].
+ * The request message for [Agents.CreateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.CreateAgent].
  * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest} @@ -415,8 +414,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The request message for
-   * [Agents.CreateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.CreateAgent].
+   * The request message for [Agents.CreateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.CreateAgent].
    * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateExperimentRequest.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateTestCaseRequest.java similarity index 59% rename from proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateExperimentRequest.java rename to proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateTestCaseRequest.java index 9cb624c62..e6eee1328 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateExperimentRequest.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateTestCaseRequest.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dialogflow/cx/v3beta1/experiment.proto +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto package com.google.cloud.dialogflow.cx.v3beta1; @@ -22,29 +22,29 @@ * * *
- * The request message for [Experiments.CreateExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.CreateExperiment].
+ * The request message for [TestCases.CreateTestCase][google.cloud.dialogflow.cx.v3beta1.TestCases.CreateTestCase].
  * 
* - * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest} + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest} */ -public final class CreateExperimentRequest extends com.google.protobuf.GeneratedMessageV3 +public final class CreateTestCaseRequest extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest) - CreateExperimentRequestOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest) + CreateTestCaseRequestOrBuilder { private static final long serialVersionUID = 0L; - // Use CreateExperimentRequest.newBuilder() to construct. - private CreateExperimentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use CreateTestCaseRequest.newBuilder() to construct. + private CreateTestCaseRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private CreateExperimentRequest() { + private CreateTestCaseRequest() { parent_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreateExperimentRequest(); + return new CreateTestCaseRequest(); } @java.lang.Override @@ -52,7 +52,7 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreateExperimentRequest( + private CreateTestCaseRequest( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -79,17 +79,16 @@ private CreateExperimentRequest( } case 18: { - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Builder subBuilder = null; - if (experiment_ != null) { - subBuilder = experiment_.toBuilder(); + com.google.cloud.dialogflow.cx.v3beta1.TestCase.Builder subBuilder = null; + if (testCase_ != null) { + subBuilder = testCase_.toBuilder(); } - experiment_ = + testCase_ = input.readMessage( - com.google.cloud.dialogflow.cx.v3beta1.Experiment.parser(), - extensionRegistry); + com.google.cloud.dialogflow.cx.v3beta1.TestCase.parser(), extensionRegistry); if (subBuilder != null) { - subBuilder.mergeFrom(experiment_); - experiment_ = subBuilder.buildPartial(); + subBuilder.mergeFrom(testCase_); + testCase_ = subBuilder.buildPartial(); } break; @@ -114,18 +113,18 @@ private CreateExperimentRequest( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_CreateExperimentRequest_descriptor; + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_CreateTestCaseRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_CreateExperimentRequest_fieldAccessorTable + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_CreateTestCaseRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest.class, - com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest.Builder.class); + com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest.Builder.class); } public static final int PARENT_FIELD_NUMBER = 1; @@ -134,9 +133,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. The [Agent][google.cloud.dialogflow.cx.v3beta1.Agent] to create an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] for.
-   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/environments/<Environment ID>`.
+   * Required. The agent to create the test case for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
    * 
* * @@ -161,9 +159,8 @@ public java.lang.String getParent() { * * *
-   * Required. The [Agent][google.cloud.dialogflow.cx.v3beta1.Agent] to create an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] for.
-   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/environments/<Environment ID>`.
+   * Required. The agent to create the test case for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
    * 
* * @@ -185,58 +182,58 @@ public com.google.protobuf.ByteString getParentBytes() { } } - public static final int EXPERIMENT_FIELD_NUMBER = 2; - private com.google.cloud.dialogflow.cx.v3beta1.Experiment experiment_; + public static final int TEST_CASE_FIELD_NUMBER = 2; + private com.google.cloud.dialogflow.cx.v3beta1.TestCase testCase_; /** * * *
-   * Required. The experiment to create.
+   * Required. The test case to create.
    * 
* * - * .google.cloud.dialogflow.cx.v3beta1.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; * * - * @return Whether the experiment field is set. + * @return Whether the testCase field is set. */ @java.lang.Override - public boolean hasExperiment() { - return experiment_ != null; + public boolean hasTestCase() { + return testCase_ != null; } /** * * *
-   * Required. The experiment to create.
+   * Required. The test case to create.
    * 
* * - * .google.cloud.dialogflow.cx.v3beta1.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; * * - * @return The experiment. + * @return The testCase. */ @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.Experiment getExperiment() { - return experiment_ == null - ? com.google.cloud.dialogflow.cx.v3beta1.Experiment.getDefaultInstance() - : experiment_; + public com.google.cloud.dialogflow.cx.v3beta1.TestCase getTestCase() { + return testCase_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.TestCase.getDefaultInstance() + : testCase_; } /** * * *
-   * Required. The experiment to create.
+   * Required. The test case to create.
    * 
* * - * .google.cloud.dialogflow.cx.v3beta1.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; * */ @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.ExperimentOrBuilder getExperimentOrBuilder() { - return getExperiment(); + public com.google.cloud.dialogflow.cx.v3beta1.TestCaseOrBuilder getTestCaseOrBuilder() { + return getTestCase(); } private byte memoizedIsInitialized = -1; @@ -256,8 +253,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!getParentBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); } - if (experiment_ != null) { - output.writeMessage(2, getExperiment()); + if (testCase_ != null) { + output.writeMessage(2, getTestCase()); } unknownFields.writeTo(output); } @@ -271,8 +268,8 @@ public int getSerializedSize() { if (!getParentBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); } - if (experiment_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getExperiment()); + if (testCase_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTestCase()); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -284,16 +281,16 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest)) { + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest)) { return super.equals(obj); } - com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest other = - (com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest) obj; + com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest other = + (com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest) obj; if (!getParent().equals(other.getParent())) return false; - if (hasExperiment() != other.hasExperiment()) return false; - if (hasExperiment()) { - if (!getExperiment().equals(other.getExperiment())) return false; + if (hasTestCase() != other.hasTestCase()) return false; + if (hasTestCase()) { + if (!getTestCase().equals(other.getTestCase())) return false; } if (!unknownFields.equals(other.unknownFields)) return false; return true; @@ -308,80 +305,80 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + PARENT_FIELD_NUMBER; hash = (53 * hash) + getParent().hashCode(); - if (hasExperiment()) { - hash = (37 * hash) + EXPERIMENT_FIELD_NUMBER; - hash = (53 * hash) + getExperiment().hashCode(); + if (hasTestCase()) { + hash = (37 * hash) + TEST_CASE_FIELD_NUMBER; + hash = (53 * hash) + getTestCase().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest parseDelimitedFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest parseDelimitedFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -399,7 +396,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest prototype) { + com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -417,31 +414,31 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The request message for [Experiments.CreateExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.CreateExperiment].
+   * The request message for [TestCases.CreateTestCase][google.cloud.dialogflow.cx.v3beta1.TestCases.CreateTestCase].
    * 
* - * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest} + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest) - com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequestOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest) + com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_CreateExperimentRequest_descriptor; + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_CreateTestCaseRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_CreateExperimentRequest_fieldAccessorTable + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_CreateTestCaseRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest.class, - com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest.Builder.class); + com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest.Builder.class); } - // Construct using com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest.newBuilder() + // Construct using com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -460,30 +457,30 @@ public Builder clear() { super.clear(); parent_ = ""; - if (experimentBuilder_ == null) { - experiment_ = null; + if (testCaseBuilder_ == null) { + testCase_ = null; } else { - experiment_ = null; - experimentBuilder_ = null; + testCase_ = null; + testCaseBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_CreateExperimentRequest_descriptor; + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_CreateTestCaseRequest_descriptor; } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest + public com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest getDefaultInstanceForType() { - return com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest.getDefaultInstance(); + return com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest.getDefaultInstance(); } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest build() { - com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest result = buildPartial(); + public com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest build() { + com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -491,14 +488,14 @@ public com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest build() { } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest buildPartial() { - com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest result = - new com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest(this); + public com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest result = + new com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest(this); result.parent_ = parent_; - if (experimentBuilder_ == null) { - result.experiment_ = experiment_; + if (testCaseBuilder_ == null) { + result.testCase_ = testCase_; } else { - result.experiment_ = experimentBuilder_.build(); + result.testCase_ = testCaseBuilder_.build(); } onBuilt(); return result; @@ -539,24 +536,24 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest) { - return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest) other); + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest other) { + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest other) { if (other - == com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest.getDefaultInstance()) + == com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest.getDefaultInstance()) return this; if (!other.getParent().isEmpty()) { parent_ = other.parent_; onChanged(); } - if (other.hasExperiment()) { - mergeExperiment(other.getExperiment()); + if (other.hasTestCase()) { + mergeTestCase(other.getTestCase()); } this.mergeUnknownFields(other.unknownFields); onChanged(); @@ -573,13 +570,12 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest parsedMessage = null; + com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = - (com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest) - e.getUnfinishedMessage(); + (com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -594,9 +590,8 @@ public Builder mergeFrom( * * *
-     * Required. The [Agent][google.cloud.dialogflow.cx.v3beta1.Agent] to create an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] for.
-     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>`.
+     * Required. The agent to create the test case for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
      * 
* * @@ -620,9 +615,8 @@ public java.lang.String getParent() { * * *
-     * Required. The [Agent][google.cloud.dialogflow.cx.v3beta1.Agent] to create an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] for.
-     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>`.
+     * Required. The agent to create the test case for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
      * 
* * @@ -646,9 +640,8 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
-     * Required. The [Agent][google.cloud.dialogflow.cx.v3beta1.Agent] to create an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] for.
-     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>`.
+     * Required. The agent to create the test case for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
      * 
* * @@ -671,9 +664,8 @@ public Builder setParent(java.lang.String value) { * * *
-     * Required. The [Agent][google.cloud.dialogflow.cx.v3beta1.Agent] to create an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] for.
-     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>`.
+     * Required. The agent to create the test case for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
      * 
* * @@ -692,9 +684,8 @@ public Builder clearParent() { * * *
-     * Required. The [Agent][google.cloud.dialogflow.cx.v3beta1.Agent] to create an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] for.
-     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>`.
+     * Required. The agent to create the test case for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
      * 
* * @@ -715,70 +706,70 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { return this; } - private com.google.cloud.dialogflow.cx.v3beta1.Experiment experiment_; + private com.google.cloud.dialogflow.cx.v3beta1.TestCase testCase_; private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.Experiment, - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Builder, - com.google.cloud.dialogflow.cx.v3beta1.ExperimentOrBuilder> - experimentBuilder_; + com.google.cloud.dialogflow.cx.v3beta1.TestCase, + com.google.cloud.dialogflow.cx.v3beta1.TestCase.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TestCaseOrBuilder> + testCaseBuilder_; /** * * *
-     * Required. The experiment to create.
+     * Required. The test case to create.
      * 
* * - * .google.cloud.dialogflow.cx.v3beta1.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; * * - * @return Whether the experiment field is set. + * @return Whether the testCase field is set. */ - public boolean hasExperiment() { - return experimentBuilder_ != null || experiment_ != null; + public boolean hasTestCase() { + return testCaseBuilder_ != null || testCase_ != null; } /** * * *
-     * Required. The experiment to create.
+     * Required. The test case to create.
      * 
* * - * .google.cloud.dialogflow.cx.v3beta1.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; * * - * @return The experiment. + * @return The testCase. */ - public com.google.cloud.dialogflow.cx.v3beta1.Experiment getExperiment() { - if (experimentBuilder_ == null) { - return experiment_ == null - ? com.google.cloud.dialogflow.cx.v3beta1.Experiment.getDefaultInstance() - : experiment_; + public com.google.cloud.dialogflow.cx.v3beta1.TestCase getTestCase() { + if (testCaseBuilder_ == null) { + return testCase_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.TestCase.getDefaultInstance() + : testCase_; } else { - return experimentBuilder_.getMessage(); + return testCaseBuilder_.getMessage(); } } /** * * *
-     * Required. The experiment to create.
+     * Required. The test case to create.
      * 
* * - * .google.cloud.dialogflow.cx.v3beta1.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; * */ - public Builder setExperiment(com.google.cloud.dialogflow.cx.v3beta1.Experiment value) { - if (experimentBuilder_ == null) { + public Builder setTestCase(com.google.cloud.dialogflow.cx.v3beta1.TestCase value) { + if (testCaseBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - experiment_ = value; + testCase_ = value; onChanged(); } else { - experimentBuilder_.setMessage(value); + testCaseBuilder_.setMessage(value); } return this; @@ -787,20 +778,20 @@ public Builder setExperiment(com.google.cloud.dialogflow.cx.v3beta1.Experiment v * * *
-     * Required. The experiment to create.
+     * Required. The test case to create.
      * 
* * - * .google.cloud.dialogflow.cx.v3beta1.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; * */ - public Builder setExperiment( - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Builder builderForValue) { - if (experimentBuilder_ == null) { - experiment_ = builderForValue.build(); + public Builder setTestCase( + com.google.cloud.dialogflow.cx.v3beta1.TestCase.Builder builderForValue) { + if (testCaseBuilder_ == null) { + testCase_ = builderForValue.build(); onChanged(); } else { - experimentBuilder_.setMessage(builderForValue.build()); + testCaseBuilder_.setMessage(builderForValue.build()); } return this; @@ -809,26 +800,26 @@ public Builder setExperiment( * * *
-     * Required. The experiment to create.
+     * Required. The test case to create.
      * 
* * - * .google.cloud.dialogflow.cx.v3beta1.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; * */ - public Builder mergeExperiment(com.google.cloud.dialogflow.cx.v3beta1.Experiment value) { - if (experimentBuilder_ == null) { - if (experiment_ != null) { - experiment_ = - com.google.cloud.dialogflow.cx.v3beta1.Experiment.newBuilder(experiment_) + public Builder mergeTestCase(com.google.cloud.dialogflow.cx.v3beta1.TestCase value) { + if (testCaseBuilder_ == null) { + if (testCase_ != null) { + testCase_ = + com.google.cloud.dialogflow.cx.v3beta1.TestCase.newBuilder(testCase_) .mergeFrom(value) .buildPartial(); } else { - experiment_ = value; + testCase_ = value; } onChanged(); } else { - experimentBuilder_.mergeFrom(value); + testCaseBuilder_.mergeFrom(value); } return this; @@ -837,20 +828,20 @@ public Builder mergeExperiment(com.google.cloud.dialogflow.cx.v3beta1.Experiment * * *
-     * Required. The experiment to create.
+     * Required. The test case to create.
      * 
* * - * .google.cloud.dialogflow.cx.v3beta1.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; * */ - public Builder clearExperiment() { - if (experimentBuilder_ == null) { - experiment_ = null; + public Builder clearTestCase() { + if (testCaseBuilder_ == null) { + testCase_ = null; onChanged(); } else { - experiment_ = null; - experimentBuilder_ = null; + testCase_ = null; + testCaseBuilder_ = null; } return this; @@ -859,64 +850,64 @@ public Builder clearExperiment() { * * *
-     * Required. The experiment to create.
+     * Required. The test case to create.
      * 
* * - * .google.cloud.dialogflow.cx.v3beta1.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; * */ - public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Builder getExperimentBuilder() { + public com.google.cloud.dialogflow.cx.v3beta1.TestCase.Builder getTestCaseBuilder() { onChanged(); - return getExperimentFieldBuilder().getBuilder(); + return getTestCaseFieldBuilder().getBuilder(); } /** * * *
-     * Required. The experiment to create.
+     * Required. The test case to create.
      * 
* * - * .google.cloud.dialogflow.cx.v3beta1.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; * */ - public com.google.cloud.dialogflow.cx.v3beta1.ExperimentOrBuilder getExperimentOrBuilder() { - if (experimentBuilder_ != null) { - return experimentBuilder_.getMessageOrBuilder(); + public com.google.cloud.dialogflow.cx.v3beta1.TestCaseOrBuilder getTestCaseOrBuilder() { + if (testCaseBuilder_ != null) { + return testCaseBuilder_.getMessageOrBuilder(); } else { - return experiment_ == null - ? com.google.cloud.dialogflow.cx.v3beta1.Experiment.getDefaultInstance() - : experiment_; + return testCase_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.TestCase.getDefaultInstance() + : testCase_; } } /** * * *
-     * Required. The experiment to create.
+     * Required. The test case to create.
      * 
* * - * .google.cloud.dialogflow.cx.v3beta1.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; * */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.Experiment, - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Builder, - com.google.cloud.dialogflow.cx.v3beta1.ExperimentOrBuilder> - getExperimentFieldBuilder() { - if (experimentBuilder_ == null) { - experimentBuilder_ = + com.google.cloud.dialogflow.cx.v3beta1.TestCase, + com.google.cloud.dialogflow.cx.v3beta1.TestCase.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TestCaseOrBuilder> + getTestCaseFieldBuilder() { + if (testCaseBuilder_ == null) { + testCaseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.Experiment, - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Builder, - com.google.cloud.dialogflow.cx.v3beta1.ExperimentOrBuilder>( - getExperiment(), getParentForChildren(), isClean()); - experiment_ = null; + com.google.cloud.dialogflow.cx.v3beta1.TestCase, + com.google.cloud.dialogflow.cx.v3beta1.TestCase.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TestCaseOrBuilder>( + getTestCase(), getParentForChildren(), isClean()); + testCase_ = null; } - return experimentBuilder_; + return testCaseBuilder_; } @java.lang.Override @@ -930,45 +921,43 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest) + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest) } - // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest) - private static final com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest) + private static final com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest(); + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest(); } - public static com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest - getDefaultInstance() { + public static com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public CreateExperimentRequest parsePartialFrom( + public CreateTestCaseRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateExperimentRequest(input, extensionRegistry); + return new CreateTestCaseRequest(input, extensionRegistry); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest - getDefaultInstanceForType() { + public com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateExperimentRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateTestCaseRequestOrBuilder.java similarity index 56% rename from proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateExperimentRequestOrBuilder.java rename to proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateTestCaseRequestOrBuilder.java index 64f53e840..426048af2 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateExperimentRequestOrBuilder.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateTestCaseRequestOrBuilder.java @@ -14,22 +14,21 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dialogflow/cx/v3beta1/experiment.proto +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto package com.google.cloud.dialogflow.cx.v3beta1; -public interface CreateExperimentRequestOrBuilder +public interface CreateTestCaseRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest) + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest) com.google.protobuf.MessageOrBuilder { /** * * *
-   * Required. The [Agent][google.cloud.dialogflow.cx.v3beta1.Agent] to create an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] for.
-   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/environments/<Environment ID>`.
+   * Required. The agent to create the test case for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
    * 
* * @@ -43,9 +42,8 @@ public interface CreateExperimentRequestOrBuilder * * *
-   * Required. The [Agent][google.cloud.dialogflow.cx.v3beta1.Agent] to create an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] for.
-   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/environments/<Environment ID>`.
+   * Required. The agent to create the test case for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
    * 
* * @@ -60,40 +58,40 @@ public interface CreateExperimentRequestOrBuilder * * *
-   * Required. The experiment to create.
+   * Required. The test case to create.
    * 
* * - * .google.cloud.dialogflow.cx.v3beta1.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; * * - * @return Whether the experiment field is set. + * @return Whether the testCase field is set. */ - boolean hasExperiment(); + boolean hasTestCase(); /** * * *
-   * Required. The experiment to create.
+   * Required. The test case to create.
    * 
* * - * .google.cloud.dialogflow.cx.v3beta1.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; * * - * @return The experiment. + * @return The testCase. */ - com.google.cloud.dialogflow.cx.v3beta1.Experiment getExperiment(); + com.google.cloud.dialogflow.cx.v3beta1.TestCase getTestCase(); /** * * *
-   * Required. The experiment to create.
+   * Required. The test case to create.
    * 
* * - * .google.cloud.dialogflow.cx.v3beta1.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; * */ - com.google.cloud.dialogflow.cx.v3beta1.ExperimentOrBuilder getExperimentOrBuilder(); + com.google.cloud.dialogflow.cx.v3beta1.TestCaseOrBuilder getTestCaseOrBuilder(); } diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteAgentRequest.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteAgentRequest.java index ff42f882a..24112eae0 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteAgentRequest.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteAgentRequest.java @@ -22,8 +22,7 @@ * * *
- * The request message for
- * [Agents.DeleteAgent][google.cloud.dialogflow.cx.v3beta1.Agents.DeleteAgent].
+ * The request message for [Agents.DeleteAgent][google.cloud.dialogflow.cx.v3beta1.Agents.DeleteAgent].
  * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest} @@ -331,8 +330,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The request message for
-   * [Agents.DeleteAgent][google.cloud.dialogflow.cx.v3beta1.Agents.DeleteAgent].
+   * The request message for [Agents.DeleteAgent][google.cloud.dialogflow.cx.v3beta1.Agents.DeleteAgent].
    * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityType.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityType.java index 029a4e3ca..0f9e50750 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityType.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityType.java @@ -646,7 +646,6 @@ public interface EntityOrBuilder * *
    * An **entity entry** for an associated entity type.
-   * Next Id = 8
    * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.EntityType.Entity} @@ -1072,7 +1071,6 @@ protected Builder newBuilderForType( * *
      * An **entity entry** for an associated entity type.
-     * Next Id = 8
      * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.EntityType.Entity} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Experiment.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Experiment.java deleted file mode 100644 index 7ff72ae15..000000000 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Experiment.java +++ /dev/null @@ -1,10192 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dialogflow/cx/v3beta1/experiment.proto - -package com.google.cloud.dialogflow.cx.v3beta1; - -/** - * - * - *
- * Represents an experiment in an environment.
- * Next ID: 13
- * 
- * - * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Experiment} - */ -public final class Experiment extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.Experiment) - ExperimentOrBuilder { - private static final long serialVersionUID = 0L; - // Use Experiment.newBuilder() to construct. - private Experiment(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Experiment() { - name_ = ""; - displayName_ = ""; - description_ = ""; - state_ = 0; - variantsHistory_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Experiment(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private Experiment( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - displayName_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 32: - { - int rawValue = input.readEnum(); - - state_ = rawValue; - break; - } - case 42: - { - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition.Builder subBuilder = - null; - if (definition_ != null) { - subBuilder = definition_.toBuilder(); - } - definition_ = - input.readMessage( - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(definition_); - definition_ = subBuilder.buildPartial(); - } - - break; - } - case 50: - { - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Builder subBuilder = null; - if (result_ != null) { - subBuilder = result_.toBuilder(); - } - result_ = - input.readMessage( - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(result_); - result_ = subBuilder.buildPartial(); - } - - break; - } - case 58: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (createTime_ != null) { - subBuilder = createTime_.toBuilder(); - } - createTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(createTime_); - createTime_ = subBuilder.buildPartial(); - } - - break; - } - case 66: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (startTime_ != null) { - subBuilder = startTime_.toBuilder(); - } - startTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(startTime_); - startTime_ = subBuilder.buildPartial(); - } - - break; - } - case 74: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (endTime_ != null) { - subBuilder = endTime_.toBuilder(); - } - endTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(endTime_); - endTime_ = subBuilder.buildPartial(); - } - - break; - } - case 82: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (lastUpdateTime_ != null) { - subBuilder = lastUpdateTime_.toBuilder(); - } - lastUpdateTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(lastUpdateTime_); - lastUpdateTime_ = subBuilder.buildPartial(); - } - - break; - } - case 90: - { - com.google.protobuf.Duration.Builder subBuilder = null; - if (experimentLength_ != null) { - subBuilder = experimentLength_.toBuilder(); - } - experimentLength_ = - input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(experimentLength_); - experimentLength_ = subBuilder.buildPartial(); - } - - break; - } - case 98: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - variantsHistory_ = - new java.util.ArrayList< - com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory>(); - mutable_bitField0_ |= 0x00000001; - } - variantsHistory_.add( - input.readMessage( - com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory.parser(), - extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - variantsHistory_ = java.util.Collections.unmodifiableList(variantsHistory_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3beta1.Experiment.class, - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Builder.class); - } - - /** - * - * - *
-   * The state of the experiment.
-   * 
- * - * Protobuf enum {@code google.cloud.dialogflow.cx.v3beta1.Experiment.State} - */ - public enum State implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * State unspecified.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - STATE_UNSPECIFIED(0), - /** - * - * - *
-     * The experiment is created but not started yet.
-     * 
- * - * DRAFT = 1; - */ - DRAFT(1), - /** - * - * - *
-     * The experiment is running.
-     * 
- * - * RUNNING = 2; - */ - RUNNING(2), - /** - * - * - *
-     * The experiment is done.
-     * 
- * - * DONE = 3; - */ - DONE(3), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * State unspecified.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - public static final int STATE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * The experiment is created but not started yet.
-     * 
- * - * DRAFT = 1; - */ - public static final int DRAFT_VALUE = 1; - /** - * - * - *
-     * The experiment is running.
-     * 
- * - * RUNNING = 2; - */ - public static final int RUNNING_VALUE = 2; - /** - * - * - *
-     * The experiment is done.
-     * 
- * - * DONE = 3; - */ - public static final int DONE_VALUE = 3; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static State valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static State forNumber(int value) { - switch (value) { - case 0: - return STATE_UNSPECIFIED; - case 1: - return DRAFT; - case 2: - return RUNNING; - case 3: - return DONE; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public State findValueByNumber(int number) { - return State.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3beta1.Experiment.getDescriptor() - .getEnumTypes() - .get(0); - } - - private static final State[] VALUES = values(); - - public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private State(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3beta1.Experiment.State) - } - - public interface DefinitionOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.Experiment.Definition) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * 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).
-     * 
- * - * string condition = 1; - * - * @return The condition. - */ - java.lang.String getCondition(); - /** - * - * - *
-     * 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).
-     * 
- * - * string condition = 1; - * - * @return The bytes for condition. - */ - com.google.protobuf.ByteString getConditionBytes(); - - /** - * - * - *
-     * The flow versions as the variants of this experiment.
-     * 
- * - * .google.cloud.dialogflow.cx.v3beta1.VersionVariants version_variants = 2; - * - * @return Whether the versionVariants field is set. - */ - boolean hasVersionVariants(); - /** - * - * - *
-     * The flow versions as the variants of this experiment.
-     * 
- * - * .google.cloud.dialogflow.cx.v3beta1.VersionVariants version_variants = 2; - * - * @return The versionVariants. - */ - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants getVersionVariants(); - /** - * - * - *
-     * The flow versions as the variants of this experiment.
-     * 
- * - * .google.cloud.dialogflow.cx.v3beta1.VersionVariants version_variants = 2; - */ - com.google.cloud.dialogflow.cx.v3beta1.VersionVariantsOrBuilder getVersionVariantsOrBuilder(); - - public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition.VariantsCase - getVariantsCase(); - } - /** - * - * - *
-   * Definition of the experiment.
-   * Next ID: 3
-   * 
- * - * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Experiment.Definition} - */ - public static final class Definition extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.Experiment.Definition) - DefinitionOrBuilder { - private static final long serialVersionUID = 0L; - // Use Definition.newBuilder() to construct. - private Definition(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Definition() { - condition_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Definition(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private Definition( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - condition_ = s; - break; - } - case 18: - { - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Builder subBuilder = null; - if (variantsCase_ == 2) { - subBuilder = - ((com.google.cloud.dialogflow.cx.v3beta1.VersionVariants) variants_) - .toBuilder(); - } - variants_ = - input.readMessage( - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.dialogflow.cx.v3beta1.VersionVariants) variants_); - variants_ = subBuilder.buildPartial(); - } - variantsCase_ = 2; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Definition_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Definition_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition.class, - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition.Builder.class); - } - - private int variantsCase_ = 0; - private java.lang.Object variants_; - - public enum VariantsCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - VERSION_VARIANTS(2), - VARIANTS_NOT_SET(0); - private final int value; - - private VariantsCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static VariantsCase valueOf(int value) { - return forNumber(value); - } - - public static VariantsCase forNumber(int value) { - switch (value) { - case 2: - return VERSION_VARIANTS; - case 0: - return VARIANTS_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public VariantsCase getVariantsCase() { - return VariantsCase.forNumber(variantsCase_); - } - - public static final int CONDITION_FIELD_NUMBER = 1; - private volatile java.lang.Object 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).
-     * 
- * - * string condition = 1; - * - * @return The condition. - */ - @java.lang.Override - public java.lang.String getCondition() { - java.lang.Object ref = condition_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - condition_ = s; - return s; - } - } - /** - * - * - *
-     * 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).
-     * 
- * - * string condition = 1; - * - * @return The bytes for condition. - */ - @java.lang.Override - public com.google.protobuf.ByteString getConditionBytes() { - java.lang.Object ref = condition_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - condition_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int VERSION_VARIANTS_FIELD_NUMBER = 2; - /** - * - * - *
-     * The flow versions as the variants of this experiment.
-     * 
- * - * .google.cloud.dialogflow.cx.v3beta1.VersionVariants version_variants = 2; - * - * @return Whether the versionVariants field is set. - */ - @java.lang.Override - public boolean hasVersionVariants() { - return variantsCase_ == 2; - } - /** - * - * - *
-     * The flow versions as the variants of this experiment.
-     * 
- * - * .google.cloud.dialogflow.cx.v3beta1.VersionVariants version_variants = 2; - * - * @return The versionVariants. - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.VersionVariants getVersionVariants() { - if (variantsCase_ == 2) { - return (com.google.cloud.dialogflow.cx.v3beta1.VersionVariants) variants_; - } - return com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.getDefaultInstance(); - } - /** - * - * - *
-     * The flow versions as the variants of this experiment.
-     * 
- * - * .google.cloud.dialogflow.cx.v3beta1.VersionVariants version_variants = 2; - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.VersionVariantsOrBuilder - getVersionVariantsOrBuilder() { - if (variantsCase_ == 2) { - return (com.google.cloud.dialogflow.cx.v3beta1.VersionVariants) variants_; - } - return com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getConditionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, condition_); - } - if (variantsCase_ == 2) { - output.writeMessage(2, (com.google.cloud.dialogflow.cx.v3beta1.VersionVariants) variants_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getConditionBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, condition_); - } - if (variantsCase_ == 2) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 2, (com.google.cloud.dialogflow.cx.v3beta1.VersionVariants) variants_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition)) { - return super.equals(obj); - } - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition other = - (com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition) obj; - - if (!getCondition().equals(other.getCondition())) return false; - if (!getVariantsCase().equals(other.getVariantsCase())) return false; - switch (variantsCase_) { - case 2: - if (!getVersionVariants().equals(other.getVersionVariants())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + CONDITION_FIELD_NUMBER; - hash = (53 * hash) + getCondition().hashCode(); - switch (variantsCase_) { - case 2: - hash = (37 * hash) + VERSION_VARIANTS_FIELD_NUMBER; - hash = (53 * hash) + getVersionVariants().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-     * Definition of the experiment.
-     * Next ID: 3
-     * 
- * - * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Experiment.Definition} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.Experiment.Definition) - com.google.cloud.dialogflow.cx.v3beta1.Experiment.DefinitionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Definition_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Definition_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition.class, - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition.Builder.class); - } - - // Construct using com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - condition_ = ""; - - variantsCase_ = 0; - variants_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Definition_descriptor; - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition - getDefaultInstanceForType() { - return com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition build() { - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition buildPartial() { - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition result = - new com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition(this); - result.condition_ = condition_; - if (variantsCase_ == 2) { - if (versionVariantsBuilder_ == null) { - result.variants_ = variants_; - } else { - result.variants_ = versionVariantsBuilder_.build(); - } - } - result.variantsCase_ = variantsCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition) { - return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition other) { - if (other - == com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition.getDefaultInstance()) - return this; - if (!other.getCondition().isEmpty()) { - condition_ = other.condition_; - onChanged(); - } - switch (other.getVariantsCase()) { - case VERSION_VARIANTS: - { - mergeVersionVariants(other.getVersionVariants()); - break; - } - case VARIANTS_NOT_SET: - { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int variantsCase_ = 0; - private java.lang.Object variants_; - - public VariantsCase getVariantsCase() { - return VariantsCase.forNumber(variantsCase_); - } - - public Builder clearVariants() { - variantsCase_ = 0; - variants_ = null; - onChanged(); - return this; - } - - private java.lang.Object 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).
-       * 
- * - * string condition = 1; - * - * @return The condition. - */ - public java.lang.String getCondition() { - java.lang.Object ref = condition_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - condition_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-       * 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).
-       * 
- * - * string condition = 1; - * - * @return The bytes for condition. - */ - public com.google.protobuf.ByteString getConditionBytes() { - java.lang.Object ref = condition_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - condition_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-       * 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).
-       * 
- * - * string condition = 1; - * - * @param value The condition to set. - * @return This builder for chaining. - */ - public Builder setCondition(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - condition_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * 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).
-       * 
- * - * string condition = 1; - * - * @return This builder for chaining. - */ - public Builder clearCondition() { - - condition_ = getDefaultInstance().getCondition(); - onChanged(); - return this; - } - /** - * - * - *
-       * 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).
-       * 
- * - * string condition = 1; - * - * @param value The bytes for condition to set. - * @return This builder for chaining. - */ - public Builder setConditionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - condition_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants, - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Builder, - com.google.cloud.dialogflow.cx.v3beta1.VersionVariantsOrBuilder> - versionVariantsBuilder_; - /** - * - * - *
-       * The flow versions as the variants of this experiment.
-       * 
- * - * .google.cloud.dialogflow.cx.v3beta1.VersionVariants version_variants = 2; - * - * @return Whether the versionVariants field is set. - */ - @java.lang.Override - public boolean hasVersionVariants() { - return variantsCase_ == 2; - } - /** - * - * - *
-       * The flow versions as the variants of this experiment.
-       * 
- * - * .google.cloud.dialogflow.cx.v3beta1.VersionVariants version_variants = 2; - * - * @return The versionVariants. - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.VersionVariants getVersionVariants() { - if (versionVariantsBuilder_ == null) { - if (variantsCase_ == 2) { - return (com.google.cloud.dialogflow.cx.v3beta1.VersionVariants) variants_; - } - return com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.getDefaultInstance(); - } else { - if (variantsCase_ == 2) { - return versionVariantsBuilder_.getMessage(); - } - return com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.getDefaultInstance(); - } - } - /** - * - * - *
-       * The flow versions as the variants of this experiment.
-       * 
- * - * .google.cloud.dialogflow.cx.v3beta1.VersionVariants version_variants = 2; - */ - public Builder setVersionVariants( - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants value) { - if (versionVariantsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - variants_ = value; - onChanged(); - } else { - versionVariantsBuilder_.setMessage(value); - } - variantsCase_ = 2; - return this; - } - /** - * - * - *
-       * The flow versions as the variants of this experiment.
-       * 
- * - * .google.cloud.dialogflow.cx.v3beta1.VersionVariants version_variants = 2; - */ - public Builder setVersionVariants( - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Builder builderForValue) { - if (versionVariantsBuilder_ == null) { - variants_ = builderForValue.build(); - onChanged(); - } else { - versionVariantsBuilder_.setMessage(builderForValue.build()); - } - variantsCase_ = 2; - return this; - } - /** - * - * - *
-       * The flow versions as the variants of this experiment.
-       * 
- * - * .google.cloud.dialogflow.cx.v3beta1.VersionVariants version_variants = 2; - */ - public Builder mergeVersionVariants( - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants value) { - if (versionVariantsBuilder_ == null) { - if (variantsCase_ == 2 - && variants_ - != com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.getDefaultInstance()) { - variants_ = - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.newBuilder( - (com.google.cloud.dialogflow.cx.v3beta1.VersionVariants) variants_) - .mergeFrom(value) - .buildPartial(); - } else { - variants_ = value; - } - onChanged(); - } else { - if (variantsCase_ == 2) { - versionVariantsBuilder_.mergeFrom(value); - } - versionVariantsBuilder_.setMessage(value); - } - variantsCase_ = 2; - return this; - } - /** - * - * - *
-       * The flow versions as the variants of this experiment.
-       * 
- * - * .google.cloud.dialogflow.cx.v3beta1.VersionVariants version_variants = 2; - */ - public Builder clearVersionVariants() { - if (versionVariantsBuilder_ == null) { - if (variantsCase_ == 2) { - variantsCase_ = 0; - variants_ = null; - onChanged(); - } - } else { - if (variantsCase_ == 2) { - variantsCase_ = 0; - variants_ = null; - } - versionVariantsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-       * The flow versions as the variants of this experiment.
-       * 
- * - * .google.cloud.dialogflow.cx.v3beta1.VersionVariants version_variants = 2; - */ - public com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Builder - getVersionVariantsBuilder() { - return getVersionVariantsFieldBuilder().getBuilder(); - } - /** - * - * - *
-       * The flow versions as the variants of this experiment.
-       * 
- * - * .google.cloud.dialogflow.cx.v3beta1.VersionVariants version_variants = 2; - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.VersionVariantsOrBuilder - getVersionVariantsOrBuilder() { - if ((variantsCase_ == 2) && (versionVariantsBuilder_ != null)) { - return versionVariantsBuilder_.getMessageOrBuilder(); - } else { - if (variantsCase_ == 2) { - return (com.google.cloud.dialogflow.cx.v3beta1.VersionVariants) variants_; - } - return com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.getDefaultInstance(); - } - } - /** - * - * - *
-       * The flow versions as the variants of this experiment.
-       * 
- * - * .google.cloud.dialogflow.cx.v3beta1.VersionVariants version_variants = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants, - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Builder, - com.google.cloud.dialogflow.cx.v3beta1.VersionVariantsOrBuilder> - getVersionVariantsFieldBuilder() { - if (versionVariantsBuilder_ == null) { - if (!(variantsCase_ == 2)) { - variants_ = com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.getDefaultInstance(); - } - versionVariantsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants, - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Builder, - com.google.cloud.dialogflow.cx.v3beta1.VersionVariantsOrBuilder>( - (com.google.cloud.dialogflow.cx.v3beta1.VersionVariants) variants_, - getParentForChildren(), - isClean()); - variants_ = null; - } - variantsCase_ = 2; - onChanged(); - ; - return versionVariantsBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.Experiment.Definition) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.Experiment.Definition) - private static final com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition(); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Definition parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Definition(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface ResultOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.Experiment.Result) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Version variants and metrics.
-     * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics version_metrics = 1; - * - */ - java.util.List - getVersionMetricsList(); - /** - * - * - *
-     * Version variants and metrics.
-     * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics version_metrics = 1; - * - */ - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics getVersionMetrics( - int index); - /** - * - * - *
-     * Version variants and metrics.
-     * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics version_metrics = 1; - * - */ - int getVersionMetricsCount(); - /** - * - * - *
-     * Version variants and metrics.
-     * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics version_metrics = 1; - * - */ - java.util.List< - ? extends - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetricsOrBuilder> - getVersionMetricsOrBuilderList(); - /** - * - * - *
-     * Version variants and metrics.
-     * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics version_metrics = 1; - * - */ - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetricsOrBuilder - getVersionMetricsOrBuilder(int index); - - /** - * - * - *
-     * The last time the experiment's stats data was updated. Will have default
-     * value if stats have never been computed for this experiment.
-     * 
- * - * .google.protobuf.Timestamp last_update_time = 2; - * - * @return Whether the lastUpdateTime field is set. - */ - boolean hasLastUpdateTime(); - /** - * - * - *
-     * The last time the experiment's stats data was updated. Will have default
-     * value if stats have never been computed for this experiment.
-     * 
- * - * .google.protobuf.Timestamp last_update_time = 2; - * - * @return The lastUpdateTime. - */ - com.google.protobuf.Timestamp getLastUpdateTime(); - /** - * - * - *
-     * The last time the experiment's stats data was updated. Will have default
-     * value if stats have never been computed for this experiment.
-     * 
- * - * .google.protobuf.Timestamp last_update_time = 2; - */ - com.google.protobuf.TimestampOrBuilder getLastUpdateTimeOrBuilder(); - } - /** - * - * - *
-   * The inference result which includes an objective metric to optimize and the
-   * confidence interval.
-   * 
- * - * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Experiment.Result} - */ - public static final class Result extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.Experiment.Result) - ResultOrBuilder { - private static final long serialVersionUID = 0L; - // Use Result.newBuilder() to construct. - private Result(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Result() { - versionMetrics_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Result(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private Result( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - versionMetrics_ = - new java.util.ArrayList< - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result - .VersionMetrics>(); - mutable_bitField0_ |= 0x00000001; - } - versionMetrics_.add( - input.readMessage( - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics - .parser(), - extensionRegistry)); - break; - } - case 18: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (lastUpdateTime_ != null) { - subBuilder = lastUpdateTime_.toBuilder(); - } - lastUpdateTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(lastUpdateTime_); - lastUpdateTime_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - versionMetrics_ = java.util.Collections.unmodifiableList(versionMetrics_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.class, - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Builder.class); - } - - /** - * - * - *
-     * Types of metric for Dialogflow experiment.
-     * 
- * - * Protobuf enum {@code google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType} - */ - public enum MetricType implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-       * Metric unspecified.
-       * 
- * - * METRIC_UNSPECIFIED = 0; - */ - METRIC_UNSPECIFIED(0), - /** - * - * - *
-       * Percentage of contained sessions without user calling back in 24 hours.
-       * 
- * - * CONTAINED_SESSION_NO_CALLBACK_RATE = 1; - */ - CONTAINED_SESSION_NO_CALLBACK_RATE(1), - /** - * - * - *
-       * Percentage of sessions that were handed to a human agent.
-       * 
- * - * LIVE_AGENT_HANDOFF_RATE = 2; - */ - LIVE_AGENT_HANDOFF_RATE(2), - /** - * - * - *
-       * Percentage of sessions with the same user calling back.
-       * 
- * - * CALLBACK_SESSION_RATE = 3; - */ - CALLBACK_SESSION_RATE(3), - /** - * - * - *
-       * Percentage of sessions where user hung up.
-       * 
- * - * ABANDONED_SESSION_RATE = 4; - */ - ABANDONED_SESSION_RATE(4), - /** - * - * - *
-       * Percentage of sessions reached Dialogflow 'END_PAGE' or
-       * 'END_SESSION'.
-       * 
- * - * SESSION_END_RATE = 5; - */ - SESSION_END_RATE(5), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-       * Metric unspecified.
-       * 
- * - * METRIC_UNSPECIFIED = 0; - */ - public static final int METRIC_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-       * Percentage of contained sessions without user calling back in 24 hours.
-       * 
- * - * CONTAINED_SESSION_NO_CALLBACK_RATE = 1; - */ - public static final int CONTAINED_SESSION_NO_CALLBACK_RATE_VALUE = 1; - /** - * - * - *
-       * Percentage of sessions that were handed to a human agent.
-       * 
- * - * LIVE_AGENT_HANDOFF_RATE = 2; - */ - public static final int LIVE_AGENT_HANDOFF_RATE_VALUE = 2; - /** - * - * - *
-       * Percentage of sessions with the same user calling back.
-       * 
- * - * CALLBACK_SESSION_RATE = 3; - */ - public static final int CALLBACK_SESSION_RATE_VALUE = 3; - /** - * - * - *
-       * Percentage of sessions where user hung up.
-       * 
- * - * ABANDONED_SESSION_RATE = 4; - */ - public static final int ABANDONED_SESSION_RATE_VALUE = 4; - /** - * - * - *
-       * Percentage of sessions reached Dialogflow 'END_PAGE' or
-       * 'END_SESSION'.
-       * 
- * - * SESSION_END_RATE = 5; - */ - public static final int SESSION_END_RATE_VALUE = 5; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static MetricType valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static MetricType forNumber(int value) { - switch (value) { - case 0: - return METRIC_UNSPECIFIED; - case 1: - return CONTAINED_SESSION_NO_CALLBACK_RATE; - case 2: - return LIVE_AGENT_HANDOFF_RATE; - case 3: - return CALLBACK_SESSION_RATE; - case 4: - return ABANDONED_SESSION_RATE; - case 5: - return SESSION_END_RATE; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public MetricType findValueByNumber(int number) { - return MetricType.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.getDescriptor() - .getEnumTypes() - .get(0); - } - - private static final MetricType[] VALUES = values(); - - public static MetricType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private MetricType(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType) - } - - public interface ConfidenceIntervalOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-       * The confidence level used to construct the interval, i.e. there is X%
-       * chance that the true value is within this interval.
-       * 
- * - * double confidence_level = 1; - * - * @return The confidenceLevel. - */ - double getConfidenceLevel(); - - /** - * - * - *
-       * The percent change between an experiment metric's value and the value
-       * for its control.
-       * 
- * - * double ratio = 2; - * - * @return The ratio. - */ - double getRatio(); - - /** - * - * - *
-       * Lower bound of the interval.
-       * 
- * - * double lower_bound = 3; - * - * @return The lowerBound. - */ - double getLowerBound(); - - /** - * - * - *
-       * Upper bound of the interval.
-       * 
- * - * double upper_bound = 4; - * - * @return The upperBound. - */ - double getUpperBound(); - } - /** - * - * - *
-     * A confidence interval is a range of possible values for the experiment
-     * objective you are trying to measure.
-     * 
- * - * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval} - */ - public static final class ConfidenceInterval extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval) - ConfidenceIntervalOrBuilder { - private static final long serialVersionUID = 0L; - // Use ConfidenceInterval.newBuilder() to construct. - private ConfidenceInterval(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ConfidenceInterval() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ConfidenceInterval(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ConfidenceInterval( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 9: - { - confidenceLevel_ = input.readDouble(); - break; - } - case 17: - { - ratio_ = input.readDouble(); - break; - } - case 25: - { - lowerBound_ = input.readDouble(); - break; - } - case 33: - { - upperBound_ = input.readDouble(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_ConfidenceInterval_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_ConfidenceInterval_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval.class, - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval.Builder - .class); - } - - public static final int CONFIDENCE_LEVEL_FIELD_NUMBER = 1; - private double confidenceLevel_; - /** - * - * - *
-       * The confidence level used to construct the interval, i.e. there is X%
-       * chance that the true value is within this interval.
-       * 
- * - * double confidence_level = 1; - * - * @return The confidenceLevel. - */ - @java.lang.Override - public double getConfidenceLevel() { - return confidenceLevel_; - } - - public static final int RATIO_FIELD_NUMBER = 2; - private double ratio_; - /** - * - * - *
-       * The percent change between an experiment metric's value and the value
-       * for its control.
-       * 
- * - * double ratio = 2; - * - * @return The ratio. - */ - @java.lang.Override - public double getRatio() { - return ratio_; - } - - public static final int LOWER_BOUND_FIELD_NUMBER = 3; - private double lowerBound_; - /** - * - * - *
-       * Lower bound of the interval.
-       * 
- * - * double lower_bound = 3; - * - * @return The lowerBound. - */ - @java.lang.Override - public double getLowerBound() { - return lowerBound_; - } - - public static final int UPPER_BOUND_FIELD_NUMBER = 4; - private double upperBound_; - /** - * - * - *
-       * Upper bound of the interval.
-       * 
- * - * double upper_bound = 4; - * - * @return The upperBound. - */ - @java.lang.Override - public double getUpperBound() { - return upperBound_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (confidenceLevel_ != 0D) { - output.writeDouble(1, confidenceLevel_); - } - if (ratio_ != 0D) { - output.writeDouble(2, ratio_); - } - if (lowerBound_ != 0D) { - output.writeDouble(3, lowerBound_); - } - if (upperBound_ != 0D) { - output.writeDouble(4, upperBound_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (confidenceLevel_ != 0D) { - size += com.google.protobuf.CodedOutputStream.computeDoubleSize(1, confidenceLevel_); - } - if (ratio_ != 0D) { - size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, ratio_); - } - if (lowerBound_ != 0D) { - size += com.google.protobuf.CodedOutputStream.computeDoubleSize(3, lowerBound_); - } - if (upperBound_ != 0D) { - size += com.google.protobuf.CodedOutputStream.computeDoubleSize(4, upperBound_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval)) { - return super.equals(obj); - } - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval other = - (com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval) obj; - - if (java.lang.Double.doubleToLongBits(getConfidenceLevel()) - != java.lang.Double.doubleToLongBits(other.getConfidenceLevel())) return false; - if (java.lang.Double.doubleToLongBits(getRatio()) - != java.lang.Double.doubleToLongBits(other.getRatio())) return false; - if (java.lang.Double.doubleToLongBits(getLowerBound()) - != java.lang.Double.doubleToLongBits(other.getLowerBound())) return false; - if (java.lang.Double.doubleToLongBits(getUpperBound()) - != java.lang.Double.doubleToLongBits(other.getUpperBound())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + CONFIDENCE_LEVEL_FIELD_NUMBER; - hash = - (53 * hash) - + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getConfidenceLevel())); - hash = (37 * hash) + RATIO_FIELD_NUMBER; - hash = - (53 * hash) - + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getRatio())); - hash = (37 * hash) + LOWER_BOUND_FIELD_NUMBER; - hash = - (53 * hash) - + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getLowerBound())); - hash = (37 * hash) + UPPER_BOUND_FIELD_NUMBER; - hash = - (53 * hash) - + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getUpperBound())); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval - parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval - parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-       * A confidence interval is a range of possible values for the experiment
-       * objective you are trying to measure.
-       * 
- * - * Protobuf type {@code - * google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval) - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceIntervalOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_ConfidenceInterval_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_ConfidenceInterval_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval.class, - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval - .Builder.class); - } - - // Construct using - // com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - confidenceLevel_ = 0D; - - ratio_ = 0D; - - lowerBound_ = 0D; - - upperBound_ = 0D; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_ConfidenceInterval_descriptor; - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval - getDefaultInstanceForType() { - return com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval build() { - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval - buildPartial() { - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval result = - new com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval(this); - result.confidenceLevel_ = confidenceLevel_; - result.ratio_ = ratio_; - result.lowerBound_ = lowerBound_; - result.upperBound_ = upperBound_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval) { - return mergeFrom( - (com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval) - other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval other) { - if (other - == com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval - .getDefaultInstance()) return this; - if (other.getConfidenceLevel() != 0D) { - setConfidenceLevel(other.getConfidenceLevel()); - } - if (other.getRatio() != 0D) { - setRatio(other.getRatio()); - } - if (other.getLowerBound() != 0D) { - setLowerBound(other.getLowerBound()); - } - if (other.getUpperBound() != 0D) { - setUpperBound(other.getUpperBound()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval - parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private double confidenceLevel_; - /** - * - * - *
-         * The confidence level used to construct the interval, i.e. there is X%
-         * chance that the true value is within this interval.
-         * 
- * - * double confidence_level = 1; - * - * @return The confidenceLevel. - */ - @java.lang.Override - public double getConfidenceLevel() { - return confidenceLevel_; - } - /** - * - * - *
-         * The confidence level used to construct the interval, i.e. there is X%
-         * chance that the true value is within this interval.
-         * 
- * - * double confidence_level = 1; - * - * @param value The confidenceLevel to set. - * @return This builder for chaining. - */ - public Builder setConfidenceLevel(double value) { - - confidenceLevel_ = value; - onChanged(); - return this; - } - /** - * - * - *
-         * The confidence level used to construct the interval, i.e. there is X%
-         * chance that the true value is within this interval.
-         * 
- * - * double confidence_level = 1; - * - * @return This builder for chaining. - */ - public Builder clearConfidenceLevel() { - - confidenceLevel_ = 0D; - onChanged(); - return this; - } - - private double ratio_; - /** - * - * - *
-         * The percent change between an experiment metric's value and the value
-         * for its control.
-         * 
- * - * double ratio = 2; - * - * @return The ratio. - */ - @java.lang.Override - public double getRatio() { - return ratio_; - } - /** - * - * - *
-         * The percent change between an experiment metric's value and the value
-         * for its control.
-         * 
- * - * double ratio = 2; - * - * @param value The ratio to set. - * @return This builder for chaining. - */ - public Builder setRatio(double value) { - - ratio_ = value; - onChanged(); - return this; - } - /** - * - * - *
-         * The percent change between an experiment metric's value and the value
-         * for its control.
-         * 
- * - * double ratio = 2; - * - * @return This builder for chaining. - */ - public Builder clearRatio() { - - ratio_ = 0D; - onChanged(); - return this; - } - - private double lowerBound_; - /** - * - * - *
-         * Lower bound of the interval.
-         * 
- * - * double lower_bound = 3; - * - * @return The lowerBound. - */ - @java.lang.Override - public double getLowerBound() { - return lowerBound_; - } - /** - * - * - *
-         * Lower bound of the interval.
-         * 
- * - * double lower_bound = 3; - * - * @param value The lowerBound to set. - * @return This builder for chaining. - */ - public Builder setLowerBound(double value) { - - lowerBound_ = value; - onChanged(); - return this; - } - /** - * - * - *
-         * Lower bound of the interval.
-         * 
- * - * double lower_bound = 3; - * - * @return This builder for chaining. - */ - public Builder clearLowerBound() { - - lowerBound_ = 0D; - onChanged(); - return this; - } - - private double upperBound_; - /** - * - * - *
-         * Upper bound of the interval.
-         * 
- * - * double upper_bound = 4; - * - * @return The upperBound. - */ - @java.lang.Override - public double getUpperBound() { - return upperBound_; - } - /** - * - * - *
-         * Upper bound of the interval.
-         * 
- * - * double upper_bound = 4; - * - * @param value The upperBound to set. - * @return This builder for chaining. - */ - public Builder setUpperBound(double value) { - - upperBound_ = value; - onChanged(); - return this; - } - /** - * - * - *
-         * Upper bound of the interval.
-         * 
- * - * double upper_bound = 4; - * - * @return This builder for chaining. - */ - public Builder clearUpperBound() { - - upperBound_ = 0D; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval) - private static final com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result - .ConfidenceInterval - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval(); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ConfidenceInterval parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ConfidenceInterval(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface MetricOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-       * The type of the metric.
-       * 
- * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType type = 1; - * - * @return The enum numeric value on the wire for type. - */ - int getTypeValue(); - /** - * - * - *
-       * The type of the metric.
-       * 
- * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType type = 1; - * - * @return The type. - */ - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType getType(); - - /** - * - * - *
-       * Ratio value of a metric.
-       * 
- * - * double ratio = 2; - * - * @return The ratio. - */ - double getRatio(); - - /** - * - * - *
-       * The probability that the treatment is better than all other treatments
-       * in the experiment
-       * 
- * - * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval confidence_interval = 3; - * - * - * @return Whether the confidenceInterval field is set. - */ - boolean hasConfidenceInterval(); - /** - * - * - *
-       * The probability that the treatment is better than all other treatments
-       * in the experiment
-       * 
- * - * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval confidence_interval = 3; - * - * - * @return The confidenceInterval. - */ - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval - getConfidenceInterval(); - /** - * - * - *
-       * The probability that the treatment is better than all other treatments
-       * in the experiment
-       * 
- * - * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval confidence_interval = 3; - * - */ - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceIntervalOrBuilder - getConfidenceIntervalOrBuilder(); - - public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric.ValueCase - getValueCase(); - } - /** - * - * - *
-     * Metric and corresponding confidence intervals.
-     * 
- * - * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric} - */ - public static final class Metric extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric) - MetricOrBuilder { - private static final long serialVersionUID = 0L; - // Use Metric.newBuilder() to construct. - private Metric(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Metric() { - type_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Metric(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private Metric( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - int rawValue = input.readEnum(); - - type_ = rawValue; - break; - } - case 17: - { - valueCase_ = 2; - value_ = input.readDouble(); - break; - } - case 26: - { - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval - .Builder - subBuilder = null; - if (confidenceInterval_ != null) { - subBuilder = confidenceInterval_.toBuilder(); - } - confidenceInterval_ = - input.readMessage( - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result - .ConfidenceInterval.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(confidenceInterval_); - confidenceInterval_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_Metric_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_Metric_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric.class, - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric.Builder.class); - } - - private int valueCase_ = 0; - private java.lang.Object value_; - - public enum ValueCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - RATIO(2), - VALUE_NOT_SET(0); - private final int value; - - private ValueCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ValueCase valueOf(int value) { - return forNumber(value); - } - - public static ValueCase forNumber(int value) { - switch (value) { - case 2: - return RATIO; - case 0: - return VALUE_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public ValueCase getValueCase() { - return ValueCase.forNumber(valueCase_); - } - - public static final int TYPE_FIELD_NUMBER = 1; - private int type_; - /** - * - * - *
-       * The type of the metric.
-       * 
- * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType type = 1; - * - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override - public int getTypeValue() { - return type_; - } - /** - * - * - *
-       * The type of the metric.
-       * 
- * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType type = 1; - * - * @return The type. - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType getType() { - @SuppressWarnings("deprecation") - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType result = - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType.valueOf(type_); - return result == null - ? com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType.UNRECOGNIZED - : result; - } - - public static final int RATIO_FIELD_NUMBER = 2; - /** - * - * - *
-       * Ratio value of a metric.
-       * 
- * - * double ratio = 2; - * - * @return The ratio. - */ - @java.lang.Override - public double getRatio() { - if (valueCase_ == 2) { - return (java.lang.Double) value_; - } - return 0D; - } - - public static final int CONFIDENCE_INTERVAL_FIELD_NUMBER = 3; - private com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval - confidenceInterval_; - /** - * - * - *
-       * The probability that the treatment is better than all other treatments
-       * in the experiment
-       * 
- * - * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval confidence_interval = 3; - * - * - * @return Whether the confidenceInterval field is set. - */ - @java.lang.Override - public boolean hasConfidenceInterval() { - return confidenceInterval_ != null; - } - /** - * - * - *
-       * The probability that the treatment is better than all other treatments
-       * in the experiment
-       * 
- * - * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval confidence_interval = 3; - * - * - * @return The confidenceInterval. - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval - getConfidenceInterval() { - return confidenceInterval_ == null - ? com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval - .getDefaultInstance() - : confidenceInterval_; - } - /** - * - * - *
-       * The probability that the treatment is better than all other treatments
-       * in the experiment
-       * 
- * - * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval confidence_interval = 3; - * - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceIntervalOrBuilder - getConfidenceIntervalOrBuilder() { - return getConfidenceInterval(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (type_ - != com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType - .METRIC_UNSPECIFIED - .getNumber()) { - output.writeEnum(1, type_); - } - if (valueCase_ == 2) { - output.writeDouble(2, (double) ((java.lang.Double) value_)); - } - if (confidenceInterval_ != null) { - output.writeMessage(3, getConfidenceInterval()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (type_ - != com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType - .METRIC_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, type_); - } - if (valueCase_ == 2) { - size += - com.google.protobuf.CodedOutputStream.computeDoubleSize( - 2, (double) ((java.lang.Double) value_)); - } - if (confidenceInterval_ != null) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(3, getConfidenceInterval()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric)) { - return super.equals(obj); - } - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric other = - (com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric) obj; - - if (type_ != other.type_) return false; - if (hasConfidenceInterval() != other.hasConfidenceInterval()) return false; - if (hasConfidenceInterval()) { - if (!getConfidenceInterval().equals(other.getConfidenceInterval())) return false; - } - if (!getValueCase().equals(other.getValueCase())) return false; - switch (valueCase_) { - case 2: - if (java.lang.Double.doubleToLongBits(getRatio()) - != java.lang.Double.doubleToLongBits(other.getRatio())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + type_; - if (hasConfidenceInterval()) { - hash = (37 * hash) + CONFIDENCE_INTERVAL_FIELD_NUMBER; - hash = (53 * hash) + getConfidenceInterval().hashCode(); - } - switch (valueCase_) { - case 2: - hash = (37 * hash) + RATIO_FIELD_NUMBER; - hash = - (53 * hash) - + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getRatio())); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric - parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-       * Metric and corresponding confidence intervals.
-       * 
- * - * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric) - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_Metric_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_Metric_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric.class, - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric.Builder.class); - } - - // Construct using - // com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - type_ = 0; - - if (confidenceIntervalBuilder_ == null) { - confidenceInterval_ = null; - } else { - confidenceInterval_ = null; - confidenceIntervalBuilder_ = null; - } - valueCase_ = 0; - value_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_Metric_descriptor; - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric - getDefaultInstanceForType() { - return com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric build() { - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric buildPartial() { - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric result = - new com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric(this); - result.type_ = type_; - if (valueCase_ == 2) { - result.value_ = value_; - } - if (confidenceIntervalBuilder_ == null) { - result.confidenceInterval_ = confidenceInterval_; - } else { - result.confidenceInterval_ = confidenceIntervalBuilder_.build(); - } - result.valueCase_ = valueCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric) { - return mergeFrom( - (com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric other) { - if (other - == com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric - .getDefaultInstance()) return this; - if (other.type_ != 0) { - setTypeValue(other.getTypeValue()); - } - if (other.hasConfidenceInterval()) { - mergeConfidenceInterval(other.getConfidenceInterval()); - } - switch (other.getValueCase()) { - case RATIO: - { - setRatio(other.getRatio()); - break; - } - case VALUE_NOT_SET: - { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int valueCase_ = 0; - private java.lang.Object value_; - - public ValueCase getValueCase() { - return ValueCase.forNumber(valueCase_); - } - - public Builder clearValue() { - valueCase_ = 0; - value_ = null; - onChanged(); - return this; - } - - private int type_ = 0; - /** - * - * - *
-         * The type of the metric.
-         * 
- * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType type = 1; - * - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override - public int getTypeValue() { - return type_; - } - /** - * - * - *
-         * The type of the metric.
-         * 
- * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType type = 1; - * - * @param value The enum numeric value on the wire for type to set. - * @return This builder for chaining. - */ - public Builder setTypeValue(int value) { - - type_ = value; - onChanged(); - return this; - } - /** - * - * - *
-         * The type of the metric.
-         * 
- * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType type = 1; - * - * @return The type. - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType getType() { - @SuppressWarnings("deprecation") - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType result = - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType.valueOf(type_); - return result == null - ? com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType.UNRECOGNIZED - : result; - } - /** - * - * - *
-         * The type of the metric.
-         * 
- * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType type = 1; - * - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setType( - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType value) { - if (value == null) { - throw new NullPointerException(); - } - - type_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-         * The type of the metric.
-         * 
- * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType type = 1; - * - * @return This builder for chaining. - */ - public Builder clearType() { - - type_ = 0; - onChanged(); - return this; - } - - /** - * - * - *
-         * Ratio value of a metric.
-         * 
- * - * double ratio = 2; - * - * @return The ratio. - */ - public double getRatio() { - if (valueCase_ == 2) { - return (java.lang.Double) value_; - } - return 0D; - } - /** - * - * - *
-         * Ratio value of a metric.
-         * 
- * - * double ratio = 2; - * - * @param value The ratio to set. - * @return This builder for chaining. - */ - public Builder setRatio(double value) { - valueCase_ = 2; - value_ = value; - onChanged(); - return this; - } - /** - * - * - *
-         * Ratio value of a metric.
-         * 
- * - * double ratio = 2; - * - * @return This builder for chaining. - */ - public Builder clearRatio() { - if (valueCase_ == 2) { - valueCase_ = 0; - value_ = null; - onChanged(); - } - return this; - } - - private com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval - confidenceInterval_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval, - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval.Builder, - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result - .ConfidenceIntervalOrBuilder> - confidenceIntervalBuilder_; - /** - * - * - *
-         * The probability that the treatment is better than all other treatments
-         * in the experiment
-         * 
- * - * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval confidence_interval = 3; - * - * - * @return Whether the confidenceInterval field is set. - */ - public boolean hasConfidenceInterval() { - return confidenceIntervalBuilder_ != null || confidenceInterval_ != null; - } - /** - * - * - *
-         * The probability that the treatment is better than all other treatments
-         * in the experiment
-         * 
- * - * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval confidence_interval = 3; - * - * - * @return The confidenceInterval. - */ - public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval - getConfidenceInterval() { - if (confidenceIntervalBuilder_ == null) { - return confidenceInterval_ == null - ? com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval - .getDefaultInstance() - : confidenceInterval_; - } else { - return confidenceIntervalBuilder_.getMessage(); - } - } - /** - * - * - *
-         * The probability that the treatment is better than all other treatments
-         * in the experiment
-         * 
- * - * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval confidence_interval = 3; - * - */ - public Builder setConfidenceInterval( - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval value) { - if (confidenceIntervalBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - confidenceInterval_ = value; - onChanged(); - } else { - confidenceIntervalBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-         * The probability that the treatment is better than all other treatments
-         * in the experiment
-         * 
- * - * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval confidence_interval = 3; - * - */ - public Builder setConfidenceInterval( - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval.Builder - builderForValue) { - if (confidenceIntervalBuilder_ == null) { - confidenceInterval_ = builderForValue.build(); - onChanged(); - } else { - confidenceIntervalBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-         * The probability that the treatment is better than all other treatments
-         * in the experiment
-         * 
- * - * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval confidence_interval = 3; - * - */ - public Builder mergeConfidenceInterval( - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval value) { - if (confidenceIntervalBuilder_ == null) { - if (confidenceInterval_ != null) { - confidenceInterval_ = - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval - .newBuilder(confidenceInterval_) - .mergeFrom(value) - .buildPartial(); - } else { - confidenceInterval_ = value; - } - onChanged(); - } else { - confidenceIntervalBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-         * The probability that the treatment is better than all other treatments
-         * in the experiment
-         * 
- * - * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval confidence_interval = 3; - * - */ - public Builder clearConfidenceInterval() { - if (confidenceIntervalBuilder_ == null) { - confidenceInterval_ = null; - onChanged(); - } else { - confidenceInterval_ = null; - confidenceIntervalBuilder_ = null; - } - - return this; - } - /** - * - * - *
-         * The probability that the treatment is better than all other treatments
-         * in the experiment
-         * 
- * - * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval confidence_interval = 3; - * - */ - public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval.Builder - getConfidenceIntervalBuilder() { - - onChanged(); - return getConfidenceIntervalFieldBuilder().getBuilder(); - } - /** - * - * - *
-         * The probability that the treatment is better than all other treatments
-         * in the experiment
-         * 
- * - * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval confidence_interval = 3; - * - */ - public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceIntervalOrBuilder - getConfidenceIntervalOrBuilder() { - if (confidenceIntervalBuilder_ != null) { - return confidenceIntervalBuilder_.getMessageOrBuilder(); - } else { - return confidenceInterval_ == null - ? com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval - .getDefaultInstance() - : confidenceInterval_; - } - } - /** - * - * - *
-         * The probability that the treatment is better than all other treatments
-         * in the experiment
-         * 
- * - * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval confidence_interval = 3; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval, - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval.Builder, - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result - .ConfidenceIntervalOrBuilder> - getConfidenceIntervalFieldBuilder() { - if (confidenceIntervalBuilder_ == null) { - confidenceIntervalBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval, - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval - .Builder, - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result - .ConfidenceIntervalOrBuilder>( - getConfidenceInterval(), getParentForChildren(), isClean()); - confidenceInterval_ = null; - } - return confidenceIntervalBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric) - private static final com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric(); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Metric parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Metric(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface VersionMetricsOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-       * The name of the flow [Version][google.cloud.dialogflow.cx.v3beta1.Version].
-       * Format: `projects/<Project Number>/locations/<Location
-       * ID>/agents/<Agent ID>/flows/<Flow ID>/versions/<Version ID>`.
-       * 
- * - * string version = 1 [(.google.api.resource_reference) = { ... } - * - * @return The version. - */ - java.lang.String getVersion(); - /** - * - * - *
-       * The name of the flow [Version][google.cloud.dialogflow.cx.v3beta1.Version].
-       * Format: `projects/<Project Number>/locations/<Location
-       * ID>/agents/<Agent ID>/flows/<Flow ID>/versions/<Version ID>`.
-       * 
- * - * string version = 1 [(.google.api.resource_reference) = { ... } - * - * @return The bytes for version. - */ - com.google.protobuf.ByteString getVersionBytes(); - - /** - * - * - *
-       * The metrics and corresponding confidence intervals in the inference
-       * result.
-       * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric metrics = 2; - * - */ - java.util.List - getMetricsList(); - /** - * - * - *
-       * The metrics and corresponding confidence intervals in the inference
-       * result.
-       * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric metrics = 2; - * - */ - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric getMetrics(int index); - /** - * - * - *
-       * The metrics and corresponding confidence intervals in the inference
-       * result.
-       * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric metrics = 2; - * - */ - int getMetricsCount(); - /** - * - * - *
-       * The metrics and corresponding confidence intervals in the inference
-       * result.
-       * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric metrics = 2; - * - */ - java.util.List< - ? extends com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricOrBuilder> - getMetricsOrBuilderList(); - /** - * - * - *
-       * The metrics and corresponding confidence intervals in the inference
-       * result.
-       * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric metrics = 2; - * - */ - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricOrBuilder getMetricsOrBuilder( - int index); - - /** - * - * - *
-       * Number of sessions that were allocated to this version.
-       * 
- * - * int32 session_count = 3; - * - * @return The sessionCount. - */ - int getSessionCount(); - } - /** - * - * - *
-     * Version variant and associated metrics.
-     * 
- * - * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics} - */ - public static final class VersionMetrics extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics) - VersionMetricsOrBuilder { - private static final long serialVersionUID = 0L; - // Use VersionMetrics.newBuilder() to construct. - private VersionMetrics(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private VersionMetrics() { - version_ = ""; - metrics_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new VersionMetrics(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private VersionMetrics( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - version_ = s; - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - metrics_ = - new java.util.ArrayList< - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric>(); - mutable_bitField0_ |= 0x00000001; - } - metrics_.add( - input.readMessage( - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric.parser(), - extensionRegistry)); - break; - } - case 24: - { - sessionCount_ = input.readInt32(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - metrics_ = java.util.Collections.unmodifiableList(metrics_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_VersionMetrics_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_VersionMetrics_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics.class, - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics.Builder - .class); - } - - public static final int VERSION_FIELD_NUMBER = 1; - private volatile java.lang.Object version_; - /** - * - * - *
-       * The name of the flow [Version][google.cloud.dialogflow.cx.v3beta1.Version].
-       * Format: `projects/<Project Number>/locations/<Location
-       * ID>/agents/<Agent ID>/flows/<Flow ID>/versions/<Version ID>`.
-       * 
- * - * string version = 1 [(.google.api.resource_reference) = { ... } - * - * @return The version. - */ - @java.lang.Override - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - version_ = s; - return s; - } - } - /** - * - * - *
-       * The name of the flow [Version][google.cloud.dialogflow.cx.v3beta1.Version].
-       * Format: `projects/<Project Number>/locations/<Location
-       * ID>/agents/<Agent ID>/flows/<Flow ID>/versions/<Version ID>`.
-       * 
- * - * string version = 1 [(.google.api.resource_reference) = { ... } - * - * @return The bytes for version. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int METRICS_FIELD_NUMBER = 2; - private java.util.List - metrics_; - /** - * - * - *
-       * The metrics and corresponding confidence intervals in the inference
-       * result.
-       * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric metrics = 2; - * - */ - @java.lang.Override - public java.util.List - getMetricsList() { - return metrics_; - } - /** - * - * - *
-       * The metrics and corresponding confidence intervals in the inference
-       * result.
-       * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric metrics = 2; - * - */ - @java.lang.Override - public java.util.List< - ? extends com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricOrBuilder> - getMetricsOrBuilderList() { - return metrics_; - } - /** - * - * - *
-       * The metrics and corresponding confidence intervals in the inference
-       * result.
-       * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric metrics = 2; - * - */ - @java.lang.Override - public int getMetricsCount() { - return metrics_.size(); - } - /** - * - * - *
-       * The metrics and corresponding confidence intervals in the inference
-       * result.
-       * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric metrics = 2; - * - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric getMetrics(int index) { - return metrics_.get(index); - } - /** - * - * - *
-       * The metrics and corresponding confidence intervals in the inference
-       * result.
-       * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric metrics = 2; - * - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricOrBuilder - getMetricsOrBuilder(int index) { - return metrics_.get(index); - } - - public static final int SESSION_COUNT_FIELD_NUMBER = 3; - private int sessionCount_; - /** - * - * - *
-       * Number of sessions that were allocated to this version.
-       * 
- * - * int32 session_count = 3; - * - * @return The sessionCount. - */ - @java.lang.Override - public int getSessionCount() { - return sessionCount_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getVersionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, version_); - } - for (int i = 0; i < metrics_.size(); i++) { - output.writeMessage(2, metrics_.get(i)); - } - if (sessionCount_ != 0) { - output.writeInt32(3, sessionCount_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getVersionBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, version_); - } - for (int i = 0; i < metrics_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, metrics_.get(i)); - } - if (sessionCount_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, sessionCount_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics)) { - return super.equals(obj); - } - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics other = - (com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics) obj; - - if (!getVersion().equals(other.getVersion())) return false; - if (!getMetricsList().equals(other.getMetricsList())) return false; - if (getSessionCount() != other.getSessionCount()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + VERSION_FIELD_NUMBER; - hash = (53 * hash) + getVersion().hashCode(); - if (getMetricsCount() > 0) { - hash = (37 * hash) + METRICS_FIELD_NUMBER; - hash = (53 * hash) + getMetricsList().hashCode(); - } - hash = (37 * hash) + SESSION_COUNT_FIELD_NUMBER; - hash = (53 * hash) + getSessionCount(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics - parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics - parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-       * Version variant and associated metrics.
-       * 
- * - * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics) - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetricsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_VersionMetrics_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_VersionMetrics_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics.class, - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics.Builder - .class); - } - - // Construct using - // com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getMetricsFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - version_ = ""; - - if (metricsBuilder_ == null) { - metrics_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - metricsBuilder_.clear(); - } - sessionCount_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_VersionMetrics_descriptor; - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics - getDefaultInstanceForType() { - return com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics build() { - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics - buildPartial() { - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics result = - new com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics(this); - int from_bitField0_ = bitField0_; - result.version_ = version_; - if (metricsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - metrics_ = java.util.Collections.unmodifiableList(metrics_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.metrics_ = metrics_; - } else { - result.metrics_ = metricsBuilder_.build(); - } - result.sessionCount_ = sessionCount_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics) { - return mergeFrom( - (com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics other) { - if (other - == com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics - .getDefaultInstance()) return this; - if (!other.getVersion().isEmpty()) { - version_ = other.version_; - onChanged(); - } - if (metricsBuilder_ == null) { - if (!other.metrics_.isEmpty()) { - if (metrics_.isEmpty()) { - metrics_ = other.metrics_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureMetricsIsMutable(); - metrics_.addAll(other.metrics_); - } - onChanged(); - } - } else { - if (!other.metrics_.isEmpty()) { - if (metricsBuilder_.isEmpty()) { - metricsBuilder_.dispose(); - metricsBuilder_ = null; - metrics_ = other.metrics_; - bitField0_ = (bitField0_ & ~0x00000001); - metricsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getMetricsFieldBuilder() - : null; - } else { - metricsBuilder_.addAllMessages(other.metrics_); - } - } - } - if (other.getSessionCount() != 0) { - setSessionCount(other.getSessionCount()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics parsedMessage = - null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.lang.Object version_ = ""; - /** - * - * - *
-         * The name of the flow [Version][google.cloud.dialogflow.cx.v3beta1.Version].
-         * Format: `projects/<Project Number>/locations/<Location
-         * ID>/agents/<Agent ID>/flows/<Flow ID>/versions/<Version ID>`.
-         * 
- * - * string version = 1 [(.google.api.resource_reference) = { ... } - * - * @return The version. - */ - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - version_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-         * The name of the flow [Version][google.cloud.dialogflow.cx.v3beta1.Version].
-         * Format: `projects/<Project Number>/locations/<Location
-         * ID>/agents/<Agent ID>/flows/<Flow ID>/versions/<Version ID>`.
-         * 
- * - * string version = 1 [(.google.api.resource_reference) = { ... } - * - * @return The bytes for version. - */ - public com.google.protobuf.ByteString getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-         * The name of the flow [Version][google.cloud.dialogflow.cx.v3beta1.Version].
-         * Format: `projects/<Project Number>/locations/<Location
-         * ID>/agents/<Agent ID>/flows/<Flow ID>/versions/<Version ID>`.
-         * 
- * - * string version = 1 [(.google.api.resource_reference) = { ... } - * - * @param value The version to set. - * @return This builder for chaining. - */ - public Builder setVersion(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - version_ = value; - onChanged(); - return this; - } - /** - * - * - *
-         * The name of the flow [Version][google.cloud.dialogflow.cx.v3beta1.Version].
-         * Format: `projects/<Project Number>/locations/<Location
-         * ID>/agents/<Agent ID>/flows/<Flow ID>/versions/<Version ID>`.
-         * 
- * - * string version = 1 [(.google.api.resource_reference) = { ... } - * - * @return This builder for chaining. - */ - public Builder clearVersion() { - - version_ = getDefaultInstance().getVersion(); - onChanged(); - return this; - } - /** - * - * - *
-         * The name of the flow [Version][google.cloud.dialogflow.cx.v3beta1.Version].
-         * Format: `projects/<Project Number>/locations/<Location
-         * ID>/agents/<Agent ID>/flows/<Flow ID>/versions/<Version ID>`.
-         * 
- * - * string version = 1 [(.google.api.resource_reference) = { ... } - * - * @param value The bytes for version to set. - * @return This builder for chaining. - */ - public Builder setVersionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - version_ = value; - onChanged(); - return this; - } - - private java.util.List - metrics_ = java.util.Collections.emptyList(); - - private void ensureMetricsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - metrics_ = - new java.util.ArrayList< - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric>(metrics_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric, - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric.Builder, - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricOrBuilder> - metricsBuilder_; - - /** - * - * - *
-         * The metrics and corresponding confidence intervals in the inference
-         * result.
-         * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric metrics = 2; - * - */ - public java.util.List - getMetricsList() { - if (metricsBuilder_ == null) { - return java.util.Collections.unmodifiableList(metrics_); - } else { - return metricsBuilder_.getMessageList(); - } - } - /** - * - * - *
-         * The metrics and corresponding confidence intervals in the inference
-         * result.
-         * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric metrics = 2; - * - */ - public int getMetricsCount() { - if (metricsBuilder_ == null) { - return metrics_.size(); - } else { - return metricsBuilder_.getCount(); - } - } - /** - * - * - *
-         * The metrics and corresponding confidence intervals in the inference
-         * result.
-         * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric metrics = 2; - * - */ - public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric getMetrics( - int index) { - if (metricsBuilder_ == null) { - return metrics_.get(index); - } else { - return metricsBuilder_.getMessage(index); - } - } - /** - * - * - *
-         * The metrics and corresponding confidence intervals in the inference
-         * result.
-         * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric metrics = 2; - * - */ - public Builder setMetrics( - int index, com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric value) { - if (metricsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMetricsIsMutable(); - metrics_.set(index, value); - onChanged(); - } else { - metricsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-         * The metrics and corresponding confidence intervals in the inference
-         * result.
-         * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric metrics = 2; - * - */ - public Builder setMetrics( - int index, - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric.Builder - builderForValue) { - if (metricsBuilder_ == null) { - ensureMetricsIsMutable(); - metrics_.set(index, builderForValue.build()); - onChanged(); - } else { - metricsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-         * The metrics and corresponding confidence intervals in the inference
-         * result.
-         * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric metrics = 2; - * - */ - public Builder addMetrics( - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric value) { - if (metricsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMetricsIsMutable(); - metrics_.add(value); - onChanged(); - } else { - metricsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-         * The metrics and corresponding confidence intervals in the inference
-         * result.
-         * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric metrics = 2; - * - */ - public Builder addMetrics( - int index, com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric value) { - if (metricsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMetricsIsMutable(); - metrics_.add(index, value); - onChanged(); - } else { - metricsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-         * The metrics and corresponding confidence intervals in the inference
-         * result.
-         * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric metrics = 2; - * - */ - public Builder addMetrics( - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric.Builder - builderForValue) { - if (metricsBuilder_ == null) { - ensureMetricsIsMutable(); - metrics_.add(builderForValue.build()); - onChanged(); - } else { - metricsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-         * The metrics and corresponding confidence intervals in the inference
-         * result.
-         * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric metrics = 2; - * - */ - public Builder addMetrics( - int index, - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric.Builder - builderForValue) { - if (metricsBuilder_ == null) { - ensureMetricsIsMutable(); - metrics_.add(index, builderForValue.build()); - onChanged(); - } else { - metricsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-         * The metrics and corresponding confidence intervals in the inference
-         * result.
-         * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric metrics = 2; - * - */ - public Builder addAllMetrics( - java.lang.Iterable< - ? extends com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric> - values) { - if (metricsBuilder_ == null) { - ensureMetricsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, metrics_); - onChanged(); - } else { - metricsBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-         * The metrics and corresponding confidence intervals in the inference
-         * result.
-         * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric metrics = 2; - * - */ - public Builder clearMetrics() { - if (metricsBuilder_ == null) { - metrics_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - metricsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-         * The metrics and corresponding confidence intervals in the inference
-         * result.
-         * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric metrics = 2; - * - */ - public Builder removeMetrics(int index) { - if (metricsBuilder_ == null) { - ensureMetricsIsMutable(); - metrics_.remove(index); - onChanged(); - } else { - metricsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-         * The metrics and corresponding confidence intervals in the inference
-         * result.
-         * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric metrics = 2; - * - */ - public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric.Builder - getMetricsBuilder(int index) { - return getMetricsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-         * The metrics and corresponding confidence intervals in the inference
-         * result.
-         * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric metrics = 2; - * - */ - public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricOrBuilder - getMetricsOrBuilder(int index) { - if (metricsBuilder_ == null) { - return metrics_.get(index); - } else { - return metricsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-         * The metrics and corresponding confidence intervals in the inference
-         * result.
-         * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric metrics = 2; - * - */ - public java.util.List< - ? extends com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricOrBuilder> - getMetricsOrBuilderList() { - if (metricsBuilder_ != null) { - return metricsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(metrics_); - } - } - /** - * - * - *
-         * The metrics and corresponding confidence intervals in the inference
-         * result.
-         * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric metrics = 2; - * - */ - public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric.Builder - addMetricsBuilder() { - return getMetricsFieldBuilder() - .addBuilder( - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric - .getDefaultInstance()); - } - /** - * - * - *
-         * The metrics and corresponding confidence intervals in the inference
-         * result.
-         * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric metrics = 2; - * - */ - public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric.Builder - addMetricsBuilder(int index) { - return getMetricsFieldBuilder() - .addBuilder( - index, - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric - .getDefaultInstance()); - } - /** - * - * - *
-         * The metrics and corresponding confidence intervals in the inference
-         * result.
-         * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric metrics = 2; - * - */ - public java.util.List< - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric.Builder> - getMetricsBuilderList() { - return getMetricsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric, - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric.Builder, - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricOrBuilder> - getMetricsFieldBuilder() { - if (metricsBuilder_ == null) { - metricsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric, - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric.Builder, - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricOrBuilder>( - metrics_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - metrics_ = null; - } - return metricsBuilder_; - } - - private int sessionCount_; - /** - * - * - *
-         * Number of sessions that were allocated to this version.
-         * 
- * - * int32 session_count = 3; - * - * @return The sessionCount. - */ - @java.lang.Override - public int getSessionCount() { - return sessionCount_; - } - /** - * - * - *
-         * Number of sessions that were allocated to this version.
-         * 
- * - * int32 session_count = 3; - * - * @param value The sessionCount to set. - * @return This builder for chaining. - */ - public Builder setSessionCount(int value) { - - sessionCount_ = value; - onChanged(); - return this; - } - /** - * - * - *
-         * Number of sessions that were allocated to this version.
-         * 
- * - * int32 session_count = 3; - * - * @return This builder for chaining. - */ - public Builder clearSessionCount() { - - sessionCount_ = 0; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics) - private static final com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics(); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public VersionMetrics parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new VersionMetrics(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public static final int VERSION_METRICS_FIELD_NUMBER = 1; - private java.util.List - versionMetrics_; - /** - * - * - *
-     * Version variants and metrics.
-     * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics version_metrics = 1; - * - */ - @java.lang.Override - public java.util.List - getVersionMetricsList() { - return versionMetrics_; - } - /** - * - * - *
-     * Version variants and metrics.
-     * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics version_metrics = 1; - * - */ - @java.lang.Override - public java.util.List< - ? extends - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetricsOrBuilder> - getVersionMetricsOrBuilderList() { - return versionMetrics_; - } - /** - * - * - *
-     * Version variants and metrics.
-     * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics version_metrics = 1; - * - */ - @java.lang.Override - public int getVersionMetricsCount() { - return versionMetrics_.size(); - } - /** - * - * - *
-     * Version variants and metrics.
-     * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics version_metrics = 1; - * - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics - getVersionMetrics(int index) { - return versionMetrics_.get(index); - } - /** - * - * - *
-     * Version variants and metrics.
-     * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics version_metrics = 1; - * - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetricsOrBuilder - getVersionMetricsOrBuilder(int index) { - return versionMetrics_.get(index); - } - - public static final int LAST_UPDATE_TIME_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp lastUpdateTime_; - /** - * - * - *
-     * The last time the experiment's stats data was updated. Will have default
-     * value if stats have never been computed for this experiment.
-     * 
- * - * .google.protobuf.Timestamp last_update_time = 2; - * - * @return Whether the lastUpdateTime field is set. - */ - @java.lang.Override - public boolean hasLastUpdateTime() { - return lastUpdateTime_ != null; - } - /** - * - * - *
-     * The last time the experiment's stats data was updated. Will have default
-     * value if stats have never been computed for this experiment.
-     * 
- * - * .google.protobuf.Timestamp last_update_time = 2; - * - * @return The lastUpdateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getLastUpdateTime() { - return lastUpdateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : lastUpdateTime_; - } - /** - * - * - *
-     * The last time the experiment's stats data was updated. Will have default
-     * value if stats have never been computed for this experiment.
-     * 
- * - * .google.protobuf.Timestamp last_update_time = 2; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getLastUpdateTimeOrBuilder() { - return getLastUpdateTime(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < versionMetrics_.size(); i++) { - output.writeMessage(1, versionMetrics_.get(i)); - } - if (lastUpdateTime_ != null) { - output.writeMessage(2, getLastUpdateTime()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < versionMetrics_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, versionMetrics_.get(i)); - } - if (lastUpdateTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getLastUpdateTime()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result)) { - return super.equals(obj); - } - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result other = - (com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result) obj; - - if (!getVersionMetricsList().equals(other.getVersionMetricsList())) return false; - if (hasLastUpdateTime() != other.hasLastUpdateTime()) return false; - if (hasLastUpdateTime()) { - if (!getLastUpdateTime().equals(other.getLastUpdateTime())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getVersionMetricsCount() > 0) { - hash = (37 * hash) + VERSION_METRICS_FIELD_NUMBER; - hash = (53 * hash) + getVersionMetricsList().hashCode(); - } - if (hasLastUpdateTime()) { - hash = (37 * hash) + LAST_UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getLastUpdateTime().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-     * The inference result which includes an objective metric to optimize and the
-     * confidence interval.
-     * 
- * - * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Experiment.Result} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.Experiment.Result) - com.google.cloud.dialogflow.cx.v3beta1.Experiment.ResultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.class, - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Builder.class); - } - - // Construct using com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getVersionMetricsFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (versionMetricsBuilder_ == null) { - versionMetrics_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - versionMetricsBuilder_.clear(); - } - if (lastUpdateTimeBuilder_ == null) { - lastUpdateTime_ = null; - } else { - lastUpdateTime_ = null; - lastUpdateTimeBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_descriptor; - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result getDefaultInstanceForType() { - return com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result build() { - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result buildPartial() { - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result result = - new com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result(this); - int from_bitField0_ = bitField0_; - if (versionMetricsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - versionMetrics_ = java.util.Collections.unmodifiableList(versionMetrics_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.versionMetrics_ = versionMetrics_; - } else { - result.versionMetrics_ = versionMetricsBuilder_.build(); - } - if (lastUpdateTimeBuilder_ == null) { - result.lastUpdateTime_ = lastUpdateTime_; - } else { - result.lastUpdateTime_ = lastUpdateTimeBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result) { - return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result other) { - if (other == com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.getDefaultInstance()) - return this; - if (versionMetricsBuilder_ == null) { - if (!other.versionMetrics_.isEmpty()) { - if (versionMetrics_.isEmpty()) { - versionMetrics_ = other.versionMetrics_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureVersionMetricsIsMutable(); - versionMetrics_.addAll(other.versionMetrics_); - } - onChanged(); - } - } else { - if (!other.versionMetrics_.isEmpty()) { - if (versionMetricsBuilder_.isEmpty()) { - versionMetricsBuilder_.dispose(); - versionMetricsBuilder_ = null; - versionMetrics_ = other.versionMetrics_; - bitField0_ = (bitField0_ & ~0x00000001); - versionMetricsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getVersionMetricsFieldBuilder() - : null; - } else { - versionMetricsBuilder_.addAllMessages(other.versionMetrics_); - } - } - } - if (other.hasLastUpdateTime()) { - mergeLastUpdateTime(other.getLastUpdateTime()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.util.List< - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics> - versionMetrics_ = java.util.Collections.emptyList(); - - private void ensureVersionMetricsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - versionMetrics_ = - new java.util.ArrayList< - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics>( - versionMetrics_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics, - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics.Builder, - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetricsOrBuilder> - versionMetricsBuilder_; - - /** - * - * - *
-       * Version variants and metrics.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics version_metrics = 1; - * - */ - public java.util.List - getVersionMetricsList() { - if (versionMetricsBuilder_ == null) { - return java.util.Collections.unmodifiableList(versionMetrics_); - } else { - return versionMetricsBuilder_.getMessageList(); - } - } - /** - * - * - *
-       * Version variants and metrics.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics version_metrics = 1; - * - */ - public int getVersionMetricsCount() { - if (versionMetricsBuilder_ == null) { - return versionMetrics_.size(); - } else { - return versionMetricsBuilder_.getCount(); - } - } - /** - * - * - *
-       * Version variants and metrics.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics version_metrics = 1; - * - */ - public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics - getVersionMetrics(int index) { - if (versionMetricsBuilder_ == null) { - return versionMetrics_.get(index); - } else { - return versionMetricsBuilder_.getMessage(index); - } - } - /** - * - * - *
-       * Version variants and metrics.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics version_metrics = 1; - * - */ - public Builder setVersionMetrics( - int index, - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics value) { - if (versionMetricsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVersionMetricsIsMutable(); - versionMetrics_.set(index, value); - onChanged(); - } else { - versionMetricsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-       * Version variants and metrics.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics version_metrics = 1; - * - */ - public Builder setVersionMetrics( - int index, - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics.Builder - builderForValue) { - if (versionMetricsBuilder_ == null) { - ensureVersionMetricsIsMutable(); - versionMetrics_.set(index, builderForValue.build()); - onChanged(); - } else { - versionMetricsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-       * Version variants and metrics.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics version_metrics = 1; - * - */ - public Builder addVersionMetrics( - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics value) { - if (versionMetricsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVersionMetricsIsMutable(); - versionMetrics_.add(value); - onChanged(); - } else { - versionMetricsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-       * Version variants and metrics.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics version_metrics = 1; - * - */ - public Builder addVersionMetrics( - int index, - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics value) { - if (versionMetricsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVersionMetricsIsMutable(); - versionMetrics_.add(index, value); - onChanged(); - } else { - versionMetricsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-       * Version variants and metrics.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics version_metrics = 1; - * - */ - public Builder addVersionMetrics( - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics.Builder - builderForValue) { - if (versionMetricsBuilder_ == null) { - ensureVersionMetricsIsMutable(); - versionMetrics_.add(builderForValue.build()); - onChanged(); - } else { - versionMetricsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-       * Version variants and metrics.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics version_metrics = 1; - * - */ - public Builder addVersionMetrics( - int index, - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics.Builder - builderForValue) { - if (versionMetricsBuilder_ == null) { - ensureVersionMetricsIsMutable(); - versionMetrics_.add(index, builderForValue.build()); - onChanged(); - } else { - versionMetricsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-       * Version variants and metrics.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics version_metrics = 1; - * - */ - public Builder addAllVersionMetrics( - java.lang.Iterable< - ? extends com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics> - values) { - if (versionMetricsBuilder_ == null) { - ensureVersionMetricsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, versionMetrics_); - onChanged(); - } else { - versionMetricsBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-       * Version variants and metrics.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics version_metrics = 1; - * - */ - public Builder clearVersionMetrics() { - if (versionMetricsBuilder_ == null) { - versionMetrics_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - versionMetricsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-       * Version variants and metrics.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics version_metrics = 1; - * - */ - public Builder removeVersionMetrics(int index) { - if (versionMetricsBuilder_ == null) { - ensureVersionMetricsIsMutable(); - versionMetrics_.remove(index); - onChanged(); - } else { - versionMetricsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-       * Version variants and metrics.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics version_metrics = 1; - * - */ - public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics.Builder - getVersionMetricsBuilder(int index) { - return getVersionMetricsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-       * Version variants and metrics.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics version_metrics = 1; - * - */ - public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetricsOrBuilder - getVersionMetricsOrBuilder(int index) { - if (versionMetricsBuilder_ == null) { - return versionMetrics_.get(index); - } else { - return versionMetricsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-       * Version variants and metrics.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics version_metrics = 1; - * - */ - public java.util.List< - ? extends - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetricsOrBuilder> - getVersionMetricsOrBuilderList() { - if (versionMetricsBuilder_ != null) { - return versionMetricsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(versionMetrics_); - } - } - /** - * - * - *
-       * Version variants and metrics.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics version_metrics = 1; - * - */ - public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics.Builder - addVersionMetricsBuilder() { - return getVersionMetricsFieldBuilder() - .addBuilder( - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics - .getDefaultInstance()); - } - /** - * - * - *
-       * Version variants and metrics.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics version_metrics = 1; - * - */ - public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics.Builder - addVersionMetricsBuilder(int index) { - return getVersionMetricsFieldBuilder() - .addBuilder( - index, - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics - .getDefaultInstance()); - } - /** - * - * - *
-       * Version variants and metrics.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics version_metrics = 1; - * - */ - public java.util.List< - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics.Builder> - getVersionMetricsBuilderList() { - return getVersionMetricsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics, - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics.Builder, - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetricsOrBuilder> - getVersionMetricsFieldBuilder() { - if (versionMetricsBuilder_ == null) { - versionMetricsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics, - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics.Builder, - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetricsOrBuilder>( - versionMetrics_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - versionMetrics_ = null; - } - return versionMetricsBuilder_; - } - - private com.google.protobuf.Timestamp lastUpdateTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - lastUpdateTimeBuilder_; - /** - * - * - *
-       * The last time the experiment's stats data was updated. Will have default
-       * value if stats have never been computed for this experiment.
-       * 
- * - * .google.protobuf.Timestamp last_update_time = 2; - * - * @return Whether the lastUpdateTime field is set. - */ - public boolean hasLastUpdateTime() { - return lastUpdateTimeBuilder_ != null || lastUpdateTime_ != null; - } - /** - * - * - *
-       * The last time the experiment's stats data was updated. Will have default
-       * value if stats have never been computed for this experiment.
-       * 
- * - * .google.protobuf.Timestamp last_update_time = 2; - * - * @return The lastUpdateTime. - */ - public com.google.protobuf.Timestamp getLastUpdateTime() { - if (lastUpdateTimeBuilder_ == null) { - return lastUpdateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : lastUpdateTime_; - } else { - return lastUpdateTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-       * The last time the experiment's stats data was updated. Will have default
-       * value if stats have never been computed for this experiment.
-       * 
- * - * .google.protobuf.Timestamp last_update_time = 2; - */ - public Builder setLastUpdateTime(com.google.protobuf.Timestamp value) { - if (lastUpdateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - lastUpdateTime_ = value; - onChanged(); - } else { - lastUpdateTimeBuilder_.setMessage(value); - } - - 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.
-       * 
- * - * .google.protobuf.Timestamp last_update_time = 2; - */ - public Builder setLastUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (lastUpdateTimeBuilder_ == null) { - lastUpdateTime_ = builderForValue.build(); - onChanged(); - } else { - lastUpdateTimeBuilder_.setMessage(builderForValue.build()); - } - - 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.
-       * 
- * - * .google.protobuf.Timestamp last_update_time = 2; - */ - public Builder mergeLastUpdateTime(com.google.protobuf.Timestamp value) { - if (lastUpdateTimeBuilder_ == null) { - if (lastUpdateTime_ != null) { - lastUpdateTime_ = - com.google.protobuf.Timestamp.newBuilder(lastUpdateTime_) - .mergeFrom(value) - .buildPartial(); - } else { - lastUpdateTime_ = value; - } - onChanged(); - } else { - lastUpdateTimeBuilder_.mergeFrom(value); - } - - 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.
-       * 
- * - * .google.protobuf.Timestamp last_update_time = 2; - */ - public Builder clearLastUpdateTime() { - if (lastUpdateTimeBuilder_ == null) { - lastUpdateTime_ = null; - onChanged(); - } else { - lastUpdateTime_ = null; - lastUpdateTimeBuilder_ = null; - } - - 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.
-       * 
- * - * .google.protobuf.Timestamp last_update_time = 2; - */ - public com.google.protobuf.Timestamp.Builder getLastUpdateTimeBuilder() { - - onChanged(); - return getLastUpdateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-       * The last time the experiment's stats data was updated. Will have default
-       * value if stats have never been computed for this experiment.
-       * 
- * - * .google.protobuf.Timestamp last_update_time = 2; - */ - public com.google.protobuf.TimestampOrBuilder getLastUpdateTimeOrBuilder() { - if (lastUpdateTimeBuilder_ != null) { - return lastUpdateTimeBuilder_.getMessageOrBuilder(); - } else { - return lastUpdateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : lastUpdateTime_; - } - } - /** - * - * - *
-       * The last time the experiment's stats data was updated. Will have default
-       * value if stats have never been computed for this experiment.
-       * 
- * - * .google.protobuf.Timestamp last_update_time = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getLastUpdateTimeFieldBuilder() { - if (lastUpdateTimeBuilder_ == null) { - lastUpdateTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getLastUpdateTime(), getParentForChildren(), isClean()); - lastUpdateTime_ = null; - } - return lastUpdateTimeBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.Experiment.Result) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.Experiment.Result) - private static final com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result(); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Result parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Result(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * The name of the experiment.
-   * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/environments/<Environment ID>/experiments/<Experiment ID>..
-   * 
- * - * string name = 1; - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * The name of the experiment.
-   * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/environments/<Environment ID>/experiments/<Experiment ID>..
-   * 
- * - * string name = 1; - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DISPLAY_NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object displayName_; - /** - * - * - *
-   * Required. The human-readable name of the experiment (unique in an environment). Limit
-   * of 64 characters.
-   * 
- * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The displayName. - */ - @java.lang.Override - public java.lang.String getDisplayName() { - java.lang.Object ref = displayName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - displayName_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The human-readable name of the experiment (unique in an environment). Limit
-   * of 64 characters.
-   * 
- * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for displayName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDisplayNameBytes() { - java.lang.Object ref = displayName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - displayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESCRIPTION_FIELD_NUMBER = 3; - private volatile java.lang.Object description_; - /** - * - * - *
-   * The human-readable description of the experiment.
-   * 
- * - * string description = 3; - * - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - * - * - *
-   * The human-readable description of the experiment.
-   * 
- * - * string description = 3; - * - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int STATE_FIELD_NUMBER = 4; - private int state_; - /** - * - * - *
-   * The current state of the experiment.
-   * Transition triggered by Expriments.StartExperiment: PENDING->RUNNING.
-   * Transition triggered by Expriments.CancelExperiment: PENDING->CANCELLED or
-   * RUNNING->CANCELLED.
-   * 
- * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.State state = 4; - * - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override - public int getStateValue() { - return state_; - } - /** - * - * - *
-   * The current state of the experiment.
-   * Transition triggered by Expriments.StartExperiment: PENDING->RUNNING.
-   * Transition triggered by Expriments.CancelExperiment: PENDING->CANCELLED or
-   * RUNNING->CANCELLED.
-   * 
- * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.State state = 4; - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.Experiment.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.dialogflow.cx.v3beta1.Experiment.State result = - com.google.cloud.dialogflow.cx.v3beta1.Experiment.State.valueOf(state_); - return result == null - ? com.google.cloud.dialogflow.cx.v3beta1.Experiment.State.UNRECOGNIZED - : result; - } - - public static final int DEFINITION_FIELD_NUMBER = 5; - private com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition definition_; - /** - * - * - *
-   * The definition of the experiment.
-   * 
- * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.Definition definition = 5; - * - * @return Whether the definition field is set. - */ - @java.lang.Override - public boolean hasDefinition() { - return definition_ != null; - } - /** - * - * - *
-   * The definition of the experiment.
-   * 
- * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.Definition definition = 5; - * - * @return The definition. - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition getDefinition() { - return definition_ == null - ? com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition.getDefaultInstance() - : definition_; - } - /** - * - * - *
-   * The definition of the experiment.
-   * 
- * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.Definition definition = 5; - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.Experiment.DefinitionOrBuilder - getDefinitionOrBuilder() { - return getDefinition(); - } - - public static final int RESULT_FIELD_NUMBER = 6; - private com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result result_; - /** - * - * - *
-   * Inference result of the experiment.
-   * 
- * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result result = 6; - * - * @return Whether the result field is set. - */ - @java.lang.Override - public boolean hasResult() { - return result_ != null; - } - /** - * - * - *
-   * Inference result of the experiment.
-   * 
- * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result result = 6; - * - * @return The result. - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result getResult() { - return result_ == null - ? com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.getDefaultInstance() - : result_; - } - /** - * - * - *
-   * Inference result of the experiment.
-   * 
- * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result result = 6; - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.Experiment.ResultOrBuilder getResultOrBuilder() { - return getResult(); - } - - public static final int CREATE_TIME_FIELD_NUMBER = 7; - private com.google.protobuf.Timestamp createTime_; - /** - * - * - *
-   * Creation time of this experiment.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7; - * - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - * - * - *
-   * Creation time of this experiment.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7; - * - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - * - * - *
-   * Creation time of this experiment.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return getCreateTime(); - } - - public static final int START_TIME_FIELD_NUMBER = 8; - private com.google.protobuf.Timestamp startTime_; - /** - * - * - *
-   * Start time of this experiment.
-   * 
- * - * .google.protobuf.Timestamp start_time = 8; - * - * @return Whether the startTime field is set. - */ - @java.lang.Override - public boolean hasStartTime() { - return startTime_ != null; - } - /** - * - * - *
-   * Start time of this experiment.
-   * 
- * - * .google.protobuf.Timestamp start_time = 8; - * - * @return The startTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getStartTime() { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } - /** - * - * - *
-   * Start time of this experiment.
-   * 
- * - * .google.protobuf.Timestamp start_time = 8; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { - return getStartTime(); - } - - public static final int END_TIME_FIELD_NUMBER = 9; - private com.google.protobuf.Timestamp endTime_; - /** - * - * - *
-   * End time of this experiment.
-   * 
- * - * .google.protobuf.Timestamp end_time = 9; - * - * @return Whether the endTime field is set. - */ - @java.lang.Override - public boolean hasEndTime() { - return endTime_ != null; - } - /** - * - * - *
-   * End time of this experiment.
-   * 
- * - * .google.protobuf.Timestamp end_time = 9; - * - * @return The endTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getEndTime() { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - /** - * - * - *
-   * End time of this experiment.
-   * 
- * - * .google.protobuf.Timestamp end_time = 9; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - return getEndTime(); - } - - public static final int LAST_UPDATE_TIME_FIELD_NUMBER = 10; - private com.google.protobuf.Timestamp lastUpdateTime_; - /** - * - * - *
-   * Last update time of this experiment.
-   * 
- * - * .google.protobuf.Timestamp last_update_time = 10; - * - * @return Whether the lastUpdateTime field is set. - */ - @java.lang.Override - public boolean hasLastUpdateTime() { - return lastUpdateTime_ != null; - } - /** - * - * - *
-   * Last update time of this experiment.
-   * 
- * - * .google.protobuf.Timestamp last_update_time = 10; - * - * @return The lastUpdateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getLastUpdateTime() { - return lastUpdateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : lastUpdateTime_; - } - /** - * - * - *
-   * Last update time of this experiment.
-   * 
- * - * .google.protobuf.Timestamp last_update_time = 10; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getLastUpdateTimeOrBuilder() { - return getLastUpdateTime(); - } - - public static final int EXPERIMENT_LENGTH_FIELD_NUMBER = 11; - private com.google.protobuf.Duration experimentLength_; - /** - * - * - *
-   * Maximum number of days to run the experiment.
-   * 
- * - * .google.protobuf.Duration experiment_length = 11; - * - * @return Whether the experimentLength field is set. - */ - @java.lang.Override - public boolean hasExperimentLength() { - return experimentLength_ != null; - } - /** - * - * - *
-   * Maximum number of days to run the experiment.
-   * 
- * - * .google.protobuf.Duration experiment_length = 11; - * - * @return The experimentLength. - */ - @java.lang.Override - public com.google.protobuf.Duration getExperimentLength() { - return experimentLength_ == null - ? com.google.protobuf.Duration.getDefaultInstance() - : experimentLength_; - } - /** - * - * - *
-   * Maximum number of days to run the experiment.
-   * 
- * - * .google.protobuf.Duration experiment_length = 11; - */ - @java.lang.Override - public com.google.protobuf.DurationOrBuilder getExperimentLengthOrBuilder() { - return getExperimentLength(); - } - - public static final int VARIANTS_HISTORY_FIELD_NUMBER = 12; - private java.util.List variantsHistory_; - /** - * - * - *
-   * The history of updates to the experiment variants.
-   * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.VariantsHistory variants_history = 12; - * - */ - @java.lang.Override - public java.util.List - getVariantsHistoryList() { - return variantsHistory_; - } - /** - * - * - *
-   * The history of updates to the experiment variants.
-   * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.VariantsHistory variants_history = 12; - * - */ - @java.lang.Override - public java.util.List - getVariantsHistoryOrBuilderList() { - return variantsHistory_; - } - /** - * - * - *
-   * The history of updates to the experiment variants.
-   * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.VariantsHistory variants_history = 12; - * - */ - @java.lang.Override - public int getVariantsHistoryCount() { - return variantsHistory_.size(); - } - /** - * - * - *
-   * The history of updates to the experiment variants.
-   * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.VariantsHistory variants_history = 12; - * - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory getVariantsHistory(int index) { - return variantsHistory_.get(index); - } - /** - * - * - *
-   * The history of updates to the experiment variants.
-   * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.VariantsHistory variants_history = 12; - * - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.VariantsHistoryOrBuilder - getVariantsHistoryOrBuilder(int index) { - return variantsHistory_.get(index); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!getDisplayNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); - } - if (!getDescriptionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); - } - if (state_ - != com.google.cloud.dialogflow.cx.v3beta1.Experiment.State.STATE_UNSPECIFIED.getNumber()) { - output.writeEnum(4, state_); - } - if (definition_ != null) { - output.writeMessage(5, getDefinition()); - } - if (result_ != null) { - output.writeMessage(6, getResult()); - } - if (createTime_ != null) { - output.writeMessage(7, getCreateTime()); - } - if (startTime_ != null) { - output.writeMessage(8, getStartTime()); - } - if (endTime_ != null) { - output.writeMessage(9, getEndTime()); - } - if (lastUpdateTime_ != null) { - output.writeMessage(10, getLastUpdateTime()); - } - if (experimentLength_ != null) { - output.writeMessage(11, getExperimentLength()); - } - for (int i = 0; i < variantsHistory_.size(); i++) { - output.writeMessage(12, variantsHistory_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!getDisplayNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); - } - if (!getDescriptionBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); - } - if (state_ - != com.google.cloud.dialogflow.cx.v3beta1.Experiment.State.STATE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, state_); - } - if (definition_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getDefinition()); - } - if (result_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getResult()); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getCreateTime()); - } - if (startTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getStartTime()); - } - if (endTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getEndTime()); - } - if (lastUpdateTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getLastUpdateTime()); - } - if (experimentLength_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getExperimentLength()); - } - for (int i = 0; i < variantsHistory_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, variantsHistory_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.Experiment)) { - return super.equals(obj); - } - com.google.cloud.dialogflow.cx.v3beta1.Experiment other = - (com.google.cloud.dialogflow.cx.v3beta1.Experiment) obj; - - if (!getName().equals(other.getName())) return false; - if (!getDisplayName().equals(other.getDisplayName())) return false; - if (!getDescription().equals(other.getDescription())) return false; - if (state_ != other.state_) return false; - if (hasDefinition() != other.hasDefinition()) return false; - if (hasDefinition()) { - if (!getDefinition().equals(other.getDefinition())) return false; - } - if (hasResult() != other.hasResult()) return false; - if (hasResult()) { - if (!getResult().equals(other.getResult())) return false; - } - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime().equals(other.getCreateTime())) return false; - } - if (hasStartTime() != other.hasStartTime()) return false; - if (hasStartTime()) { - if (!getStartTime().equals(other.getStartTime())) return false; - } - if (hasEndTime() != other.hasEndTime()) return false; - if (hasEndTime()) { - if (!getEndTime().equals(other.getEndTime())) return false; - } - if (hasLastUpdateTime() != other.hasLastUpdateTime()) return false; - if (hasLastUpdateTime()) { - if (!getLastUpdateTime().equals(other.getLastUpdateTime())) return false; - } - if (hasExperimentLength() != other.hasExperimentLength()) return false; - if (hasExperimentLength()) { - if (!getExperimentLength().equals(other.getExperimentLength())) return false; - } - if (!getVariantsHistoryList().equals(other.getVariantsHistoryList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; - hash = (53 * hash) + getDisplayName().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - hash = (37 * hash) + STATE_FIELD_NUMBER; - hash = (53 * hash) + state_; - if (hasDefinition()) { - hash = (37 * hash) + DEFINITION_FIELD_NUMBER; - hash = (53 * hash) + getDefinition().hashCode(); - } - if (hasResult()) { - hash = (37 * hash) + RESULT_FIELD_NUMBER; - hash = (53 * hash) + getResult().hashCode(); - } - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - if (hasStartTime()) { - hash = (37 * hash) + START_TIME_FIELD_NUMBER; - hash = (53 * hash) + getStartTime().hashCode(); - } - if (hasEndTime()) { - hash = (37 * hash) + END_TIME_FIELD_NUMBER; - hash = (53 * hash) + getEndTime().hashCode(); - } - if (hasLastUpdateTime()) { - hash = (37 * hash) + LAST_UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getLastUpdateTime().hashCode(); - } - if (hasExperimentLength()) { - hash = (37 * hash) + EXPERIMENT_LENGTH_FIELD_NUMBER; - hash = (53 * hash) + getExperimentLength().hashCode(); - } - if (getVariantsHistoryCount() > 0) { - hash = (37 * hash) + VARIANTS_HISTORY_FIELD_NUMBER; - hash = (53 * hash) + getVariantsHistoryList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.dialogflow.cx.v3beta1.Experiment prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Represents an experiment in an environment.
-   * Next ID: 13
-   * 
- * - * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Experiment} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.Experiment) - com.google.cloud.dialogflow.cx.v3beta1.ExperimentOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3beta1.Experiment.class, - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Builder.class); - } - - // Construct using com.google.cloud.dialogflow.cx.v3beta1.Experiment.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getVariantsHistoryFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - displayName_ = ""; - - description_ = ""; - - state_ = 0; - - if (definitionBuilder_ == null) { - definition_ = null; - } else { - definition_ = null; - definitionBuilder_ = null; - } - if (resultBuilder_ == null) { - result_ = null; - } else { - result_ = null; - resultBuilder_ = null; - } - if (createTimeBuilder_ == null) { - createTime_ = null; - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - if (startTimeBuilder_ == null) { - startTime_ = null; - } else { - startTime_ = null; - startTimeBuilder_ = null; - } - if (endTimeBuilder_ == null) { - endTime_ = null; - } else { - endTime_ = null; - endTimeBuilder_ = null; - } - if (lastUpdateTimeBuilder_ == null) { - lastUpdateTime_ = null; - } else { - lastUpdateTime_ = null; - lastUpdateTimeBuilder_ = null; - } - if (experimentLengthBuilder_ == null) { - experimentLength_ = null; - } else { - experimentLength_ = null; - experimentLengthBuilder_ = null; - } - if (variantsHistoryBuilder_ == null) { - variantsHistory_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - variantsHistoryBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_descriptor; - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.Experiment getDefaultInstanceForType() { - return com.google.cloud.dialogflow.cx.v3beta1.Experiment.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.Experiment build() { - com.google.cloud.dialogflow.cx.v3beta1.Experiment result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.Experiment buildPartial() { - com.google.cloud.dialogflow.cx.v3beta1.Experiment result = - new com.google.cloud.dialogflow.cx.v3beta1.Experiment(this); - int from_bitField0_ = bitField0_; - result.name_ = name_; - result.displayName_ = displayName_; - result.description_ = description_; - result.state_ = state_; - if (definitionBuilder_ == null) { - result.definition_ = definition_; - } else { - result.definition_ = definitionBuilder_.build(); - } - if (resultBuilder_ == null) { - result.result_ = result_; - } else { - result.result_ = resultBuilder_.build(); - } - if (createTimeBuilder_ == null) { - result.createTime_ = createTime_; - } else { - result.createTime_ = createTimeBuilder_.build(); - } - if (startTimeBuilder_ == null) { - result.startTime_ = startTime_; - } else { - result.startTime_ = startTimeBuilder_.build(); - } - if (endTimeBuilder_ == null) { - result.endTime_ = endTime_; - } else { - result.endTime_ = endTimeBuilder_.build(); - } - if (lastUpdateTimeBuilder_ == null) { - result.lastUpdateTime_ = lastUpdateTime_; - } else { - result.lastUpdateTime_ = lastUpdateTimeBuilder_.build(); - } - if (experimentLengthBuilder_ == null) { - result.experimentLength_ = experimentLength_; - } else { - result.experimentLength_ = experimentLengthBuilder_.build(); - } - if (variantsHistoryBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - variantsHistory_ = java.util.Collections.unmodifiableList(variantsHistory_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.variantsHistory_ = variantsHistory_; - } else { - result.variantsHistory_ = variantsHistoryBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.Experiment) { - return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.Experiment) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.Experiment other) { - if (other == com.google.cloud.dialogflow.cx.v3beta1.Experiment.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getDisplayName().isEmpty()) { - displayName_ = other.displayName_; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - if (other.state_ != 0) { - setStateValue(other.getStateValue()); - } - if (other.hasDefinition()) { - mergeDefinition(other.getDefinition()); - } - if (other.hasResult()) { - mergeResult(other.getResult()); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasStartTime()) { - mergeStartTime(other.getStartTime()); - } - if (other.hasEndTime()) { - mergeEndTime(other.getEndTime()); - } - if (other.hasLastUpdateTime()) { - mergeLastUpdateTime(other.getLastUpdateTime()); - } - if (other.hasExperimentLength()) { - mergeExperimentLength(other.getExperimentLength()); - } - if (variantsHistoryBuilder_ == null) { - if (!other.variantsHistory_.isEmpty()) { - if (variantsHistory_.isEmpty()) { - variantsHistory_ = other.variantsHistory_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureVariantsHistoryIsMutable(); - variantsHistory_.addAll(other.variantsHistory_); - } - onChanged(); - } - } else { - if (!other.variantsHistory_.isEmpty()) { - if (variantsHistoryBuilder_.isEmpty()) { - variantsHistoryBuilder_.dispose(); - variantsHistoryBuilder_ = null; - variantsHistory_ = other.variantsHistory_; - bitField0_ = (bitField0_ & ~0x00000001); - variantsHistoryBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getVariantsHistoryFieldBuilder() - : null; - } else { - variantsHistoryBuilder_.addAllMessages(other.variantsHistory_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.dialogflow.cx.v3beta1.Experiment parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dialogflow.cx.v3beta1.Experiment) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * The name of the experiment.
-     * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>/experiments/<Experiment ID>..
-     * 
- * - * string name = 1; - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The name of the experiment.
-     * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>/experiments/<Experiment ID>..
-     * 
- * - * string name = 1; - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The name of the experiment.
-     * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>/experiments/<Experiment ID>..
-     * 
- * - * string name = 1; - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The name of the experiment.
-     * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>/experiments/<Experiment ID>..
-     * 
- * - * string name = 1; - * - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * - * - *
-     * The name of the experiment.
-     * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>/experiments/<Experiment ID>..
-     * 
- * - * string name = 1; - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object displayName_ = ""; - /** - * - * - *
-     * Required. The human-readable name of the experiment (unique in an environment). Limit
-     * of 64 characters.
-     * 
- * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The displayName. - */ - public java.lang.String getDisplayName() { - java.lang.Object ref = displayName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - displayName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The human-readable name of the experiment (unique in an environment). Limit
-     * of 64 characters.
-     * 
- * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for displayName. - */ - public com.google.protobuf.ByteString getDisplayNameBytes() { - java.lang.Object ref = displayName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - displayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The human-readable name of the experiment (unique in an environment). Limit
-     * of 64 characters.
-     * 
- * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The displayName to set. - * @return This builder for chaining. - */ - public Builder setDisplayName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - displayName_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The human-readable name of the experiment (unique in an environment). Limit
-     * of 64 characters.
-     * 
- * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearDisplayName() { - - displayName_ = getDefaultInstance().getDisplayName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The human-readable name of the experiment (unique in an environment). Limit
-     * of 64 characters.
-     * 
- * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for displayName to set. - * @return This builder for chaining. - */ - public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - displayName_ = value; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - * - * - *
-     * The human-readable description of the experiment.
-     * 
- * - * string description = 3; - * - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The human-readable description of the experiment.
-     * 
- * - * string description = 3; - * - * @return The bytes for description. - */ - public com.google.protobuf.ByteString getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The human-readable description of the experiment.
-     * 
- * - * string description = 3; - * - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The human-readable description of the experiment.
-     * 
- * - * string description = 3; - * - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - * - * - *
-     * The human-readable description of the experiment.
-     * 
- * - * string description = 3; - * - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - description_ = value; - onChanged(); - return this; - } - - private int state_ = 0; - /** - * - * - *
-     * The current state of the experiment.
-     * Transition triggered by Expriments.StartExperiment: PENDING->RUNNING.
-     * Transition triggered by Expriments.CancelExperiment: PENDING->CANCELLED or
-     * RUNNING->CANCELLED.
-     * 
- * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.State state = 4; - * - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override - public int getStateValue() { - return state_; - } - /** - * - * - *
-     * The current state of the experiment.
-     * Transition triggered by Expriments.StartExperiment: PENDING->RUNNING.
-     * Transition triggered by Expriments.CancelExperiment: PENDING->CANCELLED or
-     * RUNNING->CANCELLED.
-     * 
- * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.State state = 4; - * - * @param value The enum numeric value on the wire for state to set. - * @return This builder for chaining. - */ - public Builder setStateValue(int value) { - - state_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The current state of the experiment.
-     * Transition triggered by Expriments.StartExperiment: PENDING->RUNNING.
-     * Transition triggered by Expriments.CancelExperiment: PENDING->CANCELLED or
-     * RUNNING->CANCELLED.
-     * 
- * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.State state = 4; - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.Experiment.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.dialogflow.cx.v3beta1.Experiment.State result = - com.google.cloud.dialogflow.cx.v3beta1.Experiment.State.valueOf(state_); - return result == null - ? com.google.cloud.dialogflow.cx.v3beta1.Experiment.State.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * The current state of the experiment.
-     * Transition triggered by Expriments.StartExperiment: PENDING->RUNNING.
-     * Transition triggered by Expriments.CancelExperiment: PENDING->CANCELLED or
-     * RUNNING->CANCELLED.
-     * 
- * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.State state = 4; - * - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState(com.google.cloud.dialogflow.cx.v3beta1.Experiment.State value) { - if (value == null) { - throw new NullPointerException(); - } - - state_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * The current state of the experiment.
-     * Transition triggered by Expriments.StartExperiment: PENDING->RUNNING.
-     * Transition triggered by Expriments.CancelExperiment: PENDING->CANCELLED or
-     * RUNNING->CANCELLED.
-     * 
- * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.State state = 4; - * - * @return This builder for chaining. - */ - public Builder clearState() { - - state_ = 0; - onChanged(); - return this; - } - - private com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition definition_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition, - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition.Builder, - com.google.cloud.dialogflow.cx.v3beta1.Experiment.DefinitionOrBuilder> - definitionBuilder_; - /** - * - * - *
-     * The definition of the experiment.
-     * 
- * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.Definition definition = 5; - * - * @return Whether the definition field is set. - */ - public boolean hasDefinition() { - return definitionBuilder_ != null || definition_ != null; - } - /** - * - * - *
-     * The definition of the experiment.
-     * 
- * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.Definition definition = 5; - * - * @return The definition. - */ - public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition getDefinition() { - if (definitionBuilder_ == null) { - return definition_ == null - ? com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition.getDefaultInstance() - : definition_; - } else { - return definitionBuilder_.getMessage(); - } - } - /** - * - * - *
-     * The definition of the experiment.
-     * 
- * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.Definition definition = 5; - */ - public Builder setDefinition( - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition value) { - if (definitionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - definition_ = value; - onChanged(); - } else { - definitionBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * The definition of the experiment.
-     * 
- * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.Definition definition = 5; - */ - public Builder setDefinition( - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition.Builder builderForValue) { - if (definitionBuilder_ == null) { - definition_ = builderForValue.build(); - onChanged(); - } else { - definitionBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * The definition of the experiment.
-     * 
- * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.Definition definition = 5; - */ - public Builder mergeDefinition( - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition value) { - if (definitionBuilder_ == null) { - if (definition_ != null) { - definition_ = - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition.newBuilder(definition_) - .mergeFrom(value) - .buildPartial(); - } else { - definition_ = value; - } - onChanged(); - } else { - definitionBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * The definition of the experiment.
-     * 
- * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.Definition definition = 5; - */ - public Builder clearDefinition() { - if (definitionBuilder_ == null) { - definition_ = null; - onChanged(); - } else { - definition_ = null; - definitionBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * The definition of the experiment.
-     * 
- * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.Definition definition = 5; - */ - public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition.Builder - getDefinitionBuilder() { - - onChanged(); - return getDefinitionFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The definition of the experiment.
-     * 
- * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.Definition definition = 5; - */ - public com.google.cloud.dialogflow.cx.v3beta1.Experiment.DefinitionOrBuilder - getDefinitionOrBuilder() { - if (definitionBuilder_ != null) { - return definitionBuilder_.getMessageOrBuilder(); - } else { - return definition_ == null - ? com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition.getDefaultInstance() - : definition_; - } - } - /** - * - * - *
-     * The definition of the experiment.
-     * 
- * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.Definition definition = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition, - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition.Builder, - com.google.cloud.dialogflow.cx.v3beta1.Experiment.DefinitionOrBuilder> - getDefinitionFieldBuilder() { - if (definitionBuilder_ == null) { - definitionBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition, - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition.Builder, - com.google.cloud.dialogflow.cx.v3beta1.Experiment.DefinitionOrBuilder>( - getDefinition(), getParentForChildren(), isClean()); - definition_ = null; - } - return definitionBuilder_; - } - - private com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result result_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result, - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Builder, - com.google.cloud.dialogflow.cx.v3beta1.Experiment.ResultOrBuilder> - resultBuilder_; - /** - * - * - *
-     * Inference result of the experiment.
-     * 
- * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result result = 6; - * - * @return Whether the result field is set. - */ - public boolean hasResult() { - return resultBuilder_ != null || result_ != null; - } - /** - * - * - *
-     * Inference result of the experiment.
-     * 
- * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result result = 6; - * - * @return The result. - */ - public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result getResult() { - if (resultBuilder_ == null) { - return result_ == null - ? com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.getDefaultInstance() - : result_; - } else { - return resultBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Inference result of the experiment.
-     * 
- * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result result = 6; - */ - public Builder setResult(com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result value) { - if (resultBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - result_ = value; - onChanged(); - } else { - resultBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Inference result of the experiment.
-     * 
- * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result result = 6; - */ - public Builder setResult( - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Builder builderForValue) { - if (resultBuilder_ == null) { - result_ = builderForValue.build(); - onChanged(); - } else { - resultBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Inference result of the experiment.
-     * 
- * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result result = 6; - */ - public Builder mergeResult(com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result value) { - if (resultBuilder_ == null) { - if (result_ != null) { - result_ = - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.newBuilder(result_) - .mergeFrom(value) - .buildPartial(); - } else { - result_ = value; - } - onChanged(); - } else { - resultBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Inference result of the experiment.
-     * 
- * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result result = 6; - */ - public Builder clearResult() { - if (resultBuilder_ == null) { - result_ = null; - onChanged(); - } else { - result_ = null; - resultBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Inference result of the experiment.
-     * 
- * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result result = 6; - */ - public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Builder getResultBuilder() { - - onChanged(); - return getResultFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Inference result of the experiment.
-     * 
- * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result result = 6; - */ - public com.google.cloud.dialogflow.cx.v3beta1.Experiment.ResultOrBuilder getResultOrBuilder() { - if (resultBuilder_ != null) { - return resultBuilder_.getMessageOrBuilder(); - } else { - return result_ == null - ? com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.getDefaultInstance() - : result_; - } - } - /** - * - * - *
-     * Inference result of the experiment.
-     * 
- * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result result = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result, - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Builder, - com.google.cloud.dialogflow.cx.v3beta1.Experiment.ResultOrBuilder> - getResultFieldBuilder() { - if (resultBuilder_ == null) { - resultBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result, - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Builder, - com.google.cloud.dialogflow.cx.v3beta1.Experiment.ResultOrBuilder>( - getResult(), getParentForChildren(), isClean()); - result_ = null; - } - return resultBuilder_; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - createTimeBuilder_; - /** - * - * - *
-     * Creation time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7; - * - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return createTimeBuilder_ != null || createTime_ != null; - } - /** - * - * - *
-     * Creation time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7; - * - * @return The createTime. - */ - public com.google.protobuf.Timestamp getCreateTime() { - if (createTimeBuilder_ == null) { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } else { - return createTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Creation time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7; - */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - onChanged(); - } else { - createTimeBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Creation time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7; - */ - public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - onChanged(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Creation time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7; - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (createTime_ != null) { - createTime_ = - com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); - } else { - createTime_ = value; - } - onChanged(); - } else { - createTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Creation time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7; - */ - public Builder clearCreateTime() { - if (createTimeBuilder_ == null) { - createTime_ = null; - onChanged(); - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Creation time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7; - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Creation time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7; - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } - } - /** - * - * - *
-     * Creation time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), getParentForChildren(), isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - - private com.google.protobuf.Timestamp startTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - startTimeBuilder_; - /** - * - * - *
-     * Start time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp start_time = 8; - * - * @return Whether the startTime field is set. - */ - public boolean hasStartTime() { - return startTimeBuilder_ != null || startTime_ != null; - } - /** - * - * - *
-     * Start time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp start_time = 8; - * - * @return The startTime. - */ - public com.google.protobuf.Timestamp getStartTime() { - if (startTimeBuilder_ == null) { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } else { - return startTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Start time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp start_time = 8; - */ - public Builder setStartTime(com.google.protobuf.Timestamp value) { - if (startTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - startTime_ = value; - onChanged(); - } else { - startTimeBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Start time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp start_time = 8; - */ - public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (startTimeBuilder_ == null) { - startTime_ = builderForValue.build(); - onChanged(); - } else { - startTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Start time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp start_time = 8; - */ - public Builder mergeStartTime(com.google.protobuf.Timestamp value) { - if (startTimeBuilder_ == null) { - if (startTime_ != null) { - startTime_ = - com.google.protobuf.Timestamp.newBuilder(startTime_).mergeFrom(value).buildPartial(); - } else { - startTime_ = value; - } - onChanged(); - } else { - startTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Start time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp start_time = 8; - */ - public Builder clearStartTime() { - if (startTimeBuilder_ == null) { - startTime_ = null; - onChanged(); - } else { - startTime_ = null; - startTimeBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Start time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp start_time = 8; - */ - public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { - - onChanged(); - return getStartTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Start time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp start_time = 8; - */ - public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { - if (startTimeBuilder_ != null) { - return startTimeBuilder_.getMessageOrBuilder(); - } else { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } - } - /** - * - * - *
-     * Start time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp start_time = 8; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getStartTimeFieldBuilder() { - if (startTimeBuilder_ == null) { - startTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getStartTime(), getParentForChildren(), isClean()); - startTime_ = null; - } - return startTimeBuilder_; - } - - private com.google.protobuf.Timestamp endTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - endTimeBuilder_; - /** - * - * - *
-     * End time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp end_time = 9; - * - * @return Whether the endTime field is set. - */ - public boolean hasEndTime() { - return endTimeBuilder_ != null || endTime_ != null; - } - /** - * - * - *
-     * End time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp end_time = 9; - * - * @return The endTime. - */ - public com.google.protobuf.Timestamp getEndTime() { - if (endTimeBuilder_ == null) { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } else { - return endTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * End time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp end_time = 9; - */ - public Builder setEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endTime_ = value; - onChanged(); - } else { - endTimeBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * End time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp end_time = 9; - */ - public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (endTimeBuilder_ == null) { - endTime_ = builderForValue.build(); - onChanged(); - } else { - endTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * End time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp end_time = 9; - */ - public Builder mergeEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (endTime_ != null) { - endTime_ = - com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial(); - } else { - endTime_ = value; - } - onChanged(); - } else { - endTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * End time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp end_time = 9; - */ - public Builder clearEndTime() { - if (endTimeBuilder_ == null) { - endTime_ = null; - onChanged(); - } else { - endTime_ = null; - endTimeBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * End time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp end_time = 9; - */ - public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { - - onChanged(); - return getEndTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * End time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp end_time = 9; - */ - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - if (endTimeBuilder_ != null) { - return endTimeBuilder_.getMessageOrBuilder(); - } else { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - } - /** - * - * - *
-     * End time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp end_time = 9; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getEndTimeFieldBuilder() { - if (endTimeBuilder_ == null) { - endTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getEndTime(), getParentForChildren(), isClean()); - endTime_ = null; - } - return endTimeBuilder_; - } - - private com.google.protobuf.Timestamp lastUpdateTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - lastUpdateTimeBuilder_; - /** - * - * - *
-     * Last update time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp last_update_time = 10; - * - * @return Whether the lastUpdateTime field is set. - */ - public boolean hasLastUpdateTime() { - return lastUpdateTimeBuilder_ != null || lastUpdateTime_ != null; - } - /** - * - * - *
-     * Last update time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp last_update_time = 10; - * - * @return The lastUpdateTime. - */ - public com.google.protobuf.Timestamp getLastUpdateTime() { - if (lastUpdateTimeBuilder_ == null) { - return lastUpdateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : lastUpdateTime_; - } else { - return lastUpdateTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Last update time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp last_update_time = 10; - */ - public Builder setLastUpdateTime(com.google.protobuf.Timestamp value) { - if (lastUpdateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - lastUpdateTime_ = value; - onChanged(); - } else { - lastUpdateTimeBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Last update time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp last_update_time = 10; - */ - public Builder setLastUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (lastUpdateTimeBuilder_ == null) { - lastUpdateTime_ = builderForValue.build(); - onChanged(); - } else { - lastUpdateTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Last update time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp last_update_time = 10; - */ - public Builder mergeLastUpdateTime(com.google.protobuf.Timestamp value) { - if (lastUpdateTimeBuilder_ == null) { - if (lastUpdateTime_ != null) { - lastUpdateTime_ = - com.google.protobuf.Timestamp.newBuilder(lastUpdateTime_) - .mergeFrom(value) - .buildPartial(); - } else { - lastUpdateTime_ = value; - } - onChanged(); - } else { - lastUpdateTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Last update time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp last_update_time = 10; - */ - public Builder clearLastUpdateTime() { - if (lastUpdateTimeBuilder_ == null) { - lastUpdateTime_ = null; - onChanged(); - } else { - lastUpdateTime_ = null; - lastUpdateTimeBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Last update time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp last_update_time = 10; - */ - public com.google.protobuf.Timestamp.Builder getLastUpdateTimeBuilder() { - - onChanged(); - return getLastUpdateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Last update time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp last_update_time = 10; - */ - public com.google.protobuf.TimestampOrBuilder getLastUpdateTimeOrBuilder() { - if (lastUpdateTimeBuilder_ != null) { - return lastUpdateTimeBuilder_.getMessageOrBuilder(); - } else { - return lastUpdateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : lastUpdateTime_; - } - } - /** - * - * - *
-     * Last update time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp last_update_time = 10; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getLastUpdateTimeFieldBuilder() { - if (lastUpdateTimeBuilder_ == null) { - lastUpdateTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getLastUpdateTime(), getParentForChildren(), isClean()); - lastUpdateTime_ = null; - } - return lastUpdateTimeBuilder_; - } - - private com.google.protobuf.Duration experimentLength_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Duration, - com.google.protobuf.Duration.Builder, - com.google.protobuf.DurationOrBuilder> - experimentLengthBuilder_; - /** - * - * - *
-     * Maximum number of days to run the experiment.
-     * 
- * - * .google.protobuf.Duration experiment_length = 11; - * - * @return Whether the experimentLength field is set. - */ - public boolean hasExperimentLength() { - return experimentLengthBuilder_ != null || experimentLength_ != null; - } - /** - * - * - *
-     * Maximum number of days to run the experiment.
-     * 
- * - * .google.protobuf.Duration experiment_length = 11; - * - * @return The experimentLength. - */ - public com.google.protobuf.Duration getExperimentLength() { - if (experimentLengthBuilder_ == null) { - return experimentLength_ == null - ? com.google.protobuf.Duration.getDefaultInstance() - : experimentLength_; - } else { - return experimentLengthBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Maximum number of days to run the experiment.
-     * 
- * - * .google.protobuf.Duration experiment_length = 11; - */ - public Builder setExperimentLength(com.google.protobuf.Duration value) { - if (experimentLengthBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - experimentLength_ = value; - onChanged(); - } else { - experimentLengthBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Maximum number of days to run the experiment.
-     * 
- * - * .google.protobuf.Duration experiment_length = 11; - */ - public Builder setExperimentLength(com.google.protobuf.Duration.Builder builderForValue) { - if (experimentLengthBuilder_ == null) { - experimentLength_ = builderForValue.build(); - onChanged(); - } else { - experimentLengthBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Maximum number of days to run the experiment.
-     * 
- * - * .google.protobuf.Duration experiment_length = 11; - */ - public Builder mergeExperimentLength(com.google.protobuf.Duration value) { - if (experimentLengthBuilder_ == null) { - if (experimentLength_ != null) { - experimentLength_ = - com.google.protobuf.Duration.newBuilder(experimentLength_) - .mergeFrom(value) - .buildPartial(); - } else { - experimentLength_ = value; - } - onChanged(); - } else { - experimentLengthBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Maximum number of days to run the experiment.
-     * 
- * - * .google.protobuf.Duration experiment_length = 11; - */ - public Builder clearExperimentLength() { - if (experimentLengthBuilder_ == null) { - experimentLength_ = null; - onChanged(); - } else { - experimentLength_ = null; - experimentLengthBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Maximum number of days to run the experiment.
-     * 
- * - * .google.protobuf.Duration experiment_length = 11; - */ - public com.google.protobuf.Duration.Builder getExperimentLengthBuilder() { - - onChanged(); - return getExperimentLengthFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Maximum number of days to run the experiment.
-     * 
- * - * .google.protobuf.Duration experiment_length = 11; - */ - public com.google.protobuf.DurationOrBuilder getExperimentLengthOrBuilder() { - if (experimentLengthBuilder_ != null) { - return experimentLengthBuilder_.getMessageOrBuilder(); - } else { - return experimentLength_ == null - ? com.google.protobuf.Duration.getDefaultInstance() - : experimentLength_; - } - } - /** - * - * - *
-     * Maximum number of days to run the experiment.
-     * 
- * - * .google.protobuf.Duration experiment_length = 11; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Duration, - com.google.protobuf.Duration.Builder, - com.google.protobuf.DurationOrBuilder> - getExperimentLengthFieldBuilder() { - if (experimentLengthBuilder_ == null) { - experimentLengthBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Duration, - com.google.protobuf.Duration.Builder, - com.google.protobuf.DurationOrBuilder>( - getExperimentLength(), getParentForChildren(), isClean()); - experimentLength_ = null; - } - return experimentLengthBuilder_; - } - - private java.util.List - variantsHistory_ = java.util.Collections.emptyList(); - - private void ensureVariantsHistoryIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - variantsHistory_ = - new java.util.ArrayList( - variantsHistory_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory, - com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory.Builder, - com.google.cloud.dialogflow.cx.v3beta1.VariantsHistoryOrBuilder> - variantsHistoryBuilder_; - - /** - * - * - *
-     * The history of updates to the experiment variants.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.VariantsHistory variants_history = 12; - * - */ - public java.util.List - getVariantsHistoryList() { - if (variantsHistoryBuilder_ == null) { - return java.util.Collections.unmodifiableList(variantsHistory_); - } else { - return variantsHistoryBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * The history of updates to the experiment variants.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.VariantsHistory variants_history = 12; - * - */ - public int getVariantsHistoryCount() { - if (variantsHistoryBuilder_ == null) { - return variantsHistory_.size(); - } else { - return variantsHistoryBuilder_.getCount(); - } - } - /** - * - * - *
-     * The history of updates to the experiment variants.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.VariantsHistory variants_history = 12; - * - */ - public com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory getVariantsHistory(int index) { - if (variantsHistoryBuilder_ == null) { - return variantsHistory_.get(index); - } else { - return variantsHistoryBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * The history of updates to the experiment variants.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.VariantsHistory variants_history = 12; - * - */ - public Builder setVariantsHistory( - int index, com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory value) { - if (variantsHistoryBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVariantsHistoryIsMutable(); - variantsHistory_.set(index, value); - onChanged(); - } else { - variantsHistoryBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The history of updates to the experiment variants.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.VariantsHistory variants_history = 12; - * - */ - public Builder setVariantsHistory( - int index, com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory.Builder builderForValue) { - if (variantsHistoryBuilder_ == null) { - ensureVariantsHistoryIsMutable(); - variantsHistory_.set(index, builderForValue.build()); - onChanged(); - } else { - variantsHistoryBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The history of updates to the experiment variants.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.VariantsHistory variants_history = 12; - * - */ - public Builder addVariantsHistory( - com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory value) { - if (variantsHistoryBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVariantsHistoryIsMutable(); - variantsHistory_.add(value); - onChanged(); - } else { - variantsHistoryBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * The history of updates to the experiment variants.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.VariantsHistory variants_history = 12; - * - */ - public Builder addVariantsHistory( - int index, com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory value) { - if (variantsHistoryBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVariantsHistoryIsMutable(); - variantsHistory_.add(index, value); - onChanged(); - } else { - variantsHistoryBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The history of updates to the experiment variants.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.VariantsHistory variants_history = 12; - * - */ - public Builder addVariantsHistory( - com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory.Builder builderForValue) { - if (variantsHistoryBuilder_ == null) { - ensureVariantsHistoryIsMutable(); - variantsHistory_.add(builderForValue.build()); - onChanged(); - } else { - variantsHistoryBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The history of updates to the experiment variants.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.VariantsHistory variants_history = 12; - * - */ - public Builder addVariantsHistory( - int index, com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory.Builder builderForValue) { - if (variantsHistoryBuilder_ == null) { - ensureVariantsHistoryIsMutable(); - variantsHistory_.add(index, builderForValue.build()); - onChanged(); - } else { - variantsHistoryBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The history of updates to the experiment variants.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.VariantsHistory variants_history = 12; - * - */ - public Builder addAllVariantsHistory( - java.lang.Iterable - values) { - if (variantsHistoryBuilder_ == null) { - ensureVariantsHistoryIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, variantsHistory_); - onChanged(); - } else { - variantsHistoryBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * The history of updates to the experiment variants.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.VariantsHistory variants_history = 12; - * - */ - public Builder clearVariantsHistory() { - if (variantsHistoryBuilder_ == null) { - variantsHistory_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - variantsHistoryBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * The history of updates to the experiment variants.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.VariantsHistory variants_history = 12; - * - */ - public Builder removeVariantsHistory(int index) { - if (variantsHistoryBuilder_ == null) { - ensureVariantsHistoryIsMutable(); - variantsHistory_.remove(index); - onChanged(); - } else { - variantsHistoryBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * The history of updates to the experiment variants.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.VariantsHistory variants_history = 12; - * - */ - public com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory.Builder getVariantsHistoryBuilder( - int index) { - return getVariantsHistoryFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * The history of updates to the experiment variants.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.VariantsHistory variants_history = 12; - * - */ - public com.google.cloud.dialogflow.cx.v3beta1.VariantsHistoryOrBuilder - getVariantsHistoryOrBuilder(int index) { - if (variantsHistoryBuilder_ == null) { - return variantsHistory_.get(index); - } else { - return variantsHistoryBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * The history of updates to the experiment variants.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.VariantsHistory variants_history = 12; - * - */ - public java.util.List - getVariantsHistoryOrBuilderList() { - if (variantsHistoryBuilder_ != null) { - return variantsHistoryBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(variantsHistory_); - } - } - /** - * - * - *
-     * The history of updates to the experiment variants.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.VariantsHistory variants_history = 12; - * - */ - public com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory.Builder - addVariantsHistoryBuilder() { - return getVariantsHistoryFieldBuilder() - .addBuilder(com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory.getDefaultInstance()); - } - /** - * - * - *
-     * The history of updates to the experiment variants.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.VariantsHistory variants_history = 12; - * - */ - public com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory.Builder addVariantsHistoryBuilder( - int index) { - return getVariantsHistoryFieldBuilder() - .addBuilder( - index, com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory.getDefaultInstance()); - } - /** - * - * - *
-     * The history of updates to the experiment variants.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.VariantsHistory variants_history = 12; - * - */ - public java.util.List - getVariantsHistoryBuilderList() { - return getVariantsHistoryFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory, - com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory.Builder, - com.google.cloud.dialogflow.cx.v3beta1.VariantsHistoryOrBuilder> - getVariantsHistoryFieldBuilder() { - if (variantsHistoryBuilder_ == null) { - variantsHistoryBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory, - com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory.Builder, - com.google.cloud.dialogflow.cx.v3beta1.VariantsHistoryOrBuilder>( - variantsHistory_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - variantsHistory_ = null; - } - return variantsHistoryBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.Experiment) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.Experiment) - private static final com.google.cloud.dialogflow.cx.v3beta1.Experiment DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.Experiment(); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.Experiment getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Experiment parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Experiment(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.Experiment getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentOrBuilder.java deleted file mode 100644 index 16ff2aa8c..000000000 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentOrBuilder.java +++ /dev/null @@ -1,440 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dialogflow/cx/v3beta1/experiment.proto - -package com.google.cloud.dialogflow.cx.v3beta1; - -public interface ExperimentOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.Experiment) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The name of the experiment.
-   * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/environments/<Environment ID>/experiments/<Experiment ID>..
-   * 
- * - * string name = 1; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * The name of the experiment.
-   * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/environments/<Environment ID>/experiments/<Experiment ID>..
-   * 
- * - * string name = 1; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Required. The human-readable name of the experiment (unique in an environment). Limit
-   * of 64 characters.
-   * 
- * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The displayName. - */ - java.lang.String getDisplayName(); - /** - * - * - *
-   * Required. The human-readable name of the experiment (unique in an environment). Limit
-   * of 64 characters.
-   * 
- * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for displayName. - */ - com.google.protobuf.ByteString getDisplayNameBytes(); - - /** - * - * - *
-   * The human-readable description of the experiment.
-   * 
- * - * string description = 3; - * - * @return The description. - */ - java.lang.String getDescription(); - /** - * - * - *
-   * The human-readable description of the experiment.
-   * 
- * - * string description = 3; - * - * @return The bytes for description. - */ - com.google.protobuf.ByteString getDescriptionBytes(); - - /** - * - * - *
-   * The current state of the experiment.
-   * Transition triggered by Expriments.StartExperiment: PENDING->RUNNING.
-   * Transition triggered by Expriments.CancelExperiment: PENDING->CANCELLED or
-   * RUNNING->CANCELLED.
-   * 
- * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.State state = 4; - * - * @return The enum numeric value on the wire for state. - */ - int getStateValue(); - /** - * - * - *
-   * The current state of the experiment.
-   * Transition triggered by Expriments.StartExperiment: PENDING->RUNNING.
-   * Transition triggered by Expriments.CancelExperiment: PENDING->CANCELLED or
-   * RUNNING->CANCELLED.
-   * 
- * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.State state = 4; - * - * @return The state. - */ - com.google.cloud.dialogflow.cx.v3beta1.Experiment.State getState(); - - /** - * - * - *
-   * The definition of the experiment.
-   * 
- * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.Definition definition = 5; - * - * @return Whether the definition field is set. - */ - boolean hasDefinition(); - /** - * - * - *
-   * The definition of the experiment.
-   * 
- * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.Definition definition = 5; - * - * @return The definition. - */ - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition getDefinition(); - /** - * - * - *
-   * The definition of the experiment.
-   * 
- * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.Definition definition = 5; - */ - com.google.cloud.dialogflow.cx.v3beta1.Experiment.DefinitionOrBuilder getDefinitionOrBuilder(); - - /** - * - * - *
-   * Inference result of the experiment.
-   * 
- * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result result = 6; - * - * @return Whether the result field is set. - */ - boolean hasResult(); - /** - * - * - *
-   * Inference result of the experiment.
-   * 
- * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result result = 6; - * - * @return The result. - */ - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result getResult(); - /** - * - * - *
-   * Inference result of the experiment.
-   * 
- * - * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result result = 6; - */ - com.google.cloud.dialogflow.cx.v3beta1.Experiment.ResultOrBuilder getResultOrBuilder(); - - /** - * - * - *
-   * Creation time of this experiment.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7; - * - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - * - * - *
-   * Creation time of this experiment.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7; - * - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - * - * - *
-   * Creation time of this experiment.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7; - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - * - * - *
-   * Start time of this experiment.
-   * 
- * - * .google.protobuf.Timestamp start_time = 8; - * - * @return Whether the startTime field is set. - */ - boolean hasStartTime(); - /** - * - * - *
-   * Start time of this experiment.
-   * 
- * - * .google.protobuf.Timestamp start_time = 8; - * - * @return The startTime. - */ - com.google.protobuf.Timestamp getStartTime(); - /** - * - * - *
-   * Start time of this experiment.
-   * 
- * - * .google.protobuf.Timestamp start_time = 8; - */ - com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); - - /** - * - * - *
-   * End time of this experiment.
-   * 
- * - * .google.protobuf.Timestamp end_time = 9; - * - * @return Whether the endTime field is set. - */ - boolean hasEndTime(); - /** - * - * - *
-   * End time of this experiment.
-   * 
- * - * .google.protobuf.Timestamp end_time = 9; - * - * @return The endTime. - */ - com.google.protobuf.Timestamp getEndTime(); - /** - * - * - *
-   * End time of this experiment.
-   * 
- * - * .google.protobuf.Timestamp end_time = 9; - */ - com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); - - /** - * - * - *
-   * Last update time of this experiment.
-   * 
- * - * .google.protobuf.Timestamp last_update_time = 10; - * - * @return Whether the lastUpdateTime field is set. - */ - boolean hasLastUpdateTime(); - /** - * - * - *
-   * Last update time of this experiment.
-   * 
- * - * .google.protobuf.Timestamp last_update_time = 10; - * - * @return The lastUpdateTime. - */ - com.google.protobuf.Timestamp getLastUpdateTime(); - /** - * - * - *
-   * Last update time of this experiment.
-   * 
- * - * .google.protobuf.Timestamp last_update_time = 10; - */ - com.google.protobuf.TimestampOrBuilder getLastUpdateTimeOrBuilder(); - - /** - * - * - *
-   * Maximum number of days to run the experiment.
-   * 
- * - * .google.protobuf.Duration experiment_length = 11; - * - * @return Whether the experimentLength field is set. - */ - boolean hasExperimentLength(); - /** - * - * - *
-   * Maximum number of days to run the experiment.
-   * 
- * - * .google.protobuf.Duration experiment_length = 11; - * - * @return The experimentLength. - */ - com.google.protobuf.Duration getExperimentLength(); - /** - * - * - *
-   * Maximum number of days to run the experiment.
-   * 
- * - * .google.protobuf.Duration experiment_length = 11; - */ - com.google.protobuf.DurationOrBuilder getExperimentLengthOrBuilder(); - - /** - * - * - *
-   * The history of updates to the experiment variants.
-   * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.VariantsHistory variants_history = 12; - * - */ - java.util.List getVariantsHistoryList(); - /** - * - * - *
-   * The history of updates to the experiment variants.
-   * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.VariantsHistory variants_history = 12; - * - */ - com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory getVariantsHistory(int index); - /** - * - * - *
-   * The history of updates to the experiment variants.
-   * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.VariantsHistory variants_history = 12; - * - */ - int getVariantsHistoryCount(); - /** - * - * - *
-   * The history of updates to the experiment variants.
-   * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.VariantsHistory variants_history = 12; - * - */ - java.util.List - getVariantsHistoryOrBuilderList(); - /** - * - * - *
-   * The history of updates to the experiment variants.
-   * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.VariantsHistory variants_history = 12; - * - */ - com.google.cloud.dialogflow.cx.v3beta1.VariantsHistoryOrBuilder getVariantsHistoryOrBuilder( - int index); -} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentProto.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentProto.java deleted file mode 100644 index 2df16da30..000000000 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentProto.java +++ /dev/null @@ -1,436 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dialogflow/cx/v3beta1/experiment.proto - -package com.google.cloud.dialogflow.cx.v3beta1; - -public final class ExperimentProto { - private ExperimentProto() {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); - } - - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Definition_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Definition_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_ConfidenceInterval_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_ConfidenceInterval_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_Metric_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_Metric_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_VersionMetrics_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_VersionMetrics_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dialogflow_cx_v3beta1_VersionVariants_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dialogflow_cx_v3beta1_VersionVariants_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dialogflow_cx_v3beta1_VersionVariants_Variant_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dialogflow_cx_v3beta1_VersionVariants_Variant_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dialogflow_cx_v3beta1_VariantsHistory_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dialogflow_cx_v3beta1_VariantsHistory_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dialogflow_cx_v3beta1_ListExperimentsRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dialogflow_cx_v3beta1_ListExperimentsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dialogflow_cx_v3beta1_ListExperimentsResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dialogflow_cx_v3beta1_ListExperimentsResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dialogflow_cx_v3beta1_GetExperimentRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dialogflow_cx_v3beta1_GetExperimentRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dialogflow_cx_v3beta1_CreateExperimentRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dialogflow_cx_v3beta1_CreateExperimentRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateExperimentRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateExperimentRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dialogflow_cx_v3beta1_DeleteExperimentRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dialogflow_cx_v3beta1_DeleteExperimentRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dialogflow_cx_v3beta1_StartExperimentRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dialogflow_cx_v3beta1_StartExperimentRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dialogflow_cx_v3beta1_StopExperimentRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dialogflow_cx_v3beta1_StopExperimentRequest_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - - static { - java.lang.String[] descriptorData = { - "\n3google/cloud/dialogflow/cx/v3beta1/exp" - + "eriment.proto\022\"google.cloud.dialogflow.c" - + "x.v3beta1\032\034google/api/annotations.proto\032" - + "\027google/api/client.proto\032\037google/api/fie" - + "ld_behavior.proto\032\031google/api/resource.p" - + "roto\032\036google/protobuf/duration.proto\032\033go" - + "ogle/protobuf/empty.proto\032 google/protob" - + "uf/field_mask.proto\032\037google/protobuf/tim" - + "estamp.proto\"\230\016\n\nExperiment\022\014\n\004name\030\001 \001(" - + "\t\022\031\n\014display_name\030\002 \001(\tB\003\340A\002\022\023\n\013descript" - + "ion\030\003 \001(\t\022C\n\005state\030\004 \001(\01624.google.cloud." - + "dialogflow.cx.v3beta1.Experiment.State\022M" - + "\n\ndefinition\030\005 \001(\01329.google.cloud.dialog" - + "flow.cx.v3beta1.Experiment.Definition\022E\n" - + "\006result\030\006 \001(\01325.google.cloud.dialogflow." - + "cx.v3beta1.Experiment.Result\022/\n\013create_t" - + "ime\030\007 \001(\0132\032.google.protobuf.Timestamp\022.\n" - + "\nstart_time\030\010 \001(\0132\032.google.protobuf.Time" - + "stamp\022,\n\010end_time\030\t \001(\0132\032.google.protobu" - + "f.Timestamp\0224\n\020last_update_time\030\n \001(\0132\032." - + "google.protobuf.Timestamp\0224\n\021experiment_" - + "length\030\013 \001(\0132\031.google.protobuf.Duration\022" - + "M\n\020variants_history\030\014 \003(\01323.google.cloud" - + ".dialogflow.cx.v3beta1.VariantsHistory\032|" - + "\n\nDefinition\022\021\n\tcondition\030\001 \001(\t\022O\n\020versi" - + "on_variants\030\002 \001(\01323.google.cloud.dialogf" - + "low.cx.v3beta1.VersionVariantsH\000B\n\n\010vari" - + "ants\032\315\006\n\006Result\022]\n\017version_metrics\030\001 \003(\013" - + "2D.google.cloud.dialogflow.cx.v3beta1.Ex" - + "periment.Result.VersionMetrics\0224\n\020last_u" - + "pdate_time\030\002 \001(\0132\032.google.protobuf.Times" - + "tamp\032g\n\022ConfidenceInterval\022\030\n\020confidence" - + "_level\030\001 \001(\001\022\r\n\005ratio\030\002 \001(\001\022\023\n\013lower_bou" - + "nd\030\003 \001(\001\022\023\n\013upper_bound\030\004 \001(\001\032\331\001\n\006Metric" - + "\022N\n\004type\030\001 \001(\0162@.google.cloud.dialogflow" - + ".cx.v3beta1.Experiment.Result.MetricType" - + "\022\017\n\005ratio\030\002 \001(\001H\000\022e\n\023confidence_interval" - + "\030\003 \001(\0132H.google.cloud.dialogflow.cx.v3be" - + "ta1.Experiment.Result.ConfidenceInterval" - + "B\007\n\005value\032\257\001\n\016VersionMetrics\0227\n\007version\030" - + "\001 \001(\tB&\372A#\n!dialogflow.googleapis.com/Ve" - + "rsion\022M\n\007metrics\030\002 \003(\0132<.google.cloud.di" - + "alogflow.cx.v3beta1.Experiment.Result.Me" - + "tric\022\025\n\rsession_count\030\003 \001(\005\"\266\001\n\nMetricTy" - + "pe\022\026\n\022METRIC_UNSPECIFIED\020\000\022&\n\"CONTAINED_" - + "SESSION_NO_CALLBACK_RATE\020\001\022\033\n\027LIVE_AGENT" - + "_HANDOFF_RATE\020\002\022\031\n\025CALLBACK_SESSION_RATE" - + "\020\003\022\032\n\026ABANDONED_SESSION_RATE\020\004\022\024\n\020SESSIO" - + "N_END_RATE\020\005\"@\n\005State\022\025\n\021STATE_UNSPECIFI" - + "ED\020\000\022\t\n\005DRAFT\020\001\022\013\n\007RUNNING\020\002\022\010\n\004DONE\020\003:\226" - + "\001\352A\222\001\n$dialogflow.googleapis.com/Experim" - + "ent\022jprojects/{project}/locations/{locat" - + "ion}/agents/{agent}/environments/{enviro" - + "nment}/experiments/{experiment}\"\262\001\n\017Vers" - + "ionVariants\022M\n\010variants\030\001 \003(\0132;.google.c" - + "loud.dialogflow.cx.v3beta1.VersionVarian" - + "ts.Variant\032P\n\007Variant\022\017\n\007version\030\001 \001(\t\022\032" - + "\n\022traffic_allocation\030\002 \001(\002\022\030\n\020is_control" - + "_group\030\003 \001(\010\"\237\001\n\017VariantsHistory\022O\n\020vers" - + "ion_variants\030\001 \001(\01323.google.cloud.dialog" - + "flow.cx.v3beta1.VersionVariantsH\000\022/\n\013upd" - + "ate_time\030\002 \001(\0132\032.google.protobuf.Timesta" - + "mpB\n\n\010variants\"}\n\026ListExperimentsRequest" - + "\022<\n\006parent\030\001 \001(\tB,\340A\002\372A&\022$dialogflow.goo" - + "gleapis.com/Experiment\022\021\n\tpage_size\030\002 \001(" - + "\005\022\022\n\npage_token\030\003 \001(\t\"w\n\027ListExperiments" - + "Response\022C\n\013experiments\030\001 \003(\0132..google.c" - + "loud.dialogflow.cx.v3beta1.Experiment\022\027\n" - + "\017next_page_token\030\002 \001(\t\"R\n\024GetExperimentR" - + "equest\022:\n\004name\030\001 \001(\tB,\340A\002\372A&\n$dialogflow" - + ".googleapis.com/Experiment\"\240\001\n\027CreateExp" - + "erimentRequest\022<\n\006parent\030\001 \001(\tB,\340A\002\372A&\022$" - + "dialogflow.googleapis.com/Experiment\022G\n\n" - + "experiment\030\002 \001(\0132..google.cloud.dialogfl" - + "ow.cx.v3beta1.ExperimentB\003\340A\002\"\230\001\n\027Update" - + "ExperimentRequest\022G\n\nexperiment\030\001 \001(\0132.." - + "google.cloud.dialogflow.cx.v3beta1.Exper" - + "imentB\003\340A\002\0224\n\013update_mask\030\002 \001(\0132\032.google" - + ".protobuf.FieldMaskB\003\340A\002\"U\n\027DeleteExperi" - + "mentRequest\022:\n\004name\030\001 \001(\tB,\340A\002\372A&\n$dialo" - + "gflow.googleapis.com/Experiment\"T\n\026Start" - + "ExperimentRequest\022:\n\004name\030\001 \001(\tB,\340A\002\372A&\n" - + "$dialogflow.googleapis.com/Experiment\"S\n" - + "\025StopExperimentRequest\022:\n\004name\030\001 \001(\tB,\340A" - + "\002\372A&\n$dialogflow.googleapis.com/Experime" - + "nt2\335\r\n\013Experiments\022\351\001\n\017ListExperiments\022:" - + ".google.cloud.dialogflow.cx.v3beta1.List" - + "ExperimentsRequest\032;.google.cloud.dialog" - + "flow.cx.v3beta1.ListExperimentsResponse\"" - + "]\202\323\344\223\002N\022L/v3beta1/{parent=projects/*/loc" - + "ations/*/agents/*/environments/*}/experi" - + "ments\332A\006parent\022\326\001\n\rGetExperiment\0228.googl" - + "e.cloud.dialogflow.cx.v3beta1.GetExperim" - + "entRequest\032..google.cloud.dialogflow.cx." - + "v3beta1.Experiment\"[\202\323\344\223\002N\022L/v3beta1/{na" - + "me=projects/*/locations/*/agents/*/envir" - + "onments/*/experiments/*}\332A\004name\022\365\001\n\020Crea" - + "teExperiment\022;.google.cloud.dialogflow.c" - + "x.v3beta1.CreateExperimentRequest\032..goog" - + "le.cloud.dialogflow.cx.v3beta1.Experimen" - + "t\"t\202\323\344\223\002Z\"L/v3beta1/{parent=projects/*/l" - + "ocations/*/agents/*/environments/*}/expe" - + "riments:\nexperiment\332A\021parent,experiment\022" - + "\206\002\n\020UpdateExperiment\022;.google.cloud.dial" - + "ogflow.cx.v3beta1.UpdateExperimentReques" - + "t\032..google.cloud.dialogflow.cx.v3beta1.E" - + "xperiment\"\204\001\202\323\344\223\002e2W/v3beta1/{experiment" - + ".name=projects/*/locations/*/agents/*/en" - + "vironments/*/experiments/*}:\nexperiment\332" - + "A\026experiment,update_mask\022\304\001\n\020DeleteExper" - + "iment\022;.google.cloud.dialogflow.cx.v3bet" - + "a1.DeleteExperimentRequest\032\026.google.prot" - + "obuf.Empty\"[\202\323\344\223\002N*L/v3beta1/{name=proje" - + "cts/*/locations/*/agents/*/environments/" - + "*/experiments/*}\332A\004name\022\343\001\n\017StartExperim" - + "ent\022:.google.cloud.dialogflow.cx.v3beta1" - + ".StartExperimentRequest\032..google.cloud.d" - + "ialogflow.cx.v3beta1.Experiment\"d\202\323\344\223\002W\"" - + "R/v3beta1/{name=projects/*/locations/*/a" - + "gents/*/environments/*/experiments/*}:st" - + "art:\001*\332A\004name\022\340\001\n\016StopExperiment\0229.googl" - + "e.cloud.dialogflow.cx.v3beta1.StopExperi" - + "mentRequest\032..google.cloud.dialogflow.cx" - + ".v3beta1.Experiment\"c\202\323\344\223\002V\"Q/v3beta1/{n" - + "ame=projects/*/locations/*/agents/*/envi" - + "ronments/*/experiments/*}:stop:\001*\332A\004name" - + "\032x\312A\031dialogflow.googleapis.com\322AYhttps:/" - + "/www.googleapis.com/auth/cloud-platform," - + "https://www.googleapis.com/auth/dialogfl" - + "owB\256\001\n&com.google.cloud.dialogflow.cx.v3" - + "beta1B\017ExperimentProtoP\001ZDgoogle.golang." - + "org/genproto/googleapis/cloud/dialogflow" - + "/cx/v3beta1;cx\370\001\001\242\002\002DF\252\002\"Google.Cloud.Di" - + "alogflow.Cx.V3Beta1b\006proto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), - com.google.api.ClientProto.getDescriptor(), - com.google.api.FieldBehaviorProto.getDescriptor(), - com.google.api.ResourceProto.getDescriptor(), - com.google.protobuf.DurationProto.getDescriptor(), - com.google.protobuf.EmptyProto.getDescriptor(), - com.google.protobuf.FieldMaskProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - }); - internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_descriptor, - new java.lang.String[] { - "Name", - "DisplayName", - "Description", - "State", - "Definition", - "Result", - "CreateTime", - "StartTime", - "EndTime", - "LastUpdateTime", - "ExperimentLength", - "VariantsHistory", - }); - internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Definition_descriptor = - internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_descriptor - .getNestedTypes() - .get(0); - internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Definition_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Definition_descriptor, - new java.lang.String[] { - "Condition", "VersionVariants", "Variants", - }); - internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_descriptor = - internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_descriptor - .getNestedTypes() - .get(1); - internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_descriptor, - new java.lang.String[] { - "VersionMetrics", "LastUpdateTime", - }); - internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_ConfidenceInterval_descriptor = - internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_descriptor - .getNestedTypes() - .get(0); - internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_ConfidenceInterval_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_ConfidenceInterval_descriptor, - new java.lang.String[] { - "ConfidenceLevel", "Ratio", "LowerBound", "UpperBound", - }); - internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_Metric_descriptor = - internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_descriptor - .getNestedTypes() - .get(1); - internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_Metric_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_Metric_descriptor, - new java.lang.String[] { - "Type", "Ratio", "ConfidenceInterval", "Value", - }); - internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_VersionMetrics_descriptor = - internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_descriptor - .getNestedTypes() - .get(2); - internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_VersionMetrics_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_VersionMetrics_descriptor, - new java.lang.String[] { - "Version", "Metrics", "SessionCount", - }); - internal_static_google_cloud_dialogflow_cx_v3beta1_VersionVariants_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_dialogflow_cx_v3beta1_VersionVariants_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dialogflow_cx_v3beta1_VersionVariants_descriptor, - new java.lang.String[] { - "Variants", - }); - internal_static_google_cloud_dialogflow_cx_v3beta1_VersionVariants_Variant_descriptor = - internal_static_google_cloud_dialogflow_cx_v3beta1_VersionVariants_descriptor - .getNestedTypes() - .get(0); - internal_static_google_cloud_dialogflow_cx_v3beta1_VersionVariants_Variant_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dialogflow_cx_v3beta1_VersionVariants_Variant_descriptor, - new java.lang.String[] { - "Version", "TrafficAllocation", "IsControlGroup", - }); - internal_static_google_cloud_dialogflow_cx_v3beta1_VariantsHistory_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_dialogflow_cx_v3beta1_VariantsHistory_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dialogflow_cx_v3beta1_VariantsHistory_descriptor, - new java.lang.String[] { - "VersionVariants", "UpdateTime", "Variants", - }); - internal_static_google_cloud_dialogflow_cx_v3beta1_ListExperimentsRequest_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_dialogflow_cx_v3beta1_ListExperimentsRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dialogflow_cx_v3beta1_ListExperimentsRequest_descriptor, - new java.lang.String[] { - "Parent", "PageSize", "PageToken", - }); - internal_static_google_cloud_dialogflow_cx_v3beta1_ListExperimentsResponse_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_cloud_dialogflow_cx_v3beta1_ListExperimentsResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dialogflow_cx_v3beta1_ListExperimentsResponse_descriptor, - new java.lang.String[] { - "Experiments", "NextPageToken", - }); - internal_static_google_cloud_dialogflow_cx_v3beta1_GetExperimentRequest_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_google_cloud_dialogflow_cx_v3beta1_GetExperimentRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dialogflow_cx_v3beta1_GetExperimentRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_cloud_dialogflow_cx_v3beta1_CreateExperimentRequest_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_google_cloud_dialogflow_cx_v3beta1_CreateExperimentRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dialogflow_cx_v3beta1_CreateExperimentRequest_descriptor, - new java.lang.String[] { - "Parent", "Experiment", - }); - internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateExperimentRequest_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateExperimentRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateExperimentRequest_descriptor, - new java.lang.String[] { - "Experiment", "UpdateMask", - }); - internal_static_google_cloud_dialogflow_cx_v3beta1_DeleteExperimentRequest_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_google_cloud_dialogflow_cx_v3beta1_DeleteExperimentRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dialogflow_cx_v3beta1_DeleteExperimentRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_cloud_dialogflow_cx_v3beta1_StartExperimentRequest_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_google_cloud_dialogflow_cx_v3beta1_StartExperimentRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dialogflow_cx_v3beta1_StartExperimentRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_cloud_dialogflow_cx_v3beta1_StopExperimentRequest_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_google_cloud_dialogflow_cx_v3beta1_StopExperimentRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dialogflow_cx_v3beta1_StopExperimentRequest_descriptor, - new java.lang.String[] { - "Name", - }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.ClientProto.defaultHost); - registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); - registry.add(com.google.api.AnnotationsProto.http); - registry.add(com.google.api.ClientProto.methodSignature); - registry.add(com.google.api.ClientProto.oauthScopes); - registry.add(com.google.api.ResourceProto.resource); - registry.add(com.google.api.ResourceProto.resourceReference); - com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( - descriptor, registry); - com.google.api.AnnotationsProto.getDescriptor(); - com.google.api.ClientProto.getDescriptor(); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.api.ResourceProto.getDescriptor(); - com.google.protobuf.DurationProto.getDescriptor(); - com.google.protobuf.EmptyProto.getDescriptor(); - com.google.protobuf.FieldMaskProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportAgentRequest.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportAgentRequest.java index df969dcfe..27b117424 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportAgentRequest.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportAgentRequest.java @@ -22,8 +22,7 @@ * * *
- * The request message for
- * [Agents.ExportAgent][google.cloud.dialogflow.cx.v3beta1.Agents.ExportAgent].
+ * The request message for [Agents.ExportAgent][google.cloud.dialogflow.cx.v3beta1.Agents.ExportAgent].
  * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest} @@ -181,10 +180,10 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-   * 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://<bucket-name>/<object-name>`. If
-   * left unspecified, the serialized agent is returned inline.
+   * 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://<bucket-name>/<object-name>`.
+   * If left unspecified, the serialized agent is returned inline.
    * 
* * string agent_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -207,10 +206,10 @@ public java.lang.String getAgentUri() { * * *
-   * 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://<bucket-name>/<object-name>`. If
-   * left unspecified, the serialized agent is returned inline.
+   * 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://<bucket-name>/<object-name>`.
+   * If left unspecified, the serialized agent is returned inline.
    * 
* * string agent_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -403,8 +402,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The request message for
-   * [Agents.ExportAgent][google.cloud.dialogflow.cx.v3beta1.Agents.ExportAgent].
+   * The request message for [Agents.ExportAgent][google.cloud.dialogflow.cx.v3beta1.Agents.ExportAgent].
    * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest} @@ -692,10 +690,10 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * * *
-     * 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://<bucket-name>/<object-name>`. If
-     * left unspecified, the serialized agent is returned inline.
+     * 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://<bucket-name>/<object-name>`.
+     * If left unspecified, the serialized agent is returned inline.
      * 
* * string agent_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -717,10 +715,10 @@ public java.lang.String getAgentUri() { * * *
-     * 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://<bucket-name>/<object-name>`. If
-     * left unspecified, the serialized agent is returned inline.
+     * 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://<bucket-name>/<object-name>`.
+     * If left unspecified, the serialized agent is returned inline.
      * 
* * string agent_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -742,10 +740,10 @@ public com.google.protobuf.ByteString getAgentUriBytes() { * * *
-     * 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://<bucket-name>/<object-name>`. If
-     * left unspecified, the serialized agent is returned inline.
+     * 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://<bucket-name>/<object-name>`.
+     * If left unspecified, the serialized agent is returned inline.
      * 
* * string agent_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -766,10 +764,10 @@ public Builder setAgentUri(java.lang.String value) { * * *
-     * 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://<bucket-name>/<object-name>`. If
-     * left unspecified, the serialized agent is returned inline.
+     * 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://<bucket-name>/<object-name>`.
+     * If left unspecified, the serialized agent is returned inline.
      * 
* * string agent_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -786,10 +784,10 @@ public Builder clearAgentUri() { * * *
-     * 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://<bucket-name>/<object-name>`. If
-     * left unspecified, the serialized agent is returned inline.
+     * 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://<bucket-name>/<object-name>`.
+     * If left unspecified, the serialized agent is returned inline.
      * 
* * string agent_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportAgentRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportAgentRequestOrBuilder.java index e7cfc610a..b98996f88 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportAgentRequestOrBuilder.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportAgentRequestOrBuilder.java @@ -58,10 +58,10 @@ public interface ExportAgentRequestOrBuilder * * *
-   * 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://<bucket-name>/<object-name>`. If
-   * left unspecified, the serialized agent is returned inline.
+   * 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://<bucket-name>/<object-name>`.
+   * If left unspecified, the serialized agent is returned inline.
    * 
* * string agent_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -73,10 +73,10 @@ public interface ExportAgentRequestOrBuilder * * *
-   * 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://<bucket-name>/<object-name>`. If
-   * left unspecified, the serialized agent is returned inline.
+   * 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://<bucket-name>/<object-name>`.
+   * If left unspecified, the serialized agent is returned inline.
    * 
* * string agent_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportAgentResponse.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportAgentResponse.java index 7fe730328..2a4779528 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportAgentResponse.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportAgentResponse.java @@ -22,8 +22,7 @@ * * *
- * The response message for
- * [Agents.ExportAgent][google.cloud.dialogflow.cx.v3beta1.Agents.ExportAgent].
+ * The response message for [Agents.ExportAgent][google.cloud.dialogflow.cx.v3beta1.Agents.ExportAgent].
  * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse} @@ -169,8 +168,7 @@ public AgentCase getAgentCase() { * *
    * The URI to a file containing the exported agent. This field is populated
-   * only if `agent_uri` is specified in
-   * [ExportAgentRequest][google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest].
+   * only if `agent_uri` is specified in [ExportAgentRequest][google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest].
    * 
* * string agent_uri = 1; @@ -198,8 +196,7 @@ public java.lang.String getAgentUri() { * *
    * The URI to a file containing the exported agent. This field is populated
-   * only if `agent_uri` is specified in
-   * [ExportAgentRequest][google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest].
+   * only if `agent_uri` is specified in [ExportAgentRequest][google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest].
    * 
* * string agent_uri = 1; @@ -435,8 +432,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The response message for
-   * [Agents.ExportAgent][google.cloud.dialogflow.cx.v3beta1.Agents.ExportAgent].
+   * The response message for [Agents.ExportAgent][google.cloud.dialogflow.cx.v3beta1.Agents.ExportAgent].
    * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse} @@ -630,8 +626,7 @@ public Builder clearAgent() { * *
      * The URI to a file containing the exported agent. This field is populated
-     * only if `agent_uri` is specified in
-     * [ExportAgentRequest][google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest].
+     * only if `agent_uri` is specified in [ExportAgentRequest][google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest].
      * 
* * string agent_uri = 1; @@ -660,8 +655,7 @@ public java.lang.String getAgentUri() { * *
      * The URI to a file containing the exported agent. This field is populated
-     * only if `agent_uri` is specified in
-     * [ExportAgentRequest][google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest].
+     * only if `agent_uri` is specified in [ExportAgentRequest][google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest].
      * 
* * string agent_uri = 1; @@ -690,8 +684,7 @@ public com.google.protobuf.ByteString getAgentUriBytes() { * *
      * The URI to a file containing the exported agent. This field is populated
-     * only if `agent_uri` is specified in
-     * [ExportAgentRequest][google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest].
+     * only if `agent_uri` is specified in [ExportAgentRequest][google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest].
      * 
* * string agent_uri = 1; @@ -713,8 +706,7 @@ public Builder setAgentUri(java.lang.String value) { * *
      * The URI to a file containing the exported agent. This field is populated
-     * only if `agent_uri` is specified in
-     * [ExportAgentRequest][google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest].
+     * only if `agent_uri` is specified in [ExportAgentRequest][google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest].
      * 
* * string agent_uri = 1; @@ -734,8 +726,7 @@ public Builder clearAgentUri() { * *
      * The URI to a file containing the exported agent. This field is populated
-     * only if `agent_uri` is specified in
-     * [ExportAgentRequest][google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest].
+     * only if `agent_uri` is specified in [ExportAgentRequest][google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest].
      * 
* * string agent_uri = 1; diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportAgentResponseOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportAgentResponseOrBuilder.java index ea355ae19..c3a8774a5 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportAgentResponseOrBuilder.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportAgentResponseOrBuilder.java @@ -28,8 +28,7 @@ public interface ExportAgentResponseOrBuilder * *
    * The URI to a file containing the exported agent. This field is populated
-   * only if `agent_uri` is specified in
-   * [ExportAgentRequest][google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest].
+   * only if `agent_uri` is specified in [ExportAgentRequest][google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest].
    * 
* * string agent_uri = 1; @@ -42,8 +41,7 @@ public interface ExportAgentResponseOrBuilder * *
    * The URI to a file containing the exported agent. This field is populated
-   * only if `agent_uri` is specified in
-   * [ExportAgentRequest][google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest].
+   * only if `agent_uri` is specified in [ExportAgentRequest][google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest].
    * 
* * string agent_uri = 1; diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportTestCasesMetadata.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportTestCasesMetadata.java new file mode 100644 index 000000000..fd64d00fc --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportTestCasesMetadata.java @@ -0,0 +1,465 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * Metadata returned for the [TestCases.ExportTestCases][google.cloud.dialogflow.cx.v3beta1.TestCases.ExportTestCases] long running
+ * operation.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata} + */ +public final class ExportTestCasesMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata) + ExportTestCasesMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExportTestCasesMetadata.newBuilder() to construct. + private ExportTestCasesMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExportTestCasesMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExportTestCasesMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ExportTestCasesMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportTestCasesMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportTestCasesMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata.class, + com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata.Builder.class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata other = + (com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata) obj; + + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata returned for the [TestCases.ExportTestCases][google.cloud.dialogflow.cx.v3beta1.TestCases.ExportTestCases] long running
+   * operation.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata) + com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportTestCasesMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportTestCasesMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata.class, + com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportTestCasesMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata build() { + com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata result = + new com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata) + private static final com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExportTestCasesMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ExportTestCasesMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportTestCasesMetadataOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportTestCasesMetadataOrBuilder.java new file mode 100644 index 000000000..7bb1a6c5c --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportTestCasesMetadataOrBuilder.java @@ -0,0 +1,24 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface ExportTestCasesMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata) + com.google.protobuf.MessageOrBuilder {} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportTestCasesRequest.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportTestCasesRequest.java new file mode 100644 index 000000000..3c0ef85be --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportTestCasesRequest.java @@ -0,0 +1,1522 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The request message for [TestCases.ExportTestCases][google.cloud.dialogflow.cx.v3beta1.TestCases.ExportTestCases].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest} + */ +public final class ExportTestCasesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest) + ExportTestCasesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExportTestCasesRequest.newBuilder() to construct. + private ExportTestCasesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExportTestCasesRequest() { + parent_ = ""; + dataFormat_ = 0; + filter_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExportTestCasesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ExportTestCasesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + destinationCase_ = 2; + destination_ = s; + break; + } + case 24: + { + int rawValue = input.readEnum(); + + dataFormat_ = rawValue; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportTestCasesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportTestCasesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest.Builder.class); + } + + /** + * + * + *
+   * Data format of the exported test cases.
+   * 
+ * + * Protobuf enum {@code google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest.DataFormat} + */ + public enum DataFormat implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified format.
+     * 
+ * + * DATA_FORMAT_UNSPECIFIED = 0; + */ + DATA_FORMAT_UNSPECIFIED(0), + /** + * + * + *
+     * Raw bytes.
+     * 
+ * + * BLOB = 1; + */ + BLOB(1), + /** + * + * + *
+     * JSON format.
+     * 
+ * + * JSON = 2; + */ + JSON(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified format.
+     * 
+ * + * DATA_FORMAT_UNSPECIFIED = 0; + */ + public static final int DATA_FORMAT_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Raw bytes.
+     * 
+ * + * BLOB = 1; + */ + public static final int BLOB_VALUE = 1; + /** + * + * + *
+     * JSON format.
+     * 
+ * + * JSON = 2; + */ + public static final int JSON_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DataFormat valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static DataFormat forNumber(int value) { + switch (value) { + case 0: + return DATA_FORMAT_UNSPECIFIED; + case 1: + return BLOB; + case 2: + return JSON; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public DataFormat findValueByNumber(int number) { + return DataFormat.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final DataFormat[] VALUES = values(); + + public static DataFormat valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private DataFormat(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest.DataFormat) + } + + private int destinationCase_ = 0; + private java.lang.Object destination_; + + public enum DestinationCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GCS_URI(2), + DESTINATION_NOT_SET(0); + private final int value; + + private DestinationCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DestinationCase valueOf(int value) { + return forNumber(value); + } + + public static DestinationCase forNumber(int value) { + switch (value) { + case 2: + return GCS_URI; + case 0: + return DESTINATION_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public DestinationCase getDestinationCase() { + return DestinationCase.forNumber(destinationCase_); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The agent where to export test cases from.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The agent where to export test cases from.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GCS_URI_FIELD_NUMBER = 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://<bucket-name>/<object-name>`. If unspecified, the serialized test
+   * cases is returned inline.
+   * 
+ * + * string gcs_uri = 2; + * + * @return The gcsUri. + */ + public java.lang.String getGcsUri() { + java.lang.Object ref = ""; + if (destinationCase_ == 2) { + ref = destination_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (destinationCase_ == 2) { + destination_ = s; + } + return s; + } + } + /** + * + * + *
+   * 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://<bucket-name>/<object-name>`. If unspecified, the serialized test
+   * cases is returned inline.
+   * 
+ * + * string gcs_uri = 2; + * + * @return The bytes for gcsUri. + */ + public com.google.protobuf.ByteString getGcsUriBytes() { + java.lang.Object ref = ""; + if (destinationCase_ == 2) { + ref = destination_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (destinationCase_ == 2) { + destination_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATA_FORMAT_FIELD_NUMBER = 3; + private int dataFormat_; + /** + * + * + *
+   * The data format of the exported test cases. If not specified, `BLOB` is
+   * assumed.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest.DataFormat data_format = 3; + * + * + * @return The enum numeric value on the wire for dataFormat. + */ + @java.lang.Override + public int getDataFormatValue() { + return dataFormat_; + } + /** + * + * + *
+   * The data format of the exported test cases. If not specified, `BLOB` is
+   * assumed.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest.DataFormat data_format = 3; + * + * + * @return The dataFormat. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest.DataFormat getDataFormat() { + @SuppressWarnings("deprecation") + com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest.DataFormat result = + com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest.DataFormat.valueOf( + dataFormat_); + return result == null + ? com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest.DataFormat.UNRECOGNIZED + : result; + } + + public static final int FILTER_FIELD_NUMBER = 4; + private volatile java.lang.Object 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 = <value> [OR name = <value>] ...
+   * For example:
+   * *   "name = t1 OR name = t2" matches the test case with the exact resource
+   *     name "t1" or "t2".
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * 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 = <value> [OR name = <value>] ...
+   * For example:
+   * *   "name = t1 OR name = t2" matches the test case with the exact resource
+   *     name "t1" or "t2".
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (destinationCase_ == 2) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, destination_); + } + if (dataFormat_ + != com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest.DataFormat + .DATA_FORMAT_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, dataFormat_); + } + if (!getFilterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (destinationCase_ == 2) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, destination_); + } + if (dataFormat_ + != com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest.DataFormat + .DATA_FORMAT_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, dataFormat_); + } + if (!getFilterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest other = + (com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (dataFormat_ != other.dataFormat_) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getDestinationCase().equals(other.getDestinationCase())) return false; + switch (destinationCase_) { + case 2: + if (!getGcsUri().equals(other.getGcsUri())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + DATA_FORMAT_FIELD_NUMBER; + hash = (53 * hash) + dataFormat_; + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + switch (destinationCase_) { + case 2: + hash = (37 * hash) + GCS_URI_FIELD_NUMBER; + hash = (53 * hash) + getGcsUri().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for [TestCases.ExportTestCases][google.cloud.dialogflow.cx.v3beta1.TestCases.ExportTestCases].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest) + com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportTestCasesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportTestCasesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + dataFormat_ = 0; + + filter_ = ""; + + destinationCase_ = 0; + destination_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportTestCasesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest build() { + com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest result = + new com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest(this); + result.parent_ = parent_; + if (destinationCase_ == 2) { + result.destination_ = destination_; + } + result.dataFormat_ = dataFormat_; + result.filter_ = filter_; + result.destinationCase_ = destinationCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.dataFormat_ != 0) { + setDataFormatValue(other.getDataFormatValue()); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + switch (other.getDestinationCase()) { + case GCS_URI: + { + destinationCase_ = 2; + destination_ = other.destination_; + onChanged(); + break; + } + case DESTINATION_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int destinationCase_ = 0; + private java.lang.Object destination_; + + public DestinationCase getDestinationCase() { + return DestinationCase.forNumber(destinationCase_); + } + + public Builder clearDestination() { + destinationCase_ = 0; + destination_ = null; + onChanged(); + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The agent where to export test cases from.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The agent where to export test cases from.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The agent where to export test cases from.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The agent where to export test cases from.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The agent where to export test cases from.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + 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://<bucket-name>/<object-name>`. If unspecified, the serialized test
+     * cases is returned inline.
+     * 
+ * + * string gcs_uri = 2; + * + * @return The gcsUri. + */ + @java.lang.Override + public java.lang.String getGcsUri() { + java.lang.Object ref = ""; + if (destinationCase_ == 2) { + ref = destination_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (destinationCase_ == 2) { + destination_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * 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://<bucket-name>/<object-name>`. If unspecified, the serialized test
+     * cases is returned inline.
+     * 
+ * + * string gcs_uri = 2; + * + * @return The bytes for gcsUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGcsUriBytes() { + java.lang.Object ref = ""; + if (destinationCase_ == 2) { + ref = destination_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (destinationCase_ == 2) { + destination_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * 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://<bucket-name>/<object-name>`. If unspecified, the serialized test
+     * cases is returned inline.
+     * 
+ * + * string gcs_uri = 2; + * + * @param value The gcsUri to set. + * @return This builder for chaining. + */ + public Builder setGcsUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + destinationCase_ = 2; + destination_ = value; + onChanged(); + 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://<bucket-name>/<object-name>`. If unspecified, the serialized test
+     * cases is returned inline.
+     * 
+ * + * string gcs_uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearGcsUri() { + if (destinationCase_ == 2) { + destinationCase_ = 0; + destination_ = null; + onChanged(); + } + 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://<bucket-name>/<object-name>`. If unspecified, the serialized test
+     * cases is returned inline.
+     * 
+ * + * string gcs_uri = 2; + * + * @param value The bytes for gcsUri to set. + * @return This builder for chaining. + */ + public Builder setGcsUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + destinationCase_ = 2; + destination_ = value; + onChanged(); + return this; + } + + private int dataFormat_ = 0; + /** + * + * + *
+     * The data format of the exported test cases. If not specified, `BLOB` is
+     * assumed.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest.DataFormat data_format = 3; + * + * + * @return The enum numeric value on the wire for dataFormat. + */ + @java.lang.Override + public int getDataFormatValue() { + return dataFormat_; + } + /** + * + * + *
+     * The data format of the exported test cases. If not specified, `BLOB` is
+     * assumed.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest.DataFormat data_format = 3; + * + * + * @param value The enum numeric value on the wire for dataFormat to set. + * @return This builder for chaining. + */ + public Builder setDataFormatValue(int value) { + + dataFormat_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The data format of the exported test cases. If not specified, `BLOB` is
+     * assumed.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest.DataFormat data_format = 3; + * + * + * @return The dataFormat. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest.DataFormat + getDataFormat() { + @SuppressWarnings("deprecation") + com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest.DataFormat result = + com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest.DataFormat.valueOf( + dataFormat_); + return result == null + ? com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest.DataFormat.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The data format of the exported test cases. If not specified, `BLOB` is
+     * assumed.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest.DataFormat data_format = 3; + * + * + * @param value The dataFormat to set. + * @return This builder for chaining. + */ + public Builder setDataFormat( + com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest.DataFormat value) { + if (value == null) { + throw new NullPointerException(); + } + + dataFormat_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The data format of the exported test cases. If not specified, `BLOB` is
+     * assumed.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest.DataFormat data_format = 3; + * + * + * @return This builder for chaining. + */ + public Builder clearDataFormat() { + + dataFormat_ = 0; + onChanged(); + return this; + } + + private java.lang.Object 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 = <value> [OR name = <value>] ...
+     * For example:
+     * *   "name = t1 OR name = t2" matches the test case with the exact resource
+     *     name "t1" or "t2".
+     * 
+ * + * string filter = 4; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * 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 = <value> [OR name = <value>] ...
+     * For example:
+     * *   "name = t1 OR name = t2" matches the test case with the exact resource
+     *     name "t1" or "t2".
+     * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * 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 = <value> [OR name = <value>] ...
+     * For example:
+     * *   "name = t1 OR name = t2" matches the test case with the exact resource
+     *     name "t1" or "t2".
+     * 
+ * + * string filter = 4; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + 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 = <value> [OR name = <value>] ...
+     * For example:
+     * *   "name = t1 OR name = t2" matches the test case with the exact resource
+     *     name "t1" or "t2".
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + 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 = <value> [OR name = <value>] ...
+     * For example:
+     * *   "name = t1 OR name = t2" matches the test case with the exact resource
+     *     name "t1" or "t2".
+     * 
+ * + * string filter = 4; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest) + private static final com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExportTestCasesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ExportTestCasesRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportTestCasesRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportTestCasesRequestOrBuilder.java new file mode 100644 index 000000000..a63c8f99d --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportTestCasesRequestOrBuilder.java @@ -0,0 +1,156 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface ExportTestCasesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The agent where to export test cases from.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The agent where to export test cases from.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * 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://<bucket-name>/<object-name>`. If unspecified, the serialized test
+   * cases is returned inline.
+   * 
+ * + * string gcs_uri = 2; + * + * @return The gcsUri. + */ + java.lang.String getGcsUri(); + /** + * + * + *
+   * 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://<bucket-name>/<object-name>`. If unspecified, the serialized test
+   * cases is returned inline.
+   * 
+ * + * string gcs_uri = 2; + * + * @return The bytes for gcsUri. + */ + com.google.protobuf.ByteString getGcsUriBytes(); + + /** + * + * + *
+   * The data format of the exported test cases. If not specified, `BLOB` is
+   * assumed.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest.DataFormat data_format = 3; + * + * + * @return The enum numeric value on the wire for dataFormat. + */ + int getDataFormatValue(); + /** + * + * + *
+   * The data format of the exported test cases. If not specified, `BLOB` is
+   * assumed.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest.DataFormat data_format = 3; + * + * + * @return The dataFormat. + */ + com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest.DataFormat getDataFormat(); + + /** + * + * + *
+   * 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 = <value> [OR name = <value>] ...
+   * For example:
+   * *   "name = t1 OR name = t2" matches the test case with the exact resource
+   *     name "t1" or "t2".
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * 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 = <value> [OR name = <value>] ...
+   * For example:
+   * *   "name = t1 OR name = t2" matches the test case with the exact resource
+   *     name "t1" or "t2".
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + public com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest.DestinationCase + getDestinationCase(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportTestCasesResponse.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportTestCasesResponse.java new file mode 100644 index 000000000..e76529550 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportTestCasesResponse.java @@ -0,0 +1,868 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The response message for [TestCases.ExportTestCases][google.cloud.dialogflow.cx.v3beta1.TestCases.ExportTestCases].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse} + */ +public final class ExportTestCasesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse) + ExportTestCasesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExportTestCasesResponse.newBuilder() to construct. + private ExportTestCasesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExportTestCasesResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExportTestCasesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ExportTestCasesResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + destinationCase_ = 1; + destination_ = s; + break; + } + case 18: + { + destinationCase_ = 2; + destination_ = input.readBytes(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportTestCasesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportTestCasesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse.class, + com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse.Builder.class); + } + + private int destinationCase_ = 0; + private java.lang.Object destination_; + + public enum DestinationCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GCS_URI(1), + CONTENT(2), + DESTINATION_NOT_SET(0); + private final int value; + + private DestinationCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DestinationCase valueOf(int value) { + return forNumber(value); + } + + public static DestinationCase forNumber(int value) { + switch (value) { + case 1: + return GCS_URI; + case 2: + return CONTENT; + case 0: + return DESTINATION_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public DestinationCase getDestinationCase() { + return DestinationCase.forNumber(destinationCase_); + } + + public static final int GCS_URI_FIELD_NUMBER = 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.v3beta1.ExportTestCasesRequest].
+   * 
+ * + * string gcs_uri = 1; + * + * @return The gcsUri. + */ + public java.lang.String getGcsUri() { + java.lang.Object ref = ""; + if (destinationCase_ == 1) { + ref = destination_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (destinationCase_ == 1) { + destination_ = s; + } + return s; + } + } + /** + * + * + *
+   * 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.v3beta1.ExportTestCasesRequest].
+   * 
+ * + * string gcs_uri = 1; + * + * @return The bytes for gcsUri. + */ + public com.google.protobuf.ByteString getGcsUriBytes() { + java.lang.Object ref = ""; + if (destinationCase_ == 1) { + ref = destination_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (destinationCase_ == 1) { + destination_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONTENT_FIELD_NUMBER = 2; + /** + * + * + *
+   * Uncompressed raw byte content for test cases.
+   * 
+ * + * bytes content = 2; + * + * @return The content. + */ + @java.lang.Override + public com.google.protobuf.ByteString getContent() { + if (destinationCase_ == 2) { + return (com.google.protobuf.ByteString) destination_; + } + return com.google.protobuf.ByteString.EMPTY; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (destinationCase_ == 1) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, destination_); + } + if (destinationCase_ == 2) { + output.writeBytes(2, (com.google.protobuf.ByteString) destination_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (destinationCase_ == 1) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, destination_); + } + if (destinationCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeBytesSize( + 2, (com.google.protobuf.ByteString) destination_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse other = + (com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse) obj; + + if (!getDestinationCase().equals(other.getDestinationCase())) return false; + switch (destinationCase_) { + case 1: + if (!getGcsUri().equals(other.getGcsUri())) return false; + break; + case 2: + if (!getContent().equals(other.getContent())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (destinationCase_) { + case 1: + hash = (37 * hash) + GCS_URI_FIELD_NUMBER; + hash = (53 * hash) + getGcsUri().hashCode(); + break; + case 2: + hash = (37 * hash) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The response message for [TestCases.ExportTestCases][google.cloud.dialogflow.cx.v3beta1.TestCases.ExportTestCases].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse) + com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportTestCasesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportTestCasesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse.class, + com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + destinationCase_ = 0; + destination_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportTestCasesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse build() { + com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse result = + new com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse(this); + if (destinationCase_ == 1) { + result.destination_ = destination_; + } + if (destinationCase_ == 2) { + result.destination_ = destination_; + } + result.destinationCase_ = destinationCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse.getDefaultInstance()) + return this; + switch (other.getDestinationCase()) { + case GCS_URI: + { + destinationCase_ = 1; + destination_ = other.destination_; + onChanged(); + break; + } + case CONTENT: + { + setContent(other.getContent()); + break; + } + case DESTINATION_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int destinationCase_ = 0; + private java.lang.Object destination_; + + public DestinationCase getDestinationCase() { + return DestinationCase.forNumber(destinationCase_); + } + + public Builder clearDestination() { + destinationCase_ = 0; + destination_ = null; + onChanged(); + return this; + } + + /** + * + * + *
+     * 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.v3beta1.ExportTestCasesRequest].
+     * 
+ * + * string gcs_uri = 1; + * + * @return The gcsUri. + */ + @java.lang.Override + public java.lang.String getGcsUri() { + java.lang.Object ref = ""; + if (destinationCase_ == 1) { + ref = destination_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (destinationCase_ == 1) { + destination_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * 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.v3beta1.ExportTestCasesRequest].
+     * 
+ * + * string gcs_uri = 1; + * + * @return The bytes for gcsUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGcsUriBytes() { + java.lang.Object ref = ""; + if (destinationCase_ == 1) { + ref = destination_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (destinationCase_ == 1) { + destination_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * 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.v3beta1.ExportTestCasesRequest].
+     * 
+ * + * string gcs_uri = 1; + * + * @param value The gcsUri to set. + * @return This builder for chaining. + */ + public Builder setGcsUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + destinationCase_ = 1; + destination_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * 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.v3beta1.ExportTestCasesRequest].
+     * 
+ * + * string gcs_uri = 1; + * + * @return This builder for chaining. + */ + public Builder clearGcsUri() { + if (destinationCase_ == 1) { + destinationCase_ = 0; + destination_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * 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.v3beta1.ExportTestCasesRequest].
+     * 
+ * + * string gcs_uri = 1; + * + * @param value The bytes for gcsUri to set. + * @return This builder for chaining. + */ + public Builder setGcsUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + destinationCase_ = 1; + destination_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Uncompressed raw byte content for test cases.
+     * 
+ * + * bytes content = 2; + * + * @return The content. + */ + public com.google.protobuf.ByteString getContent() { + if (destinationCase_ == 2) { + return (com.google.protobuf.ByteString) destination_; + } + return com.google.protobuf.ByteString.EMPTY; + } + /** + * + * + *
+     * Uncompressed raw byte content for test cases.
+     * 
+ * + * bytes content = 2; + * + * @param value The content to set. + * @return This builder for chaining. + */ + public Builder setContent(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + destinationCase_ = 2; + destination_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Uncompressed raw byte content for test cases.
+     * 
+ * + * bytes content = 2; + * + * @return This builder for chaining. + */ + public Builder clearContent() { + if (destinationCase_ == 2) { + destinationCase_ = 0; + destination_ = null; + onChanged(); + } + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse) + private static final com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExportTestCasesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ExportTestCasesResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportTestCasesResponseOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportTestCasesResponseOrBuilder.java new file mode 100644 index 000000000..37230bb88 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportTestCasesResponseOrBuilder.java @@ -0,0 +1,70 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface ExportTestCasesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * 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.v3beta1.ExportTestCasesRequest].
+   * 
+ * + * string gcs_uri = 1; + * + * @return The gcsUri. + */ + java.lang.String getGcsUri(); + /** + * + * + *
+   * 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.v3beta1.ExportTestCasesRequest].
+   * 
+ * + * string gcs_uri = 1; + * + * @return The bytes for gcsUri. + */ + com.google.protobuf.ByteString getGcsUriBytes(); + + /** + * + * + *
+   * Uncompressed raw byte content for test cases.
+   * 
+ * + * bytes content = 2; + * + * @return The content. + */ + com.google.protobuf.ByteString getContent(); + + public com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse.DestinationCase + getDestinationCase(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowProto.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowProto.java index cf6dc7203..006520cc3 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowProto.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowProto.java @@ -63,6 +63,18 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dialogflow_cx_v3beta1_TrainFlowRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_cx_v3beta1_TrainFlowRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_ValidateFlowRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_ValidateFlowRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_GetFlowValidationResultRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_GetFlowValidationResultRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_FlowValidationResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_FlowValidationResult_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -78,89 +90,115 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "e/api/client.proto\032\037google/api/field_beh" + "avior.proto\032\031google/api/resource.proto\032-" + "google/cloud/dialogflow/cx/v3beta1/page." - + "proto\032#google/longrunning/operations.pro" - + "to\032\033google/protobuf/empty.proto\032 google/" - + "protobuf/field_mask.proto\032\037google/protob" - + "uf/timestamp.proto\"\266\003\n\013NluSettings\022M\n\nmo" - + "del_type\030\001 \001(\01629.google.cloud.dialogflow" - + ".cx.v3beta1.NluSettings.ModelType\022 \n\030cla" - + "ssification_threshold\030\003 \001(\002\022^\n\023model_tra" - + "ining_mode\030\004 \001(\0162A.google.cloud.dialogfl" - + "ow.cx.v3beta1.NluSettings.ModelTrainingM" - + "ode\"Y\n\tModelType\022\032\n\026MODEL_TYPE_UNSPECIFI" - + "ED\020\000\022\027\n\023MODEL_TYPE_STANDARD\020\001\022\027\n\023MODEL_T" - + "YPE_ADVANCED\020\003\"{\n\021ModelTrainingMode\022#\n\037M" - + "ODEL_TRAINING_MODE_UNSPECIFIED\020\000\022!\n\035MODE" - + "L_TRAINING_MODE_AUTOMATIC\020\001\022\036\n\032MODEL_TRA" - + "INING_MODE_MANUAL\020\002\"\217\003\n\004Flow\022\014\n\004name\030\001 \001" - + "(\t\022\031\n\014display_name\030\002 \001(\tB\003\340A\002\022\023\n\013descrip" - + "tion\030\003 \001(\t\022N\n\021transition_routes\030\004 \003(\01323." - + "google.cloud.dialogflow.cx.v3beta1.Trans" - + "itionRoute\022H\n\016event_handlers\030\n \003(\01320.goo" - + "gle.cloud.dialogflow.cx.v3beta1.EventHan" - + "dler\022E\n\014nlu_settings\030\013 \001(\0132/.google.clou" - + "d.dialogflow.cx.v3beta1.NluSettings:h\352Ae" - + "\n\036dialogflow.googleapis.com/Flow\022Cprojec" - + "ts/{project}/locations/{location}/agents" - + "/{agent}/flows/{flow}\"\237\001\n\021CreateFlowRequ" - + "est\0226\n\006parent\030\001 \001(\tB&\340A\002\372A \022\036dialogflow." - + "googleapis.com/Flow\022;\n\004flow\030\002 \001(\0132(.goog" - + "le.cloud.dialogflow.cx.v3beta1.FlowB\003\340A\002" - + "\022\025\n\rlanguage_code\030\003 \001(\t\"X\n\021DeleteFlowReq" - + "uest\0224\n\004name\030\001 \001(\tB&\340A\002\372A \n\036dialogflow.g" - + "oogleapis.com/Flow\022\r\n\005force\030\002 \001(\010\"\210\001\n\020Li" - + "stFlowsRequest\0226\n\006parent\030\001 \001(\tB&\340A\002\372A \022\036" - + "dialogflow.googleapis.com/Flow\022\021\n\tpage_s" - + "ize\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\025\n\rlanguag" - + "e_code\030\004 \001(\t\"e\n\021ListFlowsResponse\0227\n\005flo" - + "ws\030\001 \003(\0132(.google.cloud.dialogflow.cx.v3" - + "beta1.Flow\022\027\n\017next_page_token\030\002 \001(\t\"]\n\016G" - + "etFlowRequest\0224\n\004name\030\001 \001(\tB&\340A\002\372A \n\036dia" - + "logflow.googleapis.com/Flow\022\025\n\rlanguage_" - + "code\030\002 \001(\t\"\235\001\n\021UpdateFlowRequest\022;\n\004flow" - + "\030\001 \001(\0132(.google.cloud.dialogflow.cx.v3be" - + "ta1.FlowB\003\340A\002\0224\n\013update_mask\030\002 \001(\0132\032.goo" - + "gle.protobuf.FieldMaskB\003\340A\002\022\025\n\rlanguage_" - + "code\030\003 \001(\t\"H\n\020TrainFlowRequest\0224\n\004name\030\001" - + " \001(\tB&\340A\002\372A \n\036dialogflow.googleapis.com/" - + "Flow2\231\n\n\005Flows\022\302\001\n\nCreateFlow\0225.google.c" - + "loud.dialogflow.cx.v3beta1.CreateFlowReq" - + "uest\032(.google.cloud.dialogflow.cx.v3beta" - + "1.Flow\"S\202\323\344\223\002?\"7/v3beta1/{parent=project" - + "s/*/locations/*/agents/*}/flows:\004flow\332A\013" - + "parent,flow\022\243\001\n\nDeleteFlow\0225.google.clou" - + "d.dialogflow.cx.v3beta1.DeleteFlowReques" - + "t\032\026.google.protobuf.Empty\"F\202\323\344\223\0029*7/v3be" - + "ta1/{name=projects/*/locations/*/agents/" - + "*/flows/*}\332A\004name\022\302\001\n\tListFlows\0224.google" - + ".cloud.dialogflow.cx.v3beta1.ListFlowsRe" - + "quest\0325.google.cloud.dialogflow.cx.v3bet" - + "a1.ListFlowsResponse\"H\202\323\344\223\0029\0227/v3beta1/{" - + "parent=projects/*/locations/*/agents/*}/" - + "flows\332A\006parent\022\257\001\n\007GetFlow\0222.google.clou" - + "d.dialogflow.cx.v3beta1.GetFlowRequest\032(" - + ".google.cloud.dialogflow.cx.v3beta1.Flow" - + "\"F\202\323\344\223\0029\0227/v3beta1/{name=projects/*/loca" - + "tions/*/agents/*/flows/*}\332A\004name\022\314\001\n\nUpd" - + "ateFlow\0225.google.cloud.dialogflow.cx.v3b" - + "eta1.UpdateFlowRequest\032(.google.cloud.di" - + "alogflow.cx.v3beta1.Flow\"]\202\323\344\223\002D2 + * The response message for [Flows.GetFlowValidationResult][google.cloud.dialogflow.cx.v3beta1.Flows.GetFlowValidationResult]. + * + * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.FlowValidationResult} + */ +public final class FlowValidationResult extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.FlowValidationResult) + FlowValidationResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use FlowValidationResult.newBuilder() to construct. + private FlowValidationResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FlowValidationResult() { + name_ = ""; + validationMessages_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FlowValidationResult(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private FlowValidationResult( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + validationMessages_ = + new java.util.ArrayList< + com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage>(); + mutable_bitField0_ |= 0x00000001; + } + validationMessages_.add( + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.parser(), + extensionRegistry)); + break; + } + case 26: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + validationMessages_ = java.util.Collections.unmodifiableList(validationMessages_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.FlowProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_FlowValidationResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.FlowProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_FlowValidationResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.class, + com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * The unique identifier of the flow validation result.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>/validationResult`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * The unique identifier of the flow validation result.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>/validationResult`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALIDATION_MESSAGES_FIELD_NUMBER = 2; + private java.util.List + validationMessages_; + /** + * + * + *
+   * Contains all validation messages.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ValidationMessage validation_messages = 2; + * + */ + @java.lang.Override + public java.util.List + getValidationMessagesList() { + return validationMessages_; + } + /** + * + * + *
+   * Contains all validation messages.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ValidationMessage validation_messages = 2; + * + */ + @java.lang.Override + public java.util.List + getValidationMessagesOrBuilderList() { + return validationMessages_; + } + /** + * + * + *
+   * Contains all validation messages.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ValidationMessage validation_messages = 2; + * + */ + @java.lang.Override + public int getValidationMessagesCount() { + return validationMessages_.size(); + } + /** + * + * + *
+   * Contains all validation messages.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ValidationMessage validation_messages = 2; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage getValidationMessages(int index) { + return validationMessages_.get(index); + } + /** + * + * + *
+   * Contains all validation messages.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ValidationMessage validation_messages = 2; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ValidationMessageOrBuilder + getValidationMessagesOrBuilder(int index) { + return validationMessages_.get(index); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Last time the flow was validated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3; + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Last time the flow was validated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3; + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Last time the flow was validated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + for (int i = 0; i < validationMessages_.size(); i++) { + output.writeMessage(2, validationMessages_.get(i)); + } + if (updateTime_ != null) { + output.writeMessage(3, getUpdateTime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + for (int i = 0; i < validationMessages_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, validationMessages_.get(i)); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult other = + (com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult) obj; + + if (!getName().equals(other.getName())) return false; + if (!getValidationMessagesList().equals(other.getValidationMessagesList())) return false; + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getValidationMessagesCount() > 0) { + hash = (37 * hash) + VALIDATION_MESSAGES_FIELD_NUMBER; + hash = (53 * hash) + getValidationMessagesList().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The response message for [Flows.GetFlowValidationResult][google.cloud.dialogflow.cx.v3beta1.Flows.GetFlowValidationResult].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.FlowValidationResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.FlowValidationResult) + com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.FlowProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_FlowValidationResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.FlowProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_FlowValidationResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.class, + com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getValidationMessagesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (validationMessagesBuilder_ == null) { + validationMessages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + validationMessagesBuilder_.clear(); + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.FlowProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_FlowValidationResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult build() { + com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult result = + new com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + if (validationMessagesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + validationMessages_ = java.util.Collections.unmodifiableList(validationMessages_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.validationMessages_ = validationMessages_; + } else { + result.validationMessages_ = validationMessagesBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (validationMessagesBuilder_ == null) { + if (!other.validationMessages_.isEmpty()) { + if (validationMessages_.isEmpty()) { + validationMessages_ = other.validationMessages_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValidationMessagesIsMutable(); + validationMessages_.addAll(other.validationMessages_); + } + onChanged(); + } + } else { + if (!other.validationMessages_.isEmpty()) { + if (validationMessagesBuilder_.isEmpty()) { + validationMessagesBuilder_.dispose(); + validationMessagesBuilder_ = null; + validationMessages_ = other.validationMessages_; + bitField0_ = (bitField0_ & ~0x00000001); + validationMessagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getValidationMessagesFieldBuilder() + : null; + } else { + validationMessagesBuilder_.addAllMessages(other.validationMessages_); + } + } + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The unique identifier of the flow validation result.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>/validationResult`.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The unique identifier of the flow validation result.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>/validationResult`.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The unique identifier of the flow validation result.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>/validationResult`.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The unique identifier of the flow validation result.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>/validationResult`.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The unique identifier of the flow validation result.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>/validationResult`.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.util.List + validationMessages_ = java.util.Collections.emptyList(); + + private void ensureValidationMessagesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + validationMessages_ = + new java.util.ArrayList( + validationMessages_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage, + com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ValidationMessageOrBuilder> + validationMessagesBuilder_; + + /** + * + * + *
+     * Contains all validation messages.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ValidationMessage validation_messages = 2; + * + */ + public java.util.List + getValidationMessagesList() { + if (validationMessagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(validationMessages_); + } else { + return validationMessagesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Contains all validation messages.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ValidationMessage validation_messages = 2; + * + */ + public int getValidationMessagesCount() { + if (validationMessagesBuilder_ == null) { + return validationMessages_.size(); + } else { + return validationMessagesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Contains all validation messages.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ValidationMessage validation_messages = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage getValidationMessages( + int index) { + if (validationMessagesBuilder_ == null) { + return validationMessages_.get(index); + } else { + return validationMessagesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Contains all validation messages.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ValidationMessage validation_messages = 2; + * + */ + public Builder setValidationMessages( + int index, com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage value) { + if (validationMessagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValidationMessagesIsMutable(); + validationMessages_.set(index, value); + onChanged(); + } else { + validationMessagesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Contains all validation messages.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ValidationMessage validation_messages = 2; + * + */ + public Builder setValidationMessages( + int index, + com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.Builder builderForValue) { + if (validationMessagesBuilder_ == null) { + ensureValidationMessagesIsMutable(); + validationMessages_.set(index, builderForValue.build()); + onChanged(); + } else { + validationMessagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Contains all validation messages.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ValidationMessage validation_messages = 2; + * + */ + public Builder addValidationMessages( + com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage value) { + if (validationMessagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValidationMessagesIsMutable(); + validationMessages_.add(value); + onChanged(); + } else { + validationMessagesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Contains all validation messages.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ValidationMessage validation_messages = 2; + * + */ + public Builder addValidationMessages( + int index, com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage value) { + if (validationMessagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValidationMessagesIsMutable(); + validationMessages_.add(index, value); + onChanged(); + } else { + validationMessagesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Contains all validation messages.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ValidationMessage validation_messages = 2; + * + */ + public Builder addValidationMessages( + com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.Builder builderForValue) { + if (validationMessagesBuilder_ == null) { + ensureValidationMessagesIsMutable(); + validationMessages_.add(builderForValue.build()); + onChanged(); + } else { + validationMessagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Contains all validation messages.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ValidationMessage validation_messages = 2; + * + */ + public Builder addValidationMessages( + int index, + com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.Builder builderForValue) { + if (validationMessagesBuilder_ == null) { + ensureValidationMessagesIsMutable(); + validationMessages_.add(index, builderForValue.build()); + onChanged(); + } else { + validationMessagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Contains all validation messages.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ValidationMessage validation_messages = 2; + * + */ + public Builder addAllValidationMessages( + java.lang.Iterable + values) { + if (validationMessagesBuilder_ == null) { + ensureValidationMessagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, validationMessages_); + onChanged(); + } else { + validationMessagesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Contains all validation messages.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ValidationMessage validation_messages = 2; + * + */ + public Builder clearValidationMessages() { + if (validationMessagesBuilder_ == null) { + validationMessages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + validationMessagesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Contains all validation messages.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ValidationMessage validation_messages = 2; + * + */ + public Builder removeValidationMessages(int index) { + if (validationMessagesBuilder_ == null) { + ensureValidationMessagesIsMutable(); + validationMessages_.remove(index); + onChanged(); + } else { + validationMessagesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Contains all validation messages.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ValidationMessage validation_messages = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.Builder + getValidationMessagesBuilder(int index) { + return getValidationMessagesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Contains all validation messages.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ValidationMessage validation_messages = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ValidationMessageOrBuilder + getValidationMessagesOrBuilder(int index) { + if (validationMessagesBuilder_ == null) { + return validationMessages_.get(index); + } else { + return validationMessagesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Contains all validation messages.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ValidationMessage validation_messages = 2; + * + */ + public java.util.List< + ? extends com.google.cloud.dialogflow.cx.v3beta1.ValidationMessageOrBuilder> + getValidationMessagesOrBuilderList() { + if (validationMessagesBuilder_ != null) { + return validationMessagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(validationMessages_); + } + } + /** + * + * + *
+     * Contains all validation messages.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ValidationMessage validation_messages = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.Builder + addValidationMessagesBuilder() { + return getValidationMessagesFieldBuilder() + .addBuilder( + com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.getDefaultInstance()); + } + /** + * + * + *
+     * Contains all validation messages.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ValidationMessage validation_messages = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.Builder + addValidationMessagesBuilder(int index) { + return getValidationMessagesFieldBuilder() + .addBuilder( + index, com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.getDefaultInstance()); + } + /** + * + * + *
+     * Contains all validation messages.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ValidationMessage validation_messages = 2; + * + */ + public java.util.List + getValidationMessagesBuilderList() { + return getValidationMessagesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage, + com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ValidationMessageOrBuilder> + getValidationMessagesFieldBuilder() { + if (validationMessagesBuilder_ == null) { + validationMessagesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage, + com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ValidationMessageOrBuilder>( + validationMessages_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + validationMessages_ = null; + } + return validationMessagesBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Last time the flow was validated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Last time the flow was validated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Last time the flow was validated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Last time the flow was validated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Last time the flow was validated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Last time the flow was validated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Last time the flow was validated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Last time the flow was validated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Last time the flow was validated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.FlowValidationResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.FlowValidationResult) + private static final com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FlowValidationResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new FlowValidationResult(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowValidationResultName.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowValidationResultName.java new file mode 100644 index 000000000..7c76fc2aa --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowValidationResultName.java @@ -0,0 +1,261 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.cx.v3beta1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class FlowValidationResultName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_AGENT_FLOW = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/validationResult"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String agent; + private final String flow; + + @Deprecated + protected FlowValidationResultName() { + project = null; + location = null; + agent = null; + flow = null; + } + + private FlowValidationResultName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + agent = Preconditions.checkNotNull(builder.getAgent()); + flow = Preconditions.checkNotNull(builder.getFlow()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAgent() { + return agent; + } + + public String getFlow() { + return flow; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static FlowValidationResultName of( + String project, String location, String agent, String flow) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAgent(agent) + .setFlow(flow) + .build(); + } + + public static String format(String project, String location, String agent, String flow) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAgent(agent) + .setFlow(flow) + .build() + .toString(); + } + + public static FlowValidationResultName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_AGENT_FLOW.validatedMatch( + formattedString, "FlowValidationResultName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("agent"), + matchMap.get("flow")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (FlowValidationResultName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_AGENT_FLOW.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (agent != null) { + fieldMapBuilder.put("agent", agent); + } + if (flow != null) { + fieldMapBuilder.put("flow", flow); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_AGENT_FLOW.instantiate( + "project", project, "location", location, "agent", agent, "flow", flow); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + FlowValidationResultName that = ((FlowValidationResultName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.agent, that.agent) + && Objects.equals(this.flow, that.flow); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(agent); + h *= 1000003; + h ^= Objects.hashCode(flow); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/validationResult. + */ + public static class Builder { + private String project; + private String location; + private String agent; + private String flow; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAgent() { + return agent; + } + + public String getFlow() { + return flow; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setAgent(String agent) { + this.agent = agent; + return this; + } + + public Builder setFlow(String flow) { + this.flow = flow; + return this; + } + + private Builder(FlowValidationResultName flowValidationResultName) { + project = flowValidationResultName.project; + location = flowValidationResultName.location; + agent = flowValidationResultName.agent; + flow = flowValidationResultName.flow; + } + + public FlowValidationResultName build() { + return new FlowValidationResultName(this); + } + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowValidationResultOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowValidationResultOrBuilder.java new file mode 100644 index 000000000..1021b0a20 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowValidationResultOrBuilder.java @@ -0,0 +1,148 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/flow.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface FlowValidationResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.FlowValidationResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The unique identifier of the flow validation result.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>/validationResult`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The unique identifier of the flow validation result.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>/validationResult`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Contains all validation messages.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ValidationMessage validation_messages = 2; + * + */ + java.util.List + getValidationMessagesList(); + /** + * + * + *
+   * Contains all validation messages.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ValidationMessage validation_messages = 2; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage getValidationMessages(int index); + /** + * + * + *
+   * Contains all validation messages.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ValidationMessage validation_messages = 2; + * + */ + int getValidationMessagesCount(); + /** + * + * + *
+   * Contains all validation messages.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ValidationMessage validation_messages = 2; + * + */ + java.util.List + getValidationMessagesOrBuilderList(); + /** + * + * + *
+   * Contains all validation messages.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ValidationMessage validation_messages = 2; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.ValidationMessageOrBuilder getValidationMessagesOrBuilder( + int index); + + /** + * + * + *
+   * Last time the flow was validated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3; + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Last time the flow was validated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3; + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Last time the flow was validated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Form.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Form.java index 25d5bf47f..fa95fd702 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Form.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Form.java @@ -309,9 +309,12 @@ public interface ParameterOrBuilder * * *
-     * Indicates whether the parameter content is logged in text and audio. If
-     * it is set to true, the parameter content will be replaced to parameter
-     * name in both request and response. The default value is false.
+     * Indicates whether the parameter content should be redacted in text and
+     * audio. If the flag is set to true, the parameter content will be replaced
+     * by parameter name in both request and response.
+     * Note: the parameter content is subject to redaction if either parameter
+     * level redaction or [entity type level redaction][google.cloud.dialogflow.cx.v3beta1.EntityType.redact] is
+     * enabled.
      * 
* * bool redact = 11; @@ -2924,9 +2927,12 @@ public com.google.protobuf.ValueOrBuilder getDefaultValueOrBuilder() { * * *
-     * Indicates whether the parameter content is logged in text and audio. If
-     * it is set to true, the parameter content will be replaced to parameter
-     * name in both request and response. The default value is false.
+     * Indicates whether the parameter content should be redacted in text and
+     * audio. If the flag is set to true, the parameter content will be replaced
+     * by parameter name in both request and response.
+     * Note: the parameter content is subject to redaction if either parameter
+     * level redaction or [entity type level redaction][google.cloud.dialogflow.cx.v3beta1.EntityType.redact] is
+     * enabled.
      * 
* * bool redact = 11; @@ -4149,9 +4155,12 @@ public com.google.protobuf.ValueOrBuilder getDefaultValueOrBuilder() { * * *
-       * Indicates whether the parameter content is logged in text and audio. If
-       * it is set to true, the parameter content will be replaced to parameter
-       * name in both request and response. The default value is false.
+       * Indicates whether the parameter content should be redacted in text and
+       * audio. If the flag is set to true, the parameter content will be replaced
+       * by parameter name in both request and response.
+       * Note: the parameter content is subject to redaction if either parameter
+       * level redaction or [entity type level redaction][google.cloud.dialogflow.cx.v3beta1.EntityType.redact] is
+       * enabled.
        * 
* * bool redact = 11; @@ -4166,9 +4175,12 @@ public boolean getRedact() { * * *
-       * Indicates whether the parameter content is logged in text and audio. If
-       * it is set to true, the parameter content will be replaced to parameter
-       * name in both request and response. The default value is false.
+       * Indicates whether the parameter content should be redacted in text and
+       * audio. If the flag is set to true, the parameter content will be replaced
+       * by parameter name in both request and response.
+       * Note: the parameter content is subject to redaction if either parameter
+       * level redaction or [entity type level redaction][google.cloud.dialogflow.cx.v3beta1.EntityType.redact] is
+       * enabled.
        * 
* * bool redact = 11; @@ -4186,9 +4198,12 @@ public Builder setRedact(boolean value) { * * *
-       * Indicates whether the parameter content is logged in text and audio. If
-       * it is set to true, the parameter content will be replaced to parameter
-       * name in both request and response. The default value is false.
+       * Indicates whether the parameter content should be redacted in text and
+       * audio. If the flag is set to true, the parameter content will be replaced
+       * by parameter name in both request and response.
+       * Note: the parameter content is subject to redaction if either parameter
+       * level redaction or [entity type level redaction][google.cloud.dialogflow.cx.v3beta1.EntityType.redact] is
+       * enabled.
        * 
* * bool redact = 11; diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetAgentRequest.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetAgentRequest.java index e13c8fe2e..222abad8b 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetAgentRequest.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetAgentRequest.java @@ -22,8 +22,7 @@ * * *
- * The request message for
- * [Agents.GetAgent][google.cloud.dialogflow.cx.v3beta1.Agents.GetAgent].
+ * The request message for [Agents.GetAgent][google.cloud.dialogflow.cx.v3beta1.Agents.GetAgent].
  * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.GetAgentRequest} @@ -331,8 +330,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The request message for
-   * [Agents.GetAgent][google.cloud.dialogflow.cx.v3beta1.Agents.GetAgent].
+   * The request message for [Agents.GetAgent][google.cloud.dialogflow.cx.v3beta1.Agents.GetAgent].
    * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.GetAgentRequest} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetAgentValidationResultRequest.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetAgentValidationResultRequest.java new file mode 100644 index 000000000..6539648cc --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetAgentValidationResultRequest.java @@ -0,0 +1,857 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/agent.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The request message for [Agents.GetAgentValidationResult][google.cloud.dialogflow.cx.v3beta1.Agents.GetAgentValidationResult].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest} + */ +public final class GetAgentValidationResultRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest) + GetAgentValidationResultRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetAgentValidationResultRequest.newBuilder() to construct. + private GetAgentValidationResultRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetAgentValidationResultRequest() { + name_ = ""; + languageCode_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetAgentValidationResultRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetAgentValidationResultRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + languageCode_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.AgentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GetAgentValidationResultRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.AgentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GetAgentValidationResultRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The agent name.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/validationResult`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The agent name.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/validationResult`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 2; + private volatile java.lang.Object languageCode_; + /** + * + * + *
+   * If not specified, the agent's default language is used.
+   * 
+ * + * string language_code = 2; + * + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } + } + /** + * + * + *
+   * If not specified, the agent's default language is used.
+   * 
+ * + * string language_code = 2; + * + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getLanguageCodeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, languageCode_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getLanguageCodeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, languageCode_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest other = + (com.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getLanguageCode().equals(other.getLanguageCode())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for [Agents.GetAgentValidationResult][google.cloud.dialogflow.cx.v3beta1.Agents.GetAgentValidationResult].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest) + com.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.AgentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GetAgentValidationResultRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.AgentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GetAgentValidationResultRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest.Builder.class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + languageCode_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.AgentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GetAgentValidationResultRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest build() { + com.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest result = + new com.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest(this); + result.name_ = name_; + result.languageCode_ = languageCode_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The agent name.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/validationResult`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The agent name.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/validationResult`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The agent name.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/validationResult`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The agent name.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/validationResult`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The agent name.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/validationResult`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object languageCode_ = ""; + /** + * + * + *
+     * If not specified, the agent's default language is used.
+     * 
+ * + * string language_code = 2; + * + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * If not specified, the agent's default language is used.
+     * 
+ * + * string language_code = 2; + * + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * If not specified, the agent's default language is used.
+     * 
+ * + * string language_code = 2; + * + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + languageCode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If not specified, the agent's default language is used.
+     * 
+ * + * string language_code = 2; + * + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + + languageCode_ = getDefaultInstance().getLanguageCode(); + onChanged(); + return this; + } + /** + * + * + *
+     * If not specified, the agent's default language is used.
+     * 
+ * + * string language_code = 2; + * + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + languageCode_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest) + private static final com.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetAgentValidationResultRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetAgentValidationResultRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetExperimentRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetAgentValidationResultRequestOrBuilder.java similarity index 65% rename from proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetExperimentRequestOrBuilder.java rename to proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetAgentValidationResultRequestOrBuilder.java index cd551a79b..229ac9a69 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetExperimentRequestOrBuilder.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetAgentValidationResultRequestOrBuilder.java @@ -14,22 +14,22 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dialogflow/cx/v3beta1/experiment.proto +// source: google/cloud/dialogflow/cx/v3beta1/agent.proto package com.google.cloud.dialogflow.cx.v3beta1; -public interface GetExperimentRequestOrBuilder +public interface GetAgentValidationResultRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest) + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest) com.google.protobuf.MessageOrBuilder { /** * * *
-   * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
+   * Required. The agent name.
    * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * ID>/validationResult`.
    * 
* * @@ -43,9 +43,9 @@ public interface GetExperimentRequestOrBuilder * * *
-   * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
+   * Required. The agent name.
    * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * ID>/validationResult`.
    * 
* * @@ -55,4 +55,29 @@ public interface GetExperimentRequestOrBuilder * @return The bytes for name. */ com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * If not specified, the agent's default language is used.
+   * 
+ * + * string language_code = 2; + * + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + /** + * + * + *
+   * If not specified, the agent's default language is used.
+   * 
+ * + * string language_code = 2; + * + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString getLanguageCodeBytes(); } diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetFlowValidationResultRequest.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetFlowValidationResultRequest.java new file mode 100644 index 000000000..02809b62b --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetFlowValidationResultRequest.java @@ -0,0 +1,856 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/flow.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The request message for [Flows.GetFlowValidationResult][google.cloud.dialogflow.cx.v3beta1.Flows.GetFlowValidationResult].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest} + */ +public final class GetFlowValidationResultRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest) + GetFlowValidationResultRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetFlowValidationResultRequest.newBuilder() to construct. + private GetFlowValidationResultRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetFlowValidationResultRequest() { + name_ = ""; + languageCode_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetFlowValidationResultRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetFlowValidationResultRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + languageCode_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.FlowProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GetFlowValidationResultRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.FlowProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GetFlowValidationResultRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The flow name.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>/validationResult`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The flow name.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>/validationResult`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 2; + private volatile java.lang.Object languageCode_; + /** + * + * + *
+   * If not specified, the agent's default language is used.
+   * 
+ * + * string language_code = 2; + * + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } + } + /** + * + * + *
+   * If not specified, the agent's default language is used.
+   * 
+ * + * string language_code = 2; + * + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getLanguageCodeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, languageCode_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getLanguageCodeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, languageCode_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest other = + (com.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getLanguageCode().equals(other.getLanguageCode())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for [Flows.GetFlowValidationResult][google.cloud.dialogflow.cx.v3beta1.Flows.GetFlowValidationResult].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest) + com.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.FlowProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GetFlowValidationResultRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.FlowProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GetFlowValidationResultRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest.Builder.class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + languageCode_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.FlowProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GetFlowValidationResultRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest build() { + com.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest result = + new com.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest(this); + result.name_ = name_; + result.languageCode_ = languageCode_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The flow name.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>/validationResult`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The flow name.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>/validationResult`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The flow name.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>/validationResult`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The flow name.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>/validationResult`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The flow name.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>/validationResult`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object languageCode_ = ""; + /** + * + * + *
+     * If not specified, the agent's default language is used.
+     * 
+ * + * string language_code = 2; + * + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * If not specified, the agent's default language is used.
+     * 
+ * + * string language_code = 2; + * + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * If not specified, the agent's default language is used.
+     * 
+ * + * string language_code = 2; + * + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + languageCode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If not specified, the agent's default language is used.
+     * 
+ * + * string language_code = 2; + * + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + + languageCode_ = getDefaultInstance().getLanguageCode(); + onChanged(); + return this; + } + /** + * + * + *
+     * If not specified, the agent's default language is used.
+     * 
+ * + * string language_code = 2; + * + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + languageCode_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest) + private static final com.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetFlowValidationResultRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetFlowValidationResultRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetFlowValidationResultRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetFlowValidationResultRequestOrBuilder.java new file mode 100644 index 000000000..e32bbd0f4 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetFlowValidationResultRequestOrBuilder.java @@ -0,0 +1,83 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/flow.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface GetFlowValidationResultRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The flow name.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>/validationResult`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The flow name.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>/validationResult`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * If not specified, the agent's default language is used.
+   * 
+ * + * string language_code = 2; + * + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + /** + * + * + *
+   * If not specified, the agent's default language is used.
+   * 
+ * + * string language_code = 2; + * + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString getLanguageCodeBytes(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetExperimentRequest.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetTestCaseRequest.java similarity index 73% rename from proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetExperimentRequest.java rename to proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetTestCaseRequest.java index 4f8e2a29e..3e7c132de 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetExperimentRequest.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetTestCaseRequest.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dialogflow/cx/v3beta1/experiment.proto +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto package com.google.cloud.dialogflow.cx.v3beta1; @@ -22,29 +22,29 @@ * * *
- * The request message for [Experiments.GetExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.GetExperiment].
+ * The request message for [TestCases.GetTestCase][google.cloud.dialogflow.cx.v3beta1.TestCases.GetTestCase].
  * 
* - * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest} + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest} */ -public final class GetExperimentRequest extends com.google.protobuf.GeneratedMessageV3 +public final class GetTestCaseRequest extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest) - GetExperimentRequestOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest) + GetTestCaseRequestOrBuilder { private static final long serialVersionUID = 0L; - // Use GetExperimentRequest.newBuilder() to construct. - private GetExperimentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use GetTestCaseRequest.newBuilder() to construct. + private GetTestCaseRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private GetExperimentRequest() { + private GetTestCaseRequest() { name_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetExperimentRequest(); + return new GetTestCaseRequest(); } @java.lang.Override @@ -52,7 +52,7 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetExperimentRequest( + private GetTestCaseRequest( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -97,18 +97,18 @@ private GetExperimentRequest( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_GetExperimentRequest_descriptor; + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GetTestCaseRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_GetExperimentRequest_fieldAccessorTable + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GetTestCaseRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest.class, - com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest.Builder.class); + com.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest.Builder.class); } public static final int NAME_FIELD_NUMBER = 1; @@ -117,9 +117,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
+   * Required. The name of the testcase.
    * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * ID>/testCases/<TestCase ID>`.
    * 
* * @@ -144,9 +144,9 @@ public java.lang.String getName() { * * *
-   * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
+   * Required. The name of the testcase.
    * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * ID>/testCases/<TestCase ID>`.
    * 
* * @@ -207,11 +207,11 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest)) { + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest)) { return super.equals(obj); } - com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest other = - (com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest) obj; + com.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest other = + (com.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest) obj; if (!getName().equals(other.getName())) return false; if (!unknownFields.equals(other.unknownFields)) return false; @@ -232,71 +232,71 @@ public int hashCode() { return hash; } - public static com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest parseFrom(byte[] data) + public static com.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest parseDelimitedFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest parseDelimitedFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -314,7 +314,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest prototype) { + com.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -332,31 +332,31 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The request message for [Experiments.GetExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.GetExperiment].
+   * The request message for [TestCases.GetTestCase][google.cloud.dialogflow.cx.v3beta1.TestCases.GetTestCase].
    * 
* - * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest} + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest) - com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequestOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest) + com.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_GetExperimentRequest_descriptor; + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GetTestCaseRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_GetExperimentRequest_fieldAccessorTable + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GetTestCaseRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest.class, - com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest.Builder.class); + com.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest.Builder.class); } - // Construct using com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest.newBuilder() + // Construct using com.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -380,18 +380,18 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_GetExperimentRequest_descriptor; + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GetTestCaseRequest_descriptor; } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest getDefaultInstanceForType() { - return com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest.getDefaultInstance(); + public com.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest.getDefaultInstance(); } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest build() { - com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest result = buildPartial(); + public com.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest build() { + com.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -399,9 +399,9 @@ public com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest build() { } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest buildPartial() { - com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest result = - new com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest(this); + public com.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest result = + new com.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest(this); result.name_ = name_; onBuilt(); return result; @@ -442,16 +442,16 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest) { - return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest) other); + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest other) { - if (other == com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest.getDefaultInstance()) + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; @@ -472,12 +472,12 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest parsedMessage = null; + com.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = - (com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest) e.getUnfinishedMessage(); + (com.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -492,9 +492,9 @@ public Builder mergeFrom( * * *
-     * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
+     * Required. The name of the testcase.
      * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * ID>/testCases/<TestCase ID>`.
      * 
* * @@ -518,9 +518,9 @@ public java.lang.String getName() { * * *
-     * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
+     * Required. The name of the testcase.
      * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * ID>/testCases/<TestCase ID>`.
      * 
* * @@ -544,9 +544,9 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-     * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
+     * Required. The name of the testcase.
      * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * ID>/testCases/<TestCase ID>`.
      * 
* * @@ -569,9 +569,9 @@ public Builder setName(java.lang.String value) { * * *
-     * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
+     * Required. The name of the testcase.
      * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * ID>/testCases/<TestCase ID>`.
      * 
* * @@ -590,9 +590,9 @@ public Builder clearName() { * * *
-     * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
+     * Required. The name of the testcase.
      * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * ID>/testCases/<TestCase ID>`.
      * 
* * @@ -624,42 +624,42 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest) + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest) } - // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest) - private static final com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest) + private static final com.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest(); + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest(); } - public static com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest getDefaultInstance() { + public static com.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public GetExperimentRequest parsePartialFrom( + public GetTestCaseRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetExperimentRequest(input, extensionRegistry); + return new GetTestCaseRequest(input, extensionRegistry); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest getDefaultInstanceForType() { + public com.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/StopExperimentRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetTestCaseRequestOrBuilder.java similarity index 77% rename from proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/StopExperimentRequestOrBuilder.java rename to proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetTestCaseRequestOrBuilder.java index 8aed1c386..ba9878069 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/StopExperimentRequestOrBuilder.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetTestCaseRequestOrBuilder.java @@ -14,22 +14,22 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dialogflow/cx/v3beta1/experiment.proto +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto package com.google.cloud.dialogflow.cx.v3beta1; -public interface StopExperimentRequestOrBuilder +public interface GetTestCaseRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest) + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest) com.google.protobuf.MessageOrBuilder { /** * * *
-   * Required. Resource name of the experiment to stop.
+   * Required. The name of the testcase.
    * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * ID>/testCases/<TestCase ID>`.
    * 
* * @@ -43,9 +43,9 @@ public interface StopExperimentRequestOrBuilder * * *
-   * Required. Resource name of the experiment to stop.
+   * Required. The name of the testcase.
    * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * ID>/testCases/<TestCase ID>`.
    * 
* * diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportTestCasesMetadata.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportTestCasesMetadata.java new file mode 100644 index 000000000..e75530e45 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportTestCasesMetadata.java @@ -0,0 +1,969 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * Metadata returned for the [TestCases.ImportTestCases][google.cloud.dialogflow.cx.v3beta1.TestCases.ImportTestCases] long running
+ * operation.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata} + */ +public final class ImportTestCasesMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata) + ImportTestCasesMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImportTestCasesMetadata.newBuilder() to construct. + private ImportTestCasesMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImportTestCasesMetadata() { + errors_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImportTestCasesMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ImportTestCasesMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + errors_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + errors_.add( + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.TestCaseError.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + errors_ = java.util.Collections.unmodifiableList(errors_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ImportTestCasesMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ImportTestCasesMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata.class, + com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata.Builder.class); + } + + public static final int ERRORS_FIELD_NUMBER = 1; + private java.util.List errors_; + /** + * + * + *
+   * Errors for failed test cases.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseError errors = 1; + */ + @java.lang.Override + public java.util.List getErrorsList() { + return errors_; + } + /** + * + * + *
+   * Errors for failed test cases.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseError errors = 1; + */ + @java.lang.Override + public java.util.List + getErrorsOrBuilderList() { + return errors_; + } + /** + * + * + *
+   * Errors for failed test cases.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseError errors = 1; + */ + @java.lang.Override + public int getErrorsCount() { + return errors_.size(); + } + /** + * + * + *
+   * Errors for failed test cases.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseError errors = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TestCaseError getErrors(int index) { + return errors_.get(index); + } + /** + * + * + *
+   * Errors for failed test cases.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseError errors = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TestCaseErrorOrBuilder getErrorsOrBuilder( + int index) { + return errors_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < errors_.size(); i++) { + output.writeMessage(1, errors_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < errors_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, errors_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata other = + (com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata) obj; + + if (!getErrorsList().equals(other.getErrorsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getErrorsCount() > 0) { + hash = (37 * hash) + ERRORS_FIELD_NUMBER; + hash = (53 * hash) + getErrorsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata returned for the [TestCases.ImportTestCases][google.cloud.dialogflow.cx.v3beta1.TestCases.ImportTestCases] long running
+   * operation.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata) + com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ImportTestCasesMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ImportTestCasesMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata.class, + com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getErrorsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (errorsBuilder_ == null) { + errors_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + errorsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ImportTestCasesMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata build() { + com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata result = + new com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata(this); + int from_bitField0_ = bitField0_; + if (errorsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + errors_ = java.util.Collections.unmodifiableList(errors_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.errors_ = errors_; + } else { + result.errors_ = errorsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata.getDefaultInstance()) + return this; + if (errorsBuilder_ == null) { + if (!other.errors_.isEmpty()) { + if (errors_.isEmpty()) { + errors_ = other.errors_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureErrorsIsMutable(); + errors_.addAll(other.errors_); + } + onChanged(); + } + } else { + if (!other.errors_.isEmpty()) { + if (errorsBuilder_.isEmpty()) { + errorsBuilder_.dispose(); + errorsBuilder_ = null; + errors_ = other.errors_; + bitField0_ = (bitField0_ & ~0x00000001); + errorsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getErrorsFieldBuilder() + : null; + } else { + errorsBuilder_.addAllMessages(other.errors_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List errors_ = + java.util.Collections.emptyList(); + + private void ensureErrorsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + errors_ = + new java.util.ArrayList(errors_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TestCaseError, + com.google.cloud.dialogflow.cx.v3beta1.TestCaseError.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TestCaseErrorOrBuilder> + errorsBuilder_; + + /** + * + * + *
+     * Errors for failed test cases.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseError errors = 1; + */ + public java.util.List getErrorsList() { + if (errorsBuilder_ == null) { + return java.util.Collections.unmodifiableList(errors_); + } else { + return errorsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Errors for failed test cases.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseError errors = 1; + */ + public int getErrorsCount() { + if (errorsBuilder_ == null) { + return errors_.size(); + } else { + return errorsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Errors for failed test cases.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseError errors = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.TestCaseError getErrors(int index) { + if (errorsBuilder_ == null) { + return errors_.get(index); + } else { + return errorsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Errors for failed test cases.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseError errors = 1; + */ + public Builder setErrors( + int index, com.google.cloud.dialogflow.cx.v3beta1.TestCaseError value) { + if (errorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorsIsMutable(); + errors_.set(index, value); + onChanged(); + } else { + errorsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Errors for failed test cases.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseError errors = 1; + */ + public Builder setErrors( + int index, com.google.cloud.dialogflow.cx.v3beta1.TestCaseError.Builder builderForValue) { + if (errorsBuilder_ == null) { + ensureErrorsIsMutable(); + errors_.set(index, builderForValue.build()); + onChanged(); + } else { + errorsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Errors for failed test cases.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseError errors = 1; + */ + public Builder addErrors(com.google.cloud.dialogflow.cx.v3beta1.TestCaseError value) { + if (errorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorsIsMutable(); + errors_.add(value); + onChanged(); + } else { + errorsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Errors for failed test cases.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseError errors = 1; + */ + public Builder addErrors( + int index, com.google.cloud.dialogflow.cx.v3beta1.TestCaseError value) { + if (errorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorsIsMutable(); + errors_.add(index, value); + onChanged(); + } else { + errorsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Errors for failed test cases.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseError errors = 1; + */ + public Builder addErrors( + com.google.cloud.dialogflow.cx.v3beta1.TestCaseError.Builder builderForValue) { + if (errorsBuilder_ == null) { + ensureErrorsIsMutable(); + errors_.add(builderForValue.build()); + onChanged(); + } else { + errorsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Errors for failed test cases.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseError errors = 1; + */ + public Builder addErrors( + int index, com.google.cloud.dialogflow.cx.v3beta1.TestCaseError.Builder builderForValue) { + if (errorsBuilder_ == null) { + ensureErrorsIsMutable(); + errors_.add(index, builderForValue.build()); + onChanged(); + } else { + errorsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Errors for failed test cases.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseError errors = 1; + */ + public Builder addAllErrors( + java.lang.Iterable values) { + if (errorsBuilder_ == null) { + ensureErrorsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, errors_); + onChanged(); + } else { + errorsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Errors for failed test cases.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseError errors = 1; + */ + public Builder clearErrors() { + if (errorsBuilder_ == null) { + errors_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + errorsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Errors for failed test cases.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseError errors = 1; + */ + public Builder removeErrors(int index) { + if (errorsBuilder_ == null) { + ensureErrorsIsMutable(); + errors_.remove(index); + onChanged(); + } else { + errorsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Errors for failed test cases.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseError errors = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.TestCaseError.Builder getErrorsBuilder( + int index) { + return getErrorsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Errors for failed test cases.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseError errors = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.TestCaseErrorOrBuilder getErrorsOrBuilder( + int index) { + if (errorsBuilder_ == null) { + return errors_.get(index); + } else { + return errorsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Errors for failed test cases.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseError errors = 1; + */ + public java.util.List + getErrorsOrBuilderList() { + if (errorsBuilder_ != null) { + return errorsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(errors_); + } + } + /** + * + * + *
+     * Errors for failed test cases.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseError errors = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.TestCaseError.Builder addErrorsBuilder() { + return getErrorsFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3beta1.TestCaseError.getDefaultInstance()); + } + /** + * + * + *
+     * Errors for failed test cases.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseError errors = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.TestCaseError.Builder addErrorsBuilder( + int index) { + return getErrorsFieldBuilder() + .addBuilder( + index, com.google.cloud.dialogflow.cx.v3beta1.TestCaseError.getDefaultInstance()); + } + /** + * + * + *
+     * Errors for failed test cases.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseError errors = 1; + */ + public java.util.List + getErrorsBuilderList() { + return getErrorsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TestCaseError, + com.google.cloud.dialogflow.cx.v3beta1.TestCaseError.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TestCaseErrorOrBuilder> + getErrorsFieldBuilder() { + if (errorsBuilder_ == null) { + errorsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TestCaseError, + com.google.cloud.dialogflow.cx.v3beta1.TestCaseError.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TestCaseErrorOrBuilder>( + errors_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + errors_ = null; + } + return errorsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata) + private static final com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportTestCasesMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImportTestCasesMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportTestCasesMetadataOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportTestCasesMetadataOrBuilder.java new file mode 100644 index 000000000..3c76292fe --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportTestCasesMetadataOrBuilder.java @@ -0,0 +1,77 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface ImportTestCasesMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Errors for failed test cases.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseError errors = 1; + */ + java.util.List getErrorsList(); + /** + * + * + *
+   * Errors for failed test cases.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseError errors = 1; + */ + com.google.cloud.dialogflow.cx.v3beta1.TestCaseError getErrors(int index); + /** + * + * + *
+   * Errors for failed test cases.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseError errors = 1; + */ + int getErrorsCount(); + /** + * + * + *
+   * Errors for failed test cases.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseError errors = 1; + */ + java.util.List + getErrorsOrBuilderList(); + /** + * + * + *
+   * Errors for failed test cases.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseError errors = 1; + */ + com.google.cloud.dialogflow.cx.v3beta1.TestCaseErrorOrBuilder getErrorsOrBuilder(int index); +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportTestCasesRequest.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportTestCasesRequest.java new file mode 100644 index 000000000..a6521a9a0 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportTestCasesRequest.java @@ -0,0 +1,1067 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The request message for [TestCases.ImportTestCases][google.cloud.dialogflow.cx.v3beta1.TestCases.ImportTestCases].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest} + */ +public final class ImportTestCasesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest) + ImportTestCasesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImportTestCasesRequest.newBuilder() to construct. + private ImportTestCasesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImportTestCasesRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImportTestCasesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ImportTestCasesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + sourceCase_ = 2; + source_ = s; + break; + } + case 26: + { + sourceCase_ = 3; + source_ = input.readBytes(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ImportTestCasesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ImportTestCasesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest.Builder.class); + } + + private int sourceCase_ = 0; + private java.lang.Object source_; + + public enum SourceCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GCS_URI(2), + CONTENT(3), + SOURCE_NOT_SET(0); + private final int value; + + private SourceCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SourceCase valueOf(int value) { + return forNumber(value); + } + + public static SourceCase forNumber(int value) { + switch (value) { + case 2: + return GCS_URI; + case 3: + return CONTENT; + case 0: + return SOURCE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public SourceCase getSourceCase() { + return SourceCase.forNumber(sourceCase_); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The agent to import test cases to.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The agent to import test cases to.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GCS_URI_FIELD_NUMBER = 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://<bucket-name>/<object-name>`.
+   * 
+ * + * string gcs_uri = 2; + * + * @return The gcsUri. + */ + public java.lang.String getGcsUri() { + java.lang.Object ref = ""; + if (sourceCase_ == 2) { + ref = source_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (sourceCase_ == 2) { + source_ = s; + } + return s; + } + } + /** + * + * + *
+   * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI
+   * to import test cases from. The format of this URI must be
+   * `gs://<bucket-name>/<object-name>`.
+   * 
+ * + * string gcs_uri = 2; + * + * @return The bytes for gcsUri. + */ + public com.google.protobuf.ByteString getGcsUriBytes() { + java.lang.Object ref = ""; + if (sourceCase_ == 2) { + ref = source_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (sourceCase_ == 2) { + source_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONTENT_FIELD_NUMBER = 3; + /** + * + * + *
+   * Uncompressed raw byte content for test cases.
+   * 
+ * + * bytes content = 3; + * + * @return The content. + */ + @java.lang.Override + public com.google.protobuf.ByteString getContent() { + if (sourceCase_ == 3) { + return (com.google.protobuf.ByteString) source_; + } + return com.google.protobuf.ByteString.EMPTY; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (sourceCase_ == 2) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, source_); + } + if (sourceCase_ == 3) { + output.writeBytes(3, (com.google.protobuf.ByteString) source_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (sourceCase_ == 2) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, source_); + } + if (sourceCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeBytesSize( + 3, (com.google.protobuf.ByteString) source_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest other = + (com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getSourceCase().equals(other.getSourceCase())) return false; + switch (sourceCase_) { + case 2: + if (!getGcsUri().equals(other.getGcsUri())) return false; + break; + case 3: + if (!getContent().equals(other.getContent())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + switch (sourceCase_) { + case 2: + hash = (37 * hash) + GCS_URI_FIELD_NUMBER; + hash = (53 * hash) + getGcsUri().hashCode(); + break; + case 3: + hash = (37 * hash) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for [TestCases.ImportTestCases][google.cloud.dialogflow.cx.v3beta1.TestCases.ImportTestCases].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest) + com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ImportTestCasesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ImportTestCasesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + sourceCase_ = 0; + source_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ImportTestCasesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest build() { + com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest result = + new com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest(this); + result.parent_ = parent_; + if (sourceCase_ == 2) { + result.source_ = source_; + } + if (sourceCase_ == 3) { + result.source_ = source_; + } + result.sourceCase_ = sourceCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + switch (other.getSourceCase()) { + case GCS_URI: + { + sourceCase_ = 2; + source_ = other.source_; + onChanged(); + break; + } + case CONTENT: + { + setContent(other.getContent()); + break; + } + case SOURCE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int sourceCase_ = 0; + private java.lang.Object source_; + + public SourceCase getSourceCase() { + return SourceCase.forNumber(sourceCase_); + } + + public Builder clearSource() { + sourceCase_ = 0; + source_ = null; + onChanged(); + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The agent to import test cases to.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The agent to import test cases to.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The agent to import test cases to.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The agent to import test cases to.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The agent to import test cases to.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + 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://<bucket-name>/<object-name>`.
+     * 
+ * + * string gcs_uri = 2; + * + * @return The gcsUri. + */ + @java.lang.Override + public java.lang.String getGcsUri() { + java.lang.Object ref = ""; + if (sourceCase_ == 2) { + ref = source_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (sourceCase_ == 2) { + source_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI
+     * to import test cases from. The format of this URI must be
+     * `gs://<bucket-name>/<object-name>`.
+     * 
+ * + * string gcs_uri = 2; + * + * @return The bytes for gcsUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGcsUriBytes() { + java.lang.Object ref = ""; + if (sourceCase_ == 2) { + ref = source_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (sourceCase_ == 2) { + source_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI
+     * to import test cases from. The format of this URI must be
+     * `gs://<bucket-name>/<object-name>`.
+     * 
+ * + * string gcs_uri = 2; + * + * @param value The gcsUri to set. + * @return This builder for chaining. + */ + public Builder setGcsUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sourceCase_ = 2; + source_ = value; + onChanged(); + 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://<bucket-name>/<object-name>`.
+     * 
+ * + * string gcs_uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearGcsUri() { + if (sourceCase_ == 2) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + 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://<bucket-name>/<object-name>`.
+     * 
+ * + * string gcs_uri = 2; + * + * @param value The bytes for gcsUri to set. + * @return This builder for chaining. + */ + public Builder setGcsUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sourceCase_ = 2; + source_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Uncompressed raw byte content for test cases.
+     * 
+ * + * bytes content = 3; + * + * @return The content. + */ + public com.google.protobuf.ByteString getContent() { + if (sourceCase_ == 3) { + return (com.google.protobuf.ByteString) source_; + } + return com.google.protobuf.ByteString.EMPTY; + } + /** + * + * + *
+     * Uncompressed raw byte content for test cases.
+     * 
+ * + * bytes content = 3; + * + * @param value The content to set. + * @return This builder for chaining. + */ + public Builder setContent(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + sourceCase_ = 3; + source_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Uncompressed raw byte content for test cases.
+     * 
+ * + * bytes content = 3; + * + * @return This builder for chaining. + */ + public Builder clearContent() { + if (sourceCase_ == 3) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest) + private static final com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportTestCasesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImportTestCasesRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportTestCasesRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportTestCasesRequestOrBuilder.java new file mode 100644 index 000000000..628dd191e --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportTestCasesRequestOrBuilder.java @@ -0,0 +1,100 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface ImportTestCasesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The agent to import test cases to.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The agent to import test cases to.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI
+   * to import test cases from. The format of this URI must be
+   * `gs://<bucket-name>/<object-name>`.
+   * 
+ * + * string gcs_uri = 2; + * + * @return The gcsUri. + */ + java.lang.String getGcsUri(); + /** + * + * + *
+   * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI
+   * to import test cases from. The format of this URI must be
+   * `gs://<bucket-name>/<object-name>`.
+   * 
+ * + * string gcs_uri = 2; + * + * @return The bytes for gcsUri. + */ + com.google.protobuf.ByteString getGcsUriBytes(); + + /** + * + * + *
+   * Uncompressed raw byte content for test cases.
+   * 
+ * + * bytes content = 3; + * + * @return The content. + */ + com.google.protobuf.ByteString getContent(); + + public com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest.SourceCase getSourceCase(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportTestCasesResponse.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportTestCasesResponse.java new file mode 100644 index 000000000..f09494313 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportTestCasesResponse.java @@ -0,0 +1,770 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The response message for [TestCases.ImportTestCases][google.cloud.dialogflow.cx.v3beta1.TestCases.ImportTestCases].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse} + */ +public final class ImportTestCasesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse) + ImportTestCasesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImportTestCasesResponse.newBuilder() to construct. + private ImportTestCasesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImportTestCasesResponse() { + names_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImportTestCasesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ImportTestCasesResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + names_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + names_.add(s); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + names_ = names_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ImportTestCasesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ImportTestCasesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse.class, + com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse.Builder.class); + } + + public static final int NAMES_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList names_; + /** + * + * + *
+   * The unique identifiers of the new test cases.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/testCases/<TestCase ID>`.
+   * 
+ * + * repeated string names = 1 [(.google.api.resource_reference) = { ... } + * + * @return A list containing the names. + */ + public com.google.protobuf.ProtocolStringList getNamesList() { + return names_; + } + /** + * + * + *
+   * The unique identifiers of the new test cases.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/testCases/<TestCase ID>`.
+   * 
+ * + * repeated string names = 1 [(.google.api.resource_reference) = { ... } + * + * @return The count of names. + */ + public int getNamesCount() { + return names_.size(); + } + /** + * + * + *
+   * The unique identifiers of the new test cases.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/testCases/<TestCase ID>`.
+   * 
+ * + * repeated string names = 1 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the element to return. + * @return The names at the given index. + */ + public java.lang.String getNames(int index) { + return names_.get(index); + } + /** + * + * + *
+   * The unique identifiers of the new test cases.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/testCases/<TestCase ID>`.
+   * 
+ * + * repeated string names = 1 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the value to return. + * @return The bytes of the names at the given index. + */ + public com.google.protobuf.ByteString getNamesBytes(int index) { + return names_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < names_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, names_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < names_.size(); i++) { + dataSize += computeStringSizeNoTag(names_.getRaw(i)); + } + size += dataSize; + size += 1 * getNamesList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse other = + (com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse) obj; + + if (!getNamesList().equals(other.getNamesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getNamesCount() > 0) { + hash = (37 * hash) + NAMES_FIELD_NUMBER; + hash = (53 * hash) + getNamesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The response message for [TestCases.ImportTestCases][google.cloud.dialogflow.cx.v3beta1.TestCases.ImportTestCases].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse) + com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ImportTestCasesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ImportTestCasesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse.class, + com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + names_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ImportTestCasesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse build() { + com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse result = + new com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + names_ = names_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.names_ = names_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse.getDefaultInstance()) + return this; + if (!other.names_.isEmpty()) { + if (names_.isEmpty()) { + names_ = other.names_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureNamesIsMutable(); + names_.addAll(other.names_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringList names_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureNamesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + names_ = new com.google.protobuf.LazyStringArrayList(names_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * The unique identifiers of the new test cases.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/testCases/<TestCase ID>`.
+     * 
+ * + * repeated string names = 1 [(.google.api.resource_reference) = { ... } + * + * @return A list containing the names. + */ + public com.google.protobuf.ProtocolStringList getNamesList() { + return names_.getUnmodifiableView(); + } + /** + * + * + *
+     * The unique identifiers of the new test cases.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/testCases/<TestCase ID>`.
+     * 
+ * + * repeated string names = 1 [(.google.api.resource_reference) = { ... } + * + * @return The count of names. + */ + public int getNamesCount() { + return names_.size(); + } + /** + * + * + *
+     * The unique identifiers of the new test cases.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/testCases/<TestCase ID>`.
+     * 
+ * + * repeated string names = 1 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the element to return. + * @return The names at the given index. + */ + public java.lang.String getNames(int index) { + return names_.get(index); + } + /** + * + * + *
+     * The unique identifiers of the new test cases.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/testCases/<TestCase ID>`.
+     * 
+ * + * repeated string names = 1 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the value to return. + * @return The bytes of the names at the given index. + */ + public com.google.protobuf.ByteString getNamesBytes(int index) { + return names_.getByteString(index); + } + /** + * + * + *
+     * The unique identifiers of the new test cases.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/testCases/<TestCase ID>`.
+     * 
+ * + * repeated string names = 1 [(.google.api.resource_reference) = { ... } + * + * @param index The index to set the value at. + * @param value The names to set. + * @return This builder for chaining. + */ + public Builder setNames(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureNamesIsMutable(); + names_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * The unique identifiers of the new test cases.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/testCases/<TestCase ID>`.
+     * 
+ * + * repeated string names = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The names to add. + * @return This builder for chaining. + */ + public Builder addNames(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureNamesIsMutable(); + names_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * The unique identifiers of the new test cases.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/testCases/<TestCase ID>`.
+     * 
+ * + * repeated string names = 1 [(.google.api.resource_reference) = { ... } + * + * @param values The names to add. + * @return This builder for chaining. + */ + public Builder addAllNames(java.lang.Iterable values) { + ensureNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, names_); + onChanged(); + return this; + } + /** + * + * + *
+     * The unique identifiers of the new test cases.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/testCases/<TestCase ID>`.
+     * 
+ * + * repeated string names = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearNames() { + names_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The unique identifiers of the new test cases.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/testCases/<TestCase ID>`.
+     * 
+ * + * repeated string names = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes of the names to add. + * @return This builder for chaining. + */ + public Builder addNamesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureNamesIsMutable(); + names_.add(value); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse) + private static final com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportTestCasesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImportTestCasesResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportTestCasesResponseOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportTestCasesResponseOrBuilder.java new file mode 100644 index 000000000..0ec53b0f5 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportTestCasesResponseOrBuilder.java @@ -0,0 +1,84 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface ImportTestCasesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The unique identifiers of the new test cases.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/testCases/<TestCase ID>`.
+   * 
+ * + * repeated string names = 1 [(.google.api.resource_reference) = { ... } + * + * @return A list containing the names. + */ + java.util.List getNamesList(); + /** + * + * + *
+   * The unique identifiers of the new test cases.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/testCases/<TestCase ID>`.
+   * 
+ * + * repeated string names = 1 [(.google.api.resource_reference) = { ... } + * + * @return The count of names. + */ + int getNamesCount(); + /** + * + * + *
+   * The unique identifiers of the new test cases.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/testCases/<TestCase ID>`.
+   * 
+ * + * repeated string names = 1 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the element to return. + * @return The names at the given index. + */ + java.lang.String getNames(int index); + /** + * + * + *
+   * The unique identifiers of the new test cases.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/testCases/<TestCase ID>`.
+   * 
+ * + * repeated string names = 1 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the value to return. + * @return The bytes of the names at the given index. + */ + com.google.protobuf.ByteString getNamesBytes(int index); +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Intent.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Intent.java index d571ab7a4..05246b971 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Intent.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Intent.java @@ -2912,9 +2912,12 @@ public interface ParameterOrBuilder * * *
-     * Indicates whether the parameter content is logged in text and audio. If
-     * it is set to true, the parameter content will be replaced to parameter
-     * id in both request and response. The default value is false.
+     * Indicates whether the parameter content should be redacted in text and
+     * audio. If the flag is set to true, the parameter content will be replaced
+     * by parameter name in both request and response.
+     * Note: the parameter content is subject to redaction if either parameter
+     * level redaction or [entity type level redaction][google.cloud.dialogflow.cx.v3beta1.EntityType.redact] is
+     * enabled.
      * 
* * bool redact = 4; @@ -3174,9 +3177,12 @@ public boolean getIsList() { * * *
-     * Indicates whether the parameter content is logged in text and audio. If
-     * it is set to true, the parameter content will be replaced to parameter
-     * id in both request and response. The default value is false.
+     * Indicates whether the parameter content should be redacted in text and
+     * audio. If the flag is set to true, the parameter content will be replaced
+     * by parameter name in both request and response.
+     * Note: the parameter content is subject to redaction if either parameter
+     * level redaction or [entity type level redaction][google.cloud.dialogflow.cx.v3beta1.EntityType.redact] is
+     * enabled.
      * 
* * bool redact = 4; @@ -3871,9 +3877,12 @@ public Builder clearIsList() { * * *
-       * Indicates whether the parameter content is logged in text and audio. If
-       * it is set to true, the parameter content will be replaced to parameter
-       * id in both request and response. The default value is false.
+       * Indicates whether the parameter content should be redacted in text and
+       * audio. If the flag is set to true, the parameter content will be replaced
+       * by parameter name in both request and response.
+       * Note: the parameter content is subject to redaction if either parameter
+       * level redaction or [entity type level redaction][google.cloud.dialogflow.cx.v3beta1.EntityType.redact] is
+       * enabled.
        * 
* * bool redact = 4; @@ -3888,9 +3897,12 @@ public boolean getRedact() { * * *
-       * Indicates whether the parameter content is logged in text and audio. If
-       * it is set to true, the parameter content will be replaced to parameter
-       * id in both request and response. The default value is false.
+       * Indicates whether the parameter content should be redacted in text and
+       * audio. If the flag is set to true, the parameter content will be replaced
+       * by parameter name in both request and response.
+       * Note: the parameter content is subject to redaction if either parameter
+       * level redaction or [entity type level redaction][google.cloud.dialogflow.cx.v3beta1.EntityType.redact] is
+       * enabled.
        * 
* * bool redact = 4; @@ -3908,9 +3920,12 @@ public Builder setRedact(boolean value) { * * *
-       * Indicates whether the parameter content is logged in text and audio. If
-       * it is set to true, the parameter content will be replaced to parameter
-       * id in both request and response. The default value is false.
+       * Indicates whether the parameter content should be redacted in text and
+       * audio. If the flag is set to true, the parameter content will be replaced
+       * by parameter name in both request and response.
+       * Note: the parameter content is subject to redaction if either parameter
+       * level redaction or [entity type level redaction][google.cloud.dialogflow.cx.v3beta1.EntityType.redact] is
+       * enabled.
        * 
* * bool redact = 4; diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VersionVariants.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/IntentCoverage.java similarity index 51% rename from proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VersionVariants.java rename to proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/IntentCoverage.java index 2cf87f7bd..8f611bae1 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VersionVariants.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/IntentCoverage.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dialogflow/cx/v3beta1/experiment.proto +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto package com.google.cloud.dialogflow.cx.v3beta1; @@ -22,29 +22,30 @@ * * *
- * A list of flow version variants.
+ * Intent coverage represents the percentage of all possible intents in the
+ * agent that are triggered in any of a parent's test cases.
  * 
* - * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.VersionVariants} + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.IntentCoverage} */ -public final class VersionVariants extends com.google.protobuf.GeneratedMessageV3 +public final class IntentCoverage extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.VersionVariants) - VersionVariantsOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.IntentCoverage) + IntentCoverageOrBuilder { private static final long serialVersionUID = 0L; - // Use VersionVariants.newBuilder() to construct. - private VersionVariants(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use IntentCoverage.newBuilder() to construct. + private IntentCoverage(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private VersionVariants() { - variants_ = java.util.Collections.emptyList(); + private IntentCoverage() { + intents_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new VersionVariants(); + return new IntentCoverage(); } @java.lang.Override @@ -52,7 +53,7 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private VersionVariants( + private IntentCoverage( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -74,17 +75,22 @@ private VersionVariants( case 10: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { - variants_ = + intents_ = new java.util.ArrayList< - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant>(); + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent>(); mutable_bitField0_ |= 0x00000001; } - variants_.add( + intents_.add( input.readMessage( - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant.parser(), + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent.parser(), extensionRegistry)); break; } + case 21: + { + coverageScore_ = input.readFloat(); + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -100,7 +106,7 @@ private VersionVariants( throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000001) != 0)) { - variants_ = java.util.Collections.unmodifiableList(variants_); + intents_ = java.util.Collections.unmodifiableList(intents_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); @@ -108,108 +114,91 @@ private VersionVariants( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_VersionVariants_descriptor; + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_IntentCoverage_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_VersionVariants_fieldAccessorTable + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_IntentCoverage_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.class, - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Builder.class); + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.class, + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Builder.class); } - public interface VariantOrBuilder + public interface IntentOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant) + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent) com.google.protobuf.MessageOrBuilder { /** * * *
-     * The name of the flow version.
-     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/flows/<Flow ID>/versions/<Version ID>`.
+     * The intent full resource name
      * 
* - * string version = 1; + * string intent = 1 [(.google.api.resource_reference) = { ... } * - * @return The version. + * @return The intent. */ - java.lang.String getVersion(); + java.lang.String getIntent(); /** * * *
-     * The name of the flow version.
-     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/flows/<Flow ID>/versions/<Version ID>`.
+     * The intent full resource name
      * 
* - * string version = 1; + * string intent = 1 [(.google.api.resource_reference) = { ... } * - * @return The bytes for version. + * @return The bytes for intent. */ - com.google.protobuf.ByteString getVersionBytes(); + com.google.protobuf.ByteString getIntentBytes(); /** * * *
-     * 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.
+     * Whether or not the intent is covered by at least one of the agent's
+     * test cases.
      * 
* - * float traffic_allocation = 2; + * bool covered = 2; * - * @return The trafficAllocation. + * @return The covered. */ - float getTrafficAllocation(); - - /** - * - * - *
-     * Whether the variant is for the control group.
-     * 
- * - * bool is_control_group = 3; - * - * @return The isControlGroup. - */ - boolean getIsControlGroup(); + boolean getCovered(); } /** * * *
-   * A single flow version with specified traffic allocation.
+   * The agent's intent.
    * 
* - * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant} + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent} */ - public static final class Variant extends com.google.protobuf.GeneratedMessageV3 + public static final class Intent extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant) - VariantOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent) + IntentOrBuilder { private static final long serialVersionUID = 0L; - // Use Variant.newBuilder() to construct. - private Variant(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use Intent.newBuilder() to construct. + private Intent(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private Variant() { - version_ = ""; + private Intent() { + intent_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Variant(); + return new Intent(); } @java.lang.Override @@ -217,7 +206,7 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Variant( + private Intent( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -239,17 +228,12 @@ private Variant( { java.lang.String s = input.readStringRequireUtf8(); - version_ = s; - break; - } - case 21: - { - trafficAllocation_ = input.readFloat(); + intent_ = s; break; } - case 24: + case 16: { - isControlGroup_ = input.readBool(); + covered_ = input.readBool(); break; } default: @@ -272,44 +256,42 @@ private Variant( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_VersionVariants_Variant_descriptor; + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_IntentCoverage_Intent_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_VersionVariants_Variant_fieldAccessorTable + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_IntentCoverage_Intent_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant.class, - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant.Builder.class); + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent.class, + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent.Builder.class); } - public static final int VERSION_FIELD_NUMBER = 1; - private volatile java.lang.Object version_; + public static final int INTENT_FIELD_NUMBER = 1; + private volatile java.lang.Object intent_; /** * * *
-     * The name of the flow version.
-     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/flows/<Flow ID>/versions/<Version ID>`.
+     * The intent full resource name
      * 
* - * string version = 1; + * string intent = 1 [(.google.api.resource_reference) = { ... } * - * @return The version. + * @return The intent. */ @java.lang.Override - public java.lang.String getVersion() { - java.lang.Object ref = version_; + public java.lang.String getIntent() { + java.lang.Object ref = intent_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - version_ = s; + intent_ = s; return s; } } @@ -317,63 +299,43 @@ public java.lang.String getVersion() { * * *
-     * The name of the flow version.
-     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/flows/<Flow ID>/versions/<Version ID>`.
+     * The intent full resource name
      * 
* - * string version = 1; + * string intent = 1 [(.google.api.resource_reference) = { ... } * - * @return The bytes for version. + * @return The bytes for intent. */ @java.lang.Override - public com.google.protobuf.ByteString getVersionBytes() { - java.lang.Object ref = version_; + public com.google.protobuf.ByteString getIntentBytes() { + java.lang.Object ref = intent_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - version_ = b; + intent_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - public static final int TRAFFIC_ALLOCATION_FIELD_NUMBER = 2; - private float trafficAllocation_; + public static final int COVERED_FIELD_NUMBER = 2; + private boolean covered_; /** * * *
-     * 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.
+     * Whether or not the intent is covered by at least one of the agent's
+     * test cases.
      * 
* - * float traffic_allocation = 2; + * bool covered = 2; * - * @return The trafficAllocation. + * @return The covered. */ @java.lang.Override - public float getTrafficAllocation() { - return trafficAllocation_; - } - - public static final int IS_CONTROL_GROUP_FIELD_NUMBER = 3; - private boolean isControlGroup_; - /** - * - * - *
-     * Whether the variant is for the control group.
-     * 
- * - * bool is_control_group = 3; - * - * @return The isControlGroup. - */ - @java.lang.Override - public boolean getIsControlGroup() { - return isControlGroup_; + public boolean getCovered() { + return covered_; } private byte memoizedIsInitialized = -1; @@ -390,14 +352,11 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getVersionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, version_); - } - if (trafficAllocation_ != 0F) { - output.writeFloat(2, trafficAllocation_); + if (!getIntentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, intent_); } - if (isControlGroup_ != false) { - output.writeBool(3, isControlGroup_); + if (covered_ != false) { + output.writeBool(2, covered_); } unknownFields.writeTo(output); } @@ -408,14 +367,11 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getVersionBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, version_); + if (!getIntentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, intent_); } - if (trafficAllocation_ != 0F) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, trafficAllocation_); - } - if (isControlGroup_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, isControlGroup_); + if (covered_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, covered_); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -427,16 +383,14 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant)) { + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent)) { return super.equals(obj); } - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant other = - (com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant) obj; + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent other = + (com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent) obj; - if (!getVersion().equals(other.getVersion())) return false; - if (java.lang.Float.floatToIntBits(getTrafficAllocation()) - != java.lang.Float.floatToIntBits(other.getTrafficAllocation())) return false; - if (getIsControlGroup() != other.getIsControlGroup()) return false; + if (!getIntent().equals(other.getIntent())) return false; + if (getCovered() != other.getCovered()) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -448,82 +402,80 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + VERSION_FIELD_NUMBER; - hash = (53 * hash) + getVersion().hashCode(); - hash = (37 * hash) + TRAFFIC_ALLOCATION_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getTrafficAllocation()); - hash = (37 * hash) + IS_CONTROL_GROUP_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsControlGroup()); + hash = (37 * hash) + INTENT_FIELD_NUMBER; + hash = (53 * hash) + getIntent().hashCode(); + hash = (37 * hash) + COVERED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getCovered()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent parseFrom( byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant parseDelimitedFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant parseDelimitedFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -541,7 +493,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant prototype) { + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -560,32 +512,32 @@ protected Builder newBuilderForType( * * *
-     * A single flow version with specified traffic allocation.
+     * The agent's intent.
      * 
* - * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant} + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant) - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.VariantOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent) + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.IntentOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_VersionVariants_Variant_descriptor; + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_IntentCoverage_Intent_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_VersionVariants_Variant_fieldAccessorTable + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_IntentCoverage_Intent_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant.class, - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant.Builder.class); + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent.class, + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent.Builder.class); } - // Construct using com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant.newBuilder() + // Construct using com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -602,30 +554,28 @@ private void maybeForceBuilderInitialization() { @java.lang.Override public Builder clear() { super.clear(); - version_ = ""; - - trafficAllocation_ = 0F; + intent_ = ""; - isControlGroup_ = false; + covered_ = false; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_VersionVariants_Variant_descriptor; + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_IntentCoverage_Intent_descriptor; } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant + public com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent getDefaultInstanceForType() { - return com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant.getDefaultInstance(); + return com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent.getDefaultInstance(); } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant build() { - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant result = buildPartial(); + public com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent build() { + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -633,12 +583,11 @@ public com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant build() { } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant buildPartial() { - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant result = - new com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant(this); - result.version_ = version_; - result.trafficAllocation_ = trafficAllocation_; - result.isControlGroup_ = isControlGroup_; + public com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent result = + new com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent(this); + result.intent_ = intent_; + result.covered_ = covered_; onBuilt(); return result; } @@ -680,28 +629,24 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant) { - return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant) other); + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom( - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant other) { + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent other) { if (other - == com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant.getDefaultInstance()) + == com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent.getDefaultInstance()) return this; - if (!other.getVersion().isEmpty()) { - version_ = other.version_; + if (!other.getIntent().isEmpty()) { + intent_ = other.intent_; onChanged(); } - if (other.getTrafficAllocation() != 0F) { - setTrafficAllocation(other.getTrafficAllocation()); - } - if (other.getIsControlGroup() != false) { - setIsControlGroup(other.getIsControlGroup()); + if (other.getCovered() != false) { + setCovered(other.getCovered()); } this.mergeUnknownFields(other.unknownFields); onChanged(); @@ -718,12 +663,12 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant parsedMessage = null; + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = - (com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant) + (com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { @@ -734,26 +679,24 @@ public Builder mergeFrom( return this; } - private java.lang.Object version_ = ""; + private java.lang.Object intent_ = ""; /** * * *
-       * The name of the flow version.
-       * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-       * ID>/flows/<Flow ID>/versions/<Version ID>`.
+       * The intent full resource name
        * 
* - * string version = 1; + * string intent = 1 [(.google.api.resource_reference) = { ... } * - * @return The version. + * @return The intent. */ - public java.lang.String getVersion() { - java.lang.Object ref = version_; + public java.lang.String getIntent() { + java.lang.Object ref = intent_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - version_ = s; + intent_ = s; return s; } else { return (java.lang.String) ref; @@ -763,21 +706,19 @@ public java.lang.String getVersion() { * * *
-       * The name of the flow version.
-       * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-       * ID>/flows/<Flow ID>/versions/<Version ID>`.
+       * The intent full resource name
        * 
* - * string version = 1; + * string intent = 1 [(.google.api.resource_reference) = { ... } * - * @return The bytes for version. + * @return The bytes for intent. */ - public com.google.protobuf.ByteString getVersionBytes() { - java.lang.Object ref = version_; + public com.google.protobuf.ByteString getIntentBytes() { + java.lang.Object ref = intent_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - version_ = b; + intent_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -787,22 +728,20 @@ public com.google.protobuf.ByteString getVersionBytes() { * * *
-       * The name of the flow version.
-       * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-       * ID>/flows/<Flow ID>/versions/<Version ID>`.
+       * The intent full resource name
        * 
* - * string version = 1; + * string intent = 1 [(.google.api.resource_reference) = { ... } * - * @param value The version to set. + * @param value The intent to set. * @return This builder for chaining. */ - public Builder setVersion(java.lang.String value) { + public Builder setIntent(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - version_ = value; + intent_ = value; onChanged(); return this; } @@ -810,18 +749,16 @@ public Builder setVersion(java.lang.String value) { * * *
-       * The name of the flow version.
-       * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-       * ID>/flows/<Flow ID>/versions/<Version ID>`.
+       * The intent full resource name
        * 
* - * string version = 1; + * string intent = 1 [(.google.api.resource_reference) = { ... } * * @return This builder for chaining. */ - public Builder clearVersion() { + public Builder clearIntent() { - version_ = getDefaultInstance().getVersion(); + intent_ = getDefaultInstance().getIntent(); onChanged(); return this; } @@ -829,113 +766,58 @@ public Builder clearVersion() { * * *
-       * The name of the flow version.
-       * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-       * ID>/flows/<Flow ID>/versions/<Version ID>`.
+       * The intent full resource name
        * 
* - * string version = 1; + * string intent = 1 [(.google.api.resource_reference) = { ... } * - * @param value The bytes for version to set. + * @param value The bytes for intent to set. * @return This builder for chaining. */ - public Builder setVersionBytes(com.google.protobuf.ByteString value) { + public Builder setIntentBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - version_ = value; - onChanged(); - return this; - } - - private float trafficAllocation_; - /** - * - * - *
-       * 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.
-       * 
- * - * float traffic_allocation = 2; - * - * @return The trafficAllocation. - */ - @java.lang.Override - public float getTrafficAllocation() { - return trafficAllocation_; - } - /** - * - * - *
-       * 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.
-       * 
- * - * float traffic_allocation = 2; - * - * @param value The trafficAllocation to set. - * @return This builder for chaining. - */ - public Builder setTrafficAllocation(float value) { - - trafficAllocation_ = value; - onChanged(); - 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.
-       * 
- * - * float traffic_allocation = 2; - * - * @return This builder for chaining. - */ - public Builder clearTrafficAllocation() { - - trafficAllocation_ = 0F; + intent_ = value; onChanged(); return this; } - private boolean isControlGroup_; + private boolean covered_; /** * * *
-       * Whether the variant is for the control group.
+       * Whether or not the intent is covered by at least one of the agent's
+       * test cases.
        * 
* - * bool is_control_group = 3; + * bool covered = 2; * - * @return The isControlGroup. + * @return The covered. */ @java.lang.Override - public boolean getIsControlGroup() { - return isControlGroup_; + public boolean getCovered() { + return covered_; } /** * * *
-       * Whether the variant is for the control group.
+       * Whether or not the intent is covered by at least one of the agent's
+       * test cases.
        * 
* - * bool is_control_group = 3; + * bool covered = 2; * - * @param value The isControlGroup to set. + * @param value The covered to set. * @return This builder for chaining. */ - public Builder setIsControlGroup(boolean value) { + public Builder setCovered(boolean value) { - isControlGroup_ = value; + covered_ = value; onChanged(); return this; } @@ -943,16 +825,17 @@ public Builder setIsControlGroup(boolean value) { * * *
-       * Whether the variant is for the control group.
+       * Whether or not the intent is covered by at least one of the agent's
+       * test cases.
        * 
* - * bool is_control_group = 3; + * bool covered = 2; * * @return This builder for chaining. */ - public Builder clearIsControlGroup() { + public Builder clearCovered() { - isControlGroup_ = false; + covered_ = false; onChanged(); return this; } @@ -969,119 +852,137 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant) + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent) } - // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant) - private static final com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent) + private static final com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant(); + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent(); } - public static com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant + public static com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public Variant parsePartialFrom( + public Intent parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Variant(input, extensionRegistry); + return new Intent(input, extensionRegistry); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant + public com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public static final int VARIANTS_FIELD_NUMBER = 1; - private java.util.List variants_; + public static final int INTENTS_FIELD_NUMBER = 1; + private java.util.List intents_; /** * * *
-   * A list of flow version variants.
+   * The list of Intents present in the agent
    * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant variants = 1; + * repeated .google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent intents = 1; */ @java.lang.Override - public java.util.List - getVariantsList() { - return variants_; + public java.util.List + getIntentsList() { + return intents_; } /** * * *
-   * A list of flow version variants.
+   * The list of Intents present in the agent
    * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant variants = 1; + * repeated .google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent intents = 1; */ @java.lang.Override public java.util.List< - ? extends com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.VariantOrBuilder> - getVariantsOrBuilderList() { - return variants_; + ? extends com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.IntentOrBuilder> + getIntentsOrBuilderList() { + return intents_; + } + /** + * + * + *
+   * The list of Intents present in the agent
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent intents = 1; + */ + @java.lang.Override + public int getIntentsCount() { + return intents_.size(); } /** * * *
-   * A list of flow version variants.
+   * The list of Intents present in the agent
    * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant variants = 1; + * repeated .google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent intents = 1; */ @java.lang.Override - public int getVariantsCount() { - return variants_.size(); + public com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent getIntents(int index) { + return intents_.get(index); } /** * * *
-   * A list of flow version variants.
+   * The list of Intents present in the agent
    * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant variants = 1; + * repeated .google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent intents = 1; */ @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant getVariants(int index) { - return variants_.get(index); + public com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.IntentOrBuilder getIntentsOrBuilder( + int index) { + return intents_.get(index); } + + public static final int COVERAGE_SCORE_FIELD_NUMBER = 2; + private float coverageScore_; /** * * *
-   * A list of flow version variants.
+   * The percent of intents in the agent that are covered.
    * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant variants = 1; + * float coverage_score = 2; + * + * @return The coverageScore. */ @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.VariantOrBuilder - getVariantsOrBuilder(int index) { - return variants_.get(index); + public float getCoverageScore() { + return coverageScore_; } private byte memoizedIsInitialized = -1; @@ -1098,8 +999,11 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < variants_.size(); i++) { - output.writeMessage(1, variants_.get(i)); + for (int i = 0; i < intents_.size(); i++) { + output.writeMessage(1, intents_.get(i)); + } + if (coverageScore_ != 0F) { + output.writeFloat(2, coverageScore_); } unknownFields.writeTo(output); } @@ -1110,8 +1014,11 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - for (int i = 0; i < variants_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, variants_.get(i)); + for (int i = 0; i < intents_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, intents_.get(i)); + } + if (coverageScore_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, coverageScore_); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -1123,13 +1030,15 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.VersionVariants)) { + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage)) { return super.equals(obj); } - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants other = - (com.google.cloud.dialogflow.cx.v3beta1.VersionVariants) obj; + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage other = + (com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage) obj; - if (!getVariantsList().equals(other.getVariantsList())) return false; + if (!getIntentsList().equals(other.getIntentsList())) return false; + if (java.lang.Float.floatToIntBits(getCoverageScore()) + != java.lang.Float.floatToIntBits(other.getCoverageScore())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -1141,80 +1050,82 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (getVariantsCount() > 0) { - hash = (37 * hash) + VARIANTS_FIELD_NUMBER; - hash = (53 * hash) + getVariantsList().hashCode(); + if (getIntentsCount() > 0) { + hash = (37 * hash) + INTENTS_FIELD_NUMBER; + hash = (53 * hash) + getIntentsList().hashCode(); } + hash = (37 * hash) + COVERAGE_SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getCoverageScore()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.cloud.dialogflow.cx.v3beta1.VersionVariants parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3beta1.VersionVariants parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.VersionVariants parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3beta1.VersionVariants parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.VersionVariants parseFrom(byte[] data) + public static com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3beta1.VersionVariants parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.VersionVariants parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3beta1.VersionVariants parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.VersionVariants parseDelimitedFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3beta1.VersionVariants parseDelimitedFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.VersionVariants parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3beta1.VersionVariants parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -1232,7 +1143,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants prototype) { + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -1250,31 +1161,32 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * A list of flow version variants.
+   * Intent coverage represents the percentage of all possible intents in the
+   * agent that are triggered in any of a parent's test cases.
    * 
* - * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.VersionVariants} + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.IntentCoverage} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.VersionVariants) - com.google.cloud.dialogflow.cx.v3beta1.VersionVariantsOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.IntentCoverage) + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverageOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_VersionVariants_descriptor; + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_IntentCoverage_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_VersionVariants_fieldAccessorTable + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_IntentCoverage_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.class, - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Builder.class); + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.class, + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Builder.class); } - // Construct using com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.newBuilder() + // Construct using com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -1286,36 +1198,38 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getVariantsFieldBuilder(); + getIntentsFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); - if (variantsBuilder_ == null) { - variants_ = java.util.Collections.emptyList(); + if (intentsBuilder_ == null) { + intents_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { - variantsBuilder_.clear(); + intentsBuilder_.clear(); } + coverageScore_ = 0F; + return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_VersionVariants_descriptor; + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_IntentCoverage_descriptor; } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.VersionVariants getDefaultInstanceForType() { - return com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.getDefaultInstance(); + public com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.getDefaultInstance(); } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.VersionVariants build() { - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants result = buildPartial(); + public com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage build() { + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -1323,19 +1237,20 @@ public com.google.cloud.dialogflow.cx.v3beta1.VersionVariants build() { } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.VersionVariants buildPartial() { - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants result = - new com.google.cloud.dialogflow.cx.v3beta1.VersionVariants(this); + public com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage result = + new com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage(this); int from_bitField0_ = bitField0_; - if (variantsBuilder_ == null) { + if (intentsBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { - variants_ = java.util.Collections.unmodifiableList(variants_); + intents_ = java.util.Collections.unmodifiableList(intents_); bitField0_ = (bitField0_ & ~0x00000001); } - result.variants_ = variants_; + result.intents_ = intents_; } else { - result.variants_ = variantsBuilder_.build(); + result.intents_ = intentsBuilder_.build(); } + result.coverageScore_ = coverageScore_; onBuilt(); return result; } @@ -1375,44 +1290,47 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.VersionVariants) { - return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.VersionVariants) other); + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.VersionVariants other) { - if (other == com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.getDefaultInstance()) + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.getDefaultInstance()) return this; - if (variantsBuilder_ == null) { - if (!other.variants_.isEmpty()) { - if (variants_.isEmpty()) { - variants_ = other.variants_; + if (intentsBuilder_ == null) { + if (!other.intents_.isEmpty()) { + if (intents_.isEmpty()) { + intents_ = other.intents_; bitField0_ = (bitField0_ & ~0x00000001); } else { - ensureVariantsIsMutable(); - variants_.addAll(other.variants_); + ensureIntentsIsMutable(); + intents_.addAll(other.intents_); } onChanged(); } } else { - if (!other.variants_.isEmpty()) { - if (variantsBuilder_.isEmpty()) { - variantsBuilder_.dispose(); - variantsBuilder_ = null; - variants_ = other.variants_; + if (!other.intents_.isEmpty()) { + if (intentsBuilder_.isEmpty()) { + intentsBuilder_.dispose(); + intentsBuilder_ = null; + intents_ = other.intents_; bitField0_ = (bitField0_ & ~0x00000001); - variantsBuilder_ = + intentsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getVariantsFieldBuilder() + ? getIntentsFieldBuilder() : null; } else { - variantsBuilder_.addAllMessages(other.variants_); + intentsBuilder_.addAllMessages(other.intents_); } } } + if (other.getCoverageScore() != 0F) { + setCoverageScore(other.getCoverageScore()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -1428,12 +1346,12 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants parsedMessage = null; + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = - (com.google.cloud.dialogflow.cx.v3beta1.VersionVariants) e.getUnfinishedMessage(); + (com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -1445,97 +1363,93 @@ public Builder mergeFrom( private int bitField0_; - private java.util.List - variants_ = java.util.Collections.emptyList(); + private java.util.List intents_ = + java.util.Collections.emptyList(); - private void ensureVariantsIsMutable() { + private void ensureIntentsIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { - variants_ = - new java.util.ArrayList( - variants_); + intents_ = + new java.util.ArrayList( + intents_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant, - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant.Builder, - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.VariantOrBuilder> - variantsBuilder_; + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent, + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent.Builder, + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.IntentOrBuilder> + intentsBuilder_; /** * * *
-     * A list of flow version variants.
+     * The list of Intents present in the agent
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant variants = 1; - * + * repeated .google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent intents = 1; */ - public java.util.List - getVariantsList() { - if (variantsBuilder_ == null) { - return java.util.Collections.unmodifiableList(variants_); + public java.util.List + getIntentsList() { + if (intentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(intents_); } else { - return variantsBuilder_.getMessageList(); + return intentsBuilder_.getMessageList(); } } /** * * *
-     * A list of flow version variants.
+     * The list of Intents present in the agent
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant variants = 1; - * + * repeated .google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent intents = 1; */ - public int getVariantsCount() { - if (variantsBuilder_ == null) { - return variants_.size(); + public int getIntentsCount() { + if (intentsBuilder_ == null) { + return intents_.size(); } else { - return variantsBuilder_.getCount(); + return intentsBuilder_.getCount(); } } /** * * *
-     * A list of flow version variants.
+     * The list of Intents present in the agent
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant variants = 1; - * + * repeated .google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent intents = 1; */ - public com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant getVariants(int index) { - if (variantsBuilder_ == null) { - return variants_.get(index); + public com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent getIntents(int index) { + if (intentsBuilder_ == null) { + return intents_.get(index); } else { - return variantsBuilder_.getMessage(index); + return intentsBuilder_.getMessage(index); } } /** * * *
-     * A list of flow version variants.
+     * The list of Intents present in the agent
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant variants = 1; - * + * repeated .google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent intents = 1; */ - public Builder setVariants( - int index, com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant value) { - if (variantsBuilder_ == null) { + public Builder setIntents( + int index, com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent value) { + if (intentsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureVariantsIsMutable(); - variants_.set(index, value); + ensureIntentsIsMutable(); + intents_.set(index, value); onChanged(); } else { - variantsBuilder_.setMessage(index, value); + intentsBuilder_.setMessage(index, value); } return this; } @@ -1543,21 +1457,20 @@ public Builder setVariants( * * *
-     * A list of flow version variants.
+     * The list of Intents present in the agent
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant variants = 1; - * + * repeated .google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent intents = 1; */ - public Builder setVariants( + public Builder setIntents( int index, - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant.Builder builderForValue) { - if (variantsBuilder_ == null) { - ensureVariantsIsMutable(); - variants_.set(index, builderForValue.build()); + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent.Builder builderForValue) { + if (intentsBuilder_ == null) { + ensureIntentsIsMutable(); + intents_.set(index, builderForValue.build()); onChanged(); } else { - variantsBuilder_.setMessage(index, builderForValue.build()); + intentsBuilder_.setMessage(index, builderForValue.build()); } return this; } @@ -1565,23 +1478,21 @@ public Builder setVariants( * * *
-     * A list of flow version variants.
+     * The list of Intents present in the agent
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant variants = 1; - * + * repeated .google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent intents = 1; */ - public Builder addVariants( - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant value) { - if (variantsBuilder_ == null) { + public Builder addIntents(com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent value) { + if (intentsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureVariantsIsMutable(); - variants_.add(value); + ensureIntentsIsMutable(); + intents_.add(value); onChanged(); } else { - variantsBuilder_.addMessage(value); + intentsBuilder_.addMessage(value); } return this; } @@ -1589,23 +1500,22 @@ public Builder addVariants( * * *
-     * A list of flow version variants.
+     * The list of Intents present in the agent
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant variants = 1; - * + * repeated .google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent intents = 1; */ - public Builder addVariants( - int index, com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant value) { - if (variantsBuilder_ == null) { + public Builder addIntents( + int index, com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent value) { + if (intentsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureVariantsIsMutable(); - variants_.add(index, value); + ensureIntentsIsMutable(); + intents_.add(index, value); onChanged(); } else { - variantsBuilder_.addMessage(index, value); + intentsBuilder_.addMessage(index, value); } return this; } @@ -1613,20 +1523,19 @@ public Builder addVariants( * * *
-     * A list of flow version variants.
+     * The list of Intents present in the agent
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant variants = 1; - * + * repeated .google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent intents = 1; */ - public Builder addVariants( - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant.Builder builderForValue) { - if (variantsBuilder_ == null) { - ensureVariantsIsMutable(); - variants_.add(builderForValue.build()); + public Builder addIntents( + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent.Builder builderForValue) { + if (intentsBuilder_ == null) { + ensureIntentsIsMutable(); + intents_.add(builderForValue.build()); onChanged(); } else { - variantsBuilder_.addMessage(builderForValue.build()); + intentsBuilder_.addMessage(builderForValue.build()); } return this; } @@ -1634,21 +1543,20 @@ public Builder addVariants( * * *
-     * A list of flow version variants.
+     * The list of Intents present in the agent
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant variants = 1; - * + * repeated .google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent intents = 1; */ - public Builder addVariants( + public Builder addIntents( int index, - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant.Builder builderForValue) { - if (variantsBuilder_ == null) { - ensureVariantsIsMutable(); - variants_.add(index, builderForValue.build()); + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent.Builder builderForValue) { + if (intentsBuilder_ == null) { + ensureIntentsIsMutable(); + intents_.add(index, builderForValue.build()); onChanged(); } else { - variantsBuilder_.addMessage(index, builderForValue.build()); + intentsBuilder_.addMessage(index, builderForValue.build()); } return this; } @@ -1656,21 +1564,20 @@ public Builder addVariants( * * *
-     * A list of flow version variants.
+     * The list of Intents present in the agent
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant variants = 1; - * + * repeated .google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent intents = 1; */ - public Builder addAllVariants( - java.lang.Iterable + public Builder addAllIntents( + java.lang.Iterable values) { - if (variantsBuilder_ == null) { - ensureVariantsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, variants_); + if (intentsBuilder_ == null) { + ensureIntentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, intents_); onChanged(); } else { - variantsBuilder_.addAllMessages(values); + intentsBuilder_.addAllMessages(values); } return this; } @@ -1678,19 +1585,18 @@ public Builder addAllVariants( * * *
-     * A list of flow version variants.
+     * The list of Intents present in the agent
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant variants = 1; - * + * repeated .google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent intents = 1; */ - public Builder clearVariants() { - if (variantsBuilder_ == null) { - variants_ = java.util.Collections.emptyList(); + public Builder clearIntents() { + if (intentsBuilder_ == null) { + intents_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { - variantsBuilder_.clear(); + intentsBuilder_.clear(); } return this; } @@ -1698,19 +1604,18 @@ public Builder clearVariants() { * * *
-     * A list of flow version variants.
+     * The list of Intents present in the agent
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant variants = 1; - * + * repeated .google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent intents = 1; */ - public Builder removeVariants(int index) { - if (variantsBuilder_ == null) { - ensureVariantsIsMutable(); - variants_.remove(index); + public Builder removeIntents(int index) { + if (intentsBuilder_ == null) { + ensureIntentsIsMutable(); + intents_.remove(index); onChanged(); } else { - variantsBuilder_.remove(index); + intentsBuilder_.remove(index); } return this; } @@ -1718,116 +1623,162 @@ public Builder removeVariants(int index) { * * *
-     * A list of flow version variants.
+     * The list of Intents present in the agent
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant variants = 1; - * + * repeated .google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent intents = 1; */ - public com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant.Builder - getVariantsBuilder(int index) { - return getVariantsFieldBuilder().getBuilder(index); + public com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent.Builder getIntentsBuilder( + int index) { + return getIntentsFieldBuilder().getBuilder(index); } /** * * *
-     * A list of flow version variants.
+     * The list of Intents present in the agent
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant variants = 1; - * + * repeated .google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent intents = 1; */ - public com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.VariantOrBuilder - getVariantsOrBuilder(int index) { - if (variantsBuilder_ == null) { - return variants_.get(index); + public com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.IntentOrBuilder + getIntentsOrBuilder(int index) { + if (intentsBuilder_ == null) { + return intents_.get(index); } else { - return variantsBuilder_.getMessageOrBuilder(index); + return intentsBuilder_.getMessageOrBuilder(index); } } /** * * *
-     * A list of flow version variants.
+     * The list of Intents present in the agent
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant variants = 1; - * + * repeated .google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent intents = 1; */ public java.util.List< - ? extends com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.VariantOrBuilder> - getVariantsOrBuilderList() { - if (variantsBuilder_ != null) { - return variantsBuilder_.getMessageOrBuilderList(); + ? extends com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.IntentOrBuilder> + getIntentsOrBuilderList() { + if (intentsBuilder_ != null) { + return intentsBuilder_.getMessageOrBuilderList(); } else { - return java.util.Collections.unmodifiableList(variants_); + return java.util.Collections.unmodifiableList(intents_); } } /** * * *
-     * A list of flow version variants.
+     * The list of Intents present in the agent
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant variants = 1; - * + * repeated .google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent intents = 1; */ - public com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant.Builder - addVariantsBuilder() { - return getVariantsFieldBuilder() + public com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent.Builder + addIntentsBuilder() { + return getIntentsFieldBuilder() .addBuilder( - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant.getDefaultInstance()); + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent.getDefaultInstance()); } /** * * *
-     * A list of flow version variants.
+     * The list of Intents present in the agent
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant variants = 1; - * + * repeated .google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent intents = 1; */ - public com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant.Builder - addVariantsBuilder(int index) { - return getVariantsFieldBuilder() + public com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent.Builder addIntentsBuilder( + int index) { + return getIntentsFieldBuilder() .addBuilder( index, - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant.getDefaultInstance()); + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent.getDefaultInstance()); } /** * * *
-     * A list of flow version variants.
+     * The list of Intents present in the agent
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant variants = 1; - * + * repeated .google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent intents = 1; */ - public java.util.List - getVariantsBuilderList() { - return getVariantsFieldBuilder().getBuilderList(); + public java.util.List + getIntentsBuilderList() { + return getIntentsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant, - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant.Builder, - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.VariantOrBuilder> - getVariantsFieldBuilder() { - if (variantsBuilder_ == null) { - variantsBuilder_ = + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent, + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent.Builder, + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.IntentOrBuilder> + getIntentsFieldBuilder() { + if (intentsBuilder_ == null) { + intentsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant, - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant.Builder, - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.VariantOrBuilder>( - variants_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - variants_ = null; + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent, + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent.Builder, + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.IntentOrBuilder>( + intents_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + intents_ = null; } - return variantsBuilder_; + return intentsBuilder_; + } + + private float coverageScore_; + /** + * + * + *
+     * The percent of intents in the agent that are covered.
+     * 
+ * + * float coverage_score = 2; + * + * @return The coverageScore. + */ + @java.lang.Override + public float getCoverageScore() { + return coverageScore_; + } + /** + * + * + *
+     * The percent of intents in the agent that are covered.
+     * 
+ * + * float coverage_score = 2; + * + * @param value The coverageScore to set. + * @return This builder for chaining. + */ + public Builder setCoverageScore(float value) { + + coverageScore_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The percent of intents in the agent that are covered.
+     * 
+ * + * float coverage_score = 2; + * + * @return This builder for chaining. + */ + public Builder clearCoverageScore() { + + coverageScore_ = 0F; + onChanged(); + return this; } @java.lang.Override @@ -1841,42 +1792,42 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.VersionVariants) + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.IntentCoverage) } - // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.VersionVariants) - private static final com.google.cloud.dialogflow.cx.v3beta1.VersionVariants DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.IntentCoverage) + private static final com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.VersionVariants(); + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage(); } - public static com.google.cloud.dialogflow.cx.v3beta1.VersionVariants getDefaultInstance() { + public static com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public VersionVariants parsePartialFrom( + public IntentCoverage parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new VersionVariants(input, extensionRegistry); + return new IntentCoverage(input, extensionRegistry); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.VersionVariants getDefaultInstanceForType() { + public com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/IntentCoverageOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/IntentCoverageOrBuilder.java new file mode 100644 index 000000000..eafde2bca --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/IntentCoverageOrBuilder.java @@ -0,0 +1,91 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface IntentCoverageOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.IntentCoverage) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of Intents present in the agent
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent intents = 1; + */ + java.util.List getIntentsList(); + /** + * + * + *
+   * The list of Intents present in the agent
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent intents = 1; + */ + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent getIntents(int index); + /** + * + * + *
+   * The list of Intents present in the agent
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent intents = 1; + */ + int getIntentsCount(); + /** + * + * + *
+   * The list of Intents present in the agent
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent intents = 1; + */ + java.util.List + getIntentsOrBuilderList(); + /** + * + * + *
+   * The list of Intents present in the agent
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent intents = 1; + */ + com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.IntentOrBuilder getIntentsOrBuilder( + int index); + + /** + * + * + *
+   * The percent of intents in the agent that are covered.
+   * 
+ * + * float coverage_score = 2; + * + * @return The coverageScore. + */ + float getCoverageScore(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListAgentsRequest.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListAgentsRequest.java index dd5389bb2..72b151ff7 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListAgentsRequest.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListAgentsRequest.java @@ -22,8 +22,7 @@ * * *
- * The request message for
- * [Agents.ListAgents][google.cloud.dialogflow.cx.v3beta1.Agents.ListAgents].
+ * The request message for [Agents.ListAgents][google.cloud.dialogflow.cx.v3beta1.Agents.ListAgents].
  * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest} @@ -430,8 +429,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The request message for
-   * [Agents.ListAgents][google.cloud.dialogflow.cx.v3beta1.Agents.ListAgents].
+   * The request message for [Agents.ListAgents][google.cloud.dialogflow.cx.v3beta1.Agents.ListAgents].
    * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListAgentsResponse.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListAgentsResponse.java index 028c3aeac..84837d503 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListAgentsResponse.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListAgentsResponse.java @@ -22,8 +22,7 @@ * * *
- * The response message for
- * [Agents.ListAgents][google.cloud.dialogflow.cx.v3beta1.Agents.ListAgents].
+ * The response message for [Agents.ListAgents][google.cloud.dialogflow.cx.v3beta1.Agents.ListAgents].
  * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse} @@ -428,8 +427,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The response message for
-   * [Agents.ListAgents][google.cloud.dialogflow.cx.v3beta1.Agents.ListAgents].
+   * The response message for [Agents.ListAgents][google.cloud.dialogflow.cx.v3beta1.Agents.ListAgents].
    * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExperimentsResponseOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExperimentsResponseOrBuilder.java deleted file mode 100644 index 473f7028e..000000000 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExperimentsResponseOrBuilder.java +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dialogflow/cx/v3beta1/experiment.proto - -package com.google.cloud.dialogflow.cx.v3beta1; - -public interface ListExperimentsResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * 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.
-   * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment experiments = 1; - */ - java.util.List getExperimentsList(); - /** - * - * - *
-   * 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.
-   * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment experiments = 1; - */ - com.google.cloud.dialogflow.cx.v3beta1.Experiment getExperiments(int index); - /** - * - * - *
-   * 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.
-   * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment experiments = 1; - */ - int getExperimentsCount(); - /** - * - * - *
-   * 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.
-   * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment experiments = 1; - */ - java.util.List - getExperimentsOrBuilderList(); - /** - * - * - *
-   * 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.
-   * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment experiments = 1; - */ - com.google.cloud.dialogflow.cx.v3beta1.ExperimentOrBuilder getExperimentsOrBuilder(int index); - - /** - * - * - *
-   * Token to retrieve the next page of results, or empty if there are no more
-   * results in the list.
-   * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - * - * - *
-   * Token to retrieve the next page of results, or empty if there are no more
-   * results in the list.
-   * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString getNextPageTokenBytes(); -} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListTestCaseResultsRequest.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListTestCaseResultsRequest.java new file mode 100644 index 000000000..18a0a291e --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListTestCaseResultsRequest.java @@ -0,0 +1,1259 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The request message for [TestCases.ListTestCaseResults][google.cloud.dialogflow.cx.v3beta1.TestCases.ListTestCaseResults].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest} + */ +public final class ListTestCaseResultsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest) + ListTestCaseResultsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListTestCaseResultsRequest.newBuilder() to construct. + private ListTestCaseResultsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListTestCaseResultsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListTestCaseResultsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListTestCaseResultsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: + { + pageSize_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCaseResultsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCaseResultsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The test case to list results for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/
+   * testCases/<TestCase ID>`. Specify a `-` as a wildcard for TestCase ID to
+   * list results across multiple test cases.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The test case to list results for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/
+   * testCases/<TestCase ID>`. Specify a `-` as a wildcard for TestCase ID to
+   * list results across multiple test cases.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * The maximum number of items to return in a single page. By default 100 and
+   * at most 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * The next_page_token value returned from a previous list request.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The next_page_token value returned from a previous list request.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + private volatile java.lang.Object 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:
+   *   <field> <operator> <value> [AND <field> <operator> <value>] ...
+   *   [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.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * 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:
+   *   <field> <operator> <value> [AND <field> <operator> <value>] ...
+   *   [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.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!getFilterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!getFilterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest other = + (com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for [TestCases.ListTestCaseResults][google.cloud.dialogflow.cx.v3beta1.TestCases.ListTestCaseResults].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest) + com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCaseResultsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCaseResultsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest.Builder.class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + filter_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCaseResultsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest build() { + com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest result = + new com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + result.filter_ = filter_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The test case to list results for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/
+     * testCases/<TestCase ID>`. Specify a `-` as a wildcard for TestCase ID to
+     * list results across multiple test cases.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The test case to list results for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/
+     * testCases/<TestCase ID>`. Specify a `-` as a wildcard for TestCase ID to
+     * list results across multiple test cases.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The test case to list results for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/
+     * testCases/<TestCase ID>`. Specify a `-` as a wildcard for TestCase ID to
+     * list results across multiple test cases.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The test case to list results for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/
+     * testCases/<TestCase ID>`. Specify a `-` as a wildcard for TestCase ID to
+     * list results across multiple test cases.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The test case to list results for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/
+     * testCases/<TestCase ID>`. Specify a `-` as a wildcard for TestCase ID to
+     * list results across multiple test cases.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of items to return in a single page. By default 100 and
+     * at most 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of items to return in a single page. By default 100 and
+     * at most 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of items to return in a single page. By default 100 and
+     * at most 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The next_page_token value returned from a previous list request.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The next_page_token value returned from a previous list request.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The next_page_token value returned from a previous list request.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The next_page_token value returned from a previous list request.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The next_page_token value returned from a previous list request.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private java.lang.Object 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:
+     *   <field> <operator> <value> [AND <field> <operator> <value>] ...
+     *   [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.
+     * 
+ * + * string filter = 4; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * 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:
+     *   <field> <operator> <value> [AND <field> <operator> <value>] ...
+     *   [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.
+     * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * 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:
+     *   <field> <operator> <value> [AND <field> <operator> <value>] ...
+     *   [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.
+     * 
+ * + * string filter = 4; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + 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:
+     *   <field> <operator> <value> [AND <field> <operator> <value>] ...
+     *   [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.
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + 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:
+     *   <field> <operator> <value> [AND <field> <operator> <value>] ...
+     *   [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.
+     * 
+ * + * string filter = 4; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest) + private static final com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListTestCaseResultsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListTestCaseResultsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListTestCaseResultsRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListTestCaseResultsRequestOrBuilder.java new file mode 100644 index 000000000..ec2d6d584 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListTestCaseResultsRequestOrBuilder.java @@ -0,0 +1,160 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface ListTestCaseResultsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The test case to list results for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/
+   * testCases/<TestCase ID>`. Specify a `-` as a wildcard for TestCase ID to
+   * list results across multiple test cases.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The test case to list results for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/
+   * testCases/<TestCase ID>`. Specify a `-` as a wildcard for TestCase ID to
+   * list results across multiple test cases.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of items to return in a single page. By default 100 and
+   * at most 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The next_page_token value returned from a previous list request.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The next_page_token value returned from a previous list request.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * 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:
+   *   <field> <operator> <value> [AND <field> <operator> <value>] ...
+   *   [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.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * 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:
+   *   <field> <operator> <value> [AND <field> <operator> <value>] ...
+   *   [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.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListTestCaseResultsResponse.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListTestCaseResultsResponse.java new file mode 100644 index 000000000..5c78717a4 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListTestCaseResultsResponse.java @@ -0,0 +1,1185 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The response message for [TestCases.ListTestCaseResults][google.cloud.dialogflow.cx.v3beta1.TestCases.ListTestCaseResults].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse} + */ +public final class ListTestCaseResultsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse) + ListTestCaseResultsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListTestCaseResultsResponse.newBuilder() to construct. + private ListTestCaseResultsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListTestCaseResultsResponse() { + testCaseResults_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListTestCaseResultsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListTestCaseResultsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + testCaseResults_ = + new java.util.ArrayList< + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult>(); + mutable_bitField0_ |= 0x00000001; + } + testCaseResults_.add( + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult.parser(), + extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + testCaseResults_ = java.util.Collections.unmodifiableList(testCaseResults_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCaseResultsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCaseResultsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse.class, + com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse.Builder.class); + } + + public static final int TEST_CASE_RESULTS_FIELD_NUMBER = 1; + private java.util.List testCaseResults_; + /** + * + * + *
+   * The list of test case results.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseResult test_case_results = 1; + */ + @java.lang.Override + public java.util.List + getTestCaseResultsList() { + return testCaseResults_; + } + /** + * + * + *
+   * The list of test case results.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseResult test_case_results = 1; + */ + @java.lang.Override + public java.util.List + getTestCaseResultsOrBuilderList() { + return testCaseResults_; + } + /** + * + * + *
+   * The list of test case results.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseResult test_case_results = 1; + */ + @java.lang.Override + public int getTestCaseResultsCount() { + return testCaseResults_.size(); + } + /** + * + * + *
+   * The list of test case results.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseResult test_case_results = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult getTestCaseResults(int index) { + return testCaseResults_.get(index); + } + /** + * + * + *
+   * The list of test case results.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseResult test_case_results = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TestCaseResultOrBuilder getTestCaseResultsOrBuilder( + int index) { + return testCaseResults_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < testCaseResults_.size(); i++) { + output.writeMessage(1, testCaseResults_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < testCaseResults_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, testCaseResults_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse other = + (com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse) obj; + + if (!getTestCaseResultsList().equals(other.getTestCaseResultsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getTestCaseResultsCount() > 0) { + hash = (37 * hash) + TEST_CASE_RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getTestCaseResultsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The response message for [TestCases.ListTestCaseResults][google.cloud.dialogflow.cx.v3beta1.TestCases.ListTestCaseResults].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse) + com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCaseResultsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCaseResultsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse.class, + com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse.Builder.class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getTestCaseResultsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (testCaseResultsBuilder_ == null) { + testCaseResults_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + testCaseResultsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCaseResultsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse build() { + com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse result = + new com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse(this); + int from_bitField0_ = bitField0_; + if (testCaseResultsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + testCaseResults_ = java.util.Collections.unmodifiableList(testCaseResults_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.testCaseResults_ = testCaseResults_; + } else { + result.testCaseResults_ = testCaseResultsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse + .getDefaultInstance()) return this; + if (testCaseResultsBuilder_ == null) { + if (!other.testCaseResults_.isEmpty()) { + if (testCaseResults_.isEmpty()) { + testCaseResults_ = other.testCaseResults_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTestCaseResultsIsMutable(); + testCaseResults_.addAll(other.testCaseResults_); + } + onChanged(); + } + } else { + if (!other.testCaseResults_.isEmpty()) { + if (testCaseResultsBuilder_.isEmpty()) { + testCaseResultsBuilder_.dispose(); + testCaseResultsBuilder_ = null; + testCaseResults_ = other.testCaseResults_; + bitField0_ = (bitField0_ & ~0x00000001); + testCaseResultsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTestCaseResultsFieldBuilder() + : null; + } else { + testCaseResultsBuilder_.addAllMessages(other.testCaseResults_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List testCaseResults_ = + java.util.Collections.emptyList(); + + private void ensureTestCaseResultsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + testCaseResults_ = + new java.util.ArrayList( + testCaseResults_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult, + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResultOrBuilder> + testCaseResultsBuilder_; + + /** + * + * + *
+     * The list of test case results.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseResult test_case_results = 1; + * + */ + public java.util.List + getTestCaseResultsList() { + if (testCaseResultsBuilder_ == null) { + return java.util.Collections.unmodifiableList(testCaseResults_); + } else { + return testCaseResultsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of test case results.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseResult test_case_results = 1; + * + */ + public int getTestCaseResultsCount() { + if (testCaseResultsBuilder_ == null) { + return testCaseResults_.size(); + } else { + return testCaseResultsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of test case results.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseResult test_case_results = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult getTestCaseResults(int index) { + if (testCaseResultsBuilder_ == null) { + return testCaseResults_.get(index); + } else { + return testCaseResultsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of test case results.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseResult test_case_results = 1; + * + */ + public Builder setTestCaseResults( + int index, com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult value) { + if (testCaseResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTestCaseResultsIsMutable(); + testCaseResults_.set(index, value); + onChanged(); + } else { + testCaseResultsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of test case results.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseResult test_case_results = 1; + * + */ + public Builder setTestCaseResults( + int index, com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult.Builder builderForValue) { + if (testCaseResultsBuilder_ == null) { + ensureTestCaseResultsIsMutable(); + testCaseResults_.set(index, builderForValue.build()); + onChanged(); + } else { + testCaseResultsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of test case results.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseResult test_case_results = 1; + * + */ + public Builder addTestCaseResults(com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult value) { + if (testCaseResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTestCaseResultsIsMutable(); + testCaseResults_.add(value); + onChanged(); + } else { + testCaseResultsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of test case results.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseResult test_case_results = 1; + * + */ + public Builder addTestCaseResults( + int index, com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult value) { + if (testCaseResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTestCaseResultsIsMutable(); + testCaseResults_.add(index, value); + onChanged(); + } else { + testCaseResultsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of test case results.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseResult test_case_results = 1; + * + */ + public Builder addTestCaseResults( + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult.Builder builderForValue) { + if (testCaseResultsBuilder_ == null) { + ensureTestCaseResultsIsMutable(); + testCaseResults_.add(builderForValue.build()); + onChanged(); + } else { + testCaseResultsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of test case results.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseResult test_case_results = 1; + * + */ + public Builder addTestCaseResults( + int index, com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult.Builder builderForValue) { + if (testCaseResultsBuilder_ == null) { + ensureTestCaseResultsIsMutable(); + testCaseResults_.add(index, builderForValue.build()); + onChanged(); + } else { + testCaseResultsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of test case results.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseResult test_case_results = 1; + * + */ + public Builder addAllTestCaseResults( + java.lang.Iterable + values) { + if (testCaseResultsBuilder_ == null) { + ensureTestCaseResultsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, testCaseResults_); + onChanged(); + } else { + testCaseResultsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of test case results.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseResult test_case_results = 1; + * + */ + public Builder clearTestCaseResults() { + if (testCaseResultsBuilder_ == null) { + testCaseResults_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + testCaseResultsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of test case results.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseResult test_case_results = 1; + * + */ + public Builder removeTestCaseResults(int index) { + if (testCaseResultsBuilder_ == null) { + ensureTestCaseResultsIsMutable(); + testCaseResults_.remove(index); + onChanged(); + } else { + testCaseResultsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of test case results.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseResult test_case_results = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult.Builder getTestCaseResultsBuilder( + int index) { + return getTestCaseResultsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of test case results.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseResult test_case_results = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.TestCaseResultOrBuilder + getTestCaseResultsOrBuilder(int index) { + if (testCaseResultsBuilder_ == null) { + return testCaseResults_.get(index); + } else { + return testCaseResultsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of test case results.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseResult test_case_results = 1; + * + */ + public java.util.List + getTestCaseResultsOrBuilderList() { + if (testCaseResultsBuilder_ != null) { + return testCaseResultsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(testCaseResults_); + } + } + /** + * + * + *
+     * The list of test case results.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseResult test_case_results = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult.Builder + addTestCaseResultsBuilder() { + return getTestCaseResultsFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult.getDefaultInstance()); + } + /** + * + * + *
+     * The list of test case results.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseResult test_case_results = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult.Builder addTestCaseResultsBuilder( + int index) { + return getTestCaseResultsFieldBuilder() + .addBuilder( + index, com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult.getDefaultInstance()); + } + /** + * + * + *
+     * The list of test case results.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseResult test_case_results = 1; + * + */ + public java.util.List + getTestCaseResultsBuilderList() { + return getTestCaseResultsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult, + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResultOrBuilder> + getTestCaseResultsFieldBuilder() { + if (testCaseResultsBuilder_ == null) { + testCaseResultsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult, + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResultOrBuilder>( + testCaseResults_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + testCaseResults_ = null; + } + return testCaseResultsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse) + private static final com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListTestCaseResultsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListTestCaseResultsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListTestCaseResultsResponseOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListTestCaseResultsResponseOrBuilder.java new file mode 100644 index 000000000..afbeb61b8 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListTestCaseResultsResponseOrBuilder.java @@ -0,0 +1,105 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface ListTestCaseResultsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of test case results.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseResult test_case_results = 1; + */ + java.util.List getTestCaseResultsList(); + /** + * + * + *
+   * The list of test case results.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseResult test_case_results = 1; + */ + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult getTestCaseResults(int index); + /** + * + * + *
+   * The list of test case results.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseResult test_case_results = 1; + */ + int getTestCaseResultsCount(); + /** + * + * + *
+   * The list of test case results.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseResult test_case_results = 1; + */ + java.util.List + getTestCaseResultsOrBuilderList(); + /** + * + * + *
+   * The list of test case results.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCaseResult test_case_results = 1; + */ + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResultOrBuilder getTestCaseResultsOrBuilder( + int index); + + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExperimentsRequest.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListTestCasesRequest.java similarity index 61% rename from proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExperimentsRequest.java rename to proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListTestCasesRequest.java index 6f9ccd7dd..a32d49887 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExperimentsRequest.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListTestCasesRequest.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dialogflow/cx/v3beta1/experiment.proto +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto package com.google.cloud.dialogflow.cx.v3beta1; @@ -22,30 +22,31 @@ * * *
- * The request message for [Experiments.ListExperiments][google.cloud.dialogflow.cx.v3beta1.Experiments.ListExperiments].
+ * The request message for [TestCases.ListTestCases][google.cloud.dialogflow.cx.v3beta1.TestCases.ListTestCases].
  * 
* - * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest} + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest} */ -public final class ListExperimentsRequest extends com.google.protobuf.GeneratedMessageV3 +public final class ListTestCasesRequest extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest) - ListExperimentsRequestOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest) + ListTestCasesRequestOrBuilder { private static final long serialVersionUID = 0L; - // Use ListExperimentsRequest.newBuilder() to construct. - private ListExperimentsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use ListTestCasesRequest.newBuilder() to construct. + private ListTestCasesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private ListExperimentsRequest() { + private ListTestCasesRequest() { parent_ = ""; pageToken_ = ""; + view_ = 0; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListExperimentsRequest(); + return new ListTestCasesRequest(); } @java.lang.Override @@ -53,7 +54,7 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListExperimentsRequest( + private ListTestCasesRequest( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -90,6 +91,13 @@ private ListExperimentsRequest( pageToken_ = s; break; } + case 32: + { + int rawValue = input.readEnum(); + + view_ = rawValue; + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -110,18 +118,181 @@ private ListExperimentsRequest( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_ListExperimentsRequest_descriptor; + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCasesRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_ListExperimentsRequest_fieldAccessorTable + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCasesRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest.class, - com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest.Builder.class); + com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest.Builder.class); + } + + /** + * + * + *
+   * Specifies how much test case information to include in the response.
+   * 
+ * + * Protobuf enum {@code google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest.TestCaseView} + */ + public enum TestCaseView implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The default / unset value.
+     * The API will default to the BASIC view.
+     * 
+ * + * TEST_CASE_VIEW_UNSPECIFIED = 0; + */ + TEST_CASE_VIEW_UNSPECIFIED(0), + /** + * + * + *
+     * Include basic metadata about the test case, but not the conversation
+     * turns. This is the default value.
+     * 
+ * + * BASIC = 1; + */ + BASIC(1), + /** + * + * + *
+     * Include everything.
+     * 
+ * + * FULL = 2; + */ + FULL(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The default / unset value.
+     * The API will default to the BASIC view.
+     * 
+ * + * TEST_CASE_VIEW_UNSPECIFIED = 0; + */ + public static final int TEST_CASE_VIEW_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Include basic metadata about the test case, but not the conversation
+     * turns. This is the default value.
+     * 
+ * + * BASIC = 1; + */ + public static final int BASIC_VALUE = 1; + /** + * + * + *
+     * Include everything.
+     * 
+ * + * FULL = 2; + */ + public static final int FULL_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TestCaseView valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static TestCaseView forNumber(int value) { + switch (value) { + case 0: + return TEST_CASE_VIEW_UNSPECIFIED; + case 1: + return BASIC; + case 2: + return FULL; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public TestCaseView findValueByNumber(int number) { + return TestCaseView.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final TestCaseView[] VALUES = values(); + + public static TestCaseView valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private TestCaseView(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest.TestCaseView) } public static final int PARENT_FIELD_NUMBER = 1; @@ -130,9 +301,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to list all environments for.
-   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/environments/<Environment ID>`.
+   * Required. The agent to list all pages for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
    * 
* * @@ -157,9 +327,8 @@ public java.lang.String getParent() { * * *
-   * Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to list all environments for.
-   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/environments/<Environment ID>`.
+   * Required. The agent to list all pages for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
    * 
* * @@ -187,8 +356,9 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
-   * The maximum number of items to return in a single page. By default 20 and
-   * at most 100.
+   * 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.
    * 
* * int32 page_size = 2; @@ -249,6 +419,44 @@ public com.google.protobuf.ByteString getPageTokenBytes() { } } + public static final int VIEW_FIELD_NUMBER = 4; + private int view_; + /** + * + * + *
+   * Specifies whether response should include all fields or just the metadata.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest.TestCaseView view = 4; + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + /** + * + * + *
+   * Specifies whether response should include all fields or just the metadata.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest.TestCaseView view = 4; + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest.TestCaseView getView() { + @SuppressWarnings("deprecation") + com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest.TestCaseView result = + com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest.TestCaseView.valueOf(view_); + return result == null + ? com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest.TestCaseView.UNRECOGNIZED + : result; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -272,6 +480,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!getPageTokenBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); } + if (view_ + != com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest.TestCaseView + .TEST_CASE_VIEW_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, view_); + } unknownFields.writeTo(output); } @@ -290,6 +504,12 @@ public int getSerializedSize() { if (!getPageTokenBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); } + if (view_ + != com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest.TestCaseView + .TEST_CASE_VIEW_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, view_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -300,15 +520,16 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest)) { + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest)) { return super.equals(obj); } - com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest other = - (com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest) obj; + com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest other = + (com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest) obj; if (!getParent().equals(other.getParent())) return false; if (getPageSize() != other.getPageSize()) return false; if (!getPageToken().equals(other.getPageToken())) return false; + if (view_ != other.view_) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -326,76 +547,78 @@ public int hashCode() { hash = (53 * hash) + getPageSize(); hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + VIEW_FIELD_NUMBER; + hash = (53 * hash) + view_; hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest parseFrom(byte[] data) + public static com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest parseDelimitedFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest parseDelimitedFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -413,7 +636,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest prototype) { + com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -431,31 +654,31 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The request message for [Experiments.ListExperiments][google.cloud.dialogflow.cx.v3beta1.Experiments.ListExperiments].
+   * The request message for [TestCases.ListTestCases][google.cloud.dialogflow.cx.v3beta1.TestCases.ListTestCases].
    * 
* - * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest} + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest) - com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequestOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest) + com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_ListExperimentsRequest_descriptor; + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCasesRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_ListExperimentsRequest_fieldAccessorTable + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCasesRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest.class, - com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest.Builder.class); + com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest.Builder.class); } - // Construct using com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest.newBuilder() + // Construct using com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -478,24 +701,25 @@ public Builder clear() { pageToken_ = ""; + view_ = 0; + return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_ListExperimentsRequest_descriptor; + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCasesRequest_descriptor; } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest - getDefaultInstanceForType() { - return com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest.getDefaultInstance(); + public com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest.getDefaultInstance(); } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest build() { - com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest result = buildPartial(); + public com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest build() { + com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -503,12 +727,13 @@ public com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest build() { } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest buildPartial() { - com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest result = - new com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest(this); + public com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest result = + new com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest(this); result.parent_ = parent_; result.pageSize_ = pageSize_; result.pageToken_ = pageToken_; + result.view_ = view_; onBuilt(); return result; } @@ -548,17 +773,16 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest) { - return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest) other); + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest other) { - if (other - == com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest.getDefaultInstance()) + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest.getDefaultInstance()) return this; if (!other.getParent().isEmpty()) { parent_ = other.parent_; @@ -571,6 +795,9 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsR pageToken_ = other.pageToken_; onChanged(); } + if (other.view_ != 0) { + setViewValue(other.getViewValue()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -586,13 +813,12 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest parsedMessage = null; + com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = - (com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest) - e.getUnfinishedMessage(); + (com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -607,9 +833,8 @@ public Builder mergeFrom( * * *
-     * Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to list all environments for.
-     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>`.
+     * Required. The agent to list all pages for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
      * 
* * @@ -633,9 +858,8 @@ public java.lang.String getParent() { * * *
-     * Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to list all environments for.
-     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>`.
+     * Required. The agent to list all pages for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
      * 
* * @@ -659,9 +883,8 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
-     * Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to list all environments for.
-     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>`.
+     * Required. The agent to list all pages for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
      * 
* * @@ -684,9 +907,8 @@ public Builder setParent(java.lang.String value) { * * *
-     * Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to list all environments for.
-     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>`.
+     * Required. The agent to list all pages for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
      * 
* * @@ -705,9 +927,8 @@ public Builder clearParent() { * * *
-     * Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to list all environments for.
-     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>`.
+     * Required. The agent to list all pages for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
      * 
* * @@ -733,8 +954,9 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * * *
-     * The maximum number of items to return in a single page. By default 20 and
-     * at most 100.
+     * 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.
      * 
* * int32 page_size = 2; @@ -749,8 +971,9 @@ public int getPageSize() { * * *
-     * The maximum number of items to return in a single page. By default 20 and
-     * at most 100.
+     * 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.
      * 
* * int32 page_size = 2; @@ -768,8 +991,9 @@ public Builder setPageSize(int value) { * * *
-     * The maximum number of items to return in a single page. By default 20 and
-     * at most 100.
+     * 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.
      * 
* * int32 page_size = 2; @@ -889,6 +1113,100 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { return this; } + private int view_ = 0; + /** + * + * + *
+     * Specifies whether response should include all fields or just the metadata.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest.TestCaseView view = 4; + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + /** + * + * + *
+     * Specifies whether response should include all fields or just the metadata.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest.TestCaseView view = 4; + * + * @param value The enum numeric value on the wire for view to set. + * @return This builder for chaining. + */ + public Builder setViewValue(int value) { + + view_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies whether response should include all fields or just the metadata.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest.TestCaseView view = 4; + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest.TestCaseView getView() { + @SuppressWarnings("deprecation") + com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest.TestCaseView result = + com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest.TestCaseView.valueOf(view_); + return result == null + ? com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest.TestCaseView.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Specifies whether response should include all fields or just the metadata.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest.TestCaseView view = 4; + * + * @param value The view to set. + * @return This builder for chaining. + */ + public Builder setView( + com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest.TestCaseView value) { + if (value == null) { + throw new NullPointerException(); + } + + view_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies whether response should include all fields or just the metadata.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest.TestCaseView view = 4; + * + * @return This builder for chaining. + */ + public Builder clearView() { + + view_ = 0; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); @@ -900,43 +1218,42 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest) + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest) } - // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest) - private static final com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest - DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest) + private static final com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest(); + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest(); } - public static com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest getDefaultInstance() { + public static com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public ListExperimentsRequest parsePartialFrom( + public ListTestCasesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListExperimentsRequest(input, extensionRegistry); + return new ListTestCasesRequest(input, extensionRegistry); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest getDefaultInstanceForType() { + public com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExperimentsRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListTestCasesRequestOrBuilder.java similarity index 65% rename from proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExperimentsRequestOrBuilder.java rename to proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListTestCasesRequestOrBuilder.java index d898d28f1..4b9ce65a7 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExperimentsRequestOrBuilder.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListTestCasesRequestOrBuilder.java @@ -14,22 +14,21 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dialogflow/cx/v3beta1/experiment.proto +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto package com.google.cloud.dialogflow.cx.v3beta1; -public interface ListExperimentsRequestOrBuilder +public interface ListTestCasesRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest) + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest) com.google.protobuf.MessageOrBuilder { /** * * *
-   * Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to list all environments for.
-   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/environments/<Environment ID>`.
+   * Required. The agent to list all pages for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
    * 
* * @@ -43,9 +42,8 @@ public interface ListExperimentsRequestOrBuilder * * *
-   * Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to list all environments for.
-   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/environments/<Environment ID>`.
+   * Required. The agent to list all pages for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
    * 
* * @@ -60,8 +58,9 @@ public interface ListExperimentsRequestOrBuilder * * *
-   * The maximum number of items to return in a single page. By default 20 and
-   * at most 100.
+   * 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.
    * 
* * int32 page_size = 2; @@ -94,4 +93,29 @@ public interface ListExperimentsRequestOrBuilder * @return The bytes for pageToken. */ com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Specifies whether response should include all fields or just the metadata.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest.TestCaseView view = 4; + * + * @return The enum numeric value on the wire for view. + */ + int getViewValue(); + /** + * + * + *
+   * Specifies whether response should include all fields or just the metadata.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest.TestCaseView view = 4; + * + * @return The view. + */ + com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest.TestCaseView getView(); } diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExperimentsResponse.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListTestCasesResponse.java similarity index 50% rename from proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExperimentsResponse.java rename to proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListTestCasesResponse.java index 7b8008b6e..1b2ad224b 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExperimentsResponse.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListTestCasesResponse.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dialogflow/cx/v3beta1/experiment.proto +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto package com.google.cloud.dialogflow.cx.v3beta1; @@ -22,30 +22,30 @@ * * *
- * The response message for [Experiments.ListExperiments][google.cloud.dialogflow.cx.v3beta1.Experiments.ListExperiments].
+ * The response message for [TestCases.ListTestCases][google.cloud.dialogflow.cx.v3beta1.TestCases.ListTestCases].
  * 
* - * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse} + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse} */ -public final class ListExperimentsResponse extends com.google.protobuf.GeneratedMessageV3 +public final class ListTestCasesResponse extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse) - ListExperimentsResponseOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse) + ListTestCasesResponseOrBuilder { private static final long serialVersionUID = 0L; - // Use ListExperimentsResponse.newBuilder() to construct. - private ListExperimentsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use ListTestCasesResponse.newBuilder() to construct. + private ListTestCasesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private ListExperimentsResponse() { - experiments_ = java.util.Collections.emptyList(); + private ListTestCasesResponse() { + testCases_ = java.util.Collections.emptyList(); nextPageToken_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListExperimentsResponse(); + return new ListTestCasesResponse(); } @java.lang.Override @@ -53,7 +53,7 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListExperimentsResponse( + private ListTestCasesResponse( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -75,14 +75,13 @@ private ListExperimentsResponse( case 10: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { - experiments_ = - new java.util.ArrayList(); + testCases_ = + new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } - experiments_.add( + testCases_.add( input.readMessage( - com.google.cloud.dialogflow.cx.v3beta1.Experiment.parser(), - extensionRegistry)); + com.google.cloud.dialogflow.cx.v3beta1.TestCase.parser(), extensionRegistry)); break; } case 18: @@ -107,7 +106,7 @@ private ListExperimentsResponse( throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000001) != 0)) { - experiments_ = java.util.Collections.unmodifiableList(experiments_); + testCases_ = java.util.Collections.unmodifiableList(testCases_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); @@ -115,103 +114,92 @@ private ListExperimentsResponse( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_ListExperimentsResponse_descriptor; + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCasesResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_ListExperimentsResponse_fieldAccessorTable + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCasesResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse.class, - com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse.Builder.class); + com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse.class, + com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse.Builder.class); } - public static final int EXPERIMENTS_FIELD_NUMBER = 1; - private java.util.List experiments_; + public static final int TEST_CASES_FIELD_NUMBER = 1; + private java.util.List testCases_; /** * * *
-   * 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.
+   * The list of test cases. There will be a maximum number of items returned
+   * based on the page_size field in the request.
    * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment experiments = 1; + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCase test_cases = 1; */ @java.lang.Override - public java.util.List getExperimentsList() { - return experiments_; + public java.util.List getTestCasesList() { + return testCases_; } /** * * *
-   * 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.
+   * The list of test cases. There will be a maximum number of items returned
+   * based on the page_size field in the request.
    * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment experiments = 1; + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCase test_cases = 1; */ @java.lang.Override - public java.util.List - getExperimentsOrBuilderList() { - return experiments_; + public java.util.List + getTestCasesOrBuilderList() { + return testCases_; } /** * * *
-   * 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.
+   * The list of test cases. There will be a maximum number of items returned
+   * based on the page_size field in the request.
    * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment experiments = 1; + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCase test_cases = 1; */ @java.lang.Override - public int getExperimentsCount() { - return experiments_.size(); + public int getTestCasesCount() { + return testCases_.size(); } /** * * *
-   * 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.
+   * The list of test cases. There will be a maximum number of items returned
+   * based on the page_size field in the request.
    * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment experiments = 1; + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCase test_cases = 1; */ @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.Experiment getExperiments(int index) { - return experiments_.get(index); + public com.google.cloud.dialogflow.cx.v3beta1.TestCase getTestCases(int index) { + return testCases_.get(index); } /** * * *
-   * 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.
+   * The list of test cases. There will be a maximum number of items returned
+   * based on the page_size field in the request.
    * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment experiments = 1; + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCase test_cases = 1; */ @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.ExperimentOrBuilder getExperimentsOrBuilder( - int index) { - return experiments_.get(index); + public com.google.cloud.dialogflow.cx.v3beta1.TestCaseOrBuilder getTestCasesOrBuilder(int index) { + return testCases_.get(index); } public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; @@ -279,8 +267,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < experiments_.size(); i++) { - output.writeMessage(1, experiments_.get(i)); + for (int i = 0; i < testCases_.size(); i++) { + output.writeMessage(1, testCases_.get(i)); } if (!getNextPageTokenBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); @@ -294,8 +282,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - for (int i = 0; i < experiments_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, experiments_.get(i)); + for (int i = 0; i < testCases_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, testCases_.get(i)); } if (!getNextPageTokenBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); @@ -310,13 +298,13 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse)) { + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse)) { return super.equals(obj); } - com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse other = - (com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse) obj; + com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse other = + (com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse) obj; - if (!getExperimentsList().equals(other.getExperimentsList())) return false; + if (!getTestCasesList().equals(other.getTestCasesList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; @@ -329,9 +317,9 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (getExperimentsCount() > 0) { - hash = (37 * hash) + EXPERIMENTS_FIELD_NUMBER; - hash = (53 * hash) + getExperimentsList().hashCode(); + if (getTestCasesCount() > 0) { + hash = (37 * hash) + TEST_CASES_FIELD_NUMBER; + hash = (53 * hash) + getTestCasesList().hashCode(); } hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getNextPageToken().hashCode(); @@ -340,71 +328,71 @@ public int hashCode() { return hash; } - public static com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse parseDelimitedFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse parseDelimitedFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -422,7 +410,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse prototype) { + com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -440,31 +428,31 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The response message for [Experiments.ListExperiments][google.cloud.dialogflow.cx.v3beta1.Experiments.ListExperiments].
+   * The response message for [TestCases.ListTestCases][google.cloud.dialogflow.cx.v3beta1.TestCases.ListTestCases].
    * 
* - * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse} + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse) - com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponseOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse) + com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_ListExperimentsResponse_descriptor; + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCasesResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_ListExperimentsResponse_fieldAccessorTable + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCasesResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse.class, - com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse.Builder.class); + com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse.class, + com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse.Builder.class); } - // Construct using com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse.newBuilder() + // Construct using com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -476,18 +464,18 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getExperimentsFieldBuilder(); + getTestCasesFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); - if (experimentsBuilder_ == null) { - experiments_ = java.util.Collections.emptyList(); + if (testCasesBuilder_ == null) { + testCases_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { - experimentsBuilder_.clear(); + testCasesBuilder_.clear(); } nextPageToken_ = ""; @@ -496,19 +484,19 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_ListExperimentsResponse_descriptor; + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCasesResponse_descriptor; } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse + public com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse getDefaultInstanceForType() { - return com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse.getDefaultInstance(); + return com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse.getDefaultInstance(); } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse build() { - com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse result = buildPartial(); + public com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse build() { + com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -516,18 +504,18 @@ public com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse build() { } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse buildPartial() { - com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse result = - new com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse(this); + public com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse result = + new com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse(this); int from_bitField0_ = bitField0_; - if (experimentsBuilder_ == null) { + if (testCasesBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { - experiments_ = java.util.Collections.unmodifiableList(experiments_); + testCases_ = java.util.Collections.unmodifiableList(testCases_); bitField0_ = (bitField0_ & ~0x00000001); } - result.experiments_ = experiments_; + result.testCases_ = testCases_; } else { - result.experiments_ = experimentsBuilder_.build(); + result.testCases_ = testCasesBuilder_.build(); } result.nextPageToken_ = nextPageToken_; onBuilt(); @@ -569,42 +557,42 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse) { - return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse) other); + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse other) { + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse other) { if (other - == com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse.getDefaultInstance()) + == com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse.getDefaultInstance()) return this; - if (experimentsBuilder_ == null) { - if (!other.experiments_.isEmpty()) { - if (experiments_.isEmpty()) { - experiments_ = other.experiments_; + if (testCasesBuilder_ == null) { + if (!other.testCases_.isEmpty()) { + if (testCases_.isEmpty()) { + testCases_ = other.testCases_; bitField0_ = (bitField0_ & ~0x00000001); } else { - ensureExperimentsIsMutable(); - experiments_.addAll(other.experiments_); + ensureTestCasesIsMutable(); + testCases_.addAll(other.testCases_); } onChanged(); } } else { - if (!other.experiments_.isEmpty()) { - if (experimentsBuilder_.isEmpty()) { - experimentsBuilder_.dispose(); - experimentsBuilder_ = null; - experiments_ = other.experiments_; + if (!other.testCases_.isEmpty()) { + if (testCasesBuilder_.isEmpty()) { + testCasesBuilder_.dispose(); + testCasesBuilder_ = null; + testCases_ = other.testCases_; bitField0_ = (bitField0_ & ~0x00000001); - experimentsBuilder_ = + testCasesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getExperimentsFieldBuilder() + ? getTestCasesFieldBuilder() : null; } else { - experimentsBuilder_.addAllMessages(other.experiments_); + testCasesBuilder_.addAllMessages(other.testCases_); } } } @@ -627,13 +615,12 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse parsedMessage = null; + com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = - (com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse) - e.getUnfinishedMessage(); + (com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -645,104 +632,94 @@ public Builder mergeFrom( private int bitField0_; - private java.util.List experiments_ = + private java.util.List testCases_ = java.util.Collections.emptyList(); - private void ensureExperimentsIsMutable() { + private void ensureTestCasesIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { - experiments_ = - new java.util.ArrayList( - experiments_); + testCases_ = + new java.util.ArrayList(testCases_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.Experiment, - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Builder, - com.google.cloud.dialogflow.cx.v3beta1.ExperimentOrBuilder> - experimentsBuilder_; + com.google.cloud.dialogflow.cx.v3beta1.TestCase, + com.google.cloud.dialogflow.cx.v3beta1.TestCase.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TestCaseOrBuilder> + testCasesBuilder_; /** * * *
-     * 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.
+     * The list of test cases. There will be a maximum number of items returned
+     * based on the page_size field in the request.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment experiments = 1; + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCase test_cases = 1; */ - public java.util.List getExperimentsList() { - if (experimentsBuilder_ == null) { - return java.util.Collections.unmodifiableList(experiments_); + public java.util.List getTestCasesList() { + if (testCasesBuilder_ == null) { + return java.util.Collections.unmodifiableList(testCases_); } else { - return experimentsBuilder_.getMessageList(); + return testCasesBuilder_.getMessageList(); } } /** * * *
-     * 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.
+     * The list of test cases. There will be a maximum number of items returned
+     * based on the page_size field in the request.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment experiments = 1; + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCase test_cases = 1; */ - public int getExperimentsCount() { - if (experimentsBuilder_ == null) { - return experiments_.size(); + public int getTestCasesCount() { + if (testCasesBuilder_ == null) { + return testCases_.size(); } else { - return experimentsBuilder_.getCount(); + return testCasesBuilder_.getCount(); } } /** * * *
-     * 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.
+     * The list of test cases. There will be a maximum number of items returned
+     * based on the page_size field in the request.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment experiments = 1; + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCase test_cases = 1; */ - public com.google.cloud.dialogflow.cx.v3beta1.Experiment getExperiments(int index) { - if (experimentsBuilder_ == null) { - return experiments_.get(index); + public com.google.cloud.dialogflow.cx.v3beta1.TestCase getTestCases(int index) { + if (testCasesBuilder_ == null) { + return testCases_.get(index); } else { - return experimentsBuilder_.getMessage(index); + return testCasesBuilder_.getMessage(index); } } /** * * *
-     * 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.
+     * The list of test cases. There will be a maximum number of items returned
+     * based on the page_size field in the request.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment experiments = 1; + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCase test_cases = 1; */ - public Builder setExperiments( - int index, com.google.cloud.dialogflow.cx.v3beta1.Experiment value) { - if (experimentsBuilder_ == null) { + public Builder setTestCases(int index, com.google.cloud.dialogflow.cx.v3beta1.TestCase value) { + if (testCasesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureExperimentsIsMutable(); - experiments_.set(index, value); + ensureTestCasesIsMutable(); + testCases_.set(index, value); onChanged(); } else { - experimentsBuilder_.setMessage(index, value); + testCasesBuilder_.setMessage(index, value); } return this; } @@ -750,22 +727,20 @@ public Builder setExperiments( * * *
-     * 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.
+     * The list of test cases. There will be a maximum number of items returned
+     * based on the page_size field in the request.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment experiments = 1; + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCase test_cases = 1; */ - public Builder setExperiments( - int index, com.google.cloud.dialogflow.cx.v3beta1.Experiment.Builder builderForValue) { - if (experimentsBuilder_ == null) { - ensureExperimentsIsMutable(); - experiments_.set(index, builderForValue.build()); + public Builder setTestCases( + int index, com.google.cloud.dialogflow.cx.v3beta1.TestCase.Builder builderForValue) { + if (testCasesBuilder_ == null) { + ensureTestCasesIsMutable(); + testCases_.set(index, builderForValue.build()); onChanged(); } else { - experimentsBuilder_.setMessage(index, builderForValue.build()); + testCasesBuilder_.setMessage(index, builderForValue.build()); } return this; } @@ -773,24 +748,22 @@ public Builder setExperiments( * * *
-     * 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.
+     * The list of test cases. There will be a maximum number of items returned
+     * based on the page_size field in the request.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment experiments = 1; + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCase test_cases = 1; */ - public Builder addExperiments(com.google.cloud.dialogflow.cx.v3beta1.Experiment value) { - if (experimentsBuilder_ == null) { + public Builder addTestCases(com.google.cloud.dialogflow.cx.v3beta1.TestCase value) { + if (testCasesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureExperimentsIsMutable(); - experiments_.add(value); + ensureTestCasesIsMutable(); + testCases_.add(value); onChanged(); } else { - experimentsBuilder_.addMessage(value); + testCasesBuilder_.addMessage(value); } return this; } @@ -798,25 +771,22 @@ public Builder addExperiments(com.google.cloud.dialogflow.cx.v3beta1.Experiment * * *
-     * 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.
+     * The list of test cases. There will be a maximum number of items returned
+     * based on the page_size field in the request.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment experiments = 1; + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCase test_cases = 1; */ - public Builder addExperiments( - int index, com.google.cloud.dialogflow.cx.v3beta1.Experiment value) { - if (experimentsBuilder_ == null) { + public Builder addTestCases(int index, com.google.cloud.dialogflow.cx.v3beta1.TestCase value) { + if (testCasesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureExperimentsIsMutable(); - experiments_.add(index, value); + ensureTestCasesIsMutable(); + testCases_.add(index, value); onChanged(); } else { - experimentsBuilder_.addMessage(index, value); + testCasesBuilder_.addMessage(index, value); } return this; } @@ -824,22 +794,20 @@ public Builder addExperiments( * * *
-     * 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.
+     * The list of test cases. There will be a maximum number of items returned
+     * based on the page_size field in the request.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment experiments = 1; + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCase test_cases = 1; */ - public Builder addExperiments( - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Builder builderForValue) { - if (experimentsBuilder_ == null) { - ensureExperimentsIsMutable(); - experiments_.add(builderForValue.build()); + public Builder addTestCases( + com.google.cloud.dialogflow.cx.v3beta1.TestCase.Builder builderForValue) { + if (testCasesBuilder_ == null) { + ensureTestCasesIsMutable(); + testCases_.add(builderForValue.build()); onChanged(); } else { - experimentsBuilder_.addMessage(builderForValue.build()); + testCasesBuilder_.addMessage(builderForValue.build()); } return this; } @@ -847,22 +815,20 @@ public Builder addExperiments( * * *
-     * 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.
+     * The list of test cases. There will be a maximum number of items returned
+     * based on the page_size field in the request.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment experiments = 1; + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCase test_cases = 1; */ - public Builder addExperiments( - int index, com.google.cloud.dialogflow.cx.v3beta1.Experiment.Builder builderForValue) { - if (experimentsBuilder_ == null) { - ensureExperimentsIsMutable(); - experiments_.add(index, builderForValue.build()); + public Builder addTestCases( + int index, com.google.cloud.dialogflow.cx.v3beta1.TestCase.Builder builderForValue) { + if (testCasesBuilder_ == null) { + ensureTestCasesIsMutable(); + testCases_.add(index, builderForValue.build()); onChanged(); } else { - experimentsBuilder_.addMessage(index, builderForValue.build()); + testCasesBuilder_.addMessage(index, builderForValue.build()); } return this; } @@ -870,22 +836,20 @@ public Builder addExperiments( * * *
-     * 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.
+     * The list of test cases. There will be a maximum number of items returned
+     * based on the page_size field in the request.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment experiments = 1; + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCase test_cases = 1; */ - public Builder addAllExperiments( - java.lang.Iterable values) { - if (experimentsBuilder_ == null) { - ensureExperimentsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, experiments_); + public Builder addAllTestCases( + java.lang.Iterable values) { + if (testCasesBuilder_ == null) { + ensureTestCasesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, testCases_); onChanged(); } else { - experimentsBuilder_.addAllMessages(values); + testCasesBuilder_.addAllMessages(values); } return this; } @@ -893,21 +857,19 @@ public Builder addAllExperiments( * * *
-     * 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.
+     * The list of test cases. There will be a maximum number of items returned
+     * based on the page_size field in the request.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment experiments = 1; + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCase test_cases = 1; */ - public Builder clearExperiments() { - if (experimentsBuilder_ == null) { - experiments_ = java.util.Collections.emptyList(); + public Builder clearTestCases() { + if (testCasesBuilder_ == null) { + testCases_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { - experimentsBuilder_.clear(); + testCasesBuilder_.clear(); } return this; } @@ -915,21 +877,19 @@ public Builder clearExperiments() { * * *
-     * 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.
+     * The list of test cases. There will be a maximum number of items returned
+     * based on the page_size field in the request.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment experiments = 1; + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCase test_cases = 1; */ - public Builder removeExperiments(int index) { - if (experimentsBuilder_ == null) { - ensureExperimentsIsMutable(); - experiments_.remove(index); + public Builder removeTestCases(int index) { + if (testCasesBuilder_ == null) { + ensureTestCasesIsMutable(); + testCases_.remove(index); onChanged(); } else { - experimentsBuilder_.remove(index); + testCasesBuilder_.remove(index); } return this; } @@ -937,124 +897,109 @@ public Builder removeExperiments(int index) { * * *
-     * 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.
+     * The list of test cases. There will be a maximum number of items returned
+     * based on the page_size field in the request.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment experiments = 1; + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCase test_cases = 1; */ - public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Builder getExperimentsBuilder( - int index) { - return getExperimentsFieldBuilder().getBuilder(index); + public com.google.cloud.dialogflow.cx.v3beta1.TestCase.Builder getTestCasesBuilder(int index) { + return getTestCasesFieldBuilder().getBuilder(index); } /** * * *
-     * 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.
+     * The list of test cases. There will be a maximum number of items returned
+     * based on the page_size field in the request.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment experiments = 1; + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCase test_cases = 1; */ - public com.google.cloud.dialogflow.cx.v3beta1.ExperimentOrBuilder getExperimentsOrBuilder( + public com.google.cloud.dialogflow.cx.v3beta1.TestCaseOrBuilder getTestCasesOrBuilder( int index) { - if (experimentsBuilder_ == null) { - return experiments_.get(index); + if (testCasesBuilder_ == null) { + return testCases_.get(index); } else { - return experimentsBuilder_.getMessageOrBuilder(index); + return testCasesBuilder_.getMessageOrBuilder(index); } } /** * * *
-     * 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.
+     * The list of test cases. There will be a maximum number of items returned
+     * based on the page_size field in the request.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment experiments = 1; + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCase test_cases = 1; */ - public java.util.List - getExperimentsOrBuilderList() { - if (experimentsBuilder_ != null) { - return experimentsBuilder_.getMessageOrBuilderList(); + public java.util.List + getTestCasesOrBuilderList() { + if (testCasesBuilder_ != null) { + return testCasesBuilder_.getMessageOrBuilderList(); } else { - return java.util.Collections.unmodifiableList(experiments_); + return java.util.Collections.unmodifiableList(testCases_); } } /** * * *
-     * 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.
+     * The list of test cases. There will be a maximum number of items returned
+     * based on the page_size field in the request.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment experiments = 1; + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCase test_cases = 1; */ - public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Builder addExperimentsBuilder() { - return getExperimentsFieldBuilder() - .addBuilder(com.google.cloud.dialogflow.cx.v3beta1.Experiment.getDefaultInstance()); + public com.google.cloud.dialogflow.cx.v3beta1.TestCase.Builder addTestCasesBuilder() { + return getTestCasesFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3beta1.TestCase.getDefaultInstance()); } /** * * *
-     * 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.
+     * The list of test cases. There will be a maximum number of items returned
+     * based on the page_size field in the request.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment experiments = 1; + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCase test_cases = 1; */ - public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Builder addExperimentsBuilder( - int index) { - return getExperimentsFieldBuilder() - .addBuilder( - index, com.google.cloud.dialogflow.cx.v3beta1.Experiment.getDefaultInstance()); + public com.google.cloud.dialogflow.cx.v3beta1.TestCase.Builder addTestCasesBuilder(int index) { + return getTestCasesFieldBuilder() + .addBuilder(index, com.google.cloud.dialogflow.cx.v3beta1.TestCase.getDefaultInstance()); } /** * * *
-     * 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.
+     * The list of test cases. There will be a maximum number of items returned
+     * based on the page_size field in the request.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment experiments = 1; + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCase test_cases = 1; */ - public java.util.List - getExperimentsBuilderList() { - return getExperimentsFieldBuilder().getBuilderList(); + public java.util.List + getTestCasesBuilderList() { + return getTestCasesFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.Experiment, - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Builder, - com.google.cloud.dialogflow.cx.v3beta1.ExperimentOrBuilder> - getExperimentsFieldBuilder() { - if (experimentsBuilder_ == null) { - experimentsBuilder_ = + com.google.cloud.dialogflow.cx.v3beta1.TestCase, + com.google.cloud.dialogflow.cx.v3beta1.TestCase.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TestCaseOrBuilder> + getTestCasesFieldBuilder() { + if (testCasesBuilder_ == null) { + testCasesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.Experiment, - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Builder, - com.google.cloud.dialogflow.cx.v3beta1.ExperimentOrBuilder>( - experiments_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - experiments_ = null; + com.google.cloud.dialogflow.cx.v3beta1.TestCase, + com.google.cloud.dialogflow.cx.v3beta1.TestCase.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TestCaseOrBuilder>( + testCases_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + testCases_ = null; } - return experimentsBuilder_; + return testCasesBuilder_; } private java.lang.Object nextPageToken_ = ""; @@ -1179,45 +1124,43 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse) + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse) } - // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse) - private static final com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse) + private static final com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse(); + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse(); } - public static com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse - getDefaultInstance() { + public static com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public ListExperimentsResponse parsePartialFrom( + public ListTestCasesResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListExperimentsResponse(input, extensionRegistry); + return new ListTestCasesResponse(input, extensionRegistry); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse - getDefaultInstanceForType() { + public com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListTestCasesResponseOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListTestCasesResponseOrBuilder.java new file mode 100644 index 000000000..f0a3095d8 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListTestCasesResponseOrBuilder.java @@ -0,0 +1,109 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface ListTestCasesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of test cases. There will be a maximum number of items returned
+   * based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCase test_cases = 1; + */ + java.util.List getTestCasesList(); + /** + * + * + *
+   * The list of test cases. There will be a maximum number of items returned
+   * based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCase test_cases = 1; + */ + com.google.cloud.dialogflow.cx.v3beta1.TestCase getTestCases(int index); + /** + * + * + *
+   * The list of test cases. There will be a maximum number of items returned
+   * based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCase test_cases = 1; + */ + int getTestCasesCount(); + /** + * + * + *
+   * The list of test cases. There will be a maximum number of items returned
+   * based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCase test_cases = 1; + */ + java.util.List + getTestCasesOrBuilderList(); + /** + * + * + *
+   * The list of test cases. There will be a maximum number of items returned
+   * based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestCase test_cases = 1; + */ + com.google.cloud.dialogflow.cx.v3beta1.TestCaseOrBuilder getTestCasesOrBuilder(int index); + + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Page.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Page.java index 4cb13bdd4..899513cae 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Page.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Page.java @@ -528,9 +528,13 @@ public com.google.protobuf.ByteString getTransitionRouteGroupsBytes(int index) { * following order: * * TransitionRoutes defined in the page with intent specified. * * TransitionRoutes defined in the - * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups]. + * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with intent + * specified. * * TransitionRoutes defined in flow with intent specified. * * TransitionRoutes defined in the page with only condition specified. + * * TransitionRoutes defined in the + * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with only + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 9; @@ -552,9 +556,13 @@ public com.google.protobuf.ByteString getTransitionRouteGroupsBytes(int index) { * following order: * * TransitionRoutes defined in the page with intent specified. * * TransitionRoutes defined in the - * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups]. + * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with intent + * specified. * * TransitionRoutes defined in flow with intent specified. * * TransitionRoutes defined in the page with only condition specified. + * * TransitionRoutes defined in the + * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with only + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 9; @@ -576,9 +584,13 @@ public com.google.protobuf.ByteString getTransitionRouteGroupsBytes(int index) { * following order: * * TransitionRoutes defined in the page with intent specified. * * TransitionRoutes defined in the - * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups]. + * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with intent + * specified. * * TransitionRoutes defined in flow with intent specified. * * TransitionRoutes defined in the page with only condition specified. + * * TransitionRoutes defined in the + * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with only + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 9; @@ -599,9 +611,13 @@ public int getTransitionRoutesCount() { * following order: * * TransitionRoutes defined in the page with intent specified. * * TransitionRoutes defined in the - * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups]. + * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with intent + * specified. * * TransitionRoutes defined in flow with intent specified. * * TransitionRoutes defined in the page with only condition specified. + * * TransitionRoutes defined in the + * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with only + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 9; @@ -622,9 +638,13 @@ public com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute getTransitionRoute * following order: * * TransitionRoutes defined in the page with intent specified. * * TransitionRoutes defined in the - * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups]. + * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with intent + * specified. * * TransitionRoutes defined in flow with intent specified. * * TransitionRoutes defined in the page with only condition specified. + * * TransitionRoutes defined in the + * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with only + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 9; @@ -2159,9 +2179,13 @@ private void ensureTransitionRoutesIsMutable() { * following order: * * TransitionRoutes defined in the page with intent specified. * * TransitionRoutes defined in the - * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups]. + * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with intent + * specified. * * TransitionRoutes defined in flow with intent specified. * * TransitionRoutes defined in the page with only condition specified. + * * TransitionRoutes defined in the + * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with only + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 9; @@ -2186,9 +2210,13 @@ private void ensureTransitionRoutesIsMutable() { * following order: * * TransitionRoutes defined in the page with intent specified. * * TransitionRoutes defined in the - * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups]. + * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with intent + * specified. * * TransitionRoutes defined in flow with intent specified. * * TransitionRoutes defined in the page with only condition specified. + * * TransitionRoutes defined in the + * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with only + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 9; @@ -2212,9 +2240,13 @@ public int getTransitionRoutesCount() { * following order: * * TransitionRoutes defined in the page with intent specified. * * TransitionRoutes defined in the - * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups]. + * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with intent + * specified. * * TransitionRoutes defined in flow with intent specified. * * TransitionRoutes defined in the page with only condition specified. + * * TransitionRoutes defined in the + * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with only + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 9; @@ -2238,9 +2270,13 @@ public com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute getTransitionRoute * following order: * * TransitionRoutes defined in the page with intent specified. * * TransitionRoutes defined in the - * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups]. + * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with intent + * specified. * * TransitionRoutes defined in flow with intent specified. * * TransitionRoutes defined in the page with only condition specified. + * * TransitionRoutes defined in the + * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with only + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 9; @@ -2271,9 +2307,13 @@ public Builder setTransitionRoutes( * following order: * * TransitionRoutes defined in the page with intent specified. * * TransitionRoutes defined in the - * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups]. + * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with intent + * specified. * * TransitionRoutes defined in flow with intent specified. * * TransitionRoutes defined in the page with only condition specified. + * * TransitionRoutes defined in the + * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with only + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 9; @@ -2301,9 +2341,13 @@ public Builder setTransitionRoutes( * following order: * * TransitionRoutes defined in the page with intent specified. * * TransitionRoutes defined in the - * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups]. + * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with intent + * specified. * * TransitionRoutes defined in flow with intent specified. * * TransitionRoutes defined in the page with only condition specified. + * * TransitionRoutes defined in the + * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with only + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 9; @@ -2334,9 +2378,13 @@ public Builder addTransitionRoutes( * following order: * * TransitionRoutes defined in the page with intent specified. * * TransitionRoutes defined in the - * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups]. + * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with intent + * specified. * * TransitionRoutes defined in flow with intent specified. * * TransitionRoutes defined in the page with only condition specified. + * * TransitionRoutes defined in the + * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with only + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 9; @@ -2367,9 +2415,13 @@ public Builder addTransitionRoutes( * following order: * * TransitionRoutes defined in the page with intent specified. * * TransitionRoutes defined in the - * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups]. + * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with intent + * specified. * * TransitionRoutes defined in flow with intent specified. * * TransitionRoutes defined in the page with only condition specified. + * * TransitionRoutes defined in the + * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with only + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 9; @@ -2397,9 +2449,13 @@ public Builder addTransitionRoutes( * following order: * * TransitionRoutes defined in the page with intent specified. * * TransitionRoutes defined in the - * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups]. + * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with intent + * specified. * * TransitionRoutes defined in flow with intent specified. * * TransitionRoutes defined in the page with only condition specified. + * * TransitionRoutes defined in the + * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with only + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 9; @@ -2427,9 +2483,13 @@ public Builder addTransitionRoutes( * following order: * * TransitionRoutes defined in the page with intent specified. * * TransitionRoutes defined in the - * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups]. + * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with intent + * specified. * * TransitionRoutes defined in flow with intent specified. * * TransitionRoutes defined in the page with only condition specified. + * * TransitionRoutes defined in the + * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with only + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 9; @@ -2458,9 +2518,13 @@ public Builder addAllTransitionRoutes( * following order: * * TransitionRoutes defined in the page with intent specified. * * TransitionRoutes defined in the - * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups]. + * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with intent + * specified. * * TransitionRoutes defined in flow with intent specified. * * TransitionRoutes defined in the page with only condition specified. + * * TransitionRoutes defined in the + * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with only + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 9; @@ -2487,9 +2551,13 @@ public Builder clearTransitionRoutes() { * following order: * * TransitionRoutes defined in the page with intent specified. * * TransitionRoutes defined in the - * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups]. + * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with intent + * specified. * * TransitionRoutes defined in flow with intent specified. * * TransitionRoutes defined in the page with only condition specified. + * * TransitionRoutes defined in the + * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with only + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 9; @@ -2516,9 +2584,13 @@ public Builder removeTransitionRoutes(int index) { * following order: * * TransitionRoutes defined in the page with intent specified. * * TransitionRoutes defined in the - * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups]. + * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with intent + * specified. * * TransitionRoutes defined in flow with intent specified. * * TransitionRoutes defined in the page with only condition specified. + * * TransitionRoutes defined in the + * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with only + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 9; @@ -2539,9 +2611,13 @@ public Builder removeTransitionRoutes(int index) { * following order: * * TransitionRoutes defined in the page with intent specified. * * TransitionRoutes defined in the - * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups]. + * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with intent + * specified. * * TransitionRoutes defined in flow with intent specified. * * TransitionRoutes defined in the page with only condition specified. + * * TransitionRoutes defined in the + * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with only + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 9; @@ -2566,9 +2642,13 @@ public Builder removeTransitionRoutes(int index) { * following order: * * TransitionRoutes defined in the page with intent specified. * * TransitionRoutes defined in the - * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups]. + * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with intent + * specified. * * TransitionRoutes defined in flow with intent specified. * * TransitionRoutes defined in the page with only condition specified. + * * TransitionRoutes defined in the + * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with only + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 9; @@ -2593,9 +2673,13 @@ public Builder removeTransitionRoutes(int index) { * following order: * * TransitionRoutes defined in the page with intent specified. * * TransitionRoutes defined in the - * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups]. + * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with intent + * specified. * * TransitionRoutes defined in flow with intent specified. * * TransitionRoutes defined in the page with only condition specified. + * * TransitionRoutes defined in the + * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with only + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 9; @@ -2617,9 +2701,13 @@ public Builder removeTransitionRoutes(int index) { * following order: * * TransitionRoutes defined in the page with intent specified. * * TransitionRoutes defined in the - * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups]. + * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with intent + * specified. * * TransitionRoutes defined in flow with intent specified. * * TransitionRoutes defined in the page with only condition specified. + * * TransitionRoutes defined in the + * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with only + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 9; @@ -2642,9 +2730,13 @@ public Builder removeTransitionRoutes(int index) { * following order: * * TransitionRoutes defined in the page with intent specified. * * TransitionRoutes defined in the - * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups]. + * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with intent + * specified. * * TransitionRoutes defined in flow with intent specified. * * TransitionRoutes defined in the page with only condition specified. + * * TransitionRoutes defined in the + * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with only + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 9; diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PageOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PageOrBuilder.java index 9ea6020db..ea2f8b587 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PageOrBuilder.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PageOrBuilder.java @@ -252,9 +252,13 @@ public interface PageOrBuilder * following order: * * TransitionRoutes defined in the page with intent specified. * * TransitionRoutes defined in the - * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups]. + * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with intent + * specified. * * TransitionRoutes defined in flow with intent specified. * * TransitionRoutes defined in the page with only condition specified. + * * TransitionRoutes defined in the + * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with only + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 9; @@ -272,9 +276,13 @@ public interface PageOrBuilder * following order: * * TransitionRoutes defined in the page with intent specified. * * TransitionRoutes defined in the - * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups]. + * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with intent + * specified. * * TransitionRoutes defined in flow with intent specified. * * TransitionRoutes defined in the page with only condition specified. + * * TransitionRoutes defined in the + * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with only + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 9; @@ -292,9 +300,13 @@ public interface PageOrBuilder * following order: * * TransitionRoutes defined in the page with intent specified. * * TransitionRoutes defined in the - * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups]. + * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with intent + * specified. * * TransitionRoutes defined in flow with intent specified. * * TransitionRoutes defined in the page with only condition specified. + * * TransitionRoutes defined in the + * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with only + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 9; @@ -312,9 +324,13 @@ public interface PageOrBuilder * following order: * * TransitionRoutes defined in the page with intent specified. * * TransitionRoutes defined in the - * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups]. + * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with intent + * specified. * * TransitionRoutes defined in flow with intent specified. * * TransitionRoutes defined in the page with only condition specified. + * * TransitionRoutes defined in the + * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with only + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 9; @@ -333,9 +349,13 @@ public interface PageOrBuilder * following order: * * TransitionRoutes defined in the page with intent specified. * * TransitionRoutes defined in the - * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups]. + * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with intent + * specified. * * TransitionRoutes defined in flow with intent specified. * * TransitionRoutes defined in the page with only condition specified. + * * TransitionRoutes defined in the + * [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with only + * condition specified. * * * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 9; diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/StopExperimentRequest.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ResourceName.java similarity index 60% rename from proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/StopExperimentRequest.java rename to proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ResourceName.java index 8036a1c27..377ee9be3 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/StopExperimentRequest.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ResourceName.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dialogflow/cx/v3beta1/experiment.proto +// source: google/cloud/dialogflow/cx/v3beta1/validation_message.proto package com.google.cloud.dialogflow.cx.v3beta1; @@ -22,29 +22,30 @@ * * *
- * The request message for [Experiments.StopExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.StopExperiment].
+ * Resource name and display name.
  * 
* - * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest} + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ResourceName} */ -public final class StopExperimentRequest extends com.google.protobuf.GeneratedMessageV3 +public final class ResourceName extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest) - StopExperimentRequestOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ResourceName) + ResourceNameOrBuilder { private static final long serialVersionUID = 0L; - // Use StopExperimentRequest.newBuilder() to construct. - private StopExperimentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use ResourceName.newBuilder() to construct. + private ResourceName(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private StopExperimentRequest() { + private ResourceName() { name_ = ""; + displayName_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new StopExperimentRequest(); + return new ResourceName(); } @java.lang.Override @@ -52,7 +53,7 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private StopExperimentRequest( + private ResourceName( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -77,6 +78,13 @@ private StopExperimentRequest( name_ = s; break; } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -97,18 +105,18 @@ private StopExperimentRequest( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_StopExperimentRequest_descriptor; + return com.google.cloud.dialogflow.cx.v3beta1.ValidationMessageProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ResourceName_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_StopExperimentRequest_fieldAccessorTable + return com.google.cloud.dialogflow.cx.v3beta1.ValidationMessageProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ResourceName_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest.class, - com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest.Builder.class); + com.google.cloud.dialogflow.cx.v3beta1.ResourceName.class, + com.google.cloud.dialogflow.cx.v3beta1.ResourceName.Builder.class); } public static final int NAME_FIELD_NUMBER = 1; @@ -117,14 +125,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. Resource name of the experiment to stop.
-   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * Name.
    * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * + * string name = 1; * * @return The name. */ @@ -144,14 +148,10 @@ public java.lang.String getName() { * * *
-   * Required. Resource name of the experiment to stop.
-   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * Name.
    * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * + * string name = 1; * * @return The bytes for name. */ @@ -168,6 +168,55 @@ public com.google.protobuf.ByteString getNameBytes() { } } + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Display name.
+   * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Display name.
+   * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -185,6 +234,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!getNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } unknownFields.writeTo(output); } @@ -197,6 +249,9 @@ public int getSerializedSize() { if (!getNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -207,13 +262,14 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest)) { + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.ResourceName)) { return super.equals(obj); } - com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest other = - (com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest) obj; + com.google.cloud.dialogflow.cx.v3beta1.ResourceName other = + (com.google.cloud.dialogflow.cx.v3beta1.ResourceName) obj; if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -227,76 +283,78 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ResourceName parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ResourceName parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ResourceName parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ResourceName parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest parseFrom(byte[] data) + public static com.google.cloud.dialogflow.cx.v3beta1.ResourceName parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ResourceName parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ResourceName parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ResourceName parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest parseDelimitedFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ResourceName parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest parseDelimitedFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ResourceName parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ResourceName parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ResourceName parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -313,8 +371,7 @@ public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder( - com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest prototype) { + public static Builder newBuilder(com.google.cloud.dialogflow.cx.v3beta1.ResourceName prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -332,31 +389,31 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The request message for [Experiments.StopExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.StopExperiment].
+   * Resource name and display name.
    * 
* - * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest} + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ResourceName} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest) - com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequestOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ResourceName) + com.google.cloud.dialogflow.cx.v3beta1.ResourceNameOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_StopExperimentRequest_descriptor; + return com.google.cloud.dialogflow.cx.v3beta1.ValidationMessageProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ResourceName_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_StopExperimentRequest_fieldAccessorTable + return com.google.cloud.dialogflow.cx.v3beta1.ValidationMessageProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ResourceName_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest.class, - com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest.Builder.class); + com.google.cloud.dialogflow.cx.v3beta1.ResourceName.class, + com.google.cloud.dialogflow.cx.v3beta1.ResourceName.Builder.class); } - // Construct using com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest.newBuilder() + // Construct using com.google.cloud.dialogflow.cx.v3beta1.ResourceName.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -375,24 +432,25 @@ public Builder clear() { super.clear(); name_ = ""; + displayName_ = ""; + return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_StopExperimentRequest_descriptor; + return com.google.cloud.dialogflow.cx.v3beta1.ValidationMessageProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ResourceName_descriptor; } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest - getDefaultInstanceForType() { - return com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest.getDefaultInstance(); + public com.google.cloud.dialogflow.cx.v3beta1.ResourceName getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ResourceName.getDefaultInstance(); } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest build() { - com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest result = buildPartial(); + public com.google.cloud.dialogflow.cx.v3beta1.ResourceName build() { + com.google.cloud.dialogflow.cx.v3beta1.ResourceName result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -400,10 +458,11 @@ public com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest build() { } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest buildPartial() { - com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest result = - new com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest(this); + public com.google.cloud.dialogflow.cx.v3beta1.ResourceName buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.ResourceName result = + new com.google.cloud.dialogflow.cx.v3beta1.ResourceName(this); result.name_ = name_; + result.displayName_ = displayName_; onBuilt(); return result; } @@ -443,22 +502,25 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest) { - return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest) other); + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.ResourceName) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.ResourceName) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest other) { - if (other - == com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest.getDefaultInstance()) + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.ResourceName other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.ResourceName.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -474,12 +536,12 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest parsedMessage = null; + com.google.cloud.dialogflow.cx.v3beta1.ResourceName parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = - (com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest) e.getUnfinishedMessage(); + (com.google.cloud.dialogflow.cx.v3beta1.ResourceName) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -494,14 +556,10 @@ public Builder mergeFrom( * * *
-     * Required. Resource name of the experiment to stop.
-     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * Name.
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * + * string name = 1; * * @return The name. */ @@ -520,14 +578,10 @@ public java.lang.String getName() { * * *
-     * Required. Resource name of the experiment to stop.
-     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * Name.
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * + * string name = 1; * * @return The bytes for name. */ @@ -546,14 +600,10 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-     * Required. Resource name of the experiment to stop.
-     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * Name.
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * + * string name = 1; * * @param value The name to set. * @return This builder for chaining. @@ -571,14 +621,10 @@ public Builder setName(java.lang.String value) { * * *
-     * Required. Resource name of the experiment to stop.
-     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * Name.
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * + * string name = 1; * * @return This builder for chaining. */ @@ -592,14 +638,10 @@ public Builder clearName() { * * *
-     * Required. Resource name of the experiment to stop.
-     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * Name.
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * + * string name = 1; * * @param value The bytes for name to set. * @return This builder for chaining. @@ -615,6 +657,112 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Display name.
+     * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Display name.
+     * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Display name.
+     * 
+ * + * string display_name = 2; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Display name.
+     * 
+ * + * string display_name = 2; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Display name.
+     * 
+ * + * string display_name = 2; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); @@ -626,43 +774,42 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest) + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ResourceName) } - // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest) - private static final com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest - DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ResourceName) + private static final com.google.cloud.dialogflow.cx.v3beta1.ResourceName DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest(); + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.ResourceName(); } - public static com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest getDefaultInstance() { + public static com.google.cloud.dialogflow.cx.v3beta1.ResourceName getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public StopExperimentRequest parsePartialFrom( + public ResourceName parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new StopExperimentRequest(input, extensionRegistry); + return new ResourceName(input, extensionRegistry); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest getDefaultInstanceForType() { + public com.google.cloud.dialogflow.cx.v3beta1.ResourceName getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ResourceNameOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ResourceNameOrBuilder.java new file mode 100644 index 000000000..8bf0005fa --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ResourceNameOrBuilder.java @@ -0,0 +1,75 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/validation_message.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface ResourceNameOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ResourceName) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Name.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Display name.
+   * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Display name.
+   * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ResponseMessage.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ResponseMessage.java index c48702eea..64da5a812 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ResponseMessage.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ResponseMessage.java @@ -3926,111 +3926,37 @@ public com.google.protobuf.Parser getParserForType() { } } - public interface MixedAudioOrBuilder + public interface EndInteractionOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Segments this audio response is composed of.
-     * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment segments = 1; - * - */ - java.util.List - getSegmentsList(); - /** - * - * - *
-     * Segments this audio response is composed of.
-     * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment segments = 1; - * - */ - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment getSegments( - int index); - /** - * - * - *
-     * Segments this audio response is composed of.
-     * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment segments = 1; - * - */ - int getSegmentsCount(); - /** - * - * - *
-     * Segments this audio response is composed of.
-     * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment segments = 1; - * - */ - java.util.List< - ? extends - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.SegmentOrBuilder> - getSegmentsOrBuilderList(); - /** - * - * - *
-     * Segments this audio response is composed of.
-     * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment segments = 1; - * - */ - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.SegmentOrBuilder - getSegmentsOrBuilder(int index); - } + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction) + com.google.protobuf.MessageOrBuilder {} /** * * *
-   * Represents an audio message that is composed of both segments
-   * synthesized from the Dialogflow agent prompts and ones hosted externally
-   * at the specified URIs.
-   * The external URIs are specified via
-   * [play_audio][google.cloud.dialogflow.cx.v3beta1.ResponseMessage.play_audio].
+   * Indicates that interaction with the Dialogflow agent has ended.
    * This message is generated by Dialogflow only and not supposed to be
    * defined by the user.
    * 
* - * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio} + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction} */ - public static final class MixedAudio extends com.google.protobuf.GeneratedMessageV3 + public static final class EndInteraction extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio) - MixedAudioOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction) + EndInteractionOrBuilder { private static final long serialVersionUID = 0L; - // Use MixedAudio.newBuilder() to construct. - private MixedAudio(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use EndInteraction.newBuilder() to construct. + private EndInteraction(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private MixedAudio() { - segments_ = java.util.Collections.emptyList(); - } + private EndInteraction() {} @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new MixedAudio(); + return new EndInteraction(); } @java.lang.Override @@ -4038,7 +3964,7 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private MixedAudio( + private EndInteraction( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -4046,7 +3972,6 @@ private MixedAudio( if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } - int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { @@ -4057,22 +3982,6 @@ private MixedAudio( case 0: done = true; break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - segments_ = - new java.util.ArrayList< - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio - .Segment>(); - mutable_bitField0_ |= 0x00000001; - } - segments_.add( - input.readMessage( - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment - .parser(), - extensionRegistry)); - break; - } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -4087,9 +3996,6 @@ private MixedAudio( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - segments_ = java.util.Collections.unmodifiableList(segments_); - } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } @@ -4097,1148 +4003,614 @@ private MixedAudio( public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_MixedAudio_descriptor; + .internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_EndInteraction_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_MixedAudio_fieldAccessorTable + .internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_EndInteraction_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.class, - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Builder.class); + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction.class, + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction.Builder.class); } - public interface SegmentOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment) - com.google.protobuf.MessageOrBuilder { + private byte memoizedIsInitialized = -1; - /** - * - * - *
-       * Raw audio synthesized from the Dialogflow agent's response using
-       * the output config specified in the request.
-       * 
- * - * bytes audio = 1; - * - * @return The audio. - */ - com.google.protobuf.ByteString getAudio(); + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; - /** - * - * - *
-       * Client-specific URI that points to an audio clip accessible to the
-       * client. Dialogflow does not impose any validation on it.
-       * 
- * - * string uri = 2; - * - * @return The uri. - */ - java.lang.String getUri(); - /** - * - * - *
-       * Client-specific URI that points to an audio clip accessible to the
-       * client. Dialogflow does not impose any validation on it.
-       * 
- * - * string uri = 2; - * - * @return The bytes for uri. - */ - com.google.protobuf.ByteString getUriBytes(); + memoizedIsInitialized = 1; + return true; + } - /** - * - * - *
-       * 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.
-       * 
- * - * bool allow_playback_interruption = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The allowPlaybackInterruption. - */ - boolean getAllowPlaybackInterruption(); + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + unknownFields.writeTo(output); + } - public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.ContentCase - getContentCase(); + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; } - /** - * - * - *
-     * Represents one segment of audio.
-     * 
- * - * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment} - */ - public static final class Segment extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment) - SegmentOrBuilder { - private static final long serialVersionUID = 0L; - // Use Segment.newBuilder() to construct. - private Segment(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction other = + (com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction) obj; - private Segment() {} + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Segment(); + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } + public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - private Segment( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - contentCase_ = 1; - content_ = input.readBytes(); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - contentCase_ = 2; - content_ = s; - break; - } - case 24: - { - allowPlaybackInterruption_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } + public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Indicates that interaction with the Dialogflow agent has ended.
+     * This message is generated by Dialogflow only and not supposed to be
+     * defined by the user.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction) + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteractionOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_MixedAudio_Segment_descriptor; + .internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_EndInteraction_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_MixedAudio_Segment_fieldAccessorTable + .internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_EndInteraction_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.class, - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.Builder + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction.class, + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction.Builder .class); } - private int contentCase_ = 0; - private java.lang.Object content_; - - public enum ContentCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - AUDIO(1), - URI(2), - CONTENT_NOT_SET(0); - private final int value; - - private ContentCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ContentCase valueOf(int value) { - return forNumber(value); - } - - public static ContentCase forNumber(int value) { - switch (value) { - case 1: - return AUDIO; - case 2: - return URI; - case 0: - return CONTENT_NOT_SET; - default: - return null; - } - } + // Construct using + // com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - public int getNumber() { - return this.value; - } - }; + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } - public ContentCase getContentCase() { - return ContentCase.forNumber(contentCase_); + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } - public static final int AUDIO_FIELD_NUMBER = 1; - /** - * - * - *
-       * Raw audio synthesized from the Dialogflow agent's response using
-       * the output config specified in the request.
-       * 
- * - * bytes audio = 1; - * - * @return The audio. - */ @java.lang.Override - public com.google.protobuf.ByteString getAudio() { - if (contentCase_ == 1) { - return (com.google.protobuf.ByteString) content_; - } - return com.google.protobuf.ByteString.EMPTY; + public Builder clear() { + super.clear(); + return this; } - public static final int URI_FIELD_NUMBER = 2; - /** - * - * - *
-       * Client-specific URI that points to an audio clip accessible to the
-       * client. Dialogflow does not impose any validation on it.
-       * 
- * - * string uri = 2; - * - * @return The uri. - */ - public java.lang.String getUri() { - java.lang.Object ref = ""; - if (contentCase_ == 2) { - ref = content_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (contentCase_ == 2) { - content_ = s; - } - return s; - } - } - /** - * - * - *
-       * Client-specific URI that points to an audio clip accessible to the
-       * client. Dialogflow does not impose any validation on it.
-       * 
- * - * string uri = 2; - * - * @return The bytes for uri. - */ - public com.google.protobuf.ByteString getUriBytes() { - java.lang.Object ref = ""; - if (contentCase_ == 2) { - ref = content_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (contentCase_ == 2) { - content_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ALLOW_PLAYBACK_INTERRUPTION_FIELD_NUMBER = 3; - private boolean allowPlaybackInterruption_; - /** - * - * - *
-       * 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.
-       * 
- * - * bool allow_playback_interruption = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The allowPlaybackInterruption. - */ @java.lang.Override - public boolean getAllowPlaybackInterruption() { - return allowPlaybackInterruption_; + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_EndInteraction_descriptor; } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; + public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction + .getDefaultInstance(); } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (contentCase_ == 1) { - output.writeBytes(1, (com.google.protobuf.ByteString) content_); - } - if (contentCase_ == 2) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, content_); - } - if (allowPlaybackInterruption_ != false) { - output.writeBool(3, allowPlaybackInterruption_); + public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction build() { + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); } - unknownFields.writeTo(output); + return result; } @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (contentCase_ == 1) { - size += - com.google.protobuf.CodedOutputStream.computeBytesSize( - 1, (com.google.protobuf.ByteString) content_); - } - if (contentCase_ == 2) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, content_); - } - if (allowPlaybackInterruption_ != false) { - size += - com.google.protobuf.CodedOutputStream.computeBoolSize(3, allowPlaybackInterruption_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; + public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction result = + new com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction(this); + onBuilt(); + return result; } @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment)) { - return super.equals(obj); - } - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment other = - (com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment) obj; - - if (getAllowPlaybackInterruption() != other.getAllowPlaybackInterruption()) return false; - if (!getContentCase().equals(other.getContentCase())) return false; - switch (contentCase_) { - case 1: - if (!getAudio().equals(other.getAudio())) return false; - break; - case 2: - if (!getUri().equals(other.getUri())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; + public Builder clone() { + return super.clone(); } @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ALLOW_PLAYBACK_INTERRUPTION_FIELD_NUMBER; - hash = - (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowPlaybackInterruption()); - switch (contentCase_) { - case 1: - hash = (37 * hash) + AUDIO_FIELD_NUMBER; - hash = (53 * hash) + getAudio().hashCode(); - break; - case 2: - hash = (37 * hash) + URI_FIELD_NUMBER; - hash = (53 * hash) + getUri().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); } - public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); } - public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); } - public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); } - public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); } - public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction) other); + } else { + super.mergeFrom(other); + return this; + } } - public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction + .getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; } - public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment - parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment - parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + @java.lang.Override + public final boolean isInitialized() { + return true; } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; } @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); } - /** - * - * - *
-       * Represents one segment of audio.
-       * 
- * - * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment) - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.SegmentOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_MixedAudio_Segment_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_MixedAudio_Segment_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.class, - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.Builder - .class); - } - - // Construct using - // com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - allowPlaybackInterruption_ = false; - - contentCase_ = 0; - content_ = null; - return this; - } + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction) + } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_MixedAudio_Segment_descriptor; - } + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction) + private static final com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction + DEFAULT_INSTANCE; - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment - getDefaultInstanceForType() { - return com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment - .getDefaultInstance(); - } + static { + DEFAULT_INSTANCE = + new com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction(); + } - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment build() { - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } + public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction + getDefaultInstance() { + return DEFAULT_INSTANCE; + } - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment - buildPartial() { - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment result = - new com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment(this); - if (contentCase_ == 1) { - result.content_ = content_; - } - if (contentCase_ == 2) { - result.content_ = content_; + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EndInteraction parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new EndInteraction(input, extensionRegistry); } - result.allowPlaybackInterruption_ = allowPlaybackInterruption_; - result.contentCase_ = contentCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } + }; - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } + public static com.google.protobuf.Parser parser() { + return PARSER; + } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } + public interface PlayAudioOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio) + com.google.protobuf.MessageOrBuilder { - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } + /** + * + * + *
+     * Required. URI of the audio clip. Dialogflow does not impose any validation on this
+     * value. It is specific to the client that reads it.
+     * 
+ * + * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The audioUri. + */ + java.lang.String getAudioUri(); + /** + * + * + *
+     * Required. URI of the audio clip. Dialogflow does not impose any validation on this
+     * value. It is specific to the client that reads it.
+     * 
+ * + * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for audioUri. + */ + com.google.protobuf.ByteString getAudioUriBytes(); - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment) { - return mergeFrom( - (com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment) other); - } else { - super.mergeFrom(other); - 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.
+     * 
+ * + * bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The allowPlaybackInterruption. + */ + boolean getAllowPlaybackInterruption(); + } + /** + * + * + *
+   * Specifies an audio clip to be played by the client as part of the response.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio} + */ + public static final class PlayAudio extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio) + PlayAudioOrBuilder { + private static final long serialVersionUID = 0L; + // Use PlayAudio.newBuilder() to construct. + private PlayAudio(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - public Builder mergeFrom( - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment other) { - if (other - == com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment - .getDefaultInstance()) return this; - if (other.getAllowPlaybackInterruption() != false) { - setAllowPlaybackInterruption(other.getAllowPlaybackInterruption()); - } - switch (other.getContentCase()) { - case AUDIO: + private PlayAudio() { + audioUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PlayAudio(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private PlayAudio( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { - setAudio(other.getAudio()); + java.lang.String s = input.readStringRequireUtf8(); + + audioUri_ = s; break; } - case URI: + case 16: { - contentCase_ = 2; - content_ = other.content_; - onChanged(); + allowPlaybackInterruption_ = input.readBool(); break; } - case CONTENT_NOT_SET: + default: { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } break; } } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } - @java.lang.Override - public final boolean isInitialized() { - return true; - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_PlayAudio_descriptor; + } - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment parsedMessage = - null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_PlayAudio_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio.class, + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio.Builder.class); + } - private int contentCase_ = 0; - private java.lang.Object content_; + public static final int AUDIO_URI_FIELD_NUMBER = 1; + private volatile java.lang.Object audioUri_; + /** + * + * + *
+     * Required. URI of the audio clip. Dialogflow does not impose any validation on this
+     * value. It is specific to the client that reads it.
+     * 
+ * + * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The audioUri. + */ + @java.lang.Override + public java.lang.String getAudioUri() { + java.lang.Object ref = audioUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + audioUri_ = s; + return s; + } + } + /** + * + * + *
+     * Required. URI of the audio clip. Dialogflow does not impose any validation on this
+     * value. It is specific to the client that reads it.
+     * 
+ * + * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for audioUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAudioUriBytes() { + java.lang.Object ref = audioUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + audioUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - public ContentCase getContentCase() { - return ContentCase.forNumber(contentCase_); - } + public static final int ALLOW_PLAYBACK_INTERRUPTION_FIELD_NUMBER = 2; + private boolean allowPlaybackInterruption_; + /** + * + * + *
+     * 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.
+     * 
+ * + * bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The allowPlaybackInterruption. + */ + @java.lang.Override + public boolean getAllowPlaybackInterruption() { + return allowPlaybackInterruption_; + } - public Builder clearContent() { - contentCase_ = 0; - content_ = null; - onChanged(); - return this; - } - - /** - * - * - *
-         * Raw audio synthesized from the Dialogflow agent's response using
-         * the output config specified in the request.
-         * 
- * - * bytes audio = 1; - * - * @return The audio. - */ - public com.google.protobuf.ByteString getAudio() { - if (contentCase_ == 1) { - return (com.google.protobuf.ByteString) content_; - } - return com.google.protobuf.ByteString.EMPTY; - } - /** - * - * - *
-         * Raw audio synthesized from the Dialogflow agent's response using
-         * the output config specified in the request.
-         * 
- * - * bytes audio = 1; - * - * @param value The audio to set. - * @return This builder for chaining. - */ - public Builder setAudio(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - contentCase_ = 1; - content_ = value; - onChanged(); - return this; - } - /** - * - * - *
-         * Raw audio synthesized from the Dialogflow agent's response using
-         * the output config specified in the request.
-         * 
- * - * bytes audio = 1; - * - * @return This builder for chaining. - */ - public Builder clearAudio() { - if (contentCase_ == 1) { - contentCase_ = 0; - content_ = null; - onChanged(); - } - return this; - } - - /** - * - * - *
-         * Client-specific URI that points to an audio clip accessible to the
-         * client. Dialogflow does not impose any validation on it.
-         * 
- * - * string uri = 2; - * - * @return The uri. - */ - @java.lang.Override - public java.lang.String getUri() { - java.lang.Object ref = ""; - if (contentCase_ == 2) { - ref = content_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (contentCase_ == 2) { - content_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-         * Client-specific URI that points to an audio clip accessible to the
-         * client. Dialogflow does not impose any validation on it.
-         * 
- * - * string uri = 2; - * - * @return The bytes for uri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getUriBytes() { - java.lang.Object ref = ""; - if (contentCase_ == 2) { - ref = content_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (contentCase_ == 2) { - content_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-         * Client-specific URI that points to an audio clip accessible to the
-         * client. Dialogflow does not impose any validation on it.
-         * 
- * - * string uri = 2; - * - * @param value The uri to set. - * @return This builder for chaining. - */ - public Builder setUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - contentCase_ = 2; - content_ = value; - onChanged(); - return this; - } - /** - * - * - *
-         * Client-specific URI that points to an audio clip accessible to the
-         * client. Dialogflow does not impose any validation on it.
-         * 
- * - * string uri = 2; - * - * @return This builder for chaining. - */ - public Builder clearUri() { - if (contentCase_ == 2) { - contentCase_ = 0; - content_ = null; - onChanged(); - } - return this; - } - /** - * - * - *
-         * Client-specific URI that points to an audio clip accessible to the
-         * client. Dialogflow does not impose any validation on it.
-         * 
- * - * string uri = 2; - * - * @param value The bytes for uri to set. - * @return This builder for chaining. - */ - public Builder setUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - contentCase_ = 2; - content_ = value; - onChanged(); - return this; - } - - private boolean allowPlaybackInterruption_; - /** - * - * - *
-         * 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.
-         * 
- * - * bool allow_playback_interruption = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The allowPlaybackInterruption. - */ - @java.lang.Override - public boolean getAllowPlaybackInterruption() { - return allowPlaybackInterruption_; - } - /** - * - * - *
-         * 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.
-         * 
- * - * bool allow_playback_interruption = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The allowPlaybackInterruption to set. - * @return This builder for chaining. - */ - public Builder setAllowPlaybackInterruption(boolean value) { - - allowPlaybackInterruption_ = value; - onChanged(); - 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.
-         * 
- * - * bool allow_playback_interruption = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearAllowPlaybackInterruption() { - - allowPlaybackInterruption_ = false; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment) - private static final com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment(); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Segment parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Segment(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public static final int SEGMENTS_FIELD_NUMBER = 1; - private java.util.List< - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment> - segments_; - /** - * - * - *
-     * Segments this audio response is composed of.
-     * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment segments = 1; - * - */ - @java.lang.Override - public java.util.List - getSegmentsList() { - return segments_; - } - /** - * - * - *
-     * Segments this audio response is composed of.
-     * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment segments = 1; - * - */ - @java.lang.Override - public java.util.List< - ? extends - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.SegmentOrBuilder> - getSegmentsOrBuilderList() { - return segments_; - } - /** - * - * - *
-     * Segments this audio response is composed of.
-     * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment segments = 1; - * - */ - @java.lang.Override - public int getSegmentsCount() { - return segments_.size(); - } - /** - * - * - *
-     * Segments this audio response is composed of.
-     * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment segments = 1; - * - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment getSegments( - int index) { - return segments_.get(index); - } - /** - * - * - *
-     * Segments this audio response is composed of.
-     * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment segments = 1; - * - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.SegmentOrBuilder - getSegmentsOrBuilder(int index) { - return segments_.get(index); - } - - private byte memoizedIsInitialized = -1; + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -5252,8 +4624,11 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < segments_.size(); i++) { - output.writeMessage(1, segments_.get(i)); + if (!getAudioUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, audioUri_); + } + if (allowPlaybackInterruption_ != false) { + output.writeBool(2, allowPlaybackInterruption_); } unknownFields.writeTo(output); } @@ -5264,8 +4639,12 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - for (int i = 0; i < segments_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, segments_.get(i)); + if (!getAudioUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, audioUri_); + } + if (allowPlaybackInterruption_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(2, allowPlaybackInterruption_); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -5277,13 +4656,14 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio)) { + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio)) { return super.equals(obj); } - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio other = - (com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio) obj; + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio other = + (com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio) obj; - if (!getSegmentsList().equals(other.getSegmentsList())) return false; + if (!getAudioUri().equals(other.getAudioUri())) return false; + if (getAllowPlaybackInterruption() != other.getAllowPlaybackInterruption()) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -5295,68 +4675,68 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (getSegmentsCount() > 0) { - hash = (37 * hash) + SEGMENTS_FIELD_NUMBER; - hash = (53 * hash) + getSegmentsList().hashCode(); - } + hash = (37 * hash) + AUDIO_URI_FIELD_NUMBER; + hash = (53 * hash) + getAudioUri().hashCode(); + hash = (37 * hash) + ALLOW_PLAYBACK_INTERRUPTION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowPlaybackInterruption()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio parseFrom( byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio + public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio + public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -5364,12 +4744,12 @@ public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio PARSER, input, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -5387,7 +4767,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio prototype) { + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -5406,39 +4786,33 @@ protected Builder newBuilderForType( * * *
-     * Represents an audio message that is composed of both segments
-     * synthesized from the Dialogflow agent prompts and ones hosted externally
-     * at the specified URIs.
-     * The external URIs are specified via
-     * [play_audio][google.cloud.dialogflow.cx.v3beta1.ResponseMessage.play_audio].
-     * This message is generated by Dialogflow only and not supposed to be
-     * defined by the user.
+     * Specifies an audio clip to be played by the client as part of the response.
      * 
* - * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio} + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio) - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudioOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio) + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudioOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_MixedAudio_descriptor; + .internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_PlayAudio_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_MixedAudio_fieldAccessorTable + .internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_PlayAudio_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.class, - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Builder.class); + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio.class, + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio.Builder.class); } // Construct using - // com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.newBuilder() + // com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -5449,39 +4823,35 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getSegmentsFieldBuilder(); - } + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override public Builder clear() { super.clear(); - if (segmentsBuilder_ == null) { - segments_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - segmentsBuilder_.clear(); - } + audioUri_ = ""; + + allowPlaybackInterruption_ = false; + return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_MixedAudio_descriptor; + .internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_PlayAudio_descriptor; } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio + public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio getDefaultInstanceForType() { - return com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio + return com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio .getDefaultInstance(); } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio build() { - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio result = buildPartial(); + public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio build() { + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -5489,19 +4859,11 @@ public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio build() } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio buildPartial() { - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio result = - new com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio(this); - int from_bitField0_ = bitField0_; - if (segmentsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - segments_ = java.util.Collections.unmodifiableList(segments_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.segments_ = segments_; - } else { - result.segments_ = segmentsBuilder_.build(); - } + public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio result = + new com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio(this); + result.audioUri_ = audioUri_; + result.allowPlaybackInterruption_ = allowPlaybackInterruption_; onBuilt(); return result; } @@ -5541,48 +4903,28 @@ public Builder addRepeatedField( return super.addRepeatedField(field, value); } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio) { - return mergeFrom( - (com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio other) { - if (other - == com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio - .getDefaultInstance()) return this; - if (segmentsBuilder_ == null) { - if (!other.segments_.isEmpty()) { - if (segments_.isEmpty()) { - segments_ = other.segments_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureSegmentsIsMutable(); - segments_.addAll(other.segments_); - } - onChanged(); - } - } else { - if (!other.segments_.isEmpty()) { - if (segmentsBuilder_.isEmpty()) { - segmentsBuilder_.dispose(); - segmentsBuilder_ = null; - segments_ = other.segments_; - bitField0_ = (bitField0_ & ~0x00000001); - segmentsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getSegmentsFieldBuilder() - : null; - } else { - segmentsBuilder_.addAllMessages(other.segments_); - } - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + .getDefaultInstance()) return this; + if (!other.getAudioUri().isEmpty()) { + audioUri_ = other.audioUri_; + onChanged(); + } + if (other.getAllowPlaybackInterruption() != false) { + setAllowPlaybackInterruption(other.getAllowPlaybackInterruption()); } this.mergeUnknownFields(other.unknownFields); onChanged(); @@ -5599,442 +4941,192 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio parsedMessage = null; + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = - (com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio) + (com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.util.List< - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment> - segments_ = java.util.Collections.emptyList(); - - private void ensureSegmentsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - segments_ = - new java.util.ArrayList< - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment>( - segments_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment, - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.Builder, - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.SegmentOrBuilder> - segmentsBuilder_; - - /** - * - * - *
-       * Segments this audio response is composed of.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment segments = 1; - * - */ - public java.util.List< - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment> - getSegmentsList() { - if (segmentsBuilder_ == null) { - return java.util.Collections.unmodifiableList(segments_); - } else { - return segmentsBuilder_.getMessageList(); - } - } - /** - * - * - *
-       * Segments this audio response is composed of.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment segments = 1; - * - */ - public int getSegmentsCount() { - if (segmentsBuilder_ == null) { - return segments_.size(); - } else { - return segmentsBuilder_.getCount(); - } - } - /** - * - * - *
-       * Segments this audio response is composed of.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment segments = 1; - * - */ - public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment getSegments( - int index) { - if (segmentsBuilder_ == null) { - return segments_.get(index); - } else { - return segmentsBuilder_.getMessage(index); - } - } - /** - * - * - *
-       * Segments this audio response is composed of.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment segments = 1; - * - */ - public Builder setSegments( - int index, - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment value) { - if (segmentsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSegmentsIsMutable(); - segments_.set(index, value); - onChanged(); - } else { - segmentsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-       * Segments this audio response is composed of.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment segments = 1; - * - */ - public Builder setSegments( - int index, - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.Builder - builderForValue) { - if (segmentsBuilder_ == null) { - ensureSegmentsIsMutable(); - segments_.set(index, builderForValue.build()); - onChanged(); - } else { - segmentsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-       * Segments this audio response is composed of.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment segments = 1; - * - */ - public Builder addSegments( - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment value) { - if (segmentsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSegmentsIsMutable(); - segments_.add(value); - onChanged(); - } else { - segmentsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-       * Segments this audio response is composed of.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment segments = 1; - * - */ - public Builder addSegments( - int index, - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment value) { - if (segmentsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSegmentsIsMutable(); - segments_.add(index, value); - onChanged(); - } else { - segmentsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-       * Segments this audio response is composed of.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment segments = 1; - * - */ - public Builder addSegments( - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.Builder - builderForValue) { - if (segmentsBuilder_ == null) { - ensureSegmentsIsMutable(); - segments_.add(builderForValue.build()); - onChanged(); - } else { - segmentsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-       * Segments this audio response is composed of.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment segments = 1; - * - */ - public Builder addSegments( - int index, - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.Builder - builderForValue) { - if (segmentsBuilder_ == null) { - ensureSegmentsIsMutable(); - segments_.add(index, builderForValue.build()); - onChanged(); - } else { - segmentsBuilder_.addMessage(index, builderForValue.build()); + mergeFrom(parsedMessage); + } } return this; } + + private java.lang.Object audioUri_ = ""; /** * * *
-       * Segments this audio response is composed of.
+       * Required. URI of the audio clip. Dialogflow does not impose any validation on this
+       * value. It is specific to the client that reads it.
        * 
* - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment segments = 1; - * + * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The audioUri. */ - public Builder addAllSegments( - java.lang.Iterable< - ? extends - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment> - values) { - if (segmentsBuilder_ == null) { - ensureSegmentsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, segments_); - onChanged(); + public java.lang.String getAudioUri() { + java.lang.Object ref = audioUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + audioUri_ = s; + return s; } else { - segmentsBuilder_.addAllMessages(values); + return (java.lang.String) ref; } - return this; } /** * * *
-       * Segments this audio response is composed of.
+       * Required. URI of the audio clip. Dialogflow does not impose any validation on this
+       * value. It is specific to the client that reads it.
        * 
* - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment segments = 1; - * + * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for audioUri. */ - public Builder clearSegments() { - if (segmentsBuilder_ == null) { - segments_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); + public com.google.protobuf.ByteString getAudioUriBytes() { + java.lang.Object ref = audioUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + audioUri_ = b; + return b; } else { - segmentsBuilder_.clear(); + return (com.google.protobuf.ByteString) ref; } - return this; } /** * * *
-       * Segments this audio response is composed of.
+       * Required. URI of the audio clip. Dialogflow does not impose any validation on this
+       * value. It is specific to the client that reads it.
        * 
* - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment segments = 1; - * + * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The audioUri to set. + * @return This builder for chaining. */ - public Builder removeSegments(int index) { - if (segmentsBuilder_ == null) { - ensureSegmentsIsMutable(); - segments_.remove(index); - onChanged(); - } else { - segmentsBuilder_.remove(index); + public Builder setAudioUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } + + audioUri_ = value; + onChanged(); return this; } /** * * *
-       * Segments this audio response is composed of.
+       * Required. URI of the audio clip. Dialogflow does not impose any validation on this
+       * value. It is specific to the client that reads it.
        * 
* - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment segments = 1; - * - */ - public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.Builder - getSegmentsBuilder(int index) { - return getSegmentsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-       * Segments this audio response is composed of.
-       * 
+ * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment segments = 1; - * + * @return This builder for chaining. */ - public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.SegmentOrBuilder - getSegmentsOrBuilder(int index) { - if (segmentsBuilder_ == null) { - return segments_.get(index); - } else { - return segmentsBuilder_.getMessageOrBuilder(index); - } + public Builder clearAudioUri() { + + audioUri_ = getDefaultInstance().getAudioUri(); + onChanged(); + return this; } /** * * *
-       * Segments this audio response is composed of.
+       * Required. URI of the audio clip. Dialogflow does not impose any validation on this
+       * value. It is specific to the client that reads it.
        * 
* - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment segments = 1; - * + * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for audioUri to set. + * @return This builder for chaining. */ - public java.util.List< - ? extends - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio - .SegmentOrBuilder> - getSegmentsOrBuilderList() { - if (segmentsBuilder_ != null) { - return segmentsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(segments_); + public Builder setAudioUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } + checkByteStringIsUtf8(value); + + audioUri_ = value; + onChanged(); + return this; } + + private boolean allowPlaybackInterruption_; /** * * *
-       * Segments this audio response is composed of.
+       * 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.
        * 
* - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment segments = 1; + * bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * + * + * @return The allowPlaybackInterruption. */ - public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.Builder - addSegmentsBuilder() { - return getSegmentsFieldBuilder() - .addBuilder( - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment - .getDefaultInstance()); + @java.lang.Override + public boolean getAllowPlaybackInterruption() { + return allowPlaybackInterruption_; } /** * * *
-       * Segments this audio response is composed of.
+       * 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.
        * 
* - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment segments = 1; + * bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * + * + * @param value The allowPlaybackInterruption to set. + * @return This builder for chaining. */ - public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.Builder - addSegmentsBuilder(int index) { - return getSegmentsFieldBuilder() - .addBuilder( - index, - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment - .getDefaultInstance()); + public Builder setAllowPlaybackInterruption(boolean value) { + + allowPlaybackInterruption_ = value; + onChanged(); + return this; } /** * * *
-       * Segments this audio response is composed of.
+       * 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.
        * 
* - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment segments = 1; + * bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * + * + * @return This builder for chaining. */ - public java.util.List< - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.Builder> - getSegmentsBuilderList() { - return getSegmentsFieldBuilder().getBuilderList(); - } + public Builder clearAllowPlaybackInterruption() { - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment, - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.Builder, - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.SegmentOrBuilder> - getSegmentsFieldBuilder() { - if (segmentsBuilder_ == null) { - segmentsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment, - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.Builder, - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio - .SegmentOrBuilder>( - segments_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - segments_ = null; - } - return segmentsBuilder_; + allowPlaybackInterruption_ = false; + onChanged(); + return this; } @java.lang.Override @@ -6049,80 +5141,154 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio) + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio) } - // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio) - private static final com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio) + private static final com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio(); + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio(); } - public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio + public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public MixedAudio parsePartialFrom( + public PlayAudio parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new MixedAudio(input, extensionRegistry); + return new PlayAudio(input, extensionRegistry); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio + public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - - public interface EndInteractionOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction) - com.google.protobuf.MessageOrBuilder {} + + public interface MixedAudioOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Segments this audio response is composed of.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + java.util.List + getSegmentsList(); + /** + * + * + *
+     * Segments this audio response is composed of.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment getSegments( + int index); + /** + * + * + *
+     * Segments this audio response is composed of.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + int getSegmentsCount(); + /** + * + * + *
+     * Segments this audio response is composed of.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + java.util.List< + ? extends + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.SegmentOrBuilder> + getSegmentsOrBuilderList(); + /** + * + * + *
+     * Segments this audio response is composed of.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.SegmentOrBuilder + getSegmentsOrBuilder(int index); + } /** * * *
-   * Indicates that interaction with the Dialogflow agent has ended.
+   * Represents an audio message that is composed of both segments
+   * synthesized from the Dialogflow agent prompts and ones hosted externally
+   * at the specified URIs.
+   * The external URIs are specified via
+   * [play_audio][google.cloud.dialogflow.cx.v3beta1.ResponseMessage.play_audio].
    * This message is generated by Dialogflow only and not supposed to be
    * defined by the user.
    * 
* - * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction} + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio} */ - public static final class EndInteraction extends com.google.protobuf.GeneratedMessageV3 + public static final class MixedAudio extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction) - EndInteractionOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio) + MixedAudioOrBuilder { private static final long serialVersionUID = 0L; - // Use EndInteraction.newBuilder() to construct. - private EndInteraction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use MixedAudio.newBuilder() to construct. + private MixedAudio(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private EndInteraction() {} + private MixedAudio() { + segments_ = java.util.Collections.emptyList(); + } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new EndInteraction(); + return new MixedAudio(); } @java.lang.Override @@ -6130,7 +5296,7 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private EndInteraction( + private MixedAudio( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -6138,6 +5304,7 @@ private EndInteraction( if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } + int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { @@ -6148,632 +5315,1185 @@ private EndInteraction( case 0: done = true; break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + segments_ = + new java.util.ArrayList< + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio + .Segment>(); + mutable_bitField0_ |= 0x00000001; + } + segments_.add( + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + .parser(), + extensionRegistry)); + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } - break; - } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + segments_ = java.util.Collections.unmodifiableList(segments_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_MixedAudio_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_MixedAudio_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.class, + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Builder.class); + } + + public interface SegmentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Raw audio synthesized from the Dialogflow agent's response using
+       * the output config specified in the request.
+       * 
+ * + * bytes audio = 1; + * + * @return The audio. + */ + com.google.protobuf.ByteString getAudio(); + + /** + * + * + *
+       * Client-specific URI that points to an audio clip accessible to the
+       * client. Dialogflow does not impose any validation on it.
+       * 
+ * + * string uri = 2; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+       * Client-specific URI that points to an audio clip accessible to the
+       * client. Dialogflow does not impose any validation on it.
+       * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+       * 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.
+       * 
+ * + * bool allow_playback_interruption = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The allowPlaybackInterruption. + */ + boolean getAllowPlaybackInterruption(); + + public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.ContentCase + getContentCase(); + } + /** + * + * + *
+     * Represents one segment of audio.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment} + */ + public static final class Segment extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment) + SegmentOrBuilder { + private static final long serialVersionUID = 0L; + // Use Segment.newBuilder() to construct. + private Segment(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Segment() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Segment(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Segment( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + contentCase_ = 1; + content_ = input.readBytes(); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + contentCase_ = 2; + content_ = s; + break; + } + case 24: + { + allowPlaybackInterruption_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_EndInteraction_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_EndInteraction_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction.class, - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction.Builder.class); - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_MixedAudio_Segment_descriptor; + } - private byte memoizedIsInitialized = -1; + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_MixedAudio_Segment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.class, + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.Builder + .class); + } - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private int contentCase_ = 0; + private java.lang.Object content_; - memoizedIsInitialized = 1; - return true; - } + public enum ContentCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + AUDIO(1), + URI(2), + CONTENT_NOT_SET(0); + private final int value; - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); - } + private ContentCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ContentCase valueOf(int value) { + return forNumber(value); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + public static ContentCase forNumber(int value) { + switch (value) { + case 1: + return AUDIO; + case 2: + return URI; + case 0: + return CONTENT_NOT_SET; + default: + return null; + } + } - size = 0; - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + public int getNumber() { + return this.value; + } + }; - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction)) { - return super.equals(obj); + public ContentCase getContentCase() { + return ContentCase.forNumber(contentCase_); } - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction other = - (com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction) obj; - - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; + public static final int AUDIO_FIELD_NUMBER = 1; + /** + * + * + *
+       * Raw audio synthesized from the Dialogflow agent's response using
+       * the output config specified in the request.
+       * 
+ * + * bytes audio = 1; + * + * @return The audio. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAudio() { + if (contentCase_ == 1) { + return (com.google.protobuf.ByteString) content_; + } + return com.google.protobuf.ByteString.EMPTY; } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + public static final int URI_FIELD_NUMBER = 2; + /** + * + * + *
+       * Client-specific URI that points to an audio clip accessible to the
+       * client. Dialogflow does not impose any validation on it.
+       * 
+ * + * string uri = 2; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = ""; + if (contentCase_ == 2) { + ref = content_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (contentCase_ == 2) { + content_ = s; + } + return s; + } + } + /** + * + * + *
+       * Client-specific URI that points to an audio clip accessible to the
+       * client. Dialogflow does not impose any validation on it.
+       * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = ""; + if (contentCase_ == 2) { + ref = content_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (contentCase_ == 2) { + content_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + public static final int ALLOW_PLAYBACK_INTERRUPTION_FIELD_NUMBER = 3; + private boolean allowPlaybackInterruption_; + /** + * + * + *
+       * 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.
+       * 
+ * + * bool allow_playback_interruption = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The allowPlaybackInterruption. + */ + @java.lang.Override + public boolean getAllowPlaybackInterruption() { + return allowPlaybackInterruption_; + } - public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + private byte memoizedIsInitialized = -1; - public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; - public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + memoizedIsInitialized = 1; + return true; + } - public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (contentCase_ == 1) { + output.writeBytes(1, (com.google.protobuf.ByteString) content_); + } + if (contentCase_ == 2) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, content_); + } + if (allowPlaybackInterruption_ != false) { + output.writeBool(3, allowPlaybackInterruption_); + } + unknownFields.writeTo(output); + } - public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } + size = 0; + if (contentCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeBytesSize( + 1, (com.google.protobuf.ByteString) content_); + } + if (contentCase_ == 2) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, content_); + } + if (allowPlaybackInterruption_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(3, allowPlaybackInterruption_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } - public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment other = + (com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment) obj; - public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } + if (getAllowPlaybackInterruption() != other.getAllowPlaybackInterruption()) return false; + if (!getContentCase().equals(other.getContentCase())) return false; + switch (contentCase_) { + case 1: + if (!getAudio().equals(other.getAudio())) return false; + break; + case 2: + if (!getUri().equals(other.getUri())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } - public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ALLOW_PLAYBACK_INTERRUPTION_FIELD_NUMBER; + hash = + (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowPlaybackInterruption()); + switch (contentCase_) { + case 1: + hash = (37 * hash) + AUDIO_FIELD_NUMBER; + hash = (53 * hash) + getAudio().hashCode(); + break; + case 2: + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } - public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } + public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } + public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static Builder newBuilder( - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } + public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-     * Indicates that interaction with the Dialogflow agent has ended.
-     * This message is generated by Dialogflow only and not supposed to be
-     * defined by the user.
-     * 
- * - * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction) - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteractionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_EndInteraction_descriptor; + public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_EndInteraction_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction.class, - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction.Builder - .class); + public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - // Construct using - // com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); + public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); + public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - @java.lang.Override - public Builder clear() { - super.clear(); - return this; + public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_EndInteraction_descriptor; + public Builder newBuilderForType() { + return newBuilder(); } - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction - getDefaultInstanceForType() { - return com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction - .getDefaultInstance(); + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); } - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction build() { - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction buildPartial() { - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction result = - new com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction(this); - onBuilt(); - return result; + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - public Builder clone() { - return super.clone(); + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; } + /** + * + * + *
+       * Represents one segment of audio.
+       * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment) + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.SegmentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_MixedAudio_Segment_descriptor; + } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_MixedAudio_Segment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.class, + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.Builder + .class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + allowPlaybackInterruption_ = false; + + contentCase_ = 0; + content_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_MixedAudio_Segment_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment build() { + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment result = + new com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment(this); + if (contentCase_ == 1) { + result.content_ = content_; + } + if (contentCase_ == 2) { + result.content_ = content_; + } + result.allowPlaybackInterruption_ = allowPlaybackInterruption_; + result.contentCase_ = contentCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + .getDefaultInstance()) return this; + if (other.getAllowPlaybackInterruption() != false) { + setAllowPlaybackInterruption(other.getAllowPlaybackInterruption()); + } + switch (other.getContentCase()) { + case AUDIO: + { + setAudio(other.getAudio()); + break; + } + case URI: + { + contentCase_ = 2; + content_ = other.content_; + onChanged(); + break; + } + case CONTENT_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } + private int contentCase_ = 0; + private java.lang.Object content_; - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } + public ContentCase getContentCase() { + return ContentCase.forNumber(contentCase_); + } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } + public Builder clearContent() { + contentCase_ = 0; + content_ = null; + onChanged(); + return this; + } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } + /** + * + * + *
+         * Raw audio synthesized from the Dialogflow agent's response using
+         * the output config specified in the request.
+         * 
+ * + * bytes audio = 1; + * + * @return The audio. + */ + public com.google.protobuf.ByteString getAudio() { + if (contentCase_ == 1) { + return (com.google.protobuf.ByteString) content_; + } + return com.google.protobuf.ByteString.EMPTY; + } + /** + * + * + *
+         * Raw audio synthesized from the Dialogflow agent's response using
+         * the output config specified in the request.
+         * 
+ * + * bytes audio = 1; + * + * @param value The audio to set. + * @return This builder for chaining. + */ + public Builder setAudio(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + contentCase_ = 1; + content_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Raw audio synthesized from the Dialogflow agent's response using
+         * the output config specified in the request.
+         * 
+ * + * bytes audio = 1; + * + * @return This builder for chaining. + */ + public Builder clearAudio() { + if (contentCase_ == 1) { + contentCase_ = 0; + content_ = null; + onChanged(); + } + return this; + } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction) { - return mergeFrom( - (com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction) other); - } else { - super.mergeFrom(other); + /** + * + * + *
+         * Client-specific URI that points to an audio clip accessible to the
+         * client. Dialogflow does not impose any validation on it.
+         * 
+ * + * string uri = 2; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = ""; + if (contentCase_ == 2) { + ref = content_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (contentCase_ == 2) { + content_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Client-specific URI that points to an audio clip accessible to the
+         * client. Dialogflow does not impose any validation on it.
+         * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = ""; + if (contentCase_ == 2) { + ref = content_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (contentCase_ == 2) { + content_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Client-specific URI that points to an audio clip accessible to the
+         * client. Dialogflow does not impose any validation on it.
+         * 
+ * + * string uri = 2; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + contentCase_ = 2; + content_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Client-specific URI that points to an audio clip accessible to the
+         * client. Dialogflow does not impose any validation on it.
+         * 
+ * + * string uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + if (contentCase_ == 2) { + contentCase_ = 0; + content_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+         * Client-specific URI that points to an audio clip accessible to the
+         * client. Dialogflow does not impose any validation on it.
+         * 
+ * + * string uri = 2; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + contentCase_ = 2; + content_ = value; + onChanged(); + return this; + } + + private boolean allowPlaybackInterruption_; + /** + * + * + *
+         * 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.
+         * 
+ * + * bool allow_playback_interruption = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The allowPlaybackInterruption. + */ + @java.lang.Override + public boolean getAllowPlaybackInterruption() { + return allowPlaybackInterruption_; + } + /** + * + * + *
+         * 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.
+         * 
+ * + * bool allow_playback_interruption = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The allowPlaybackInterruption to set. + * @return This builder for chaining. + */ + public Builder setAllowPlaybackInterruption(boolean value) { + + allowPlaybackInterruption_ = value; + onChanged(); return this; } - } - - public Builder mergeFrom( - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction other) { - if (other - == com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction - .getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); - onChanged(); - 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.
+         * 
+ * + * bool allow_playback_interruption = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearAllowPlaybackInterruption() { - @java.lang.Override - public final boolean isInitialized() { - return true; - } + allowPlaybackInterruption_ = false; + onChanged(); + return this; + } - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); } - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment) } - // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction) - private static final com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction(); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EndInteraction parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new EndInteraction(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface PlayAudioOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Required. URI of the audio clip. Dialogflow does not impose any validation on this
-     * value. It is specific to the client that reads it.
-     * 
- * - * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The audioUri. - */ - java.lang.String getAudioUri(); - /** - * - * - *
-     * Required. URI of the audio clip. Dialogflow does not impose any validation on this
-     * value. It is specific to the client that reads it.
-     * 
- * - * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for audioUri. - */ - com.google.protobuf.ByteString getAudioUriBytes(); - - /** - * - * - *
-     * 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.
-     * 
- * - * bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The allowPlaybackInterruption. - */ - boolean getAllowPlaybackInterruption(); - } - /** - * - * - *
-   * Specifies an audio clip to be played by the client as part of the response.
-   * 
- * - * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio} - */ - public static final class PlayAudio extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio) - PlayAudioOrBuilder { - private static final long serialVersionUID = 0L; - // Use PlayAudio.newBuilder() to construct. - private PlayAudio(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private PlayAudio() { - audioUri_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new PlayAudio(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment) + private static final com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + DEFAULT_INSTANCE; - private PlayAudio( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); + static { + DEFAULT_INSTANCE = + new com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment(); } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - audioUri_ = s; - break; - } - case 16: - { - allowPlaybackInterruption_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); + public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + getDefaultInstance() { + return DEFAULT_INSTANCE; } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_PlayAudio_descriptor; - } + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Segment parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Segment(input, extensionRegistry); + } + }; - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_PlayAudio_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio.class, - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio.Builder.class); + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - public static final int AUDIO_URI_FIELD_NUMBER = 1; - private volatile java.lang.Object audioUri_; + public static final int SEGMENTS_FIELD_NUMBER = 1; + private java.util.List< + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment> + segments_; /** * * *
-     * Required. URI of the audio clip. Dialogflow does not impose any validation on this
-     * value. It is specific to the client that reads it.
+     * Segments this audio response is composed of.
      * 
* - * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The audioUri. + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment segments = 1; + * */ @java.lang.Override - public java.lang.String getAudioUri() { - java.lang.Object ref = audioUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - audioUri_ = s; - return s; - } + public java.util.List + getSegmentsList() { + return segments_; } /** * * *
-     * Required. URI of the audio clip. Dialogflow does not impose any validation on this
-     * value. It is specific to the client that reads it.
+     * Segments this audio response is composed of.
      * 
* - * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.SegmentOrBuilder> + getSegmentsOrBuilderList() { + return segments_; + } + /** * - * @return The bytes for audioUri. + * + *
+     * Segments this audio response is composed of.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment segments = 1; + * */ @java.lang.Override - public com.google.protobuf.ByteString getAudioUriBytes() { - java.lang.Object ref = audioUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - audioUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public int getSegmentsCount() { + return segments_.size(); } - - public static final int ALLOW_PLAYBACK_INTERRUPTION_FIELD_NUMBER = 2; - private boolean allowPlaybackInterruption_; /** * * *
-     * 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.
+     * Segments this audio response is composed of.
      * 
* - * bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment segments = 1; * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment getSegments( + int index) { + return segments_.get(index); + } + /** * - * @return The allowPlaybackInterruption. + * + *
+     * Segments this audio response is composed of.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment segments = 1; + * */ @java.lang.Override - public boolean getAllowPlaybackInterruption() { - return allowPlaybackInterruption_; + public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.SegmentOrBuilder + getSegmentsOrBuilder(int index) { + return segments_.get(index); } private byte memoizedIsInitialized = -1; @@ -6790,11 +6510,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getAudioUriBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, audioUri_); - } - if (allowPlaybackInterruption_ != false) { - output.writeBool(2, allowPlaybackInterruption_); + for (int i = 0; i < segments_.size(); i++) { + output.writeMessage(1, segments_.get(i)); } unknownFields.writeTo(output); } @@ -6805,12 +6522,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getAudioUriBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, audioUri_); - } - if (allowPlaybackInterruption_ != false) { - size += - com.google.protobuf.CodedOutputStream.computeBoolSize(2, allowPlaybackInterruption_); + for (int i = 0; i < segments_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, segments_.get(i)); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -6822,14 +6535,13 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio)) { + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio)) { return super.equals(obj); } - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio other = - (com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio) obj; + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio other = + (com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio) obj; - if (!getAudioUri().equals(other.getAudioUri())) return false; - if (getAllowPlaybackInterruption() != other.getAllowPlaybackInterruption()) return false; + if (!getSegmentsList().equals(other.getSegmentsList())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -6841,68 +6553,68 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + AUDIO_URI_FIELD_NUMBER; - hash = (53 * hash) + getAudioUri().hashCode(); - hash = (37 * hash) + ALLOW_PLAYBACK_INTERRUPTION_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowPlaybackInterruption()); + if (getSegmentsCount() > 0) { + hash = (37 * hash) + SEGMENTS_FIELD_NUMBER; + hash = (53 * hash) + getSegmentsList().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio parseFrom( byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -6910,12 +6622,12 @@ public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio p PARSER, input, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -6933,7 +6645,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio prototype) { + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -6952,33 +6664,39 @@ protected Builder newBuilderForType( * * *
-     * Specifies an audio clip to be played by the client as part of the response.
+     * Represents an audio message that is composed of both segments
+     * synthesized from the Dialogflow agent prompts and ones hosted externally
+     * at the specified URIs.
+     * The external URIs are specified via
+     * [play_audio][google.cloud.dialogflow.cx.v3beta1.ResponseMessage.play_audio].
+     * This message is generated by Dialogflow only and not supposed to be
+     * defined by the user.
      * 
* - * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio} + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio) - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudioOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio) + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudioOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_PlayAudio_descriptor; + .internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_MixedAudio_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_PlayAudio_fieldAccessorTable + .internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_MixedAudio_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio.class, - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio.Builder.class); + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.class, + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Builder.class); } // Construct using - // com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio.newBuilder() + // com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -6989,35 +6707,39 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getSegmentsFieldBuilder(); + } } @java.lang.Override public Builder clear() { super.clear(); - audioUri_ = ""; - - allowPlaybackInterruption_ = false; - + if (segmentsBuilder_ == null) { + segments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + segmentsBuilder_.clear(); + } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_PlayAudio_descriptor; + .internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_MixedAudio_descriptor; } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio getDefaultInstanceForType() { - return com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + return com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio .getDefaultInstance(); } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio build() { - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio result = buildPartial(); + public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio build() { + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -7025,11 +6747,19 @@ public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio build() } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio buildPartial() { - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio result = - new com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio(this); - result.audioUri_ = audioUri_; - result.allowPlaybackInterruption_ = allowPlaybackInterruption_; + public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio result = + new com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio(this); + int from_bitField0_ = bitField0_; + if (segmentsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + segments_ = java.util.Collections.unmodifiableList(segments_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.segments_ = segments_; + } else { + result.segments_ = segmentsBuilder_.build(); + } onBuilt(); return result; } @@ -7071,9 +6801,9 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio) { return mergeFrom( - (com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio) other); + (com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio) other); } else { super.mergeFrom(other); return this; @@ -7081,16 +6811,36 @@ public Builder mergeFrom(com.google.protobuf.Message other) { } public Builder mergeFrom( - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio other) { + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio other) { if (other - == com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + == com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio .getDefaultInstance()) return this; - if (!other.getAudioUri().isEmpty()) { - audioUri_ = other.audioUri_; - onChanged(); - } - if (other.getAllowPlaybackInterruption() != false) { - setAllowPlaybackInterruption(other.getAllowPlaybackInterruption()); + if (segmentsBuilder_ == null) { + if (!other.segments_.isEmpty()) { + if (segments_.isEmpty()) { + segments_ = other.segments_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSegmentsIsMutable(); + segments_.addAll(other.segments_); + } + onChanged(); + } + } else { + if (!other.segments_.isEmpty()) { + if (segmentsBuilder_.isEmpty()) { + segmentsBuilder_.dispose(); + segmentsBuilder_ = null; + segments_ = other.segments_; + bitField0_ = (bitField0_ & ~0x00000001); + segmentsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getSegmentsFieldBuilder() + : null; + } else { + segmentsBuilder_.addAllMessages(other.segments_); + } + } } this.mergeUnknownFields(other.unknownFields); onChanged(); @@ -7107,12 +6857,12 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio parsedMessage = null; + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = - (com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio) + (com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { @@ -7122,177 +6872,427 @@ public Builder mergeFrom( } return this; } - - private java.lang.Object audioUri_ = ""; + + private int bitField0_; + + private java.util.List< + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment> + segments_ = java.util.Collections.emptyList(); + + private void ensureSegmentsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + segments_ = + new java.util.ArrayList< + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment>( + segments_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment, + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.SegmentOrBuilder> + segmentsBuilder_; + + /** + * + * + *
+       * Segments this audio response is composed of.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + public java.util.List< + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment> + getSegmentsList() { + if (segmentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(segments_); + } else { + return segmentsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Segments this audio response is composed of.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + public int getSegmentsCount() { + if (segmentsBuilder_ == null) { + return segments_.size(); + } else { + return segmentsBuilder_.getCount(); + } + } + /** + * + * + *
+       * Segments this audio response is composed of.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment getSegments( + int index) { + if (segmentsBuilder_ == null) { + return segments_.get(index); + } else { + return segmentsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Segments this audio response is composed of.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + public Builder setSegments( + int index, + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment value) { + if (segmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSegmentsIsMutable(); + segments_.set(index, value); + onChanged(); + } else { + segmentsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Segments this audio response is composed of.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + public Builder setSegments( + int index, + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.Builder + builderForValue) { + if (segmentsBuilder_ == null) { + ensureSegmentsIsMutable(); + segments_.set(index, builderForValue.build()); + onChanged(); + } else { + segmentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Segments this audio response is composed of.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + public Builder addSegments( + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment value) { + if (segmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSegmentsIsMutable(); + segments_.add(value); + onChanged(); + } else { + segmentsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Segments this audio response is composed of.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + public Builder addSegments( + int index, + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment value) { + if (segmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSegmentsIsMutable(); + segments_.add(index, value); + onChanged(); + } else { + segmentsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Segments this audio response is composed of.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + public Builder addSegments( + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.Builder + builderForValue) { + if (segmentsBuilder_ == null) { + ensureSegmentsIsMutable(); + segments_.add(builderForValue.build()); + onChanged(); + } else { + segmentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Segments this audio response is composed of.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + public Builder addSegments( + int index, + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.Builder + builderForValue) { + if (segmentsBuilder_ == null) { + ensureSegmentsIsMutable(); + segments_.add(index, builderForValue.build()); + onChanged(); + } else { + segmentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } /** * * *
-       * Required. URI of the audio clip. Dialogflow does not impose any validation on this
-       * value. It is specific to the client that reads it.
+       * Segments this audio response is composed of.
        * 
* - * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The audioUri. + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment segments = 1; + * */ - public java.lang.String getAudioUri() { - java.lang.Object ref = audioUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - audioUri_ = s; - return s; + public Builder addAllSegments( + java.lang.Iterable< + ? extends + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment> + values) { + if (segmentsBuilder_ == null) { + ensureSegmentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, segments_); + onChanged(); } else { - return (java.lang.String) ref; + segmentsBuilder_.addAllMessages(values); } + return this; } /** * * *
-       * Required. URI of the audio clip. Dialogflow does not impose any validation on this
-       * value. It is specific to the client that reads it.
+       * Segments this audio response is composed of.
        * 
* - * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for audioUri. + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment segments = 1; + * */ - public com.google.protobuf.ByteString getAudioUriBytes() { - java.lang.Object ref = audioUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - audioUri_ = b; - return b; + public Builder clearSegments() { + if (segmentsBuilder_ == null) { + segments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); } else { - return (com.google.protobuf.ByteString) ref; + segmentsBuilder_.clear(); } + return this; } /** * * *
-       * Required. URI of the audio clip. Dialogflow does not impose any validation on this
-       * value. It is specific to the client that reads it.
+       * Segments this audio response is composed of.
        * 
* - * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The audioUri to set. - * @return This builder for chaining. + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment segments = 1; + * */ - public Builder setAudioUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public Builder removeSegments(int index) { + if (segmentsBuilder_ == null) { + ensureSegmentsIsMutable(); + segments_.remove(index); + onChanged(); + } else { + segmentsBuilder_.remove(index); } - - audioUri_ = value; - onChanged(); return this; } /** * * *
-       * Required. URI of the audio clip. Dialogflow does not impose any validation on this
-       * value. It is specific to the client that reads it.
+       * Segments this audio response is composed of.
        * 
* - * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment segments = 1; + * */ - public Builder clearAudioUri() { - - audioUri_ = getDefaultInstance().getAudioUri(); - onChanged(); - return this; + public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.Builder + getSegmentsBuilder(int index) { + return getSegmentsFieldBuilder().getBuilder(index); } /** * * *
-       * Required. URI of the audio clip. Dialogflow does not impose any validation on this
-       * value. It is specific to the client that reads it.
+       * Segments this audio response is composed of.
        * 
* - * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for audioUri to set. - * @return This builder for chaining. + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment segments = 1; + * */ - public Builder setAudioUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.SegmentOrBuilder + getSegmentsOrBuilder(int index) { + if (segmentsBuilder_ == null) { + return segments_.get(index); + } else { + return segmentsBuilder_.getMessageOrBuilder(index); } - checkByteStringIsUtf8(value); - - audioUri_ = value; - onChanged(); - return this; } - - private boolean allowPlaybackInterruption_; /** * * *
-       * 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.
+       * Segments this audio response is composed of.
        * 
* - * bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment segments = 1; * - * - * @return The allowPlaybackInterruption. */ - @java.lang.Override - public boolean getAllowPlaybackInterruption() { - return allowPlaybackInterruption_; + public java.util.List< + ? extends + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio + .SegmentOrBuilder> + getSegmentsOrBuilderList() { + if (segmentsBuilder_ != null) { + return segmentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(segments_); + } } /** * * *
-       * 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.
+       * Segments this audio response is composed of.
        * 
* - * bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment segments = 1; * - * - * @param value The allowPlaybackInterruption to set. - * @return This builder for chaining. */ - public Builder setAllowPlaybackInterruption(boolean value) { - - allowPlaybackInterruption_ = value; - onChanged(); - return this; + public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.Builder + addSegmentsBuilder() { + return getSegmentsFieldBuilder() + .addBuilder( + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + .getDefaultInstance()); } /** * * *
-       * 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.
+       * Segments this audio response is composed of.
        * 
* - * bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment segments = 1; * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.Builder + addSegmentsBuilder(int index) { + return getSegmentsFieldBuilder() + .addBuilder( + index, + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + .getDefaultInstance()); + } + /** * - * @return This builder for chaining. + * + *
+       * Segments this audio response is composed of.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment segments = 1; + * */ - public Builder clearAllowPlaybackInterruption() { + public java.util.List< + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.Builder> + getSegmentsBuilderList() { + return getSegmentsFieldBuilder().getBuilderList(); + } - allowPlaybackInterruption_ = false; - onChanged(); - return this; + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment, + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.SegmentOrBuilder> + getSegmentsFieldBuilder() { + if (segmentsBuilder_ == null) { + segmentsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment, + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio + .SegmentOrBuilder>( + segments_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + segments_ = null; + } + return segmentsBuilder_; } @java.lang.Override @@ -7307,44 +7307,44 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio) + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio) } - // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio) - private static final com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio) + private static final com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio(); + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio(); } - public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + public static com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public PlayAudio parsePartialFrom( + public MixedAudio parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PlayAudio(input, extensionRegistry); + return new MixedAudio(input, extensionRegistry); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio getDefaultInstanceForType() { return DEFAULT_INSTANCE; } diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ResponseMessageProto.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ResponseMessageProto.java index c7d6ed8c8..be28245f2 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ResponseMessageProto.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ResponseMessageProto.java @@ -47,14 +47,6 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_OutputAudioText_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_OutputAudioText_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_MixedAudio_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_MixedAudio_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_MixedAudio_Segment_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_MixedAudio_Segment_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_EndInteraction_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -63,6 +55,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_PlayAudio_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_PlayAudio_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_MixedAudio_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_MixedAudio_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_MixedAudio_Segment_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_MixedAudio_Segment_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -102,14 +102,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\027.google.protobuf.Struct\032e\n\017OutputAudioT" + "ext\022\016\n\004text\030\001 \001(\tH\000\022\016\n\004ssml\030\002 \001(\tH\000\022(\n\033a" + "llow_playback_interruption\030\003 \001(\010B\003\340A\003B\010\n" - + "\006source\032\306\001\n\nMixedAudio\022X\n\010segments\030\001 \003(\013" - + "2F.google.cloud.dialogflow.cx.v3beta1.Re" - + "sponseMessage.MixedAudio.Segment\032^\n\007Segm" - + "ent\022\017\n\005audio\030\001 \001(\014H\000\022\r\n\003uri\030\002 \001(\tH\000\022(\n\033a" - + "llow_playback_interruption\030\003 \001(\010B\003\340A\003B\t\n" - + "\007content\032\020\n\016EndInteraction\032M\n\tPlayAudio\022" - + "\026\n\taudio_uri\030\001 \001(\tB\003\340A\002\022(\n\033allow_playbac" - + "k_interruption\030\002 \001(\010B\003\340A\003B\t\n\007messageB\263\001\n" + + "\006source\032\020\n\016EndInteraction\032M\n\tPlayAudio\022\026" + + "\n\taudio_uri\030\001 \001(\tB\003\340A\002\022(\n\033allow_playback" + + "_interruption\030\002 \001(\010B\003\340A\003\032\306\001\n\nMixedAudio\022" + + "X\n\010segments\030\001 \003(\0132F.google.cloud.dialogf" + + "low.cx.v3beta1.ResponseMessage.MixedAudi" + + "o.Segment\032^\n\007Segment\022\017\n\005audio\030\001 \001(\014H\000\022\r\n" + + "\003uri\030\002 \001(\tH\000\022(\n\033allow_playback_interrupt" + + "ion\030\003 \001(\010B\003\340A\003B\t\n\007contentB\t\n\007messageB\263\001\n" + "&com.google.cloud.dialogflow.cx.v3beta1B" + "\024ResponseMessageProtoP\001ZDgoogle.golang.o" + "rg/genproto/googleapis/cloud/dialogflow/" @@ -180,10 +180,28 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Text", "Ssml", "AllowPlaybackInterruption", "Source", }); - internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_MixedAudio_descriptor = + internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_EndInteraction_descriptor = internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_descriptor .getNestedTypes() .get(4); + internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_EndInteraction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_EndInteraction_descriptor, + new java.lang.String[] {}); + internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_PlayAudio_descriptor = + internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_descriptor + .getNestedTypes() + .get(5); + internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_PlayAudio_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_PlayAudio_descriptor, + new java.lang.String[] { + "AudioUri", "AllowPlaybackInterruption", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_MixedAudio_descriptor = + internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_descriptor + .getNestedTypes() + .get(6); internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_MixedAudio_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_MixedAudio_descriptor, @@ -200,24 +218,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Audio", "Uri", "AllowPlaybackInterruption", "Content", }); - internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_EndInteraction_descriptor = - internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_descriptor - .getNestedTypes() - .get(5); - internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_EndInteraction_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_EndInteraction_descriptor, - new java.lang.String[] {}); - internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_PlayAudio_descriptor = - internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_descriptor - .getNestedTypes() - .get(6); - internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_PlayAudio_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_PlayAudio_descriptor, - new java.lang.String[] { - "AudioUri", "AllowPlaybackInterruption", - }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RestoreAgentRequest.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RestoreAgentRequest.java index a588b042f..ea4141050 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RestoreAgentRequest.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RestoreAgentRequest.java @@ -22,8 +22,7 @@ * * *
- * The request message for
- * [Agents.RestoreAgent][google.cloud.dialogflow.cx.v3beta1.Agents.RestoreAgent].
+ * The request message for [Agents.RestoreAgent][google.cloud.dialogflow.cx.v3beta1.Agents.RestoreAgent].
  * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest} @@ -508,8 +507,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The request message for
-   * [Agents.RestoreAgent][google.cloud.dialogflow.cx.v3beta1.Agents.RestoreAgent].
+   * The request message for [Agents.RestoreAgent][google.cloud.dialogflow.cx.v3beta1.Agents.RestoreAgent].
    * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunTestCaseMetadata.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunTestCaseMetadata.java new file mode 100644 index 000000000..c3c8bf02c --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunTestCaseMetadata.java @@ -0,0 +1,457 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * Metadata returned for the [TestCases.RunTestCase][google.cloud.dialogflow.cx.v3beta1.TestCases.RunTestCase] long running operation.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.RunTestCaseMetadata} + */ +public final class RunTestCaseMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.RunTestCaseMetadata) + RunTestCaseMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use RunTestCaseMetadata.newBuilder() to construct. + private RunTestCaseMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RunTestCaseMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RunTestCaseMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RunTestCaseMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_RunTestCaseMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_RunTestCaseMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseMetadata.class, + com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseMetadata.Builder.class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseMetadata)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseMetadata other = + (com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseMetadata) obj; + + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata returned for the [TestCases.RunTestCase][google.cloud.dialogflow.cx.v3beta1.TestCases.RunTestCase] long running operation.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.RunTestCaseMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.RunTestCaseMetadata) + com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_RunTestCaseMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_RunTestCaseMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseMetadata.class, + com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseMetadata.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_RunTestCaseMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseMetadata getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseMetadata build() { + com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseMetadata buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseMetadata result = + new com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseMetadata(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseMetadata) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseMetadata other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseMetadata.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.RunTestCaseMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.RunTestCaseMetadata) + private static final com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseMetadata(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RunTestCaseMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RunTestCaseMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunTestCaseMetadataOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunTestCaseMetadataOrBuilder.java new file mode 100644 index 000000000..2f370de77 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunTestCaseMetadataOrBuilder.java @@ -0,0 +1,24 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface RunTestCaseMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.RunTestCaseMetadata) + com.google.protobuf.MessageOrBuilder {} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunTestCaseRequest.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunTestCaseRequest.java new file mode 100644 index 000000000..554243e5b --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunTestCaseRequest.java @@ -0,0 +1,865 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The request message for [TestCases.RunTestCase][google.cloud.dialogflow.cx.v3beta1.TestCases.RunTestCase].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest} + */ +public final class RunTestCaseRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest) + RunTestCaseRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use RunTestCaseRequest.newBuilder() to construct. + private RunTestCaseRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RunTestCaseRequest() { + name_ = ""; + environment_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RunTestCaseRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RunTestCaseRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + environment_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_RunTestCaseRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_RunTestCaseRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Format of test case name to run: `projects/<Project ID>/locations/
+   * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Format of test case name to run: `projects/<Project ID>/locations/
+   * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENVIRONMENT_FIELD_NUMBER = 2; + private volatile java.lang.Object environment_; + /** + * + * + *
+   * Optional. Environment name. If not set, draft environment is assumed.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>`.
+   * 
+ * + * + * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The environment. + */ + @java.lang.Override + public java.lang.String getEnvironment() { + java.lang.Object ref = environment_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + environment_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Environment name. If not set, draft environment is assumed.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>`.
+   * 
+ * + * + * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for environment. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEnvironmentBytes() { + java.lang.Object ref = environment_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + environment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getEnvironmentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, environment_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getEnvironmentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, environment_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest other = + (com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getEnvironment().equals(other.getEnvironment())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER; + hash = (53 * hash) + getEnvironment().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for [TestCases.RunTestCase][google.cloud.dialogflow.cx.v3beta1.TestCases.RunTestCase].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest) + com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_RunTestCaseRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_RunTestCaseRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + environment_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_RunTestCaseRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest build() { + com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest result = + new com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest(this); + result.name_ = name_; + result.environment_ = environment_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getEnvironment().isEmpty()) { + environment_ = other.environment_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Format of test case name to run: `projects/<Project ID>/locations/
+     * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Format of test case name to run: `projects/<Project ID>/locations/
+     * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Format of test case name to run: `projects/<Project ID>/locations/
+     * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format of test case name to run: `projects/<Project ID>/locations/
+     * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format of test case name to run: `projects/<Project ID>/locations/
+     * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object environment_ = ""; + /** + * + * + *
+     * Optional. Environment name. If not set, draft environment is assumed.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>`.
+     * 
+ * + * + * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The environment. + */ + public java.lang.String getEnvironment() { + java.lang.Object ref = environment_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + environment_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Environment name. If not set, draft environment is assumed.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>`.
+     * 
+ * + * + * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for environment. + */ + public com.google.protobuf.ByteString getEnvironmentBytes() { + java.lang.Object ref = environment_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + environment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Environment name. If not set, draft environment is assumed.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>`.
+     * 
+ * + * + * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The environment to set. + * @return This builder for chaining. + */ + public Builder setEnvironment(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + environment_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Environment name. If not set, draft environment is assumed.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>`.
+     * 
+ * + * + * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearEnvironment() { + + environment_ = getDefaultInstance().getEnvironment(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Environment name. If not set, draft environment is assumed.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>`.
+     * 
+ * + * + * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for environment to set. + * @return This builder for chaining. + */ + public Builder setEnvironmentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + environment_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest) + private static final com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RunTestCaseRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RunTestCaseRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunTestCaseRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunTestCaseRequestOrBuilder.java new file mode 100644 index 000000000..a5fd088b2 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunTestCaseRequestOrBuilder.java @@ -0,0 +1,89 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface RunTestCaseRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Format of test case name to run: `projects/<Project ID>/locations/
+   * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Format of test case name to run: `projects/<Project ID>/locations/
+   * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. Environment name. If not set, draft environment is assumed.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>`.
+   * 
+ * + * + * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The environment. + */ + java.lang.String getEnvironment(); + /** + * + * + *
+   * Optional. Environment name. If not set, draft environment is assumed.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>`.
+   * 
+ * + * + * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for environment. + */ + com.google.protobuf.ByteString getEnvironmentBytes(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunTestCaseResponse.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunTestCaseResponse.java new file mode 100644 index 000000000..b8b3ff2cc --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunTestCaseResponse.java @@ -0,0 +1,736 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The response message for [TestCases.RunTestCase][google.cloud.dialogflow.cx.v3beta1.TestCases.RunTestCase].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse} + */ +public final class RunTestCaseResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse) + RunTestCaseResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use RunTestCaseResponse.newBuilder() to construct. + private RunTestCaseResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RunTestCaseResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RunTestCaseResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RunTestCaseResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult.Builder subBuilder = null; + if (result_ != null) { + subBuilder = result_.toBuilder(); + } + result_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(result_); + result_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_RunTestCaseResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_RunTestCaseResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse.class, + com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse.Builder.class); + } + + public static final int RESULT_FIELD_NUMBER = 2; + private com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult result_; + /** + * + * + *
+   * The result.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestCaseResult result = 2; + * + * @return Whether the result field is set. + */ + @java.lang.Override + public boolean hasResult() { + return result_ != null; + } + /** + * + * + *
+   * The result.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestCaseResult result = 2; + * + * @return The result. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult getResult() { + return result_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult.getDefaultInstance() + : result_; + } + /** + * + * + *
+   * The result.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestCaseResult result = 2; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TestCaseResultOrBuilder getResultOrBuilder() { + return getResult(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (result_ != null) { + output.writeMessage(2, getResult()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (result_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getResult()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse other = + (com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse) obj; + + if (hasResult() != other.hasResult()) return false; + if (hasResult()) { + if (!getResult().equals(other.getResult())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasResult()) { + hash = (37 * hash) + RESULT_FIELD_NUMBER; + hash = (53 * hash) + getResult().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The response message for [TestCases.RunTestCase][google.cloud.dialogflow.cx.v3beta1.TestCases.RunTestCase].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse) + com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_RunTestCaseResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_RunTestCaseResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse.class, + com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (resultBuilder_ == null) { + result_ = null; + } else { + result_ = null; + resultBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_RunTestCaseResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse build() { + com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse result = + new com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse(this); + if (resultBuilder_ == null) { + result.result_ = result_; + } else { + result.result_ = resultBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse.getDefaultInstance()) + return this; + if (other.hasResult()) { + mergeResult(other.getResult()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult result_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult, + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResultOrBuilder> + resultBuilder_; + /** + * + * + *
+     * The result.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestCaseResult result = 2; + * + * @return Whether the result field is set. + */ + public boolean hasResult() { + return resultBuilder_ != null || result_ != null; + } + /** + * + * + *
+     * The result.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestCaseResult result = 2; + * + * @return The result. + */ + public com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult getResult() { + if (resultBuilder_ == null) { + return result_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult.getDefaultInstance() + : result_; + } else { + return resultBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The result.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestCaseResult result = 2; + */ + public Builder setResult(com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult value) { + if (resultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + result_ = value; + onChanged(); + } else { + resultBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The result.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestCaseResult result = 2; + */ + public Builder setResult( + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult.Builder builderForValue) { + if (resultBuilder_ == null) { + result_ = builderForValue.build(); + onChanged(); + } else { + resultBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The result.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestCaseResult result = 2; + */ + public Builder mergeResult(com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult value) { + if (resultBuilder_ == null) { + if (result_ != null) { + result_ = + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult.newBuilder(result_) + .mergeFrom(value) + .buildPartial(); + } else { + result_ = value; + } + onChanged(); + } else { + resultBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The result.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestCaseResult result = 2; + */ + public Builder clearResult() { + if (resultBuilder_ == null) { + result_ = null; + onChanged(); + } else { + result_ = null; + resultBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The result.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestCaseResult result = 2; + */ + public com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult.Builder getResultBuilder() { + + onChanged(); + return getResultFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The result.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestCaseResult result = 2; + */ + public com.google.cloud.dialogflow.cx.v3beta1.TestCaseResultOrBuilder getResultOrBuilder() { + if (resultBuilder_ != null) { + return resultBuilder_.getMessageOrBuilder(); + } else { + return result_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult.getDefaultInstance() + : result_; + } + } + /** + * + * + *
+     * The result.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestCaseResult result = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult, + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResultOrBuilder> + getResultFieldBuilder() { + if (resultBuilder_ == null) { + resultBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult, + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResultOrBuilder>( + getResult(), getParentForChildren(), isClean()); + result_ = null; + } + return resultBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse) + private static final com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RunTestCaseResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RunTestCaseResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunTestCaseResponseOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunTestCaseResponseOrBuilder.java new file mode 100644 index 000000000..3524058b1 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunTestCaseResponseOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface RunTestCaseResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The result.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestCaseResult result = 2; + * + * @return Whether the result field is set. + */ + boolean hasResult(); + /** + * + * + *
+   * The result.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestCaseResult result = 2; + * + * @return The result. + */ + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult getResult(); + /** + * + * + *
+   * The result.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestCaseResult result = 2; + */ + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResultOrBuilder getResultOrBuilder(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionInfo.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionInfo.java index 08b4e999d..32368d157 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionInfo.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionInfo.java @@ -147,9 +147,11 @@ protected com.google.protobuf.MapField internalGetMapField(int number) { *
    * Always present for [WebhookRequest][google.cloud.dialogflow.cx.v3beta1.WebhookRequest]. Ignored for [WebhookResponse][google.cloud.dialogflow.cx.v3beta1.WebhookResponse].
    * The unique identifier of the [session][google.cloud.dialogflow.cx.v3beta1.DetectIntentRequest.session]. This
-   * field can be used by the webhook to identify a user.
+   * field can be used by the webhook to identify a session.
    * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/sessions/<Session ID>`.
+   * ID>/sessions/<Session ID>` or `projects/<Project ID>/locations/<Location
+   * ID>/agents/<Agent ID>/environments/<Environment ID>/sessions/<Session ID>`
+   * if environment is specified.
    * 
* * string session = 1 [(.google.api.resource_reference) = { ... } @@ -174,9 +176,11 @@ public java.lang.String getSession() { *
    * Always present for [WebhookRequest][google.cloud.dialogflow.cx.v3beta1.WebhookRequest]. Ignored for [WebhookResponse][google.cloud.dialogflow.cx.v3beta1.WebhookResponse].
    * The unique identifier of the [session][google.cloud.dialogflow.cx.v3beta1.DetectIntentRequest.session]. This
-   * field can be used by the webhook to identify a user.
+   * field can be used by the webhook to identify a session.
    * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/sessions/<Session ID>`.
+   * ID>/sessions/<Session ID>` or `projects/<Project ID>/locations/<Location
+   * ID>/agents/<Agent ID>/environments/<Environment ID>/sessions/<Session ID>`
+   * if environment is specified.
    * 
* * string session = 1 [(.google.api.resource_reference) = { ... } @@ -689,9 +693,11 @@ public Builder mergeFrom( *
      * Always present for [WebhookRequest][google.cloud.dialogflow.cx.v3beta1.WebhookRequest]. Ignored for [WebhookResponse][google.cloud.dialogflow.cx.v3beta1.WebhookResponse].
      * The unique identifier of the [session][google.cloud.dialogflow.cx.v3beta1.DetectIntentRequest.session]. This
-     * field can be used by the webhook to identify a user.
+     * field can be used by the webhook to identify a session.
      * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/sessions/<Session ID>`.
+     * ID>/sessions/<Session ID>` or `projects/<Project ID>/locations/<Location
+     * ID>/agents/<Agent ID>/environments/<Environment ID>/sessions/<Session ID>`
+     * if environment is specified.
      * 
* * string session = 1 [(.google.api.resource_reference) = { ... } @@ -715,9 +721,11 @@ public java.lang.String getSession() { *
      * Always present for [WebhookRequest][google.cloud.dialogflow.cx.v3beta1.WebhookRequest]. Ignored for [WebhookResponse][google.cloud.dialogflow.cx.v3beta1.WebhookResponse].
      * The unique identifier of the [session][google.cloud.dialogflow.cx.v3beta1.DetectIntentRequest.session]. This
-     * field can be used by the webhook to identify a user.
+     * field can be used by the webhook to identify a session.
      * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/sessions/<Session ID>`.
+     * ID>/sessions/<Session ID>` or `projects/<Project ID>/locations/<Location
+     * ID>/agents/<Agent ID>/environments/<Environment ID>/sessions/<Session ID>`
+     * if environment is specified.
      * 
* * string session = 1 [(.google.api.resource_reference) = { ... } @@ -741,9 +749,11 @@ public com.google.protobuf.ByteString getSessionBytes() { *
      * Always present for [WebhookRequest][google.cloud.dialogflow.cx.v3beta1.WebhookRequest]. Ignored for [WebhookResponse][google.cloud.dialogflow.cx.v3beta1.WebhookResponse].
      * The unique identifier of the [session][google.cloud.dialogflow.cx.v3beta1.DetectIntentRequest.session]. This
-     * field can be used by the webhook to identify a user.
+     * field can be used by the webhook to identify a session.
      * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/sessions/<Session ID>`.
+     * ID>/sessions/<Session ID>` or `projects/<Project ID>/locations/<Location
+     * ID>/agents/<Agent ID>/environments/<Environment ID>/sessions/<Session ID>`
+     * if environment is specified.
      * 
* * string session = 1 [(.google.api.resource_reference) = { ... } @@ -766,9 +776,11 @@ public Builder setSession(java.lang.String value) { *
      * Always present for [WebhookRequest][google.cloud.dialogflow.cx.v3beta1.WebhookRequest]. Ignored for [WebhookResponse][google.cloud.dialogflow.cx.v3beta1.WebhookResponse].
      * The unique identifier of the [session][google.cloud.dialogflow.cx.v3beta1.DetectIntentRequest.session]. This
-     * field can be used by the webhook to identify a user.
+     * field can be used by the webhook to identify a session.
      * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/sessions/<Session ID>`.
+     * ID>/sessions/<Session ID>` or `projects/<Project ID>/locations/<Location
+     * ID>/agents/<Agent ID>/environments/<Environment ID>/sessions/<Session ID>`
+     * if environment is specified.
      * 
* * string session = 1 [(.google.api.resource_reference) = { ... } @@ -787,9 +799,11 @@ public Builder clearSession() { *
      * Always present for [WebhookRequest][google.cloud.dialogflow.cx.v3beta1.WebhookRequest]. Ignored for [WebhookResponse][google.cloud.dialogflow.cx.v3beta1.WebhookResponse].
      * The unique identifier of the [session][google.cloud.dialogflow.cx.v3beta1.DetectIntentRequest.session]. This
-     * field can be used by the webhook to identify a user.
+     * field can be used by the webhook to identify a session.
      * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/sessions/<Session ID>`.
+     * ID>/sessions/<Session ID>` or `projects/<Project ID>/locations/<Location
+     * ID>/agents/<Agent ID>/environments/<Environment ID>/sessions/<Session ID>`
+     * if environment is specified.
      * 
* * string session = 1 [(.google.api.resource_reference) = { ... } diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionInfoOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionInfoOrBuilder.java index 834c00b0a..7b5688b55 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionInfoOrBuilder.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionInfoOrBuilder.java @@ -29,9 +29,11 @@ public interface SessionInfoOrBuilder *
    * Always present for [WebhookRequest][google.cloud.dialogflow.cx.v3beta1.WebhookRequest]. Ignored for [WebhookResponse][google.cloud.dialogflow.cx.v3beta1.WebhookResponse].
    * The unique identifier of the [session][google.cloud.dialogflow.cx.v3beta1.DetectIntentRequest.session]. This
-   * field can be used by the webhook to identify a user.
+   * field can be used by the webhook to identify a session.
    * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/sessions/<Session ID>`.
+   * ID>/sessions/<Session ID>` or `projects/<Project ID>/locations/<Location
+   * ID>/agents/<Agent ID>/environments/<Environment ID>/sessions/<Session ID>`
+   * if environment is specified.
    * 
* * string session = 1 [(.google.api.resource_reference) = { ... } @@ -45,9 +47,11 @@ public interface SessionInfoOrBuilder *
    * Always present for [WebhookRequest][google.cloud.dialogflow.cx.v3beta1.WebhookRequest]. Ignored for [WebhookResponse][google.cloud.dialogflow.cx.v3beta1.WebhookResponse].
    * The unique identifier of the [session][google.cloud.dialogflow.cx.v3beta1.DetectIntentRequest.session]. This
-   * field can be used by the webhook to identify a user.
+   * field can be used by the webhook to identify a session.
    * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/sessions/<Session ID>`.
+   * ID>/sessions/<Session ID>` or `projects/<Project ID>/locations/<Location
+   * ID>/agents/<Agent ID>/environments/<Environment ID>/sessions/<Session ID>`
+   * if environment is specified.
    * 
* * string session = 1 [(.google.api.resource_reference) = { ... } diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCase.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCase.java new file mode 100644 index 000000000..24d6e05fb --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCase.java @@ -0,0 +1,2801 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * Represents a test case.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.TestCase} + */ +public final class TestCase extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.TestCase) + TestCaseOrBuilder { + private static final long serialVersionUID = 0L; + // Use TestCase.newBuilder() to construct. + private TestCase(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TestCase() { + name_ = ""; + tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + displayName_ = ""; + notes_ = ""; + testCaseConversationTurns_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TestCase(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TestCase( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + tags_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + tags_.add(s); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + notes_ = s; + break; + } + case 42: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + testCaseConversationTurns_ = + new java.util.ArrayList< + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn>(); + mutable_bitField0_ |= 0x00000002; + } + testCaseConversationTurns_.add( + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.parser(), + extensionRegistry)); + break; + } + case 82: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (creationTime_ != null) { + subBuilder = creationTime_.toBuilder(); + } + creationTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(creationTime_); + creationTime_ = subBuilder.buildPartial(); + } + + break; + } + case 98: + { + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult.Builder subBuilder = null; + if (lastTestResult_ != null) { + subBuilder = lastTestResult_.toBuilder(); + } + lastTestResult_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(lastTestResult_); + lastTestResult_ = subBuilder.buildPartial(); + } + + break; + } + case 106: + { + com.google.cloud.dialogflow.cx.v3beta1.TestConfig.Builder subBuilder = null; + if (testConfig_ != null) { + subBuilder = testConfig_.toBuilder(); + } + testConfig_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.TestConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(testConfig_); + testConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + tags_ = tags_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + testCaseConversationTurns_ = + java.util.Collections.unmodifiableList(testCaseConversationTurns_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_TestCase_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_TestCase_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.TestCase.class, + com.google.cloud.dialogflow.cx.v3beta1.TestCase.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * The unique identifier of the test case.
+   * [TestCases.CreateTestCase][google.cloud.dialogflow.cx.v3beta1.TestCases.CreateTestCase] will populate the name automatically.
+   * Otherwise use format: `projects/<Project ID>/locations/<LocationID>/agents/
+   * <AgentID>/testCases/<TestCase ID>`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * The unique identifier of the test case.
+   * [TestCases.CreateTestCase][google.cloud.dialogflow.cx.v3beta1.TestCases.CreateTestCase] will populate the name automatically.
+   * Otherwise use format: `projects/<Project ID>/locations/<LocationID>/agents/
+   * <AgentID>/testCases/<TestCase ID>`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TAGS_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList 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.
+   * 
+ * + * repeated string tags = 2; + * + * @return A list containing the tags. + */ + public com.google.protobuf.ProtocolStringList getTagsList() { + return 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.
+   * 
+ * + * repeated string tags = 2; + * + * @return The count of tags. + */ + public int getTagsCount() { + return tags_.size(); + } + /** + * + * + *
+   * 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.
+   * 
+ * + * repeated string tags = 2; + * + * @param index The index of the element to return. + * @return The tags at the given index. + */ + public java.lang.String getTags(int index) { + return tags_.get(index); + } + /** + * + * + *
+   * 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.
+   * 
+ * + * repeated string tags = 2; + * + * @param index The index of the value to return. + * @return The bytes of the tags at the given index. + */ + public com.google.protobuf.ByteString getTagsBytes(int index) { + return tags_.getByteString(index); + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 3; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Required. The human-readable name of the test case, unique within the agent. Limit of
+   * 200 characters.
+   * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The human-readable name of the test case, unique within the agent. Limit of
+   * 200 characters.
+   * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NOTES_FIELD_NUMBER = 4; + private volatile java.lang.Object notes_; + /** + * + * + *
+   * Additional freeform notes about the test case. Limit of 400 characters.
+   * 
+ * + * string notes = 4; + * + * @return The notes. + */ + @java.lang.Override + public java.lang.String getNotes() { + java.lang.Object ref = notes_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + notes_ = s; + return s; + } + } + /** + * + * + *
+   * Additional freeform notes about the test case. Limit of 400 characters.
+   * 
+ * + * string notes = 4; + * + * @return The bytes for notes. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNotesBytes() { + java.lang.Object ref = notes_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + notes_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TEST_CONFIG_FIELD_NUMBER = 13; + private com.google.cloud.dialogflow.cx.v3beta1.TestConfig testConfig_; + /** + * + * + *
+   * Config for the test case.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestConfig test_config = 13; + * + * @return Whether the testConfig field is set. + */ + @java.lang.Override + public boolean hasTestConfig() { + return testConfig_ != null; + } + /** + * + * + *
+   * Config for the test case.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestConfig test_config = 13; + * + * @return The testConfig. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TestConfig getTestConfig() { + return testConfig_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.TestConfig.getDefaultInstance() + : testConfig_; + } + /** + * + * + *
+   * Config for the test case.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestConfig test_config = 13; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TestConfigOrBuilder getTestConfigOrBuilder() { + return getTestConfig(); + } + + public static final int TEST_CASE_CONVERSATION_TURNS_FIELD_NUMBER = 5; + private java.util.List + testCaseConversationTurns_; + /** + * + * + *
+   * 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.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ConversationTurn test_case_conversation_turns = 5; + * + */ + @java.lang.Override + public java.util.List + getTestCaseConversationTurnsList() { + return testCaseConversationTurns_; + } + /** + * + * + *
+   * 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.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ConversationTurn test_case_conversation_turns = 5; + * + */ + @java.lang.Override + public java.util.List + getTestCaseConversationTurnsOrBuilderList() { + return testCaseConversationTurns_; + } + /** + * + * + *
+   * 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.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ConversationTurn test_case_conversation_turns = 5; + * + */ + @java.lang.Override + public int getTestCaseConversationTurnsCount() { + return testCaseConversationTurns_.size(); + } + /** + * + * + *
+   * 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.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ConversationTurn test_case_conversation_turns = 5; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn getTestCaseConversationTurns( + int index) { + return testCaseConversationTurns_.get(index); + } + /** + * + * + *
+   * 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.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ConversationTurn test_case_conversation_turns = 5; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ConversationTurnOrBuilder + getTestCaseConversationTurnsOrBuilder(int index) { + return testCaseConversationTurns_.get(index); + } + + public static final int CREATION_TIME_FIELD_NUMBER = 10; + private com.google.protobuf.Timestamp creationTime_; + /** + * + * + *
+   * Output only. When the test was created.
+   * 
+ * + * + * .google.protobuf.Timestamp creation_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the creationTime field is set. + */ + @java.lang.Override + public boolean hasCreationTime() { + return creationTime_ != null; + } + /** + * + * + *
+   * Output only. When the test was created.
+   * 
+ * + * + * .google.protobuf.Timestamp creation_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The creationTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreationTime() { + return creationTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : creationTime_; + } + /** + * + * + *
+   * Output only. When the test was created.
+   * 
+ * + * + * .google.protobuf.Timestamp creation_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreationTimeOrBuilder() { + return getCreationTime(); + } + + public static final int LAST_TEST_RESULT_FIELD_NUMBER = 12; + private com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult lastTestResult_; + /** + * + * + *
+   * The latest test result.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestCaseResult last_test_result = 12; + * + * @return Whether the lastTestResult field is set. + */ + @java.lang.Override + public boolean hasLastTestResult() { + return lastTestResult_ != null; + } + /** + * + * + *
+   * The latest test result.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestCaseResult last_test_result = 12; + * + * @return The lastTestResult. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult getLastTestResult() { + return lastTestResult_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult.getDefaultInstance() + : lastTestResult_; + } + /** + * + * + *
+   * The latest test result.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestCaseResult last_test_result = 12; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TestCaseResultOrBuilder + getLastTestResultOrBuilder() { + return getLastTestResult(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + for (int i = 0; i < tags_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, tags_.getRaw(i)); + } + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, displayName_); + } + if (!getNotesBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, notes_); + } + for (int i = 0; i < testCaseConversationTurns_.size(); i++) { + output.writeMessage(5, testCaseConversationTurns_.get(i)); + } + if (creationTime_ != null) { + output.writeMessage(10, getCreationTime()); + } + if (lastTestResult_ != null) { + output.writeMessage(12, getLastTestResult()); + } + if (testConfig_ != null) { + output.writeMessage(13, getTestConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + { + int dataSize = 0; + for (int i = 0; i < tags_.size(); i++) { + dataSize += computeStringSizeNoTag(tags_.getRaw(i)); + } + size += dataSize; + size += 1 * getTagsList().size(); + } + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, displayName_); + } + if (!getNotesBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, notes_); + } + for (int i = 0; i < testCaseConversationTurns_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, testCaseConversationTurns_.get(i)); + } + if (creationTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getCreationTime()); + } + if (lastTestResult_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getLastTestResult()); + } + if (testConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getTestConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.TestCase)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.TestCase other = + (com.google.cloud.dialogflow.cx.v3beta1.TestCase) obj; + + if (!getName().equals(other.getName())) return false; + if (!getTagsList().equals(other.getTagsList())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getNotes().equals(other.getNotes())) return false; + if (hasTestConfig() != other.hasTestConfig()) return false; + if (hasTestConfig()) { + if (!getTestConfig().equals(other.getTestConfig())) return false; + } + if (!getTestCaseConversationTurnsList().equals(other.getTestCaseConversationTurnsList())) + return false; + if (hasCreationTime() != other.hasCreationTime()) return false; + if (hasCreationTime()) { + if (!getCreationTime().equals(other.getCreationTime())) return false; + } + if (hasLastTestResult() != other.hasLastTestResult()) return false; + if (hasLastTestResult()) { + if (!getLastTestResult().equals(other.getLastTestResult())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getTagsCount() > 0) { + hash = (37 * hash) + TAGS_FIELD_NUMBER; + hash = (53 * hash) + getTagsList().hashCode(); + } + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + NOTES_FIELD_NUMBER; + hash = (53 * hash) + getNotes().hashCode(); + if (hasTestConfig()) { + hash = (37 * hash) + TEST_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getTestConfig().hashCode(); + } + if (getTestCaseConversationTurnsCount() > 0) { + hash = (37 * hash) + TEST_CASE_CONVERSATION_TURNS_FIELD_NUMBER; + hash = (53 * hash) + getTestCaseConversationTurnsList().hashCode(); + } + if (hasCreationTime()) { + hash = (37 * hash) + CREATION_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreationTime().hashCode(); + } + if (hasLastTestResult()) { + hash = (37 * hash) + LAST_TEST_RESULT_FIELD_NUMBER; + hash = (53 * hash) + getLastTestResult().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestCase parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestCase parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestCase parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestCase parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestCase parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestCase parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestCase parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestCase parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestCase parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestCase parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestCase parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestCase parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.dialogflow.cx.v3beta1.TestCase prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Represents a test case.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.TestCase} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.TestCase) + com.google.cloud.dialogflow.cx.v3beta1.TestCaseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_TestCase_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_TestCase_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.TestCase.class, + com.google.cloud.dialogflow.cx.v3beta1.TestCase.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.TestCase.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getTestCaseConversationTurnsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + displayName_ = ""; + + notes_ = ""; + + if (testConfigBuilder_ == null) { + testConfig_ = null; + } else { + testConfig_ = null; + testConfigBuilder_ = null; + } + if (testCaseConversationTurnsBuilder_ == null) { + testCaseConversationTurns_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + testCaseConversationTurnsBuilder_.clear(); + } + if (creationTimeBuilder_ == null) { + creationTime_ = null; + } else { + creationTime_ = null; + creationTimeBuilder_ = null; + } + if (lastTestResultBuilder_ == null) { + lastTestResult_ = null; + } else { + lastTestResult_ = null; + lastTestResultBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_TestCase_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TestCase getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCase.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TestCase build() { + com.google.cloud.dialogflow.cx.v3beta1.TestCase result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TestCase buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.TestCase result = + new com.google.cloud.dialogflow.cx.v3beta1.TestCase(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + if (((bitField0_ & 0x00000001) != 0)) { + tags_ = tags_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.tags_ = tags_; + result.displayName_ = displayName_; + result.notes_ = notes_; + if (testConfigBuilder_ == null) { + result.testConfig_ = testConfig_; + } else { + result.testConfig_ = testConfigBuilder_.build(); + } + if (testCaseConversationTurnsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + testCaseConversationTurns_ = + java.util.Collections.unmodifiableList(testCaseConversationTurns_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.testCaseConversationTurns_ = testCaseConversationTurns_; + } else { + result.testCaseConversationTurns_ = testCaseConversationTurnsBuilder_.build(); + } + if (creationTimeBuilder_ == null) { + result.creationTime_ = creationTime_; + } else { + result.creationTime_ = creationTimeBuilder_.build(); + } + if (lastTestResultBuilder_ == null) { + result.lastTestResult_ = lastTestResult_; + } else { + result.lastTestResult_ = lastTestResultBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.TestCase) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.TestCase) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.TestCase other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.TestCase.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.tags_.isEmpty()) { + if (tags_.isEmpty()) { + tags_ = other.tags_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTagsIsMutable(); + tags_.addAll(other.tags_); + } + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getNotes().isEmpty()) { + notes_ = other.notes_; + onChanged(); + } + if (other.hasTestConfig()) { + mergeTestConfig(other.getTestConfig()); + } + if (testCaseConversationTurnsBuilder_ == null) { + if (!other.testCaseConversationTurns_.isEmpty()) { + if (testCaseConversationTurns_.isEmpty()) { + testCaseConversationTurns_ = other.testCaseConversationTurns_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureTestCaseConversationTurnsIsMutable(); + testCaseConversationTurns_.addAll(other.testCaseConversationTurns_); + } + onChanged(); + } + } else { + if (!other.testCaseConversationTurns_.isEmpty()) { + if (testCaseConversationTurnsBuilder_.isEmpty()) { + testCaseConversationTurnsBuilder_.dispose(); + testCaseConversationTurnsBuilder_ = null; + testCaseConversationTurns_ = other.testCaseConversationTurns_; + bitField0_ = (bitField0_ & ~0x00000002); + testCaseConversationTurnsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTestCaseConversationTurnsFieldBuilder() + : null; + } else { + testCaseConversationTurnsBuilder_.addAllMessages(other.testCaseConversationTurns_); + } + } + } + if (other.hasCreationTime()) { + mergeCreationTime(other.getCreationTime()); + } + if (other.hasLastTestResult()) { + mergeLastTestResult(other.getLastTestResult()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.TestCase parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.dialogflow.cx.v3beta1.TestCase) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The unique identifier of the test case.
+     * [TestCases.CreateTestCase][google.cloud.dialogflow.cx.v3beta1.TestCases.CreateTestCase] will populate the name automatically.
+     * Otherwise use format: `projects/<Project ID>/locations/<LocationID>/agents/
+     * <AgentID>/testCases/<TestCase ID>`.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The unique identifier of the test case.
+     * [TestCases.CreateTestCase][google.cloud.dialogflow.cx.v3beta1.TestCases.CreateTestCase] will populate the name automatically.
+     * Otherwise use format: `projects/<Project ID>/locations/<LocationID>/agents/
+     * <AgentID>/testCases/<TestCase ID>`.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The unique identifier of the test case.
+     * [TestCases.CreateTestCase][google.cloud.dialogflow.cx.v3beta1.TestCases.CreateTestCase] will populate the name automatically.
+     * Otherwise use format: `projects/<Project ID>/locations/<LocationID>/agents/
+     * <AgentID>/testCases/<TestCase ID>`.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The unique identifier of the test case.
+     * [TestCases.CreateTestCase][google.cloud.dialogflow.cx.v3beta1.TestCases.CreateTestCase] will populate the name automatically.
+     * Otherwise use format: `projects/<Project ID>/locations/<LocationID>/agents/
+     * <AgentID>/testCases/<TestCase ID>`.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The unique identifier of the test case.
+     * [TestCases.CreateTestCase][google.cloud.dialogflow.cx.v3beta1.TestCases.CreateTestCase] will populate the name automatically.
+     * Otherwise use format: `projects/<Project ID>/locations/<LocationID>/agents/
+     * <AgentID>/testCases/<TestCase ID>`.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList tags_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureTagsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + tags_ = new com.google.protobuf.LazyStringArrayList(tags_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated string tags = 2; + * + * @return A list containing the tags. + */ + public com.google.protobuf.ProtocolStringList getTagsList() { + return tags_.getUnmodifiableView(); + } + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated string tags = 2; + * + * @return The count of tags. + */ + public int getTagsCount() { + return tags_.size(); + } + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated string tags = 2; + * + * @param index The index of the element to return. + * @return The tags at the given index. + */ + public java.lang.String getTags(int index) { + return tags_.get(index); + } + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated string tags = 2; + * + * @param index The index of the value to return. + * @return The bytes of the tags at the given index. + */ + public com.google.protobuf.ByteString getTagsBytes(int index) { + return tags_.getByteString(index); + } + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated string tags = 2; + * + * @param index The index to set the value at. + * @param value The tags to set. + * @return This builder for chaining. + */ + public Builder setTags(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagsIsMutable(); + tags_.set(index, value); + onChanged(); + 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.
+     * 
+ * + * repeated string tags = 2; + * + * @param value The tags to add. + * @return This builder for chaining. + */ + public Builder addTags(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagsIsMutable(); + tags_.add(value); + onChanged(); + 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.
+     * 
+ * + * repeated string tags = 2; + * + * @param values The tags to add. + * @return This builder for chaining. + */ + public Builder addAllTags(java.lang.Iterable values) { + ensureTagsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tags_); + onChanged(); + 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.
+     * 
+ * + * repeated string tags = 2; + * + * @return This builder for chaining. + */ + public Builder clearTags() { + tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + 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.
+     * 
+ * + * repeated string tags = 2; + * + * @param value The bytes of the tags to add. + * @return This builder for chaining. + */ + public Builder addTagsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureTagsIsMutable(); + tags_.add(value); + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Required. The human-readable name of the test case, unique within the agent. Limit of
+     * 200 characters.
+     * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The human-readable name of the test case, unique within the agent. Limit of
+     * 200 characters.
+     * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The human-readable name of the test case, unique within the agent. Limit of
+     * 200 characters.
+     * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The human-readable name of the test case, unique within the agent. Limit of
+     * 200 characters.
+     * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The human-readable name of the test case, unique within the agent. Limit of
+     * 200 characters.
+     * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.lang.Object notes_ = ""; + /** + * + * + *
+     * Additional freeform notes about the test case. Limit of 400 characters.
+     * 
+ * + * string notes = 4; + * + * @return The notes. + */ + public java.lang.String getNotes() { + java.lang.Object ref = notes_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + notes_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Additional freeform notes about the test case. Limit of 400 characters.
+     * 
+ * + * string notes = 4; + * + * @return The bytes for notes. + */ + public com.google.protobuf.ByteString getNotesBytes() { + java.lang.Object ref = notes_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + notes_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Additional freeform notes about the test case. Limit of 400 characters.
+     * 
+ * + * string notes = 4; + * + * @param value The notes to set. + * @return This builder for chaining. + */ + public Builder setNotes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + notes_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Additional freeform notes about the test case. Limit of 400 characters.
+     * 
+ * + * string notes = 4; + * + * @return This builder for chaining. + */ + public Builder clearNotes() { + + notes_ = getDefaultInstance().getNotes(); + onChanged(); + return this; + } + /** + * + * + *
+     * Additional freeform notes about the test case. Limit of 400 characters.
+     * 
+ * + * string notes = 4; + * + * @param value The bytes for notes to set. + * @return This builder for chaining. + */ + public Builder setNotesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + notes_ = value; + onChanged(); + return this; + } + + private com.google.cloud.dialogflow.cx.v3beta1.TestConfig testConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TestConfig, + com.google.cloud.dialogflow.cx.v3beta1.TestConfig.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TestConfigOrBuilder> + testConfigBuilder_; + /** + * + * + *
+     * Config for the test case.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestConfig test_config = 13; + * + * @return Whether the testConfig field is set. + */ + public boolean hasTestConfig() { + return testConfigBuilder_ != null || testConfig_ != null; + } + /** + * + * + *
+     * Config for the test case.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestConfig test_config = 13; + * + * @return The testConfig. + */ + public com.google.cloud.dialogflow.cx.v3beta1.TestConfig getTestConfig() { + if (testConfigBuilder_ == null) { + return testConfig_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.TestConfig.getDefaultInstance() + : testConfig_; + } else { + return testConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Config for the test case.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestConfig test_config = 13; + */ + public Builder setTestConfig(com.google.cloud.dialogflow.cx.v3beta1.TestConfig value) { + if (testConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + testConfig_ = value; + onChanged(); + } else { + testConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Config for the test case.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestConfig test_config = 13; + */ + public Builder setTestConfig( + com.google.cloud.dialogflow.cx.v3beta1.TestConfig.Builder builderForValue) { + if (testConfigBuilder_ == null) { + testConfig_ = builderForValue.build(); + onChanged(); + } else { + testConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Config for the test case.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestConfig test_config = 13; + */ + public Builder mergeTestConfig(com.google.cloud.dialogflow.cx.v3beta1.TestConfig value) { + if (testConfigBuilder_ == null) { + if (testConfig_ != null) { + testConfig_ = + com.google.cloud.dialogflow.cx.v3beta1.TestConfig.newBuilder(testConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + testConfig_ = value; + } + onChanged(); + } else { + testConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Config for the test case.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestConfig test_config = 13; + */ + public Builder clearTestConfig() { + if (testConfigBuilder_ == null) { + testConfig_ = null; + onChanged(); + } else { + testConfig_ = null; + testConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Config for the test case.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestConfig test_config = 13; + */ + public com.google.cloud.dialogflow.cx.v3beta1.TestConfig.Builder getTestConfigBuilder() { + + onChanged(); + return getTestConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Config for the test case.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestConfig test_config = 13; + */ + public com.google.cloud.dialogflow.cx.v3beta1.TestConfigOrBuilder getTestConfigOrBuilder() { + if (testConfigBuilder_ != null) { + return testConfigBuilder_.getMessageOrBuilder(); + } else { + return testConfig_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.TestConfig.getDefaultInstance() + : testConfig_; + } + } + /** + * + * + *
+     * Config for the test case.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestConfig test_config = 13; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TestConfig, + com.google.cloud.dialogflow.cx.v3beta1.TestConfig.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TestConfigOrBuilder> + getTestConfigFieldBuilder() { + if (testConfigBuilder_ == null) { + testConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TestConfig, + com.google.cloud.dialogflow.cx.v3beta1.TestConfig.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TestConfigOrBuilder>( + getTestConfig(), getParentForChildren(), isClean()); + testConfig_ = null; + } + return testConfigBuilder_; + } + + private java.util.List + testCaseConversationTurns_ = java.util.Collections.emptyList(); + + private void ensureTestCaseConversationTurnsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + testCaseConversationTurns_ = + new java.util.ArrayList( + testCaseConversationTurns_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn, + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurnOrBuilder> + testCaseConversationTurnsBuilder_; + + /** + * + * + *
+     * 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.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ConversationTurn test_case_conversation_turns = 5; + * + */ + public java.util.List + getTestCaseConversationTurnsList() { + if (testCaseConversationTurnsBuilder_ == null) { + return java.util.Collections.unmodifiableList(testCaseConversationTurns_); + } else { + return testCaseConversationTurnsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * 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.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ConversationTurn test_case_conversation_turns = 5; + * + */ + public int getTestCaseConversationTurnsCount() { + if (testCaseConversationTurnsBuilder_ == null) { + return testCaseConversationTurns_.size(); + } else { + return testCaseConversationTurnsBuilder_.getCount(); + } + } + /** + * + * + *
+     * 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.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ConversationTurn test_case_conversation_turns = 5; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn getTestCaseConversationTurns( + int index) { + if (testCaseConversationTurnsBuilder_ == null) { + return testCaseConversationTurns_.get(index); + } else { + return testCaseConversationTurnsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * 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.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ConversationTurn test_case_conversation_turns = 5; + * + */ + public Builder setTestCaseConversationTurns( + int index, com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn value) { + if (testCaseConversationTurnsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTestCaseConversationTurnsIsMutable(); + testCaseConversationTurns_.set(index, value); + onChanged(); + } else { + testCaseConversationTurnsBuilder_.setMessage(index, value); + } + 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.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ConversationTurn test_case_conversation_turns = 5; + * + */ + public Builder setTestCaseConversationTurns( + int index, + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.Builder builderForValue) { + if (testCaseConversationTurnsBuilder_ == null) { + ensureTestCaseConversationTurnsIsMutable(); + testCaseConversationTurns_.set(index, builderForValue.build()); + onChanged(); + } else { + testCaseConversationTurnsBuilder_.setMessage(index, builderForValue.build()); + } + 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.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ConversationTurn test_case_conversation_turns = 5; + * + */ + public Builder addTestCaseConversationTurns( + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn value) { + if (testCaseConversationTurnsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTestCaseConversationTurnsIsMutable(); + testCaseConversationTurns_.add(value); + onChanged(); + } else { + testCaseConversationTurnsBuilder_.addMessage(value); + } + 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.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ConversationTurn test_case_conversation_turns = 5; + * + */ + public Builder addTestCaseConversationTurns( + int index, com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn value) { + if (testCaseConversationTurnsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTestCaseConversationTurnsIsMutable(); + testCaseConversationTurns_.add(index, value); + onChanged(); + } else { + testCaseConversationTurnsBuilder_.addMessage(index, value); + } + 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.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ConversationTurn test_case_conversation_turns = 5; + * + */ + public Builder addTestCaseConversationTurns( + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.Builder builderForValue) { + if (testCaseConversationTurnsBuilder_ == null) { + ensureTestCaseConversationTurnsIsMutable(); + testCaseConversationTurns_.add(builderForValue.build()); + onChanged(); + } else { + testCaseConversationTurnsBuilder_.addMessage(builderForValue.build()); + } + 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.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ConversationTurn test_case_conversation_turns = 5; + * + */ + public Builder addTestCaseConversationTurns( + int index, + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.Builder builderForValue) { + if (testCaseConversationTurnsBuilder_ == null) { + ensureTestCaseConversationTurnsIsMutable(); + testCaseConversationTurns_.add(index, builderForValue.build()); + onChanged(); + } else { + testCaseConversationTurnsBuilder_.addMessage(index, builderForValue.build()); + } + 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.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ConversationTurn test_case_conversation_turns = 5; + * + */ + public Builder addAllTestCaseConversationTurns( + java.lang.Iterable + values) { + if (testCaseConversationTurnsBuilder_ == null) { + ensureTestCaseConversationTurnsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, testCaseConversationTurns_); + onChanged(); + } else { + testCaseConversationTurnsBuilder_.addAllMessages(values); + } + 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.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ConversationTurn test_case_conversation_turns = 5; + * + */ + public Builder clearTestCaseConversationTurns() { + if (testCaseConversationTurnsBuilder_ == null) { + testCaseConversationTurns_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + testCaseConversationTurnsBuilder_.clear(); + } + 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.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ConversationTurn test_case_conversation_turns = 5; + * + */ + public Builder removeTestCaseConversationTurns(int index) { + if (testCaseConversationTurnsBuilder_ == null) { + ensureTestCaseConversationTurnsIsMutable(); + testCaseConversationTurns_.remove(index); + onChanged(); + } else { + testCaseConversationTurnsBuilder_.remove(index); + } + 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.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ConversationTurn test_case_conversation_turns = 5; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.Builder + getTestCaseConversationTurnsBuilder(int index) { + return getTestCaseConversationTurnsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * 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.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ConversationTurn test_case_conversation_turns = 5; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ConversationTurnOrBuilder + getTestCaseConversationTurnsOrBuilder(int index) { + if (testCaseConversationTurnsBuilder_ == null) { + return testCaseConversationTurns_.get(index); + } else { + return testCaseConversationTurnsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * 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.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ConversationTurn test_case_conversation_turns = 5; + * + */ + public java.util.List< + ? extends com.google.cloud.dialogflow.cx.v3beta1.ConversationTurnOrBuilder> + getTestCaseConversationTurnsOrBuilderList() { + if (testCaseConversationTurnsBuilder_ != null) { + return testCaseConversationTurnsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(testCaseConversationTurns_); + } + } + /** + * + * + *
+     * 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.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ConversationTurn test_case_conversation_turns = 5; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.Builder + addTestCaseConversationTurnsBuilder() { + return getTestCaseConversationTurnsFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.getDefaultInstance()); + } + /** + * + * + *
+     * 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.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ConversationTurn test_case_conversation_turns = 5; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.Builder + addTestCaseConversationTurnsBuilder(int index) { + return getTestCaseConversationTurnsFieldBuilder() + .addBuilder( + index, com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.getDefaultInstance()); + } + /** + * + * + *
+     * 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.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ConversationTurn test_case_conversation_turns = 5; + * + */ + public java.util.List + getTestCaseConversationTurnsBuilderList() { + return getTestCaseConversationTurnsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn, + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurnOrBuilder> + getTestCaseConversationTurnsFieldBuilder() { + if (testCaseConversationTurnsBuilder_ == null) { + testCaseConversationTurnsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn, + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurnOrBuilder>( + testCaseConversationTurns_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + testCaseConversationTurns_ = null; + } + return testCaseConversationTurnsBuilder_; + } + + private com.google.protobuf.Timestamp creationTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + creationTimeBuilder_; + /** + * + * + *
+     * Output only. When the test was created.
+     * 
+ * + * + * .google.protobuf.Timestamp creation_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the creationTime field is set. + */ + public boolean hasCreationTime() { + return creationTimeBuilder_ != null || creationTime_ != null; + } + /** + * + * + *
+     * Output only. When the test was created.
+     * 
+ * + * + * .google.protobuf.Timestamp creation_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The creationTime. + */ + public com.google.protobuf.Timestamp getCreationTime() { + if (creationTimeBuilder_ == null) { + return creationTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : creationTime_; + } else { + return creationTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. When the test was created.
+     * 
+ * + * + * .google.protobuf.Timestamp creation_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreationTime(com.google.protobuf.Timestamp value) { + if (creationTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + creationTime_ = value; + onChanged(); + } else { + creationTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. When the test was created.
+     * 
+ * + * + * .google.protobuf.Timestamp creation_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreationTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (creationTimeBuilder_ == null) { + creationTime_ = builderForValue.build(); + onChanged(); + } else { + creationTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. When the test was created.
+     * 
+ * + * + * .google.protobuf.Timestamp creation_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreationTime(com.google.protobuf.Timestamp value) { + if (creationTimeBuilder_ == null) { + if (creationTime_ != null) { + creationTime_ = + com.google.protobuf.Timestamp.newBuilder(creationTime_) + .mergeFrom(value) + .buildPartial(); + } else { + creationTime_ = value; + } + onChanged(); + } else { + creationTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. When the test was created.
+     * 
+ * + * + * .google.protobuf.Timestamp creation_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreationTime() { + if (creationTimeBuilder_ == null) { + creationTime_ = null; + onChanged(); + } else { + creationTime_ = null; + creationTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. When the test was created.
+     * 
+ * + * + * .google.protobuf.Timestamp creation_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreationTimeBuilder() { + + onChanged(); + return getCreationTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. When the test was created.
+     * 
+ * + * + * .google.protobuf.Timestamp creation_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreationTimeOrBuilder() { + if (creationTimeBuilder_ != null) { + return creationTimeBuilder_.getMessageOrBuilder(); + } else { + return creationTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : creationTime_; + } + } + /** + * + * + *
+     * Output only. When the test was created.
+     * 
+ * + * + * .google.protobuf.Timestamp creation_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreationTimeFieldBuilder() { + if (creationTimeBuilder_ == null) { + creationTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreationTime(), getParentForChildren(), isClean()); + creationTime_ = null; + } + return creationTimeBuilder_; + } + + private com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult lastTestResult_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult, + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResultOrBuilder> + lastTestResultBuilder_; + /** + * + * + *
+     * The latest test result.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestCaseResult last_test_result = 12; + * + * @return Whether the lastTestResult field is set. + */ + public boolean hasLastTestResult() { + return lastTestResultBuilder_ != null || lastTestResult_ != null; + } + /** + * + * + *
+     * The latest test result.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestCaseResult last_test_result = 12; + * + * @return The lastTestResult. + */ + public com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult getLastTestResult() { + if (lastTestResultBuilder_ == null) { + return lastTestResult_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult.getDefaultInstance() + : lastTestResult_; + } else { + return lastTestResultBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The latest test result.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestCaseResult last_test_result = 12; + */ + public Builder setLastTestResult(com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult value) { + if (lastTestResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lastTestResult_ = value; + onChanged(); + } else { + lastTestResultBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The latest test result.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestCaseResult last_test_result = 12; + */ + public Builder setLastTestResult( + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult.Builder builderForValue) { + if (lastTestResultBuilder_ == null) { + lastTestResult_ = builderForValue.build(); + onChanged(); + } else { + lastTestResultBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The latest test result.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestCaseResult last_test_result = 12; + */ + public Builder mergeLastTestResult( + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult value) { + if (lastTestResultBuilder_ == null) { + if (lastTestResult_ != null) { + lastTestResult_ = + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult.newBuilder(lastTestResult_) + .mergeFrom(value) + .buildPartial(); + } else { + lastTestResult_ = value; + } + onChanged(); + } else { + lastTestResultBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The latest test result.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestCaseResult last_test_result = 12; + */ + public Builder clearLastTestResult() { + if (lastTestResultBuilder_ == null) { + lastTestResult_ = null; + onChanged(); + } else { + lastTestResult_ = null; + lastTestResultBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The latest test result.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestCaseResult last_test_result = 12; + */ + public com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult.Builder + getLastTestResultBuilder() { + + onChanged(); + return getLastTestResultFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The latest test result.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestCaseResult last_test_result = 12; + */ + public com.google.cloud.dialogflow.cx.v3beta1.TestCaseResultOrBuilder + getLastTestResultOrBuilder() { + if (lastTestResultBuilder_ != null) { + return lastTestResultBuilder_.getMessageOrBuilder(); + } else { + return lastTestResult_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult.getDefaultInstance() + : lastTestResult_; + } + } + /** + * + * + *
+     * The latest test result.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestCaseResult last_test_result = 12; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult, + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResultOrBuilder> + getLastTestResultFieldBuilder() { + if (lastTestResultBuilder_ == null) { + lastTestResultBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult, + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResultOrBuilder>( + getLastTestResult(), getParentForChildren(), isClean()); + lastTestResult_ = null; + } + return lastTestResultBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.TestCase) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.TestCase) + private static final com.google.cloud.dialogflow.cx.v3beta1.TestCase DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.TestCase(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestCase getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TestCase parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TestCase(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TestCase getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseError.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseError.java new file mode 100644 index 000000000..a5f3081f4 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseError.java @@ -0,0 +1,995 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * Error info for importing a test.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.TestCaseError} + */ +public final class TestCaseError extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.TestCaseError) + TestCaseErrorOrBuilder { + private static final long serialVersionUID = 0L; + // Use TestCaseError.newBuilder() to construct. + private TestCaseError(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TestCaseError() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TestCaseError(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TestCaseError( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.dialogflow.cx.v3beta1.TestCase.Builder subBuilder = null; + if (testCase_ != null) { + subBuilder = testCase_.toBuilder(); + } + testCase_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.TestCase.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(testCase_); + testCase_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.rpc.Status.Builder subBuilder = null; + if (status_ != null) { + subBuilder = status_.toBuilder(); + } + status_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(status_); + status_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_TestCaseError_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_TestCaseError_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.TestCaseError.class, + com.google.cloud.dialogflow.cx.v3beta1.TestCaseError.Builder.class); + } + + public static final int TEST_CASE_FIELD_NUMBER = 1; + private com.google.cloud.dialogflow.cx.v3beta1.TestCase testCase_; + /** + * + * + *
+   * The test case.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 1; + * + * @return Whether the testCase field is set. + */ + @java.lang.Override + public boolean hasTestCase() { + return testCase_ != null; + } + /** + * + * + *
+   * The test case.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 1; + * + * @return The testCase. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TestCase getTestCase() { + return testCase_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.TestCase.getDefaultInstance() + : testCase_; + } + /** + * + * + *
+   * The test case.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TestCaseOrBuilder getTestCaseOrBuilder() { + return getTestCase(); + } + + public static final int STATUS_FIELD_NUMBER = 2; + private com.google.rpc.Status status_; + /** + * + * + *
+   * The status associated with the test case.
+   * 
+ * + * .google.rpc.Status status = 2; + * + * @return Whether the status field is set. + */ + @java.lang.Override + public boolean hasStatus() { + return status_ != null; + } + /** + * + * + *
+   * The status associated with the test case.
+   * 
+ * + * .google.rpc.Status status = 2; + * + * @return The status. + */ + @java.lang.Override + public com.google.rpc.Status getStatus() { + return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; + } + /** + * + * + *
+   * The status associated with the test case.
+   * 
+ * + * .google.rpc.Status status = 2; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { + return getStatus(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (testCase_ != null) { + output.writeMessage(1, getTestCase()); + } + if (status_ != null) { + output.writeMessage(2, getStatus()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (testCase_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTestCase()); + } + if (status_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStatus()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.TestCaseError)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.TestCaseError other = + (com.google.cloud.dialogflow.cx.v3beta1.TestCaseError) obj; + + if (hasTestCase() != other.hasTestCase()) return false; + if (hasTestCase()) { + if (!getTestCase().equals(other.getTestCase())) return false; + } + if (hasStatus() != other.hasStatus()) return false; + if (hasStatus()) { + if (!getStatus().equals(other.getStatus())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasTestCase()) { + hash = (37 * hash) + TEST_CASE_FIELD_NUMBER; + hash = (53 * hash) + getTestCase().hashCode(); + } + if (hasStatus()) { + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + getStatus().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestCaseError parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestCaseError parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestCaseError parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestCaseError parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestCaseError parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestCaseError parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestCaseError parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestCaseError parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestCaseError parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestCaseError parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestCaseError parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestCaseError parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.dialogflow.cx.v3beta1.TestCaseError prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Error info for importing a test.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.TestCaseError} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.TestCaseError) + com.google.cloud.dialogflow.cx.v3beta1.TestCaseErrorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_TestCaseError_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_TestCaseError_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.TestCaseError.class, + com.google.cloud.dialogflow.cx.v3beta1.TestCaseError.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.TestCaseError.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (testCaseBuilder_ == null) { + testCase_ = null; + } else { + testCase_ = null; + testCaseBuilder_ = null; + } + if (statusBuilder_ == null) { + status_ = null; + } else { + status_ = null; + statusBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_TestCaseError_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TestCaseError getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseError.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TestCaseError build() { + com.google.cloud.dialogflow.cx.v3beta1.TestCaseError result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TestCaseError buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.TestCaseError result = + new com.google.cloud.dialogflow.cx.v3beta1.TestCaseError(this); + if (testCaseBuilder_ == null) { + result.testCase_ = testCase_; + } else { + result.testCase_ = testCaseBuilder_.build(); + } + if (statusBuilder_ == null) { + result.status_ = status_; + } else { + result.status_ = statusBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.TestCaseError) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.TestCaseError) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.TestCaseError other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.TestCaseError.getDefaultInstance()) + return this; + if (other.hasTestCase()) { + mergeTestCase(other.getTestCase()); + } + if (other.hasStatus()) { + mergeStatus(other.getStatus()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.TestCaseError parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.TestCaseError) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.dialogflow.cx.v3beta1.TestCase testCase_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TestCase, + com.google.cloud.dialogflow.cx.v3beta1.TestCase.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TestCaseOrBuilder> + testCaseBuilder_; + /** + * + * + *
+     * The test case.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 1; + * + * @return Whether the testCase field is set. + */ + public boolean hasTestCase() { + return testCaseBuilder_ != null || testCase_ != null; + } + /** + * + * + *
+     * The test case.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 1; + * + * @return The testCase. + */ + public com.google.cloud.dialogflow.cx.v3beta1.TestCase getTestCase() { + if (testCaseBuilder_ == null) { + return testCase_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.TestCase.getDefaultInstance() + : testCase_; + } else { + return testCaseBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The test case.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 1; + */ + public Builder setTestCase(com.google.cloud.dialogflow.cx.v3beta1.TestCase value) { + if (testCaseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + testCase_ = value; + onChanged(); + } else { + testCaseBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The test case.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 1; + */ + public Builder setTestCase( + com.google.cloud.dialogflow.cx.v3beta1.TestCase.Builder builderForValue) { + if (testCaseBuilder_ == null) { + testCase_ = builderForValue.build(); + onChanged(); + } else { + testCaseBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The test case.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 1; + */ + public Builder mergeTestCase(com.google.cloud.dialogflow.cx.v3beta1.TestCase value) { + if (testCaseBuilder_ == null) { + if (testCase_ != null) { + testCase_ = + com.google.cloud.dialogflow.cx.v3beta1.TestCase.newBuilder(testCase_) + .mergeFrom(value) + .buildPartial(); + } else { + testCase_ = value; + } + onChanged(); + } else { + testCaseBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The test case.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 1; + */ + public Builder clearTestCase() { + if (testCaseBuilder_ == null) { + testCase_ = null; + onChanged(); + } else { + testCase_ = null; + testCaseBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The test case.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.TestCase.Builder getTestCaseBuilder() { + + onChanged(); + return getTestCaseFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The test case.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.TestCaseOrBuilder getTestCaseOrBuilder() { + if (testCaseBuilder_ != null) { + return testCaseBuilder_.getMessageOrBuilder(); + } else { + return testCase_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.TestCase.getDefaultInstance() + : testCase_; + } + } + /** + * + * + *
+     * The test case.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TestCase, + com.google.cloud.dialogflow.cx.v3beta1.TestCase.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TestCaseOrBuilder> + getTestCaseFieldBuilder() { + if (testCaseBuilder_ == null) { + testCaseBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TestCase, + com.google.cloud.dialogflow.cx.v3beta1.TestCase.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TestCaseOrBuilder>( + getTestCase(), getParentForChildren(), isClean()); + testCase_ = null; + } + return testCaseBuilder_; + } + + private com.google.rpc.Status status_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + statusBuilder_; + /** + * + * + *
+     * The status associated with the test case.
+     * 
+ * + * .google.rpc.Status status = 2; + * + * @return Whether the status field is set. + */ + public boolean hasStatus() { + return statusBuilder_ != null || status_ != null; + } + /** + * + * + *
+     * The status associated with the test case.
+     * 
+ * + * .google.rpc.Status status = 2; + * + * @return The status. + */ + public com.google.rpc.Status getStatus() { + if (statusBuilder_ == null) { + return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; + } else { + return statusBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The status associated with the test case.
+     * 
+ * + * .google.rpc.Status status = 2; + */ + public Builder setStatus(com.google.rpc.Status value) { + if (statusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + status_ = value; + onChanged(); + } else { + statusBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The status associated with the test case.
+     * 
+ * + * .google.rpc.Status status = 2; + */ + public Builder setStatus(com.google.rpc.Status.Builder builderForValue) { + if (statusBuilder_ == null) { + status_ = builderForValue.build(); + onChanged(); + } else { + statusBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The status associated with the test case.
+     * 
+ * + * .google.rpc.Status status = 2; + */ + public Builder mergeStatus(com.google.rpc.Status value) { + if (statusBuilder_ == null) { + if (status_ != null) { + status_ = com.google.rpc.Status.newBuilder(status_).mergeFrom(value).buildPartial(); + } else { + status_ = value; + } + onChanged(); + } else { + statusBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The status associated with the test case.
+     * 
+ * + * .google.rpc.Status status = 2; + */ + public Builder clearStatus() { + if (statusBuilder_ == null) { + status_ = null; + onChanged(); + } else { + status_ = null; + statusBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The status associated with the test case.
+     * 
+ * + * .google.rpc.Status status = 2; + */ + public com.google.rpc.Status.Builder getStatusBuilder() { + + onChanged(); + return getStatusFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The status associated with the test case.
+     * 
+ * + * .google.rpc.Status status = 2; + */ + public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { + if (statusBuilder_ != null) { + return statusBuilder_.getMessageOrBuilder(); + } else { + return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; + } + } + /** + * + * + *
+     * The status associated with the test case.
+     * 
+ * + * .google.rpc.Status status = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getStatusFieldBuilder() { + if (statusBuilder_ == null) { + statusBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>(getStatus(), getParentForChildren(), isClean()); + status_ = null; + } + return statusBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.TestCaseError) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.TestCaseError) + private static final com.google.cloud.dialogflow.cx.v3beta1.TestCaseError DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.TestCaseError(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestCaseError getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TestCaseError parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TestCaseError(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TestCaseError getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseErrorOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseErrorOrBuilder.java new file mode 100644 index 000000000..cf2a988c8 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseErrorOrBuilder.java @@ -0,0 +1,95 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface TestCaseErrorOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.TestCaseError) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The test case.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 1; + * + * @return Whether the testCase field is set. + */ + boolean hasTestCase(); + /** + * + * + *
+   * The test case.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 1; + * + * @return The testCase. + */ + com.google.cloud.dialogflow.cx.v3beta1.TestCase getTestCase(); + /** + * + * + *
+   * The test case.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 1; + */ + com.google.cloud.dialogflow.cx.v3beta1.TestCaseOrBuilder getTestCaseOrBuilder(); + + /** + * + * + *
+   * The status associated with the test case.
+   * 
+ * + * .google.rpc.Status status = 2; + * + * @return Whether the status field is set. + */ + boolean hasStatus(); + /** + * + * + *
+   * The status associated with the test case.
+   * 
+ * + * .google.rpc.Status status = 2; + * + * @return The status. + */ + com.google.rpc.Status getStatus(); + /** + * + * + *
+   * The status associated with the test case.
+   * 
+ * + * .google.rpc.Status status = 2; + */ + com.google.rpc.StatusOrBuilder getStatusOrBuilder(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseName.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseName.java new file mode 100644 index 000000000..edf65a518 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseName.java @@ -0,0 +1,257 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.cx.v3beta1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class TestCaseName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_AGENT_TEST_CASE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/agents/{agent}/testCases/{test_case}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String agent; + private final String testCase; + + @Deprecated + protected TestCaseName() { + project = null; + location = null; + agent = null; + testCase = null; + } + + private TestCaseName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + agent = Preconditions.checkNotNull(builder.getAgent()); + testCase = Preconditions.checkNotNull(builder.getTestCase()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAgent() { + return agent; + } + + public String getTestCase() { + return testCase; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static TestCaseName of(String project, String location, String agent, String testCase) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAgent(agent) + .setTestCase(testCase) + .build(); + } + + public static String format(String project, String location, String agent, String testCase) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAgent(agent) + .setTestCase(testCase) + .build() + .toString(); + } + + public static TestCaseName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_AGENT_TEST_CASE.validatedMatch( + formattedString, "TestCaseName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("agent"), + matchMap.get("test_case")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (TestCaseName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_AGENT_TEST_CASE.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (agent != null) { + fieldMapBuilder.put("agent", agent); + } + if (testCase != null) { + fieldMapBuilder.put("test_case", testCase); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_AGENT_TEST_CASE.instantiate( + "project", project, "location", location, "agent", agent, "test_case", testCase); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + TestCaseName that = ((TestCaseName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.agent, that.agent) + && Objects.equals(this.testCase, that.testCase); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(agent); + h *= 1000003; + h ^= Objects.hashCode(testCase); + return h; + } + + /** Builder for projects/{project}/locations/{location}/agents/{agent}/testCases/{test_case}. */ + public static class Builder { + private String project; + private String location; + private String agent; + private String testCase; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAgent() { + return agent; + } + + public String getTestCase() { + return testCase; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setAgent(String agent) { + this.agent = agent; + return this; + } + + public Builder setTestCase(String testCase) { + this.testCase = testCase; + return this; + } + + private Builder(TestCaseName testCaseName) { + project = testCaseName.project; + location = testCaseName.location; + agent = testCaseName.agent; + testCase = testCaseName.testCase; + } + + public TestCaseName build() { + return new TestCaseName(this); + } + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseOrBuilder.java new file mode 100644 index 000000000..1ef0a4cdd --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseOrBuilder.java @@ -0,0 +1,352 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface TestCaseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.TestCase) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The unique identifier of the test case.
+   * [TestCases.CreateTestCase][google.cloud.dialogflow.cx.v3beta1.TestCases.CreateTestCase] will populate the name automatically.
+   * Otherwise use format: `projects/<Project ID>/locations/<LocationID>/agents/
+   * <AgentID>/testCases/<TestCase ID>`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The unique identifier of the test case.
+   * [TestCases.CreateTestCase][google.cloud.dialogflow.cx.v3beta1.TestCases.CreateTestCase] will populate the name automatically.
+   * Otherwise use format: `projects/<Project ID>/locations/<LocationID>/agents/
+   * <AgentID>/testCases/<TestCase ID>`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * 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.
+   * 
+ * + * repeated string tags = 2; + * + * @return A list containing the tags. + */ + java.util.List getTagsList(); + /** + * + * + *
+   * 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.
+   * 
+ * + * repeated string tags = 2; + * + * @return The count of tags. + */ + int getTagsCount(); + /** + * + * + *
+   * 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.
+   * 
+ * + * repeated string tags = 2; + * + * @param index The index of the element to return. + * @return The tags at the given index. + */ + java.lang.String getTags(int index); + /** + * + * + *
+   * 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.
+   * 
+ * + * repeated string tags = 2; + * + * @param index The index of the value to return. + * @return The bytes of the tags at the given index. + */ + com.google.protobuf.ByteString getTagsBytes(int index); + + /** + * + * + *
+   * Required. The human-readable name of the test case, unique within the agent. Limit of
+   * 200 characters.
+   * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Required. The human-readable name of the test case, unique within the agent. Limit of
+   * 200 characters.
+   * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Additional freeform notes about the test case. Limit of 400 characters.
+   * 
+ * + * string notes = 4; + * + * @return The notes. + */ + java.lang.String getNotes(); + /** + * + * + *
+   * Additional freeform notes about the test case. Limit of 400 characters.
+   * 
+ * + * string notes = 4; + * + * @return The bytes for notes. + */ + com.google.protobuf.ByteString getNotesBytes(); + + /** + * + * + *
+   * Config for the test case.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestConfig test_config = 13; + * + * @return Whether the testConfig field is set. + */ + boolean hasTestConfig(); + /** + * + * + *
+   * Config for the test case.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestConfig test_config = 13; + * + * @return The testConfig. + */ + com.google.cloud.dialogflow.cx.v3beta1.TestConfig getTestConfig(); + /** + * + * + *
+   * Config for the test case.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestConfig test_config = 13; + */ + com.google.cloud.dialogflow.cx.v3beta1.TestConfigOrBuilder getTestConfigOrBuilder(); + + /** + * + * + *
+   * 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.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ConversationTurn test_case_conversation_turns = 5; + * + */ + java.util.List + getTestCaseConversationTurnsList(); + /** + * + * + *
+   * 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.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ConversationTurn test_case_conversation_turns = 5; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn getTestCaseConversationTurns(int index); + /** + * + * + *
+   * 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.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ConversationTurn test_case_conversation_turns = 5; + * + */ + int getTestCaseConversationTurnsCount(); + /** + * + * + *
+   * 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.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ConversationTurn test_case_conversation_turns = 5; + * + */ + java.util.List + getTestCaseConversationTurnsOrBuilderList(); + /** + * + * + *
+   * 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.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ConversationTurn test_case_conversation_turns = 5; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurnOrBuilder + getTestCaseConversationTurnsOrBuilder(int index); + + /** + * + * + *
+   * Output only. When the test was created.
+   * 
+ * + * + * .google.protobuf.Timestamp creation_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the creationTime field is set. + */ + boolean hasCreationTime(); + /** + * + * + *
+   * Output only. When the test was created.
+   * 
+ * + * + * .google.protobuf.Timestamp creation_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The creationTime. + */ + com.google.protobuf.Timestamp getCreationTime(); + /** + * + * + *
+   * Output only. When the test was created.
+   * 
+ * + * + * .google.protobuf.Timestamp creation_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreationTimeOrBuilder(); + + /** + * + * + *
+   * The latest test result.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestCaseResult last_test_result = 12; + * + * @return Whether the lastTestResult field is set. + */ + boolean hasLastTestResult(); + /** + * + * + *
+   * The latest test result.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestCaseResult last_test_result = 12; + * + * @return The lastTestResult. + */ + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult getLastTestResult(); + /** + * + * + *
+   * The latest test result.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestCaseResult last_test_result = 12; + */ + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResultOrBuilder getLastTestResultOrBuilder(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseProto.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseProto.java new file mode 100644 index 000000000..51dec22a0 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseProto.java @@ -0,0 +1,789 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public final class TestCaseProto { + private TestCaseProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_TestCase_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_TestCase_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_TestCaseResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_TestCaseResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_TestConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_TestConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_ConversationTurn_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_ConversationTurn_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_ConversationTurn_UserInput_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_ConversationTurn_UserInput_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_ConversationTurn_VirtualAgentOutput_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_ConversationTurn_VirtualAgentOutput_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_TestRunDifference_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_TestRunDifference_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionCoverage_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionCoverage_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionCoverage_TransitionNode_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionCoverage_TransitionNode_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionCoverage_Transition_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionCoverage_Transition_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_IntentCoverage_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_IntentCoverage_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_IntentCoverage_Intent_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_IntentCoverage_Intent_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_CalculateCoverageRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_CalculateCoverageRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_CalculateCoverageResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_CalculateCoverageResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCasesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCasesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCasesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCasesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_BatchDeleteTestCasesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_BatchDeleteTestCasesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_CreateTestCaseRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_CreateTestCaseRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateTestCaseRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateTestCaseRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_GetTestCaseRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_GetTestCaseRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_RunTestCaseRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_RunTestCaseRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_RunTestCaseResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_RunTestCaseResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_RunTestCaseMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_RunTestCaseMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_BatchRunTestCasesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_BatchRunTestCasesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_BatchRunTestCasesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_BatchRunTestCasesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_BatchRunTestCasesMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_BatchRunTestCasesMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_TestError_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_TestError_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportTestCasesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportTestCasesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportTestCasesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportTestCasesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportTestCasesMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportTestCasesMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_TestCaseError_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_TestCaseError_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_ExportTestCasesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_ExportTestCasesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_ExportTestCasesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_ExportTestCasesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_ExportTestCasesMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_ExportTestCasesMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCaseResultsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCaseResultsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCaseResultsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCaseResultsResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n2google/cloud/dialogflow/cx/v3beta1/tes" + + "t_case.proto\022\"google.cloud.dialogflow.cx" + + ".v3beta1\032\034google/api/annotations.proto\032\027" + + "google/api/client.proto\032\037google/api/fiel" + + "d_behavior.proto\032\031google/api/resource.pr" + + "oto\032-google/cloud/dialogflow/cx/v3beta1/" + + "flow.proto\032/google/cloud/dialogflow/cx/v" + + "3beta1/intent.proto\032-google/cloud/dialog" + + "flow/cx/v3beta1/page.proto\0329google/cloud" + + "/dialogflow/cx/v3beta1/response_message." + + "proto\0320google/cloud/dialogflow/cx/v3beta" + + "1/session.proto\032#google/longrunning/oper" + + "ations.proto\032\033google/protobuf/empty.prot" + + "o\032 google/protobuf/field_mask.proto\032\034goo" + + "gle/protobuf/struct.proto\032\037google/protob" + + "uf/timestamp.proto\032\027google/rpc/status.pr" + + "oto\"\356\003\n\010TestCase\022\014\n\004name\030\001 \001(\t\022\014\n\004tags\030\002" + + " \003(\t\022\031\n\014display_name\030\003 \001(\tB\003\340A\002\022\r\n\005notes" + + "\030\004 \001(\t\022C\n\013test_config\030\r \001(\0132..google.clo" + + "ud.dialogflow.cx.v3beta1.TestConfig\022Z\n\034t" + + "est_case_conversation_turns\030\005 \003(\01324.goog" + + "le.cloud.dialogflow.cx.v3beta1.Conversat" + + "ionTurn\0226\n\rcreation_time\030\n \001(\0132\032.google." + + "protobuf.TimestampB\003\340A\003\022L\n\020last_test_res" + + "ult\030\014 \001(\01322.google.cloud.dialogflow.cx.v" + + "3beta1.TestCaseResult:u\352Ar\n\"dialogflow.g" + + "oogleapis.com/TestCase\022Lprojects/{projec" + + "t}/locations/{location}/agents/{agent}/t" + + "estCases/{test_case}\"\270\003\n\016TestCaseResult\022" + + "\014\n\004name\030\001 \001(\t\022B\n\013environment\030\002 \001(\tB-\340A\001\372" + + "A\'\n%dialogflow.googleapis.com/Environmen" + + "t\022P\n\022conversation_turns\030\003 \003(\01324.google.c" + + "loud.dialogflow.cx.v3beta1.ConversationT" + + "urn\022C\n\013test_result\030\004 \001(\0162..google.cloud." + + "dialogflow.cx.v3beta1.TestResult\022-\n\ttest" + + "_time\030\005 \001(\0132\032.google.protobuf.Timestamp:" + + "\215\001\352A\211\001\n(dialogflow.googleapis.com/TestCa" + + "seResult\022]projects/{project}/locations/{" + + "location}/agents/{agent}/testCases/{test" + + "_case}/results/{result}\"\\\n\nTestConfig\022\033\n" + + "\023tracking_parameters\030\001 \003(\t\0221\n\004flow\030\002 \001(\t" + + "B#\372A \n\036dialogflow.googleapis.com/Flow\"\277\006" + + "\n\020ConversationTurn\022R\n\nuser_input\030\001 \001(\0132>" + + ".google.cloud.dialogflow.cx.v3beta1.Conv" + + "ersationTurn.UserInput\022e\n\024virtual_agent_" + + "output\030\002 \001(\0132G.google.cloud.dialogflow.c" + + "x.v3beta1.ConversationTurn.VirtualAgentO" + + "utput\032\234\001\n\tUserInput\022=\n\005input\030\005 \001(\0132..goo" + + "gle.cloud.dialogflow.cx.v3beta1.QueryInp" + + "ut\0224\n\023injected_parameters\030\002 \001(\0132\027.google" + + ".protobuf.Struct\022\032\n\022is_webhook_enabled\030\003" + + " \001(\010\032\320\003\n\022VirtualAgentOutput\0223\n\022session_p" + + "arameters\030\004 \001(\0132\027.google.protobuf.Struct" + + "\022O\n\013differences\030\005 \003(\01325.google.cloud.dia" + + "logflow.cx.v3beta1.TestRunDifferenceB\003\340A" + + "\003\0228\n\017diagnostic_info\030\006 \001(\0132\027.google.prot" + + "obuf.StructB\006\340A\002\340A\004\022D\n\020triggered_intent\030" + + "\007 \001(\0132*.google.cloud.dialogflow.cx.v3bet" + + "a1.Intent\022>\n\014current_page\030\010 \001(\0132(.google" + + ".cloud.dialogflow.cx.v3beta1.Page\022P\n\016tex" + + "t_responses\030\t \003(\01328.google.cloud.dialogf" + + "low.cx.v3beta1.ResponseMessage.Text\022\"\n\006s" + + "tatus\030\n \001(\0132\022.google.rpc.Status\"\322\001\n\021Test" + + "RunDifference\022L\n\004type\030\001 \001(\0162>.google.clo" + + "ud.dialogflow.cx.v3beta1.TestRunDifferen" + + "ce.DiffType\022\023\n\013description\030\002 \001(\t\"Z\n\010Diff" + + "Type\022\031\n\025DIFF_TYPE_UNSPECIFIED\020\000\022\n\n\006INTEN" + + "T\020\001\022\010\n\004PAGE\020\002\022\016\n\nPARAMETERS\020\003\022\r\n\tUTTERAN" + + "CE\020\004\"\226\005\n\022TransitionCoverage\022V\n\013transitio" + + "ns\030\001 \003(\0132A.google.cloud.dialogflow.cx.v3" + + "beta1.TransitionCoverage.Transition\022\026\n\016c" + + "overage_score\030\002 \001(\002\032\214\001\n\016TransitionNode\0228" + + "\n\004page\030\001 \001(\0132(.google.cloud.dialogflow.c" + + "x.v3beta1.PageH\000\0228\n\004flow\030\002 \001(\0132(.google." + + "cloud.dialogflow.cx.v3beta1.FlowH\000B\006\n\004ki" + + "nd\032\200\003\n\nTransition\022U\n\006source\030\001 \001(\0132E.goog" + + "le.cloud.dialogflow.cx.v3beta1.Transitio" + + "nCoverage.TransitionNode\022\r\n\005index\030\004 \001(\005\022" + + "U\n\006target\030\002 \001(\0132E.google.cloud.dialogflo" + + "w.cx.v3beta1.TransitionCoverage.Transiti" + + "onNode\022\017\n\007covered\030\003 \001(\010\022O\n\020transition_ro" + + "ute\030\005 \001(\01323.google.cloud.dialogflow.cx.v" + + "3beta1.TransitionRouteH\000\022I\n\revent_handle" + + "r\030\006 \001(\01320.google.cloud.dialogflow.cx.v3b" + + "eta1.EventHandlerH\000B\010\n\006detail\"\306\001\n\016Intent" + + "Coverage\022J\n\007intents\030\001 \003(\01329.google.cloud" + + ".dialogflow.cx.v3beta1.IntentCoverage.In" + + "tent\022\026\n\016coverage_score\030\002 \001(\002\032P\n\006Intent\0225" + + "\n\006intent\030\001 \001(\tB%\372A\"\n dialogflow.googleap" + + "is.com/Intent\022\017\n\007covered\030\002 \001(\010\"\200\002\n\030Calcu" + + "lateCoverageRequest\0226\n\005agent\030\003 \001(\tB\'\340A\002\372" + + "A!\n\037dialogflow.googleapis.com/Agent\022\\\n\004t" + + "ype\030\002 \001(\0162I.google.cloud.dialogflow.cx.v" + + "3beta1.CalculateCoverageRequest.Coverage" + + "TypeB\003\340A\002\"N\n\014CoverageType\022\035\n\031COVERAGE_TY" + + "PE_UNSPECIFIED\020\000\022\n\n\006INTENT\020\001\022\023\n\017PAGE_TRA" + + "NSITION\020\002\"\207\002\n\031CalculateCoverageResponse\022" + + "3\n\005agent\030\005 \001(\tB$\372A!\n\037dialogflow.googleap" + + "is.com/Agent\022M\n\017intent_coverage\030\002 \001(\01322." + + "google.cloud.dialogflow.cx.v3beta1.Inten" + + "tCoverageH\000\022U\n\023transition_coverage\030\004 \001(\013" + + "26.google.cloud.dialogflow.cx.v3beta1.Tr" + + "ansitionCoverageH\000B\017\n\rcoverage_type\"\223\002\n\024" + + "ListTestCasesRequest\022:\n\006parent\030\001 \001(\tB*\340A" + + "\002\372A$\022\"dialogflow.googleapis.com/TestCase" + + "\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022" + + "S\n\004view\030\004 \001(\0162E.google.cloud.dialogflow." + + "cx.v3beta1.ListTestCasesRequest.TestCase" + + "View\"C\n\014TestCaseView\022\036\n\032TEST_CASE_VIEW_U" + + "NSPECIFIED\020\000\022\t\n\005BASIC\020\001\022\010\n\004FULL\020\002\"r\n\025Lis" + + "tTestCasesResponse\022@\n\ntest_cases\030\001 \003(\0132," + + ".google.cloud.dialogflow.cx.v3beta1.Test" + + "Case\022\027\n\017next_page_token\030\002 \001(\t\"\224\001\n\033BatchD" + + "eleteTestCasesRequest\022:\n\006parent\030\001 \001(\tB*\340" + + "A\002\372A$\022\"dialogflow.googleapis.com/TestCas" + + "e\0229\n\005names\030\003 \003(\tB*\340A\002\372A$\n\"dialogflow.goo" + + "gleapis.com/TestCase\"\231\001\n\025CreateTestCaseR" + + "equest\022:\n\006parent\030\001 \001(\tB*\340A\002\372A$\022\"dialogfl" + + "ow.googleapis.com/TestCase\022D\n\ttest_case\030" + + "\002 \001(\0132,.google.cloud.dialogflow.cx.v3bet" + + "a1.TestCaseB\003\340A\002\"\223\001\n\025UpdateTestCaseReque" + + "st\022D\n\ttest_case\030\001 \001(\0132,.google.cloud.dia" + + "logflow.cx.v3beta1.TestCaseB\003\340A\002\0224\n\013upda" + + "te_mask\030\002 \001(\0132\032.google.protobuf.FieldMas" + + "kB\003\340A\002\"N\n\022GetTestCaseRequest\0228\n\004name\030\001 \001" + + "(\tB*\340A\002\372A$\n\"dialogflow.googleapis.com/Te" + + "stCase\"\222\001\n\022RunTestCaseRequest\0228\n\004name\030\001 " + + "\001(\tB*\340A\002\372A$\n\"dialogflow.googleapis.com/T" + + "estCase\022B\n\013environment\030\002 \001(\tB-\340A\001\372A\'\n%di" + + "alogflow.googleapis.com/Environment\"Y\n\023R" + + "unTestCaseResponse\022B\n\006result\030\002 \001(\01322.goo" + + "gle.cloud.dialogflow.cx.v3beta1.TestCase" + + "Result\"\025\n\023RunTestCaseMetadata\"\332\001\n\030BatchR" + + "unTestCasesRequest\022:\n\006parent\030\001 \001(\tB*\340A\002\372" + + "A$\022\"dialogflow.googleapis.com/TestCase\022B" + + "\n\013environment\030\002 \001(\tB-\340A\001\372A\'\n%dialogflow." + + "googleapis.com/Environment\022>\n\ntest_cases" + + "\030\003 \003(\tB*\340A\002\372A$\n\"dialogflow.googleapis.co" + + "m/TestCase\"`\n\031BatchRunTestCasesResponse\022" + + "C\n\007results\030\001 \003(\01322.google.cloud.dialogfl" + + "ow.cx.v3beta1.TestCaseResult\"Z\n\031BatchRun" + + "TestCasesMetadata\022=\n\006errors\030\001 \003(\0132-.goog" + + "le.cloud.dialogflow.cx.v3beta1.TestError" + + "\"\232\001\n\tTestError\022:\n\ttest_case\030\001 \001(\tB\'\372A$\n\"" + + "dialogflow.googleapis.com/TestCase\022\"\n\006st" + + "atus\030\002 \001(\0132\022.google.rpc.Status\022-\n\ttest_t" + + "ime\030\003 \001(\0132\032.google.protobuf.Timestamp\"\204\001" + + "\n\026ImportTestCasesRequest\022:\n\006parent\030\001 \001(\t" + + "B*\340A\002\372A$\022\"dialogflow.googleapis.com/Test" + + "Case\022\021\n\007gcs_uri\030\002 \001(\tH\000\022\021\n\007content\030\003 \001(\014" + + "H\000B\010\n\006source\"Q\n\027ImportTestCasesResponse\022" + + "6\n\005names\030\001 \003(\tB\'\372A$\n\"dialogflow.googleap" + + "is.com/TestCase\"\\\n\027ImportTestCasesMetada" + + "ta\022A\n\006errors\030\001 \003(\01321.google.cloud.dialog" + + "flow.cx.v3beta1.TestCaseError\"t\n\rTestCas" + + "eError\022?\n\ttest_case\030\001 \001(\0132,.google.cloud" + + ".dialogflow.cx.v3beta1.TestCase\022\"\n\006statu" + + "s\030\002 \001(\0132\022.google.rpc.Status\"\241\002\n\026ExportTe" + + "stCasesRequest\022:\n\006parent\030\001 \001(\tB*\340A\002\372A$\022\"" + + "dialogflow.googleapis.com/TestCase\022\021\n\007gc" + + "s_uri\030\002 \001(\tH\000\022Z\n\013data_format\030\003 \001(\0162E.goo" + + "gle.cloud.dialogflow.cx.v3beta1.ExportTe" + + "stCasesRequest.DataFormat\022\016\n\006filter\030\004 \001(" + + "\t\"=\n\nDataFormat\022\033\n\027DATA_FORMAT_UNSPECIFI" + + "ED\020\000\022\010\n\004BLOB\020\001\022\010\n\004JSON\020\002B\r\n\013destination\"" + + "N\n\027ExportTestCasesResponse\022\021\n\007gcs_uri\030\001 " + + "\001(\tH\000\022\021\n\007content\030\002 \001(\014H\000B\r\n\013destination\"" + + "\031\n\027ExportTestCasesMetadata\"\225\001\n\032ListTestC" + + "aseResultsRequest\022@\n\006parent\030\001 \001(\tB0\340A\002\372A" + + "*\022(dialogflow.googleapis.com/TestCaseRes" + + "ult\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001" + + "(\t\022\016\n\006filter\030\004 \001(\t\"\205\001\n\033ListTestCaseResul" + + "tsResponse\022M\n\021test_case_results\030\001 \003(\01322." + + "google.cloud.dialogflow.cx.v3beta1.TestC" + + "aseResult\022\027\n\017next_page_token\030\002 \001(\t*A\n\nTe" + + "stResult\022\033\n\027TEST_RESULT_UNSPECIFIED\020\000\022\n\n" + + "\006PASSED\020\001\022\n\n\006FAILED\020\0022\317\024\n\tTestCases\022\322\001\n\r" + + "ListTestCases\0228.google.cloud.dialogflow." + + "cx.v3beta1.ListTestCasesRequest\0329.google" + + ".cloud.dialogflow.cx.v3beta1.ListTestCas" + + "esResponse\"L\202\323\344\223\002=\022;/v3beta1/{parent=pro" + + "jects/*/locations/*/agents/*}/testCases\332" + + "A\006parent\022\314\001\n\024BatchDeleteTestCases\022?.goog" + + "le.cloud.dialogflow.cx.v3beta1.BatchDele" + + "teTestCasesRequest\032\026.google.protobuf.Emp" + + "ty\"[\202\323\344\223\002L\"G/v3beta1/{parent=projects/*/" + + "locations/*/agents/*}/testCases:batchDel" + + "ete:\001*\332A\006parent\022\277\001\n\013GetTestCase\0226.google" + + ".cloud.dialogflow.cx.v3beta1.GetTestCase" + + "Request\032,.google.cloud.dialogflow.cx.v3b" + + "eta1.TestCase\"J\202\323\344\223\002=\022;/v3beta1/{name=pr" + + "ojects/*/locations/*/agents/*/testCases/" + + "*}\332A\004name\022\334\001\n\016CreateTestCase\0229.google.cl" + + "oud.dialogflow.cx.v3beta1.CreateTestCase" + + "Request\032,.google.cloud.dialogflow.cx.v3b" + + "eta1.TestCase\"a\202\323\344\223\002H\";/v3beta1/{parent=" + + "projects/*/locations/*/agents/*}/testCas" + + "es:\ttest_case\332A\020parent,test_case\022\353\001\n\016Upd" + + "ateTestCase\0229.google.cloud.dialogflow.cx" + + ".v3beta1.UpdateTestCaseRequest\032,.google." + + "cloud.dialogflow.cx.v3beta1.TestCase\"p\202\323" + + "\344\223\002R2E/v3beta1/{test_case.name=projects/" + + "*/locations/*/agents/*/testCases/*}:\ttes" + + "t_case\332A\025test_case,update_mask\022\324\001\n\013RunTe" + + "stCase\0226.google.cloud.dialogflow.cx.v3be" + + "ta1.RunTestCaseRequest\032\035.google.longrunn" + + "ing.Operation\"n\202\323\344\223\002;\"6/v3beta1/projects" + + "/*/locations/*/agents/*/testCases:run:\001*" + + "\312A*\n\023RunTestCaseResponse\022\023RunTestCaseMet" + + "adata\022\373\001\n\021BatchRunTestCases\022<.google.clo" + + "ud.dialogflow.cx.v3beta1.BatchRunTestCas" + + "esRequest\032\035.google.longrunning.Operation" + + "\"\210\001\202\323\344\223\002I\"D/v3beta1/{parent=projects/*/l" + + "ocations/*/agents/*}/testCases:batchRun:" + + "\001*\312A6\n\031BatchRunTestCasesResponse\022\031BatchR" + + "unTestCasesMetadata\022\346\001\n\021CalculateCoverag" + + "e\022<.google.cloud.dialogflow.cx.v3beta1.C" + + "alculateCoverageRequest\032=.google.cloud.d" + + "ialogflow.cx.v3beta1.CalculateCoverageRe" + + "sponse\"T\202\323\344\223\002N\022L/v3beta1/{agent=projects" + + "/*/locations/*/agents/*}/testCases:calcu" + + "lateCoverage\022\361\001\n\017ImportTestCases\022:.googl" + + "e.cloud.dialogflow.cx.v3beta1.ImportTest" + + "CasesRequest\032\035.google.longrunning.Operat" + + "ion\"\202\001\202\323\344\223\002G\"B/v3beta1/{parent=projects/" + + "*/locations/*/agents/*}/testCases:import" + + ":\001*\312A2\n\027ImportTestCasesResponse\022\027ImportT" + + "estCasesMetadata\022\361\001\n\017ExportTestCases\022:.g" + + "oogle.cloud.dialogflow.cx.v3beta1.Export" + + "TestCasesRequest\032\035.google.longrunning.Op" + + "eration\"\202\001\202\323\344\223\002G\"B/v3beta1/{parent=proje" + + "cts/*/locations/*/agents/*}/testCases:ex" + + "port:\001*\312A2\n\027ExportTestCasesResponse\022\027Exp" + + "ortTestCasesMetadata\022\356\001\n\023ListTestCaseRes" + + "ults\022>.google.cloud.dialogflow.cx.v3beta" + + "1.ListTestCaseResultsRequest\032?.google.cl" + + "oud.dialogflow.cx.v3beta1.ListTestCaseRe" + + "sultsResponse\"V\202\323\344\223\002G\022E/v3beta1/{parent=" + + "projects/*/locations/*/agents/*/testCase" + + "s/*}/results\332A\006parent\032x\312A\031dialogflow.goo" + + "gleapis.com\322AYhttps://www.googleapis.com" + + "/auth/cloud-platform,https://www.googlea" + + "pis.com/auth/dialogflowB\254\001\n&com.google.c" + + "loud.dialogflow.cx.v3beta1B\rTestCaseProt" + + "oP\001ZDgoogle.golang.org/genproto/googleap" + + "is/cloud/dialogflow/cx/v3beta1;cx\370\001\001\242\002\002D" + + "F\252\002\"Google.Cloud.Dialogflow.Cx.V3Beta1b\006" + + "proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.dialogflow.cx.v3beta1.FlowProto.getDescriptor(), + com.google.cloud.dialogflow.cx.v3beta1.IntentProto.getDescriptor(), + com.google.cloud.dialogflow.cx.v3beta1.PageProto.getDescriptor(), + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageProto.getDescriptor(), + com.google.cloud.dialogflow.cx.v3beta1.SessionProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.StructProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.rpc.StatusProto.getDescriptor(), + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_TestCase_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_dialogflow_cx_v3beta1_TestCase_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_TestCase_descriptor, + new java.lang.String[] { + "Name", + "Tags", + "DisplayName", + "Notes", + "TestConfig", + "TestCaseConversationTurns", + "CreationTime", + "LastTestResult", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_TestCaseResult_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_dialogflow_cx_v3beta1_TestCaseResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_TestCaseResult_descriptor, + new java.lang.String[] { + "Name", "Environment", "ConversationTurns", "TestResult", "TestTime", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_TestConfig_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_dialogflow_cx_v3beta1_TestConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_TestConfig_descriptor, + new java.lang.String[] { + "TrackingParameters", "Flow", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_ConversationTurn_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_dialogflow_cx_v3beta1_ConversationTurn_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_ConversationTurn_descriptor, + new java.lang.String[] { + "UserInput", "VirtualAgentOutput", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_ConversationTurn_UserInput_descriptor = + internal_static_google_cloud_dialogflow_cx_v3beta1_ConversationTurn_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_dialogflow_cx_v3beta1_ConversationTurn_UserInput_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_ConversationTurn_UserInput_descriptor, + new java.lang.String[] { + "Input", "InjectedParameters", "IsWebhookEnabled", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_ConversationTurn_VirtualAgentOutput_descriptor = + internal_static_google_cloud_dialogflow_cx_v3beta1_ConversationTurn_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_dialogflow_cx_v3beta1_ConversationTurn_VirtualAgentOutput_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_ConversationTurn_VirtualAgentOutput_descriptor, + new java.lang.String[] { + "SessionParameters", + "Differences", + "DiagnosticInfo", + "TriggeredIntent", + "CurrentPage", + "TextResponses", + "Status", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_TestRunDifference_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_dialogflow_cx_v3beta1_TestRunDifference_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_TestRunDifference_descriptor, + new java.lang.String[] { + "Type", "Description", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionCoverage_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionCoverage_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionCoverage_descriptor, + new java.lang.String[] { + "Transitions", "CoverageScore", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionCoverage_TransitionNode_descriptor = + internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionCoverage_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionCoverage_TransitionNode_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionCoverage_TransitionNode_descriptor, + new java.lang.String[] { + "Page", "Flow", "Kind", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionCoverage_Transition_descriptor = + internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionCoverage_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionCoverage_Transition_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionCoverage_Transition_descriptor, + new java.lang.String[] { + "Source", "Index", "Target", "Covered", "TransitionRoute", "EventHandler", "Detail", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_IntentCoverage_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_dialogflow_cx_v3beta1_IntentCoverage_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_IntentCoverage_descriptor, + new java.lang.String[] { + "Intents", "CoverageScore", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_IntentCoverage_Intent_descriptor = + internal_static_google_cloud_dialogflow_cx_v3beta1_IntentCoverage_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_dialogflow_cx_v3beta1_IntentCoverage_Intent_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_IntentCoverage_Intent_descriptor, + new java.lang.String[] { + "Intent", "Covered", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_CalculateCoverageRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_dialogflow_cx_v3beta1_CalculateCoverageRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_CalculateCoverageRequest_descriptor, + new java.lang.String[] { + "Agent", "Type", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_CalculateCoverageResponse_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_dialogflow_cx_v3beta1_CalculateCoverageResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_CalculateCoverageResponse_descriptor, + new java.lang.String[] { + "Agent", "IntentCoverage", "TransitionCoverage", "CoverageType", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCasesRequest_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCasesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCasesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "View", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCasesResponse_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCasesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCasesResponse_descriptor, + new java.lang.String[] { + "TestCases", "NextPageToken", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_BatchDeleteTestCasesRequest_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_dialogflow_cx_v3beta1_BatchDeleteTestCasesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_BatchDeleteTestCasesRequest_descriptor, + new java.lang.String[] { + "Parent", "Names", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_CreateTestCaseRequest_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_dialogflow_cx_v3beta1_CreateTestCaseRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_CreateTestCaseRequest_descriptor, + new java.lang.String[] { + "Parent", "TestCase", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateTestCaseRequest_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateTestCaseRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateTestCaseRequest_descriptor, + new java.lang.String[] { + "TestCase", "UpdateMask", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_GetTestCaseRequest_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_dialogflow_cx_v3beta1_GetTestCaseRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_GetTestCaseRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_RunTestCaseRequest_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_dialogflow_cx_v3beta1_RunTestCaseRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_RunTestCaseRequest_descriptor, + new java.lang.String[] { + "Name", "Environment", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_RunTestCaseResponse_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_dialogflow_cx_v3beta1_RunTestCaseResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_RunTestCaseResponse_descriptor, + new java.lang.String[] { + "Result", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_RunTestCaseMetadata_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_cloud_dialogflow_cx_v3beta1_RunTestCaseMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_RunTestCaseMetadata_descriptor, + new java.lang.String[] {}); + internal_static_google_cloud_dialogflow_cx_v3beta1_BatchRunTestCasesRequest_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_google_cloud_dialogflow_cx_v3beta1_BatchRunTestCasesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_BatchRunTestCasesRequest_descriptor, + new java.lang.String[] { + "Parent", "Environment", "TestCases", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_BatchRunTestCasesResponse_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_google_cloud_dialogflow_cx_v3beta1_BatchRunTestCasesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_BatchRunTestCasesResponse_descriptor, + new java.lang.String[] { + "Results", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_BatchRunTestCasesMetadata_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_google_cloud_dialogflow_cx_v3beta1_BatchRunTestCasesMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_BatchRunTestCasesMetadata_descriptor, + new java.lang.String[] { + "Errors", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_TestError_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_google_cloud_dialogflow_cx_v3beta1_TestError_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_TestError_descriptor, + new java.lang.String[] { + "TestCase", "Status", "TestTime", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportTestCasesRequest_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportTestCasesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportTestCasesRequest_descriptor, + new java.lang.String[] { + "Parent", "GcsUri", "Content", "Source", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportTestCasesResponse_descriptor = + getDescriptor().getMessageTypes().get(23); + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportTestCasesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportTestCasesResponse_descriptor, + new java.lang.String[] { + "Names", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportTestCasesMetadata_descriptor = + getDescriptor().getMessageTypes().get(24); + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportTestCasesMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportTestCasesMetadata_descriptor, + new java.lang.String[] { + "Errors", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_TestCaseError_descriptor = + getDescriptor().getMessageTypes().get(25); + internal_static_google_cloud_dialogflow_cx_v3beta1_TestCaseError_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_TestCaseError_descriptor, + new java.lang.String[] { + "TestCase", "Status", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_ExportTestCasesRequest_descriptor = + getDescriptor().getMessageTypes().get(26); + internal_static_google_cloud_dialogflow_cx_v3beta1_ExportTestCasesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_ExportTestCasesRequest_descriptor, + new java.lang.String[] { + "Parent", "GcsUri", "DataFormat", "Filter", "Destination", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_ExportTestCasesResponse_descriptor = + getDescriptor().getMessageTypes().get(27); + internal_static_google_cloud_dialogflow_cx_v3beta1_ExportTestCasesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_ExportTestCasesResponse_descriptor, + new java.lang.String[] { + "GcsUri", "Content", "Destination", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_ExportTestCasesMetadata_descriptor = + getDescriptor().getMessageTypes().get(28); + internal_static_google_cloud_dialogflow_cx_v3beta1_ExportTestCasesMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_ExportTestCasesMetadata_descriptor, + new java.lang.String[] {}); + internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCaseResultsRequest_descriptor = + getDescriptor().getMessageTypes().get(29); + internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCaseResultsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCaseResultsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCaseResultsResponse_descriptor = + getDescriptor().getMessageTypes().get(30); + internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCaseResultsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCaseResultsResponse_descriptor, + new java.lang.String[] { + "TestCaseResults", "NextPageToken", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.dialogflow.cx.v3beta1.FlowProto.getDescriptor(); + com.google.cloud.dialogflow.cx.v3beta1.IntentProto.getDescriptor(); + com.google.cloud.dialogflow.cx.v3beta1.PageProto.getDescriptor(); + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageProto.getDescriptor(); + com.google.cloud.dialogflow.cx.v3beta1.SessionProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.StructProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.rpc.StatusProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseResult.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseResult.java new file mode 100644 index 000000000..019a4ae03 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseResult.java @@ -0,0 +1,1837 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * Represents a result from running a test case in an agent environment.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.TestCaseResult} + */ +public final class TestCaseResult extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.TestCaseResult) + TestCaseResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use TestCaseResult.newBuilder() to construct. + private TestCaseResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TestCaseResult() { + name_ = ""; + environment_ = ""; + conversationTurns_ = java.util.Collections.emptyList(); + testResult_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TestCaseResult(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TestCaseResult( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + environment_ = s; + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + conversationTurns_ = + new java.util.ArrayList< + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn>(); + mutable_bitField0_ |= 0x00000001; + } + conversationTurns_.add( + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.parser(), + extensionRegistry)); + break; + } + case 32: + { + int rawValue = input.readEnum(); + + testResult_ = rawValue; + break; + } + case 42: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (testTime_ != null) { + subBuilder = testTime_.toBuilder(); + } + testTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(testTime_); + testTime_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + conversationTurns_ = java.util.Collections.unmodifiableList(conversationTurns_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_TestCaseResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_TestCaseResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult.class, + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * The resource name for the test case result. Format:
+   * `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/testCases/
+   * <TestCase ID>/results/<TestCaseResult ID>`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * The resource name for the test case result. Format:
+   * `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/testCases/
+   * <TestCase ID>/results/<TestCaseResult ID>`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENVIRONMENT_FIELD_NUMBER = 2; + private volatile java.lang.Object environment_; + /** + * + * + *
+   * Optional. Environment where the test was run. If not set, it indicates the draft
+   * environment.
+   * 
+ * + * + * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The environment. + */ + @java.lang.Override + public java.lang.String getEnvironment() { + java.lang.Object ref = environment_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + environment_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Environment where the test was run. If not set, it indicates the draft
+   * environment.
+   * 
+ * + * + * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for environment. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEnvironmentBytes() { + java.lang.Object ref = environment_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + environment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONVERSATION_TURNS_FIELD_NUMBER = 3; + private java.util.List + conversationTurns_; + /** + * + * + *
+   * The conversation turns uttered during the test case replay in chronological
+   * order.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ConversationTurn conversation_turns = 3; + * + */ + @java.lang.Override + public java.util.List + getConversationTurnsList() { + return conversationTurns_; + } + /** + * + * + *
+   * The conversation turns uttered during the test case replay in chronological
+   * order.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ConversationTurn conversation_turns = 3; + * + */ + @java.lang.Override + public java.util.List + getConversationTurnsOrBuilderList() { + return conversationTurns_; + } + /** + * + * + *
+   * The conversation turns uttered during the test case replay in chronological
+   * order.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ConversationTurn conversation_turns = 3; + * + */ + @java.lang.Override + public int getConversationTurnsCount() { + return conversationTurns_.size(); + } + /** + * + * + *
+   * The conversation turns uttered during the test case replay in chronological
+   * order.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ConversationTurn conversation_turns = 3; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn getConversationTurns(int index) { + return conversationTurns_.get(index); + } + /** + * + * + *
+   * The conversation turns uttered during the test case replay in chronological
+   * order.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ConversationTurn conversation_turns = 3; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ConversationTurnOrBuilder + getConversationTurnsOrBuilder(int index) { + return conversationTurns_.get(index); + } + + public static final int TEST_RESULT_FIELD_NUMBER = 4; + private int testResult_; + /** + * + * + *
+   * Whether the test case passed in the agent environment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestResult test_result = 4; + * + * @return The enum numeric value on the wire for testResult. + */ + @java.lang.Override + public int getTestResultValue() { + return testResult_; + } + /** + * + * + *
+   * Whether the test case passed in the agent environment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestResult test_result = 4; + * + * @return The testResult. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TestResult getTestResult() { + @SuppressWarnings("deprecation") + com.google.cloud.dialogflow.cx.v3beta1.TestResult result = + com.google.cloud.dialogflow.cx.v3beta1.TestResult.valueOf(testResult_); + return result == null ? com.google.cloud.dialogflow.cx.v3beta1.TestResult.UNRECOGNIZED : result; + } + + public static final int TEST_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp testTime_; + /** + * + * + *
+   * The time that the test was run.
+   * 
+ * + * .google.protobuf.Timestamp test_time = 5; + * + * @return Whether the testTime field is set. + */ + @java.lang.Override + public boolean hasTestTime() { + return testTime_ != null; + } + /** + * + * + *
+   * The time that the test was run.
+   * 
+ * + * .google.protobuf.Timestamp test_time = 5; + * + * @return The testTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getTestTime() { + return testTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : testTime_; + } + /** + * + * + *
+   * The time that the test was run.
+   * 
+ * + * .google.protobuf.Timestamp test_time = 5; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getTestTimeOrBuilder() { + return getTestTime(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getEnvironmentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, environment_); + } + for (int i = 0; i < conversationTurns_.size(); i++) { + output.writeMessage(3, conversationTurns_.get(i)); + } + if (testResult_ + != com.google.cloud.dialogflow.cx.v3beta1.TestResult.TEST_RESULT_UNSPECIFIED.getNumber()) { + output.writeEnum(4, testResult_); + } + if (testTime_ != null) { + output.writeMessage(5, getTestTime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getEnvironmentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, environment_); + } + for (int i = 0; i < conversationTurns_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(3, conversationTurns_.get(i)); + } + if (testResult_ + != com.google.cloud.dialogflow.cx.v3beta1.TestResult.TEST_RESULT_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, testResult_); + } + if (testTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getTestTime()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult other = + (com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult) obj; + + if (!getName().equals(other.getName())) return false; + if (!getEnvironment().equals(other.getEnvironment())) return false; + if (!getConversationTurnsList().equals(other.getConversationTurnsList())) return false; + if (testResult_ != other.testResult_) return false; + if (hasTestTime() != other.hasTestTime()) return false; + if (hasTestTime()) { + if (!getTestTime().equals(other.getTestTime())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER; + hash = (53 * hash) + getEnvironment().hashCode(); + if (getConversationTurnsCount() > 0) { + hash = (37 * hash) + CONVERSATION_TURNS_FIELD_NUMBER; + hash = (53 * hash) + getConversationTurnsList().hashCode(); + } + hash = (37 * hash) + TEST_RESULT_FIELD_NUMBER; + hash = (53 * hash) + testResult_; + if (hasTestTime()) { + hash = (37 * hash) + TEST_TIME_FIELD_NUMBER; + hash = (53 * hash) + getTestTime().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Represents a result from running a test case in an agent environment.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.TestCaseResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.TestCaseResult) + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_TestCaseResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_TestCaseResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult.class, + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getConversationTurnsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + environment_ = ""; + + if (conversationTurnsBuilder_ == null) { + conversationTurns_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + conversationTurnsBuilder_.clear(); + } + testResult_ = 0; + + if (testTimeBuilder_ == null) { + testTime_ = null; + } else { + testTime_ = null; + testTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_TestCaseResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult build() { + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult result = + new com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.environment_ = environment_; + if (conversationTurnsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + conversationTurns_ = java.util.Collections.unmodifiableList(conversationTurns_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.conversationTurns_ = conversationTurns_; + } else { + result.conversationTurns_ = conversationTurnsBuilder_.build(); + } + result.testResult_ = testResult_; + if (testTimeBuilder_ == null) { + result.testTime_ = testTime_; + } else { + result.testTime_ = testTimeBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getEnvironment().isEmpty()) { + environment_ = other.environment_; + onChanged(); + } + if (conversationTurnsBuilder_ == null) { + if (!other.conversationTurns_.isEmpty()) { + if (conversationTurns_.isEmpty()) { + conversationTurns_ = other.conversationTurns_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureConversationTurnsIsMutable(); + conversationTurns_.addAll(other.conversationTurns_); + } + onChanged(); + } + } else { + if (!other.conversationTurns_.isEmpty()) { + if (conversationTurnsBuilder_.isEmpty()) { + conversationTurnsBuilder_.dispose(); + conversationTurnsBuilder_ = null; + conversationTurns_ = other.conversationTurns_; + bitField0_ = (bitField0_ & ~0x00000001); + conversationTurnsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getConversationTurnsFieldBuilder() + : null; + } else { + conversationTurnsBuilder_.addAllMessages(other.conversationTurns_); + } + } + } + if (other.testResult_ != 0) { + setTestResultValue(other.getTestResultValue()); + } + if (other.hasTestTime()) { + mergeTestTime(other.getTestTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The resource name for the test case result. Format:
+     * `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/testCases/
+     * <TestCase ID>/results/<TestCaseResult ID>`.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The resource name for the test case result. Format:
+     * `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/testCases/
+     * <TestCase ID>/results/<TestCaseResult ID>`.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The resource name for the test case result. Format:
+     * `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/testCases/
+     * <TestCase ID>/results/<TestCaseResult ID>`.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name for the test case result. Format:
+     * `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/testCases/
+     * <TestCase ID>/results/<TestCaseResult ID>`.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name for the test case result. Format:
+     * `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/testCases/
+     * <TestCase ID>/results/<TestCaseResult ID>`.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object environment_ = ""; + /** + * + * + *
+     * Optional. Environment where the test was run. If not set, it indicates the draft
+     * environment.
+     * 
+ * + * + * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The environment. + */ + public java.lang.String getEnvironment() { + java.lang.Object ref = environment_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + environment_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Environment where the test was run. If not set, it indicates the draft
+     * environment.
+     * 
+ * + * + * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for environment. + */ + public com.google.protobuf.ByteString getEnvironmentBytes() { + java.lang.Object ref = environment_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + environment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Environment where the test was run. If not set, it indicates the draft
+     * environment.
+     * 
+ * + * + * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The environment to set. + * @return This builder for chaining. + */ + public Builder setEnvironment(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + environment_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Environment where the test was run. If not set, it indicates the draft
+     * environment.
+     * 
+ * + * + * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearEnvironment() { + + environment_ = getDefaultInstance().getEnvironment(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Environment where the test was run. If not set, it indicates the draft
+     * environment.
+     * 
+ * + * + * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for environment to set. + * @return This builder for chaining. + */ + public Builder setEnvironmentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + environment_ = value; + onChanged(); + return this; + } + + private java.util.List + conversationTurns_ = java.util.Collections.emptyList(); + + private void ensureConversationTurnsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + conversationTurns_ = + new java.util.ArrayList( + conversationTurns_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn, + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurnOrBuilder> + conversationTurnsBuilder_; + + /** + * + * + *
+     * The conversation turns uttered during the test case replay in chronological
+     * order.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ConversationTurn conversation_turns = 3; + * + */ + public java.util.List + getConversationTurnsList() { + if (conversationTurnsBuilder_ == null) { + return java.util.Collections.unmodifiableList(conversationTurns_); + } else { + return conversationTurnsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The conversation turns uttered during the test case replay in chronological
+     * order.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ConversationTurn conversation_turns = 3; + * + */ + public int getConversationTurnsCount() { + if (conversationTurnsBuilder_ == null) { + return conversationTurns_.size(); + } else { + return conversationTurnsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The conversation turns uttered during the test case replay in chronological
+     * order.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ConversationTurn conversation_turns = 3; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn getConversationTurns(int index) { + if (conversationTurnsBuilder_ == null) { + return conversationTurns_.get(index); + } else { + return conversationTurnsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The conversation turns uttered during the test case replay in chronological
+     * order.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ConversationTurn conversation_turns = 3; + * + */ + public Builder setConversationTurns( + int index, com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn value) { + if (conversationTurnsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConversationTurnsIsMutable(); + conversationTurns_.set(index, value); + onChanged(); + } else { + conversationTurnsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The conversation turns uttered during the test case replay in chronological
+     * order.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ConversationTurn conversation_turns = 3; + * + */ + public Builder setConversationTurns( + int index, + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.Builder builderForValue) { + if (conversationTurnsBuilder_ == null) { + ensureConversationTurnsIsMutable(); + conversationTurns_.set(index, builderForValue.build()); + onChanged(); + } else { + conversationTurnsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The conversation turns uttered during the test case replay in chronological
+     * order.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ConversationTurn conversation_turns = 3; + * + */ + public Builder addConversationTurns( + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn value) { + if (conversationTurnsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConversationTurnsIsMutable(); + conversationTurns_.add(value); + onChanged(); + } else { + conversationTurnsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The conversation turns uttered during the test case replay in chronological
+     * order.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ConversationTurn conversation_turns = 3; + * + */ + public Builder addConversationTurns( + int index, com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn value) { + if (conversationTurnsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConversationTurnsIsMutable(); + conversationTurns_.add(index, value); + onChanged(); + } else { + conversationTurnsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The conversation turns uttered during the test case replay in chronological
+     * order.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ConversationTurn conversation_turns = 3; + * + */ + public Builder addConversationTurns( + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.Builder builderForValue) { + if (conversationTurnsBuilder_ == null) { + ensureConversationTurnsIsMutable(); + conversationTurns_.add(builderForValue.build()); + onChanged(); + } else { + conversationTurnsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The conversation turns uttered during the test case replay in chronological
+     * order.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ConversationTurn conversation_turns = 3; + * + */ + public Builder addConversationTurns( + int index, + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.Builder builderForValue) { + if (conversationTurnsBuilder_ == null) { + ensureConversationTurnsIsMutable(); + conversationTurns_.add(index, builderForValue.build()); + onChanged(); + } else { + conversationTurnsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The conversation turns uttered during the test case replay in chronological
+     * order.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ConversationTurn conversation_turns = 3; + * + */ + public Builder addAllConversationTurns( + java.lang.Iterable + values) { + if (conversationTurnsBuilder_ == null) { + ensureConversationTurnsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, conversationTurns_); + onChanged(); + } else { + conversationTurnsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The conversation turns uttered during the test case replay in chronological
+     * order.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ConversationTurn conversation_turns = 3; + * + */ + public Builder clearConversationTurns() { + if (conversationTurnsBuilder_ == null) { + conversationTurns_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + conversationTurnsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The conversation turns uttered during the test case replay in chronological
+     * order.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ConversationTurn conversation_turns = 3; + * + */ + public Builder removeConversationTurns(int index) { + if (conversationTurnsBuilder_ == null) { + ensureConversationTurnsIsMutable(); + conversationTurns_.remove(index); + onChanged(); + } else { + conversationTurnsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The conversation turns uttered during the test case replay in chronological
+     * order.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ConversationTurn conversation_turns = 3; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.Builder + getConversationTurnsBuilder(int index) { + return getConversationTurnsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The conversation turns uttered during the test case replay in chronological
+     * order.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ConversationTurn conversation_turns = 3; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ConversationTurnOrBuilder + getConversationTurnsOrBuilder(int index) { + if (conversationTurnsBuilder_ == null) { + return conversationTurns_.get(index); + } else { + return conversationTurnsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The conversation turns uttered during the test case replay in chronological
+     * order.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ConversationTurn conversation_turns = 3; + * + */ + public java.util.List< + ? extends com.google.cloud.dialogflow.cx.v3beta1.ConversationTurnOrBuilder> + getConversationTurnsOrBuilderList() { + if (conversationTurnsBuilder_ != null) { + return conversationTurnsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(conversationTurns_); + } + } + /** + * + * + *
+     * The conversation turns uttered during the test case replay in chronological
+     * order.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ConversationTurn conversation_turns = 3; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.Builder + addConversationTurnsBuilder() { + return getConversationTurnsFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.getDefaultInstance()); + } + /** + * + * + *
+     * The conversation turns uttered during the test case replay in chronological
+     * order.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ConversationTurn conversation_turns = 3; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.Builder + addConversationTurnsBuilder(int index) { + return getConversationTurnsFieldBuilder() + .addBuilder( + index, com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.getDefaultInstance()); + } + /** + * + * + *
+     * The conversation turns uttered during the test case replay in chronological
+     * order.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ConversationTurn conversation_turns = 3; + * + */ + public java.util.List + getConversationTurnsBuilderList() { + return getConversationTurnsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn, + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurnOrBuilder> + getConversationTurnsFieldBuilder() { + if (conversationTurnsBuilder_ == null) { + conversationTurnsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn, + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurnOrBuilder>( + conversationTurns_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + conversationTurns_ = null; + } + return conversationTurnsBuilder_; + } + + private int testResult_ = 0; + /** + * + * + *
+     * Whether the test case passed in the agent environment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestResult test_result = 4; + * + * @return The enum numeric value on the wire for testResult. + */ + @java.lang.Override + public int getTestResultValue() { + return testResult_; + } + /** + * + * + *
+     * Whether the test case passed in the agent environment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestResult test_result = 4; + * + * @param value The enum numeric value on the wire for testResult to set. + * @return This builder for chaining. + */ + public Builder setTestResultValue(int value) { + + testResult_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether the test case passed in the agent environment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestResult test_result = 4; + * + * @return The testResult. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TestResult getTestResult() { + @SuppressWarnings("deprecation") + com.google.cloud.dialogflow.cx.v3beta1.TestResult result = + com.google.cloud.dialogflow.cx.v3beta1.TestResult.valueOf(testResult_); + return result == null + ? com.google.cloud.dialogflow.cx.v3beta1.TestResult.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Whether the test case passed in the agent environment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestResult test_result = 4; + * + * @param value The testResult to set. + * @return This builder for chaining. + */ + public Builder setTestResult(com.google.cloud.dialogflow.cx.v3beta1.TestResult value) { + if (value == null) { + throw new NullPointerException(); + } + + testResult_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Whether the test case passed in the agent environment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestResult test_result = 4; + * + * @return This builder for chaining. + */ + public Builder clearTestResult() { + + testResult_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp testTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + testTimeBuilder_; + /** + * + * + *
+     * The time that the test was run.
+     * 
+ * + * .google.protobuf.Timestamp test_time = 5; + * + * @return Whether the testTime field is set. + */ + public boolean hasTestTime() { + return testTimeBuilder_ != null || testTime_ != null; + } + /** + * + * + *
+     * The time that the test was run.
+     * 
+ * + * .google.protobuf.Timestamp test_time = 5; + * + * @return The testTime. + */ + public com.google.protobuf.Timestamp getTestTime() { + if (testTimeBuilder_ == null) { + return testTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : testTime_; + } else { + return testTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The time that the test was run.
+     * 
+ * + * .google.protobuf.Timestamp test_time = 5; + */ + public Builder setTestTime(com.google.protobuf.Timestamp value) { + if (testTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + testTime_ = value; + onChanged(); + } else { + testTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The time that the test was run.
+     * 
+ * + * .google.protobuf.Timestamp test_time = 5; + */ + public Builder setTestTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (testTimeBuilder_ == null) { + testTime_ = builderForValue.build(); + onChanged(); + } else { + testTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The time that the test was run.
+     * 
+ * + * .google.protobuf.Timestamp test_time = 5; + */ + public Builder mergeTestTime(com.google.protobuf.Timestamp value) { + if (testTimeBuilder_ == null) { + if (testTime_ != null) { + testTime_ = + com.google.protobuf.Timestamp.newBuilder(testTime_).mergeFrom(value).buildPartial(); + } else { + testTime_ = value; + } + onChanged(); + } else { + testTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The time that the test was run.
+     * 
+ * + * .google.protobuf.Timestamp test_time = 5; + */ + public Builder clearTestTime() { + if (testTimeBuilder_ == null) { + testTime_ = null; + onChanged(); + } else { + testTime_ = null; + testTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The time that the test was run.
+     * 
+ * + * .google.protobuf.Timestamp test_time = 5; + */ + public com.google.protobuf.Timestamp.Builder getTestTimeBuilder() { + + onChanged(); + return getTestTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time that the test was run.
+     * 
+ * + * .google.protobuf.Timestamp test_time = 5; + */ + public com.google.protobuf.TimestampOrBuilder getTestTimeOrBuilder() { + if (testTimeBuilder_ != null) { + return testTimeBuilder_.getMessageOrBuilder(); + } else { + return testTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : testTime_; + } + } + /** + * + * + *
+     * The time that the test was run.
+     * 
+ * + * .google.protobuf.Timestamp test_time = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getTestTimeFieldBuilder() { + if (testTimeBuilder_ == null) { + testTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getTestTime(), getParentForChildren(), isClean()); + testTime_ = null; + } + return testTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.TestCaseResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.TestCaseResult) + private static final com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TestCaseResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TestCaseResult(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentName.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseResultName.java similarity index 62% rename from proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentName.java rename to proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseResultName.java index fc6750c8a..41683c9e3 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentName.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseResultName.java @@ -28,32 +28,32 @@ // AUTO-GENERATED DOCUMENTATION AND CLASS. @Generated("by gapic-generator-java") -public class ExperimentName implements ResourceName { - private static final PathTemplate PROJECT_LOCATION_AGENT_ENVIRONMENT_EXPERIMENT = +public class TestCaseResultName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_AGENT_TEST_CASE_RESULT = PathTemplate.createWithoutUrlEncoding( - "projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}"); + "projects/{project}/locations/{location}/agents/{agent}/testCases/{test_case}/results/{result}"); private volatile Map fieldValuesMap; private final String project; private final String location; private final String agent; - private final String environment; - private final String experiment; + private final String testCase; + private final String result; @Deprecated - protected ExperimentName() { + protected TestCaseResultName() { project = null; location = null; agent = null; - environment = null; - experiment = null; + testCase = null; + result = null; } - private ExperimentName(Builder builder) { + private TestCaseResultName(Builder builder) { project = Preconditions.checkNotNull(builder.getProject()); location = Preconditions.checkNotNull(builder.getLocation()); agent = Preconditions.checkNotNull(builder.getAgent()); - environment = Preconditions.checkNotNull(builder.getEnvironment()); - experiment = Preconditions.checkNotNull(builder.getExperiment()); + testCase = Preconditions.checkNotNull(builder.getTestCase()); + result = Preconditions.checkNotNull(builder.getResult()); } public String getProject() { @@ -68,12 +68,12 @@ public String getAgent() { return agent; } - public String getEnvironment() { - return environment; + public String getTestCase() { + return testCase; } - public String getExperiment() { - return experiment; + public String getResult() { + return result; } public static Builder newBuilder() { @@ -84,55 +84,55 @@ public Builder toBuilder() { return new Builder(this); } - public static ExperimentName of( - String project, String location, String agent, String environment, String experiment) { + public static TestCaseResultName of( + String project, String location, String agent, String testCase, String result) { return newBuilder() .setProject(project) .setLocation(location) .setAgent(agent) - .setEnvironment(environment) - .setExperiment(experiment) + .setTestCase(testCase) + .setResult(result) .build(); } public static String format( - String project, String location, String agent, String environment, String experiment) { + String project, String location, String agent, String testCase, String result) { return newBuilder() .setProject(project) .setLocation(location) .setAgent(agent) - .setEnvironment(environment) - .setExperiment(experiment) + .setTestCase(testCase) + .setResult(result) .build() .toString(); } - public static ExperimentName parse(String formattedString) { + public static TestCaseResultName parse(String formattedString) { if (formattedString.isEmpty()) { return null; } Map matchMap = - PROJECT_LOCATION_AGENT_ENVIRONMENT_EXPERIMENT.validatedMatch( - formattedString, "ExperimentName.parse: formattedString not in valid format"); + PROJECT_LOCATION_AGENT_TEST_CASE_RESULT.validatedMatch( + formattedString, "TestCaseResultName.parse: formattedString not in valid format"); return of( matchMap.get("project"), matchMap.get("location"), matchMap.get("agent"), - matchMap.get("environment"), - matchMap.get("experiment")); + matchMap.get("test_case"), + matchMap.get("result")); } - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); for (String formattedString : formattedStrings) { list.add(parse(formattedString)); } return list; } - public static List toStringList(List values) { + public static List toStringList(List values) { List list = new ArrayList<>(values.size()); - for (ExperimentName value : values) { + for (TestCaseResultName value : values) { if (value == null) { list.add(""); } else { @@ -143,7 +143,7 @@ public static List toStringList(List values) { } public static boolean isParsableFrom(String formattedString) { - return PROJECT_LOCATION_AGENT_ENVIRONMENT_EXPERIMENT.matches(formattedString); + return PROJECT_LOCATION_AGENT_TEST_CASE_RESULT.matches(formattedString); } @Override @@ -161,11 +161,11 @@ public Map getFieldValuesMap() { if (agent != null) { fieldMapBuilder.put("agent", agent); } - if (environment != null) { - fieldMapBuilder.put("environment", environment); + if (testCase != null) { + fieldMapBuilder.put("test_case", testCase); } - if (experiment != null) { - fieldMapBuilder.put("experiment", experiment); + if (result != null) { + fieldMapBuilder.put("result", result); } fieldValuesMap = fieldMapBuilder.build(); } @@ -180,17 +180,17 @@ public String getFieldValue(String fieldName) { @Override public String toString() { - return PROJECT_LOCATION_AGENT_ENVIRONMENT_EXPERIMENT.instantiate( + return PROJECT_LOCATION_AGENT_TEST_CASE_RESULT.instantiate( "project", project, "location", location, "agent", agent, - "environment", - environment, - "experiment", - experiment); + "test_case", + testCase, + "result", + result); } @Override @@ -199,12 +199,12 @@ public boolean equals(Object o) { return true; } if (o != null || getClass() == o.getClass()) { - ExperimentName that = ((ExperimentName) o); + TestCaseResultName that = ((TestCaseResultName) o); return Objects.equals(this.project, that.project) && Objects.equals(this.location, that.location) && Objects.equals(this.agent, that.agent) - && Objects.equals(this.environment, that.environment) - && Objects.equals(this.experiment, that.experiment); + && Objects.equals(this.testCase, that.testCase) + && Objects.equals(this.result, that.result); } return false; } @@ -219,22 +219,22 @@ public int hashCode() { h *= 1000003; h ^= Objects.hashCode(agent); h *= 1000003; - h ^= Objects.hashCode(environment); + h ^= Objects.hashCode(testCase); h *= 1000003; - h ^= Objects.hashCode(experiment); + h ^= Objects.hashCode(result); return h; } /** * Builder for - * projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}. + * projects/{project}/locations/{location}/agents/{agent}/testCases/{test_case}/results/{result}. */ public static class Builder { private String project; private String location; private String agent; - private String environment; - private String experiment; + private String testCase; + private String result; protected Builder() {} @@ -250,12 +250,12 @@ public String getAgent() { return agent; } - public String getEnvironment() { - return environment; + public String getTestCase() { + return testCase; } - public String getExperiment() { - return experiment; + public String getResult() { + return result; } public Builder setProject(String project) { @@ -273,26 +273,26 @@ public Builder setAgent(String agent) { return this; } - public Builder setEnvironment(String environment) { - this.environment = environment; + public Builder setTestCase(String testCase) { + this.testCase = testCase; return this; } - public Builder setExperiment(String experiment) { - this.experiment = experiment; + public Builder setResult(String result) { + this.result = result; return this; } - private Builder(ExperimentName experimentName) { - project = experimentName.project; - location = experimentName.location; - agent = experimentName.agent; - environment = experimentName.environment; - experiment = experimentName.experiment; + private Builder(TestCaseResultName testCaseResultName) { + project = testCaseResultName.project; + location = testCaseResultName.location; + agent = testCaseResultName.agent; + testCase = testCaseResultName.testCase; + result = testCaseResultName.result; } - public ExperimentName build() { - return new ExperimentName(this); + public TestCaseResultName build() { + return new TestCaseResultName(this); } } } diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseResultOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseResultOrBuilder.java new file mode 100644 index 000000000..0105c126d --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseResultOrBuilder.java @@ -0,0 +1,209 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface TestCaseResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.TestCaseResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The resource name for the test case result. Format:
+   * `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/testCases/
+   * <TestCase ID>/results/<TestCaseResult ID>`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The resource name for the test case result. Format:
+   * `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/testCases/
+   * <TestCase ID>/results/<TestCaseResult ID>`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. Environment where the test was run. If not set, it indicates the draft
+   * environment.
+   * 
+ * + * + * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The environment. + */ + java.lang.String getEnvironment(); + /** + * + * + *
+   * Optional. Environment where the test was run. If not set, it indicates the draft
+   * environment.
+   * 
+ * + * + * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for environment. + */ + com.google.protobuf.ByteString getEnvironmentBytes(); + + /** + * + * + *
+   * The conversation turns uttered during the test case replay in chronological
+   * order.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ConversationTurn conversation_turns = 3; + * + */ + java.util.List + getConversationTurnsList(); + /** + * + * + *
+   * The conversation turns uttered during the test case replay in chronological
+   * order.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ConversationTurn conversation_turns = 3; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurn getConversationTurns(int index); + /** + * + * + *
+   * The conversation turns uttered during the test case replay in chronological
+   * order.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ConversationTurn conversation_turns = 3; + * + */ + int getConversationTurnsCount(); + /** + * + * + *
+   * The conversation turns uttered during the test case replay in chronological
+   * order.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ConversationTurn conversation_turns = 3; + * + */ + java.util.List + getConversationTurnsOrBuilderList(); + /** + * + * + *
+   * The conversation turns uttered during the test case replay in chronological
+   * order.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ConversationTurn conversation_turns = 3; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.ConversationTurnOrBuilder getConversationTurnsOrBuilder( + int index); + + /** + * + * + *
+   * Whether the test case passed in the agent environment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestResult test_result = 4; + * + * @return The enum numeric value on the wire for testResult. + */ + int getTestResultValue(); + /** + * + * + *
+   * Whether the test case passed in the agent environment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestResult test_result = 4; + * + * @return The testResult. + */ + com.google.cloud.dialogflow.cx.v3beta1.TestResult getTestResult(); + + /** + * + * + *
+   * The time that the test was run.
+   * 
+ * + * .google.protobuf.Timestamp test_time = 5; + * + * @return Whether the testTime field is set. + */ + boolean hasTestTime(); + /** + * + * + *
+   * The time that the test was run.
+   * 
+ * + * .google.protobuf.Timestamp test_time = 5; + * + * @return The testTime. + */ + com.google.protobuf.Timestamp getTestTime(); + /** + * + * + *
+   * The time that the test was run.
+   * 
+ * + * .google.protobuf.Timestamp test_time = 5; + */ + com.google.protobuf.TimestampOrBuilder getTestTimeOrBuilder(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestConfig.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestConfig.java new file mode 100644 index 000000000..c2439ae4e --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestConfig.java @@ -0,0 +1,930 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * Represents configurations for a test case.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.TestConfig} + */ +public final class TestConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.TestConfig) + TestConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use TestConfig.newBuilder() to construct. + private TestConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TestConfig() { + trackingParameters_ = com.google.protobuf.LazyStringArrayList.EMPTY; + flow_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TestConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TestConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + trackingParameters_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + trackingParameters_.add(s); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + flow_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + trackingParameters_ = trackingParameters_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_TestConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_TestConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.TestConfig.class, + com.google.cloud.dialogflow.cx.v3beta1.TestConfig.Builder.class); + } + + public static final int TRACKING_PARAMETERS_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList trackingParameters_; + /** + * + * + *
+   * Session parameters to be compared when calculating differences.
+   * 
+ * + * repeated string tracking_parameters = 1; + * + * @return A list containing the trackingParameters. + */ + public com.google.protobuf.ProtocolStringList getTrackingParametersList() { + return trackingParameters_; + } + /** + * + * + *
+   * Session parameters to be compared when calculating differences.
+   * 
+ * + * repeated string tracking_parameters = 1; + * + * @return The count of trackingParameters. + */ + public int getTrackingParametersCount() { + return trackingParameters_.size(); + } + /** + * + * + *
+   * Session parameters to be compared when calculating differences.
+   * 
+ * + * repeated string tracking_parameters = 1; + * + * @param index The index of the element to return. + * @return The trackingParameters at the given index. + */ + public java.lang.String getTrackingParameters(int index) { + return trackingParameters_.get(index); + } + /** + * + * + *
+   * Session parameters to be compared when calculating differences.
+   * 
+ * + * repeated string tracking_parameters = 1; + * + * @param index The index of the value to return. + * @return The bytes of the trackingParameters at the given index. + */ + public com.google.protobuf.ByteString getTrackingParametersBytes(int index) { + return trackingParameters_.getByteString(index); + } + + public static final int FLOW_FIELD_NUMBER = 2; + private volatile java.lang.Object flow_; + /** + * + * + *
+   * Flow name. If not set, default start flow is assumed.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>`.
+   * 
+ * + * string flow = 2 [(.google.api.resource_reference) = { ... } + * + * @return The flow. + */ + @java.lang.Override + public java.lang.String getFlow() { + java.lang.Object ref = flow_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + flow_ = s; + return s; + } + } + /** + * + * + *
+   * Flow name. If not set, default start flow is assumed.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>`.
+   * 
+ * + * string flow = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for flow. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFlowBytes() { + java.lang.Object ref = flow_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + flow_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < trackingParameters_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, trackingParameters_.getRaw(i)); + } + if (!getFlowBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, flow_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < trackingParameters_.size(); i++) { + dataSize += computeStringSizeNoTag(trackingParameters_.getRaw(i)); + } + size += dataSize; + size += 1 * getTrackingParametersList().size(); + } + if (!getFlowBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, flow_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.TestConfig)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.TestConfig other = + (com.google.cloud.dialogflow.cx.v3beta1.TestConfig) obj; + + if (!getTrackingParametersList().equals(other.getTrackingParametersList())) return false; + if (!getFlow().equals(other.getFlow())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getTrackingParametersCount() > 0) { + hash = (37 * hash) + TRACKING_PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + getTrackingParametersList().hashCode(); + } + hash = (37 * hash) + FLOW_FIELD_NUMBER; + hash = (53 * hash) + getFlow().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.dialogflow.cx.v3beta1.TestConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Represents configurations for a test case.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.TestConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.TestConfig) + com.google.cloud.dialogflow.cx.v3beta1.TestConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_TestConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_TestConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.TestConfig.class, + com.google.cloud.dialogflow.cx.v3beta1.TestConfig.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.TestConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + trackingParameters_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + flow_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_TestConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TestConfig getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.TestConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TestConfig build() { + com.google.cloud.dialogflow.cx.v3beta1.TestConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TestConfig buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.TestConfig result = + new com.google.cloud.dialogflow.cx.v3beta1.TestConfig(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + trackingParameters_ = trackingParameters_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.trackingParameters_ = trackingParameters_; + result.flow_ = flow_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.TestConfig) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.TestConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.TestConfig other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.TestConfig.getDefaultInstance()) + return this; + if (!other.trackingParameters_.isEmpty()) { + if (trackingParameters_.isEmpty()) { + trackingParameters_ = other.trackingParameters_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTrackingParametersIsMutable(); + trackingParameters_.addAll(other.trackingParameters_); + } + onChanged(); + } + if (!other.getFlow().isEmpty()) { + flow_ = other.flow_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.TestConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.TestConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringList trackingParameters_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureTrackingParametersIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + trackingParameters_ = new com.google.protobuf.LazyStringArrayList(trackingParameters_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Session parameters to be compared when calculating differences.
+     * 
+ * + * repeated string tracking_parameters = 1; + * + * @return A list containing the trackingParameters. + */ + public com.google.protobuf.ProtocolStringList getTrackingParametersList() { + return trackingParameters_.getUnmodifiableView(); + } + /** + * + * + *
+     * Session parameters to be compared when calculating differences.
+     * 
+ * + * repeated string tracking_parameters = 1; + * + * @return The count of trackingParameters. + */ + public int getTrackingParametersCount() { + return trackingParameters_.size(); + } + /** + * + * + *
+     * Session parameters to be compared when calculating differences.
+     * 
+ * + * repeated string tracking_parameters = 1; + * + * @param index The index of the element to return. + * @return The trackingParameters at the given index. + */ + public java.lang.String getTrackingParameters(int index) { + return trackingParameters_.get(index); + } + /** + * + * + *
+     * Session parameters to be compared when calculating differences.
+     * 
+ * + * repeated string tracking_parameters = 1; + * + * @param index The index of the value to return. + * @return The bytes of the trackingParameters at the given index. + */ + public com.google.protobuf.ByteString getTrackingParametersBytes(int index) { + return trackingParameters_.getByteString(index); + } + /** + * + * + *
+     * Session parameters to be compared when calculating differences.
+     * 
+ * + * repeated string tracking_parameters = 1; + * + * @param index The index to set the value at. + * @param value The trackingParameters to set. + * @return This builder for chaining. + */ + public Builder setTrackingParameters(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTrackingParametersIsMutable(); + trackingParameters_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Session parameters to be compared when calculating differences.
+     * 
+ * + * repeated string tracking_parameters = 1; + * + * @param value The trackingParameters to add. + * @return This builder for chaining. + */ + public Builder addTrackingParameters(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTrackingParametersIsMutable(); + trackingParameters_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Session parameters to be compared when calculating differences.
+     * 
+ * + * repeated string tracking_parameters = 1; + * + * @param values The trackingParameters to add. + * @return This builder for chaining. + */ + public Builder addAllTrackingParameters(java.lang.Iterable values) { + ensureTrackingParametersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, trackingParameters_); + onChanged(); + return this; + } + /** + * + * + *
+     * Session parameters to be compared when calculating differences.
+     * 
+ * + * repeated string tracking_parameters = 1; + * + * @return This builder for chaining. + */ + public Builder clearTrackingParameters() { + trackingParameters_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Session parameters to be compared when calculating differences.
+     * 
+ * + * repeated string tracking_parameters = 1; + * + * @param value The bytes of the trackingParameters to add. + * @return This builder for chaining. + */ + public Builder addTrackingParametersBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureTrackingParametersIsMutable(); + trackingParameters_.add(value); + onChanged(); + return this; + } + + private java.lang.Object flow_ = ""; + /** + * + * + *
+     * Flow name. If not set, default start flow is assumed.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>`.
+     * 
+ * + * string flow = 2 [(.google.api.resource_reference) = { ... } + * + * @return The flow. + */ + public java.lang.String getFlow() { + java.lang.Object ref = flow_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + flow_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Flow name. If not set, default start flow is assumed.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>`.
+     * 
+ * + * string flow = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for flow. + */ + public com.google.protobuf.ByteString getFlowBytes() { + java.lang.Object ref = flow_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + flow_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Flow name. If not set, default start flow is assumed.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>`.
+     * 
+ * + * string flow = 2 [(.google.api.resource_reference) = { ... } + * + * @param value The flow to set. + * @return This builder for chaining. + */ + public Builder setFlow(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + flow_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Flow name. If not set, default start flow is assumed.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>`.
+     * 
+ * + * string flow = 2 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearFlow() { + + flow_ = getDefaultInstance().getFlow(); + onChanged(); + return this; + } + /** + * + * + *
+     * Flow name. If not set, default start flow is assumed.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>`.
+     * 
+ * + * string flow = 2 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for flow to set. + * @return This builder for chaining. + */ + public Builder setFlowBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + flow_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.TestConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.TestConfig) + private static final com.google.cloud.dialogflow.cx.v3beta1.TestConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.TestConfig(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TestConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TestConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TestConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestConfigOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestConfigOrBuilder.java new file mode 100644 index 000000000..6cfe36ac2 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestConfigOrBuilder.java @@ -0,0 +1,105 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface TestConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.TestConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Session parameters to be compared when calculating differences.
+   * 
+ * + * repeated string tracking_parameters = 1; + * + * @return A list containing the trackingParameters. + */ + java.util.List getTrackingParametersList(); + /** + * + * + *
+   * Session parameters to be compared when calculating differences.
+   * 
+ * + * repeated string tracking_parameters = 1; + * + * @return The count of trackingParameters. + */ + int getTrackingParametersCount(); + /** + * + * + *
+   * Session parameters to be compared when calculating differences.
+   * 
+ * + * repeated string tracking_parameters = 1; + * + * @param index The index of the element to return. + * @return The trackingParameters at the given index. + */ + java.lang.String getTrackingParameters(int index); + /** + * + * + *
+   * Session parameters to be compared when calculating differences.
+   * 
+ * + * repeated string tracking_parameters = 1; + * + * @param index The index of the value to return. + * @return The bytes of the trackingParameters at the given index. + */ + com.google.protobuf.ByteString getTrackingParametersBytes(int index); + + /** + * + * + *
+   * Flow name. If not set, default start flow is assumed.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>`.
+   * 
+ * + * string flow = 2 [(.google.api.resource_reference) = { ... } + * + * @return The flow. + */ + java.lang.String getFlow(); + /** + * + * + *
+   * Flow name. If not set, default start flow is assumed.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>`.
+   * 
+ * + * string flow = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for flow. + */ + com.google.protobuf.ByteString getFlowBytes(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestError.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestError.java new file mode 100644 index 000000000..06f2209ce --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestError.java @@ -0,0 +1,1164 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * Error info for running a test.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.TestError} + */ +public final class TestError extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.TestError) + TestErrorOrBuilder { + private static final long serialVersionUID = 0L; + // Use TestError.newBuilder() to construct. + private TestError(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TestError() { + testCase_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TestError(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TestError( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + testCase_ = s; + break; + } + case 18: + { + com.google.rpc.Status.Builder subBuilder = null; + if (status_ != null) { + subBuilder = status_.toBuilder(); + } + status_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(status_); + status_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (testTime_ != null) { + subBuilder = testTime_.toBuilder(); + } + testTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(testTime_); + testTime_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_TestError_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_TestError_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.TestError.class, + com.google.cloud.dialogflow.cx.v3beta1.TestError.Builder.class); + } + + public static final int TEST_CASE_FIELD_NUMBER = 1; + private volatile java.lang.Object testCase_; + /** + * + * + *
+   * The test case resource name.
+   * 
+ * + * string test_case = 1 [(.google.api.resource_reference) = { ... } + * + * @return The testCase. + */ + @java.lang.Override + public java.lang.String getTestCase() { + java.lang.Object ref = testCase_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + testCase_ = s; + return s; + } + } + /** + * + * + *
+   * The test case resource name.
+   * 
+ * + * string test_case = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for testCase. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTestCaseBytes() { + java.lang.Object ref = testCase_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + testCase_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATUS_FIELD_NUMBER = 2; + private com.google.rpc.Status status_; + /** + * + * + *
+   * The status associated with the test.
+   * 
+ * + * .google.rpc.Status status = 2; + * + * @return Whether the status field is set. + */ + @java.lang.Override + public boolean hasStatus() { + return status_ != null; + } + /** + * + * + *
+   * The status associated with the test.
+   * 
+ * + * .google.rpc.Status status = 2; + * + * @return The status. + */ + @java.lang.Override + public com.google.rpc.Status getStatus() { + return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; + } + /** + * + * + *
+   * The status associated with the test.
+   * 
+ * + * .google.rpc.Status status = 2; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { + return getStatus(); + } + + public static final int TEST_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp testTime_; + /** + * + * + *
+   * The timestamp when the test was completed.
+   * 
+ * + * .google.protobuf.Timestamp test_time = 3; + * + * @return Whether the testTime field is set. + */ + @java.lang.Override + public boolean hasTestTime() { + return testTime_ != null; + } + /** + * + * + *
+   * The timestamp when the test was completed.
+   * 
+ * + * .google.protobuf.Timestamp test_time = 3; + * + * @return The testTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getTestTime() { + return testTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : testTime_; + } + /** + * + * + *
+   * The timestamp when the test was completed.
+   * 
+ * + * .google.protobuf.Timestamp test_time = 3; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getTestTimeOrBuilder() { + return getTestTime(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getTestCaseBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, testCase_); + } + if (status_ != null) { + output.writeMessage(2, getStatus()); + } + if (testTime_ != null) { + output.writeMessage(3, getTestTime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getTestCaseBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, testCase_); + } + if (status_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStatus()); + } + if (testTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getTestTime()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.TestError)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.TestError other = + (com.google.cloud.dialogflow.cx.v3beta1.TestError) obj; + + if (!getTestCase().equals(other.getTestCase())) return false; + if (hasStatus() != other.hasStatus()) return false; + if (hasStatus()) { + if (!getStatus().equals(other.getStatus())) return false; + } + if (hasTestTime() != other.hasTestTime()) return false; + if (hasTestTime()) { + if (!getTestTime().equals(other.getTestTime())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TEST_CASE_FIELD_NUMBER; + hash = (53 * hash) + getTestCase().hashCode(); + if (hasStatus()) { + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + getStatus().hashCode(); + } + if (hasTestTime()) { + hash = (37 * hash) + TEST_TIME_FIELD_NUMBER; + hash = (53 * hash) + getTestTime().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestError parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestError parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestError parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestError parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestError parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestError parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestError parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestError parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestError parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestError parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestError parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestError parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.dialogflow.cx.v3beta1.TestError prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Error info for running a test.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.TestError} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.TestError) + com.google.cloud.dialogflow.cx.v3beta1.TestErrorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_TestError_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_TestError_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.TestError.class, + com.google.cloud.dialogflow.cx.v3beta1.TestError.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.TestError.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + testCase_ = ""; + + if (statusBuilder_ == null) { + status_ = null; + } else { + status_ = null; + statusBuilder_ = null; + } + if (testTimeBuilder_ == null) { + testTime_ = null; + } else { + testTime_ = null; + testTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_TestError_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TestError getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.TestError.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TestError build() { + com.google.cloud.dialogflow.cx.v3beta1.TestError result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TestError buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.TestError result = + new com.google.cloud.dialogflow.cx.v3beta1.TestError(this); + result.testCase_ = testCase_; + if (statusBuilder_ == null) { + result.status_ = status_; + } else { + result.status_ = statusBuilder_.build(); + } + if (testTimeBuilder_ == null) { + result.testTime_ = testTime_; + } else { + result.testTime_ = testTimeBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.TestError) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.TestError) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.TestError other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.TestError.getDefaultInstance()) + return this; + if (!other.getTestCase().isEmpty()) { + testCase_ = other.testCase_; + onChanged(); + } + if (other.hasStatus()) { + mergeStatus(other.getStatus()); + } + if (other.hasTestTime()) { + mergeTestTime(other.getTestTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.TestError parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.dialogflow.cx.v3beta1.TestError) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object testCase_ = ""; + /** + * + * + *
+     * The test case resource name.
+     * 
+ * + * string test_case = 1 [(.google.api.resource_reference) = { ... } + * + * @return The testCase. + */ + public java.lang.String getTestCase() { + java.lang.Object ref = testCase_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + testCase_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The test case resource name.
+     * 
+ * + * string test_case = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for testCase. + */ + public com.google.protobuf.ByteString getTestCaseBytes() { + java.lang.Object ref = testCase_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + testCase_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The test case resource name.
+     * 
+ * + * string test_case = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The testCase to set. + * @return This builder for chaining. + */ + public Builder setTestCase(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + testCase_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The test case resource name.
+     * 
+ * + * string test_case = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearTestCase() { + + testCase_ = getDefaultInstance().getTestCase(); + onChanged(); + return this; + } + /** + * + * + *
+     * The test case resource name.
+     * 
+ * + * string test_case = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for testCase to set. + * @return This builder for chaining. + */ + public Builder setTestCaseBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + testCase_ = value; + onChanged(); + return this; + } + + private com.google.rpc.Status status_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + statusBuilder_; + /** + * + * + *
+     * The status associated with the test.
+     * 
+ * + * .google.rpc.Status status = 2; + * + * @return Whether the status field is set. + */ + public boolean hasStatus() { + return statusBuilder_ != null || status_ != null; + } + /** + * + * + *
+     * The status associated with the test.
+     * 
+ * + * .google.rpc.Status status = 2; + * + * @return The status. + */ + public com.google.rpc.Status getStatus() { + if (statusBuilder_ == null) { + return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; + } else { + return statusBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The status associated with the test.
+     * 
+ * + * .google.rpc.Status status = 2; + */ + public Builder setStatus(com.google.rpc.Status value) { + if (statusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + status_ = value; + onChanged(); + } else { + statusBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The status associated with the test.
+     * 
+ * + * .google.rpc.Status status = 2; + */ + public Builder setStatus(com.google.rpc.Status.Builder builderForValue) { + if (statusBuilder_ == null) { + status_ = builderForValue.build(); + onChanged(); + } else { + statusBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The status associated with the test.
+     * 
+ * + * .google.rpc.Status status = 2; + */ + public Builder mergeStatus(com.google.rpc.Status value) { + if (statusBuilder_ == null) { + if (status_ != null) { + status_ = com.google.rpc.Status.newBuilder(status_).mergeFrom(value).buildPartial(); + } else { + status_ = value; + } + onChanged(); + } else { + statusBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The status associated with the test.
+     * 
+ * + * .google.rpc.Status status = 2; + */ + public Builder clearStatus() { + if (statusBuilder_ == null) { + status_ = null; + onChanged(); + } else { + status_ = null; + statusBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The status associated with the test.
+     * 
+ * + * .google.rpc.Status status = 2; + */ + public com.google.rpc.Status.Builder getStatusBuilder() { + + onChanged(); + return getStatusFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The status associated with the test.
+     * 
+ * + * .google.rpc.Status status = 2; + */ + public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { + if (statusBuilder_ != null) { + return statusBuilder_.getMessageOrBuilder(); + } else { + return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; + } + } + /** + * + * + *
+     * The status associated with the test.
+     * 
+ * + * .google.rpc.Status status = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getStatusFieldBuilder() { + if (statusBuilder_ == null) { + statusBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>(getStatus(), getParentForChildren(), isClean()); + status_ = null; + } + return statusBuilder_; + } + + private com.google.protobuf.Timestamp testTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + testTimeBuilder_; + /** + * + * + *
+     * The timestamp when the test was completed.
+     * 
+ * + * .google.protobuf.Timestamp test_time = 3; + * + * @return Whether the testTime field is set. + */ + public boolean hasTestTime() { + return testTimeBuilder_ != null || testTime_ != null; + } + /** + * + * + *
+     * The timestamp when the test was completed.
+     * 
+ * + * .google.protobuf.Timestamp test_time = 3; + * + * @return The testTime. + */ + public com.google.protobuf.Timestamp getTestTime() { + if (testTimeBuilder_ == null) { + return testTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : testTime_; + } else { + return testTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The timestamp when the test was completed.
+     * 
+ * + * .google.protobuf.Timestamp test_time = 3; + */ + public Builder setTestTime(com.google.protobuf.Timestamp value) { + if (testTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + testTime_ = value; + onChanged(); + } else { + testTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The timestamp when the test was completed.
+     * 
+ * + * .google.protobuf.Timestamp test_time = 3; + */ + public Builder setTestTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (testTimeBuilder_ == null) { + testTime_ = builderForValue.build(); + onChanged(); + } else { + testTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The timestamp when the test was completed.
+     * 
+ * + * .google.protobuf.Timestamp test_time = 3; + */ + public Builder mergeTestTime(com.google.protobuf.Timestamp value) { + if (testTimeBuilder_ == null) { + if (testTime_ != null) { + testTime_ = + com.google.protobuf.Timestamp.newBuilder(testTime_).mergeFrom(value).buildPartial(); + } else { + testTime_ = value; + } + onChanged(); + } else { + testTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The timestamp when the test was completed.
+     * 
+ * + * .google.protobuf.Timestamp test_time = 3; + */ + public Builder clearTestTime() { + if (testTimeBuilder_ == null) { + testTime_ = null; + onChanged(); + } else { + testTime_ = null; + testTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The timestamp when the test was completed.
+     * 
+ * + * .google.protobuf.Timestamp test_time = 3; + */ + public com.google.protobuf.Timestamp.Builder getTestTimeBuilder() { + + onChanged(); + return getTestTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The timestamp when the test was completed.
+     * 
+ * + * .google.protobuf.Timestamp test_time = 3; + */ + public com.google.protobuf.TimestampOrBuilder getTestTimeOrBuilder() { + if (testTimeBuilder_ != null) { + return testTimeBuilder_.getMessageOrBuilder(); + } else { + return testTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : testTime_; + } + } + /** + * + * + *
+     * The timestamp when the test was completed.
+     * 
+ * + * .google.protobuf.Timestamp test_time = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getTestTimeFieldBuilder() { + if (testTimeBuilder_ == null) { + testTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getTestTime(), getParentForChildren(), isClean()); + testTime_ = null; + } + return testTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.TestError) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.TestError) + private static final com.google.cloud.dialogflow.cx.v3beta1.TestError DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.TestError(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestError getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TestError parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TestError(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TestError getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestErrorOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestErrorOrBuilder.java new file mode 100644 index 000000000..d22435853 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestErrorOrBuilder.java @@ -0,0 +1,120 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface TestErrorOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.TestError) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The test case resource name.
+   * 
+ * + * string test_case = 1 [(.google.api.resource_reference) = { ... } + * + * @return The testCase. + */ + java.lang.String getTestCase(); + /** + * + * + *
+   * The test case resource name.
+   * 
+ * + * string test_case = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for testCase. + */ + com.google.protobuf.ByteString getTestCaseBytes(); + + /** + * + * + *
+   * The status associated with the test.
+   * 
+ * + * .google.rpc.Status status = 2; + * + * @return Whether the status field is set. + */ + boolean hasStatus(); + /** + * + * + *
+   * The status associated with the test.
+   * 
+ * + * .google.rpc.Status status = 2; + * + * @return The status. + */ + com.google.rpc.Status getStatus(); + /** + * + * + *
+   * The status associated with the test.
+   * 
+ * + * .google.rpc.Status status = 2; + */ + com.google.rpc.StatusOrBuilder getStatusOrBuilder(); + + /** + * + * + *
+   * The timestamp when the test was completed.
+   * 
+ * + * .google.protobuf.Timestamp test_time = 3; + * + * @return Whether the testTime field is set. + */ + boolean hasTestTime(); + /** + * + * + *
+   * The timestamp when the test was completed.
+   * 
+ * + * .google.protobuf.Timestamp test_time = 3; + * + * @return The testTime. + */ + com.google.protobuf.Timestamp getTestTime(); + /** + * + * + *
+   * The timestamp when the test was completed.
+   * 
+ * + * .google.protobuf.Timestamp test_time = 3; + */ + com.google.protobuf.TimestampOrBuilder getTestTimeOrBuilder(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestResult.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestResult.java new file mode 100644 index 000000000..c28536194 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestResult.java @@ -0,0 +1,178 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The test result for a test case and an agent environment.
+ * 
+ * + * Protobuf enum {@code google.cloud.dialogflow.cx.v3beta1.TestResult} + */ +public enum TestResult implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Not specified. Should never be used.
+   * 
+ * + * TEST_RESULT_UNSPECIFIED = 0; + */ + TEST_RESULT_UNSPECIFIED(0), + /** + * + * + *
+   * The test passed.
+   * 
+ * + * PASSED = 1; + */ + PASSED(1), + /** + * + * + *
+   * The test did not pass.
+   * 
+ * + * FAILED = 2; + */ + FAILED(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Not specified. Should never be used.
+   * 
+ * + * TEST_RESULT_UNSPECIFIED = 0; + */ + public static final int TEST_RESULT_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * The test passed.
+   * 
+ * + * PASSED = 1; + */ + public static final int PASSED_VALUE = 1; + /** + * + * + *
+   * The test did not pass.
+   * 
+ * + * FAILED = 2; + */ + public static final int FAILED_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TestResult valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static TestResult forNumber(int value) { + switch (value) { + case 0: + return TEST_RESULT_UNSPECIFIED; + case 1: + return PASSED; + case 2: + return FAILED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public TestResult findValueByNumber(int number) { + return TestResult.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final TestResult[] VALUES = values(); + + public static TestResult valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private TestResult(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3beta1.TestResult) +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestRunDifference.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestRunDifference.java new file mode 100644 index 000000000..e8e74d57b --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestRunDifference.java @@ -0,0 +1,999 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The description of differences between original and replayed agent output.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.TestRunDifference} + */ +public final class TestRunDifference extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.TestRunDifference) + TestRunDifferenceOrBuilder { + private static final long serialVersionUID = 0L; + // Use TestRunDifference.newBuilder() to construct. + private TestRunDifference(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TestRunDifference() { + type_ = 0; + description_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TestRunDifference(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TestRunDifference( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_TestRunDifference_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_TestRunDifference_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference.class, + com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference.Builder.class); + } + + /** + * + * + *
+   * What part of the message replay differs from the test case.
+   * 
+ * + * Protobuf enum {@code google.cloud.dialogflow.cx.v3beta1.TestRunDifference.DiffType} + */ + public enum DiffType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Should never be used.
+     * 
+ * + * DIFF_TYPE_UNSPECIFIED = 0; + */ + DIFF_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * The intent.
+     * 
+ * + * INTENT = 1; + */ + INTENT(1), + /** + * + * + *
+     * The page.
+     * 
+ * + * PAGE = 2; + */ + PAGE(2), + /** + * + * + *
+     * The parameters.
+     * 
+ * + * PARAMETERS = 3; + */ + PARAMETERS(3), + /** + * + * + *
+     * The message utterance.
+     * 
+ * + * UTTERANCE = 4; + */ + UTTERANCE(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Should never be used.
+     * 
+ * + * DIFF_TYPE_UNSPECIFIED = 0; + */ + public static final int DIFF_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The intent.
+     * 
+ * + * INTENT = 1; + */ + public static final int INTENT_VALUE = 1; + /** + * + * + *
+     * The page.
+     * 
+ * + * PAGE = 2; + */ + public static final int PAGE_VALUE = 2; + /** + * + * + *
+     * The parameters.
+     * 
+ * + * PARAMETERS = 3; + */ + public static final int PARAMETERS_VALUE = 3; + /** + * + * + *
+     * The message utterance.
+     * 
+ * + * UTTERANCE = 4; + */ + public static final int UTTERANCE_VALUE = 4; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DiffType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static DiffType forNumber(int value) { + switch (value) { + case 0: + return DIFF_TYPE_UNSPECIFIED; + case 1: + return INTENT; + case 2: + return PAGE; + case 3: + return PARAMETERS; + case 4: + return UTTERANCE; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public DiffType findValueByNumber(int number) { + return DiffType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final DiffType[] VALUES = values(); + + public static DiffType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private DiffType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3beta1.TestRunDifference.DiffType) + } + + public static final int TYPE_FIELD_NUMBER = 1; + private int type_; + /** + * + * + *
+   * The type of diff.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestRunDifference.DiffType type = 1; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+   * The type of diff.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestRunDifference.DiffType type = 1; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference.DiffType getType() { + @SuppressWarnings("deprecation") + com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference.DiffType result = + com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference.DiffType.valueOf(type_); + return result == null + ? com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference.DiffType.UNRECOGNIZED + : result; + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + private volatile java.lang.Object description_; + /** + * + * + *
+   * A description of the diff, showing the actual output vs expected output.
+   * 
+ * + * string description = 2; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * A description of the diff, showing the actual output vs expected output.
+   * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (type_ + != com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference.DiffType.DIFF_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, type_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (type_ + != com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference.DiffType.DIFF_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, type_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference other = + (com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference) obj; + + if (type_ != other.type_) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The description of differences between original and replayed agent output.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.TestRunDifference} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.TestRunDifference) + com.google.cloud.dialogflow.cx.v3beta1.TestRunDifferenceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_TestRunDifference_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_TestRunDifference_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference.class, + com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + type_ = 0; + + description_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_TestRunDifference_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference build() { + com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference result = + new com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference(this); + result.type_ = type_; + result.description_ = description_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference.getDefaultInstance()) + return this; + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int type_ = 0; + /** + * + * + *
+     * The type of diff.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestRunDifference.DiffType type = 1; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+     * The type of diff.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestRunDifference.DiffType type = 1; + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + + type_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The type of diff.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestRunDifference.DiffType type = 1; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference.DiffType getType() { + @SuppressWarnings("deprecation") + com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference.DiffType result = + com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference.DiffType.valueOf(type_); + return result == null + ? com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference.DiffType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The type of diff.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestRunDifference.DiffType type = 1; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType( + com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference.DiffType value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The type of diff.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestRunDifference.DiffType type = 1; + * + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * A description of the diff, showing the actual output vs expected output.
+     * 
+ * + * string description = 2; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A description of the diff, showing the actual output vs expected output.
+     * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A description of the diff, showing the actual output vs expected output.
+     * 
+ * + * string description = 2; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A description of the diff, showing the actual output vs expected output.
+     * 
+ * + * string description = 2; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+     * A description of the diff, showing the actual output vs expected output.
+     * 
+ * + * string description = 2; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.TestRunDifference) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.TestRunDifference) + private static final com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TestRunDifference parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TestRunDifference(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestRunDifferenceOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestRunDifferenceOrBuilder.java new file mode 100644 index 000000000..45444cbf4 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestRunDifferenceOrBuilder.java @@ -0,0 +1,75 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface TestRunDifferenceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.TestRunDifference) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The type of diff.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestRunDifference.DiffType type = 1; + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
+   * The type of diff.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TestRunDifference.DiffType type = 1; + * + * @return The type. + */ + com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference.DiffType getType(); + + /** + * + * + *
+   * A description of the diff, showing the actual output vs expected output.
+   * 
+ * + * string description = 2; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * A description of the diff, showing the actual output vs expected output.
+   * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionCoverage.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionCoverage.java new file mode 100644 index 000000000..24680c83d --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionCoverage.java @@ -0,0 +1,4509 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * Transition coverage represents the percentage of all possible transitions
+ * present within any of a parent's test cases.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.TransitionCoverage} + */ +public final class TransitionCoverage extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.TransitionCoverage) + TransitionCoverageOrBuilder { + private static final long serialVersionUID = 0L; + // Use TransitionCoverage.newBuilder() to construct. + private TransitionCoverage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TransitionCoverage() { + transitions_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TransitionCoverage(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TransitionCoverage( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + transitions_ = + new java.util.ArrayList< + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition>(); + mutable_bitField0_ |= 0x00000001; + } + transitions_.add( + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition.parser(), + extensionRegistry)); + break; + } + case 21: + { + coverageScore_ = input.readFloat(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + transitions_ = java.util.Collections.unmodifiableList(transitions_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionCoverage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionCoverage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.class, + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Builder.class); + } + + public interface TransitionNodeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Indicates a transition to a [Page][google.cloud.dialogflow.cx.v3beta1.Page]. Only some fields such as name and
+     * displayname will be set.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Page page = 1; + * + * @return Whether the page field is set. + */ + boolean hasPage(); + /** + * + * + *
+     * Indicates a transition to a [Page][google.cloud.dialogflow.cx.v3beta1.Page]. Only some fields such as name and
+     * displayname will be set.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Page page = 1; + * + * @return The page. + */ + com.google.cloud.dialogflow.cx.v3beta1.Page getPage(); + /** + * + * + *
+     * Indicates a transition to a [Page][google.cloud.dialogflow.cx.v3beta1.Page]. Only some fields such as name and
+     * displayname will be set.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Page page = 1; + */ + com.google.cloud.dialogflow.cx.v3beta1.PageOrBuilder getPageOrBuilder(); + + /** + * + * + *
+     * Indicates a transition to a [Flow][google.cloud.dialogflow.cx.v3beta1.Flow]. Only some fields such as name and
+     * displayname will be set.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Flow flow = 2; + * + * @return Whether the flow field is set. + */ + boolean hasFlow(); + /** + * + * + *
+     * Indicates a transition to a [Flow][google.cloud.dialogflow.cx.v3beta1.Flow]. Only some fields such as name and
+     * displayname will be set.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Flow flow = 2; + * + * @return The flow. + */ + com.google.cloud.dialogflow.cx.v3beta1.Flow getFlow(); + /** + * + * + *
+     * Indicates a transition to a [Flow][google.cloud.dialogflow.cx.v3beta1.Flow]. Only some fields such as name and
+     * displayname will be set.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Flow flow = 2; + */ + com.google.cloud.dialogflow.cx.v3beta1.FlowOrBuilder getFlowOrBuilder(); + + public com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode.KindCase + getKindCase(); + } + /** + * + * + *
+   * The source or target of a transition.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode} + */ + public static final class TransitionNode extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode) + TransitionNodeOrBuilder { + private static final long serialVersionUID = 0L; + // Use TransitionNode.newBuilder() to construct. + private TransitionNode(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TransitionNode() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TransitionNode(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TransitionNode( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.dialogflow.cx.v3beta1.Page.Builder subBuilder = null; + if (kindCase_ == 1) { + subBuilder = ((com.google.cloud.dialogflow.cx.v3beta1.Page) kind_).toBuilder(); + } + kind_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.Page.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.Page) kind_); + kind_ = subBuilder.buildPartial(); + } + kindCase_ = 1; + break; + } + case 18: + { + com.google.cloud.dialogflow.cx.v3beta1.Flow.Builder subBuilder = null; + if (kindCase_ == 2) { + subBuilder = ((com.google.cloud.dialogflow.cx.v3beta1.Flow) kind_).toBuilder(); + } + kind_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.Flow.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.Flow) kind_); + kind_ = subBuilder.buildPartial(); + } + kindCase_ = 2; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionCoverage_TransitionNode_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionCoverage_TransitionNode_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode.class, + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode.Builder + .class); + } + + private int kindCase_ = 0; + private java.lang.Object kind_; + + public enum KindCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + PAGE(1), + FLOW(2), + KIND_NOT_SET(0); + private final int value; + + private KindCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static KindCase valueOf(int value) { + return forNumber(value); + } + + public static KindCase forNumber(int value) { + switch (value) { + case 1: + return PAGE; + case 2: + return FLOW; + case 0: + return KIND_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public KindCase getKindCase() { + return KindCase.forNumber(kindCase_); + } + + public static final int PAGE_FIELD_NUMBER = 1; + /** + * + * + *
+     * Indicates a transition to a [Page][google.cloud.dialogflow.cx.v3beta1.Page]. Only some fields such as name and
+     * displayname will be set.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Page page = 1; + * + * @return Whether the page field is set. + */ + @java.lang.Override + public boolean hasPage() { + return kindCase_ == 1; + } + /** + * + * + *
+     * Indicates a transition to a [Page][google.cloud.dialogflow.cx.v3beta1.Page]. Only some fields such as name and
+     * displayname will be set.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Page page = 1; + * + * @return The page. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Page getPage() { + if (kindCase_ == 1) { + return (com.google.cloud.dialogflow.cx.v3beta1.Page) kind_; + } + return com.google.cloud.dialogflow.cx.v3beta1.Page.getDefaultInstance(); + } + /** + * + * + *
+     * Indicates a transition to a [Page][google.cloud.dialogflow.cx.v3beta1.Page]. Only some fields such as name and
+     * displayname will be set.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Page page = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.PageOrBuilder getPageOrBuilder() { + if (kindCase_ == 1) { + return (com.google.cloud.dialogflow.cx.v3beta1.Page) kind_; + } + return com.google.cloud.dialogflow.cx.v3beta1.Page.getDefaultInstance(); + } + + public static final int FLOW_FIELD_NUMBER = 2; + /** + * + * + *
+     * Indicates a transition to a [Flow][google.cloud.dialogflow.cx.v3beta1.Flow]. Only some fields such as name and
+     * displayname will be set.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Flow flow = 2; + * + * @return Whether the flow field is set. + */ + @java.lang.Override + public boolean hasFlow() { + return kindCase_ == 2; + } + /** + * + * + *
+     * Indicates a transition to a [Flow][google.cloud.dialogflow.cx.v3beta1.Flow]. Only some fields such as name and
+     * displayname will be set.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Flow flow = 2; + * + * @return The flow. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Flow getFlow() { + if (kindCase_ == 2) { + return (com.google.cloud.dialogflow.cx.v3beta1.Flow) kind_; + } + return com.google.cloud.dialogflow.cx.v3beta1.Flow.getDefaultInstance(); + } + /** + * + * + *
+     * Indicates a transition to a [Flow][google.cloud.dialogflow.cx.v3beta1.Flow]. Only some fields such as name and
+     * displayname will be set.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Flow flow = 2; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.FlowOrBuilder getFlowOrBuilder() { + if (kindCase_ == 2) { + return (com.google.cloud.dialogflow.cx.v3beta1.Flow) kind_; + } + return com.google.cloud.dialogflow.cx.v3beta1.Flow.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (kindCase_ == 1) { + output.writeMessage(1, (com.google.cloud.dialogflow.cx.v3beta1.Page) kind_); + } + if (kindCase_ == 2) { + output.writeMessage(2, (com.google.cloud.dialogflow.cx.v3beta1.Flow) kind_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (kindCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.dialogflow.cx.v3beta1.Page) kind_); + } + if (kindCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.dialogflow.cx.v3beta1.Flow) kind_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode other = + (com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode) obj; + + if (!getKindCase().equals(other.getKindCase())) return false; + switch (kindCase_) { + case 1: + if (!getPage().equals(other.getPage())) return false; + break; + case 2: + if (!getFlow().equals(other.getFlow())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (kindCase_) { + case 1: + hash = (37 * hash) + PAGE_FIELD_NUMBER; + hash = (53 * hash) + getPage().hashCode(); + break; + case 2: + hash = (37 * hash) + FLOW_FIELD_NUMBER; + hash = (53 * hash) + getFlow().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * The source or target of a transition.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode) + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNodeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionCoverage_TransitionNode_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionCoverage_TransitionNode_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode.class, + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode.Builder + .class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + kindCase_ = 0; + kind_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionCoverage_TransitionNode_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode build() { + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode + buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode result = + new com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode(this); + if (kindCase_ == 1) { + if (pageBuilder_ == null) { + result.kind_ = kind_; + } else { + result.kind_ = pageBuilder_.build(); + } + } + if (kindCase_ == 2) { + if (flowBuilder_ == null) { + result.kind_ = kind_; + } else { + result.kind_ = flowBuilder_.build(); + } + } + result.kindCase_ = kindCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode + .getDefaultInstance()) return this; + switch (other.getKindCase()) { + case PAGE: + { + mergePage(other.getPage()); + break; + } + case FLOW: + { + mergeFlow(other.getFlow()); + break; + } + case KIND_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int kindCase_ = 0; + private java.lang.Object kind_; + + public KindCase getKindCase() { + return KindCase.forNumber(kindCase_); + } + + public Builder clearKind() { + kindCase_ = 0; + kind_ = null; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Page, + com.google.cloud.dialogflow.cx.v3beta1.Page.Builder, + com.google.cloud.dialogflow.cx.v3beta1.PageOrBuilder> + pageBuilder_; + /** + * + * + *
+       * Indicates a transition to a [Page][google.cloud.dialogflow.cx.v3beta1.Page]. Only some fields such as name and
+       * displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Page page = 1; + * + * @return Whether the page field is set. + */ + @java.lang.Override + public boolean hasPage() { + return kindCase_ == 1; + } + /** + * + * + *
+       * Indicates a transition to a [Page][google.cloud.dialogflow.cx.v3beta1.Page]. Only some fields such as name and
+       * displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Page page = 1; + * + * @return The page. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Page getPage() { + if (pageBuilder_ == null) { + if (kindCase_ == 1) { + return (com.google.cloud.dialogflow.cx.v3beta1.Page) kind_; + } + return com.google.cloud.dialogflow.cx.v3beta1.Page.getDefaultInstance(); + } else { + if (kindCase_ == 1) { + return pageBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3beta1.Page.getDefaultInstance(); + } + } + /** + * + * + *
+       * Indicates a transition to a [Page][google.cloud.dialogflow.cx.v3beta1.Page]. Only some fields such as name and
+       * displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Page page = 1; + */ + public Builder setPage(com.google.cloud.dialogflow.cx.v3beta1.Page value) { + if (pageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + pageBuilder_.setMessage(value); + } + kindCase_ = 1; + return this; + } + /** + * + * + *
+       * Indicates a transition to a [Page][google.cloud.dialogflow.cx.v3beta1.Page]. Only some fields such as name and
+       * displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Page page = 1; + */ + public Builder setPage(com.google.cloud.dialogflow.cx.v3beta1.Page.Builder builderForValue) { + if (pageBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + pageBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 1; + return this; + } + /** + * + * + *
+       * Indicates a transition to a [Page][google.cloud.dialogflow.cx.v3beta1.Page]. Only some fields such as name and
+       * displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Page page = 1; + */ + public Builder mergePage(com.google.cloud.dialogflow.cx.v3beta1.Page value) { + if (pageBuilder_ == null) { + if (kindCase_ == 1 + && kind_ != com.google.cloud.dialogflow.cx.v3beta1.Page.getDefaultInstance()) { + kind_ = + com.google.cloud.dialogflow.cx.v3beta1.Page.newBuilder( + (com.google.cloud.dialogflow.cx.v3beta1.Page) kind_) + .mergeFrom(value) + .buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 1) { + pageBuilder_.mergeFrom(value); + } + pageBuilder_.setMessage(value); + } + kindCase_ = 1; + return this; + } + /** + * + * + *
+       * Indicates a transition to a [Page][google.cloud.dialogflow.cx.v3beta1.Page]. Only some fields such as name and
+       * displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Page page = 1; + */ + public Builder clearPage() { + if (pageBuilder_ == null) { + if (kindCase_ == 1) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 1) { + kindCase_ = 0; + kind_ = null; + } + pageBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Indicates a transition to a [Page][google.cloud.dialogflow.cx.v3beta1.Page]. Only some fields such as name and
+       * displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Page page = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.Page.Builder getPageBuilder() { + return getPageFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Indicates a transition to a [Page][google.cloud.dialogflow.cx.v3beta1.Page]. Only some fields such as name and
+       * displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Page page = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.PageOrBuilder getPageOrBuilder() { + if ((kindCase_ == 1) && (pageBuilder_ != null)) { + return pageBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 1) { + return (com.google.cloud.dialogflow.cx.v3beta1.Page) kind_; + } + return com.google.cloud.dialogflow.cx.v3beta1.Page.getDefaultInstance(); + } + } + /** + * + * + *
+       * Indicates a transition to a [Page][google.cloud.dialogflow.cx.v3beta1.Page]. Only some fields such as name and
+       * displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Page page = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Page, + com.google.cloud.dialogflow.cx.v3beta1.Page.Builder, + com.google.cloud.dialogflow.cx.v3beta1.PageOrBuilder> + getPageFieldBuilder() { + if (pageBuilder_ == null) { + if (!(kindCase_ == 1)) { + kind_ = com.google.cloud.dialogflow.cx.v3beta1.Page.getDefaultInstance(); + } + pageBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Page, + com.google.cloud.dialogflow.cx.v3beta1.Page.Builder, + com.google.cloud.dialogflow.cx.v3beta1.PageOrBuilder>( + (com.google.cloud.dialogflow.cx.v3beta1.Page) kind_, + getParentForChildren(), + isClean()); + kind_ = null; + } + kindCase_ = 1; + onChanged(); + ; + return pageBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Flow, + com.google.cloud.dialogflow.cx.v3beta1.Flow.Builder, + com.google.cloud.dialogflow.cx.v3beta1.FlowOrBuilder> + flowBuilder_; + /** + * + * + *
+       * Indicates a transition to a [Flow][google.cloud.dialogflow.cx.v3beta1.Flow]. Only some fields such as name and
+       * displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Flow flow = 2; + * + * @return Whether the flow field is set. + */ + @java.lang.Override + public boolean hasFlow() { + return kindCase_ == 2; + } + /** + * + * + *
+       * Indicates a transition to a [Flow][google.cloud.dialogflow.cx.v3beta1.Flow]. Only some fields such as name and
+       * displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Flow flow = 2; + * + * @return The flow. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Flow getFlow() { + if (flowBuilder_ == null) { + if (kindCase_ == 2) { + return (com.google.cloud.dialogflow.cx.v3beta1.Flow) kind_; + } + return com.google.cloud.dialogflow.cx.v3beta1.Flow.getDefaultInstance(); + } else { + if (kindCase_ == 2) { + return flowBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3beta1.Flow.getDefaultInstance(); + } + } + /** + * + * + *
+       * Indicates a transition to a [Flow][google.cloud.dialogflow.cx.v3beta1.Flow]. Only some fields such as name and
+       * displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Flow flow = 2; + */ + public Builder setFlow(com.google.cloud.dialogflow.cx.v3beta1.Flow value) { + if (flowBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + flowBuilder_.setMessage(value); + } + kindCase_ = 2; + return this; + } + /** + * + * + *
+       * Indicates a transition to a [Flow][google.cloud.dialogflow.cx.v3beta1.Flow]. Only some fields such as name and
+       * displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Flow flow = 2; + */ + public Builder setFlow(com.google.cloud.dialogflow.cx.v3beta1.Flow.Builder builderForValue) { + if (flowBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + flowBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 2; + return this; + } + /** + * + * + *
+       * Indicates a transition to a [Flow][google.cloud.dialogflow.cx.v3beta1.Flow]. Only some fields such as name and
+       * displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Flow flow = 2; + */ + public Builder mergeFlow(com.google.cloud.dialogflow.cx.v3beta1.Flow value) { + if (flowBuilder_ == null) { + if (kindCase_ == 2 + && kind_ != com.google.cloud.dialogflow.cx.v3beta1.Flow.getDefaultInstance()) { + kind_ = + com.google.cloud.dialogflow.cx.v3beta1.Flow.newBuilder( + (com.google.cloud.dialogflow.cx.v3beta1.Flow) kind_) + .mergeFrom(value) + .buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 2) { + flowBuilder_.mergeFrom(value); + } + flowBuilder_.setMessage(value); + } + kindCase_ = 2; + return this; + } + /** + * + * + *
+       * Indicates a transition to a [Flow][google.cloud.dialogflow.cx.v3beta1.Flow]. Only some fields such as name and
+       * displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Flow flow = 2; + */ + public Builder clearFlow() { + if (flowBuilder_ == null) { + if (kindCase_ == 2) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 2) { + kindCase_ = 0; + kind_ = null; + } + flowBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Indicates a transition to a [Flow][google.cloud.dialogflow.cx.v3beta1.Flow]. Only some fields such as name and
+       * displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Flow flow = 2; + */ + public com.google.cloud.dialogflow.cx.v3beta1.Flow.Builder getFlowBuilder() { + return getFlowFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Indicates a transition to a [Flow][google.cloud.dialogflow.cx.v3beta1.Flow]. Only some fields such as name and
+       * displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Flow flow = 2; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.FlowOrBuilder getFlowOrBuilder() { + if ((kindCase_ == 2) && (flowBuilder_ != null)) { + return flowBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 2) { + return (com.google.cloud.dialogflow.cx.v3beta1.Flow) kind_; + } + return com.google.cloud.dialogflow.cx.v3beta1.Flow.getDefaultInstance(); + } + } + /** + * + * + *
+       * Indicates a transition to a [Flow][google.cloud.dialogflow.cx.v3beta1.Flow]. Only some fields such as name and
+       * displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Flow flow = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Flow, + com.google.cloud.dialogflow.cx.v3beta1.Flow.Builder, + com.google.cloud.dialogflow.cx.v3beta1.FlowOrBuilder> + getFlowFieldBuilder() { + if (flowBuilder_ == null) { + if (!(kindCase_ == 2)) { + kind_ = com.google.cloud.dialogflow.cx.v3beta1.Flow.getDefaultInstance(); + } + flowBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Flow, + com.google.cloud.dialogflow.cx.v3beta1.Flow.Builder, + com.google.cloud.dialogflow.cx.v3beta1.FlowOrBuilder>( + (com.google.cloud.dialogflow.cx.v3beta1.Flow) kind_, + getParentForChildren(), + isClean()); + kind_ = null; + } + kindCase_ = 2; + onChanged(); + ; + return flowBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode) + private static final com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TransitionNode parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TransitionNode(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface TransitionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The start node of a transition.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode source = 1; + * + * + * @return Whether the source field is set. + */ + boolean hasSource(); + /** + * + * + *
+     * The start node of a transition.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode source = 1; + * + * + * @return The source. + */ + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode getSource(); + /** + * + * + *
+     * The start node of a transition.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode source = 1; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNodeOrBuilder + getSourceOrBuilder(); + + /** + * + * + *
+     * The index of a transition in the transition list. Starting from 0.
+     * 
+ * + * int32 index = 4; + * + * @return The index. + */ + int getIndex(); + + /** + * + * + *
+     * The end node of a transition.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode target = 2; + * + * + * @return Whether the target field is set. + */ + boolean hasTarget(); + /** + * + * + *
+     * The end node of a transition.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode target = 2; + * + * + * @return The target. + */ + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode getTarget(); + /** + * + * + *
+     * The end node of a transition.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode target = 2; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNodeOrBuilder + getTargetOrBuilder(); + + /** + * + * + *
+     * Whether or not the transition is covered by at least one of the
+     * agent's test cases.
+     * 
+ * + * bool covered = 3; + * + * @return The covered. + */ + boolean getCovered(); + + /** + * + * + *
+     * Intent route or condition route.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_route = 5; + * + * @return Whether the transitionRoute field is set. + */ + boolean hasTransitionRoute(); + /** + * + * + *
+     * Intent route or condition route.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_route = 5; + * + * @return The transitionRoute. + */ + com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute getTransitionRoute(); + /** + * + * + *
+     * Intent route or condition route.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_route = 5; + */ + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteOrBuilder getTransitionRouteOrBuilder(); + + /** + * + * + *
+     * Event handler.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.EventHandler event_handler = 6; + * + * @return Whether the eventHandler field is set. + */ + boolean hasEventHandler(); + /** + * + * + *
+     * Event handler.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.EventHandler event_handler = 6; + * + * @return The eventHandler. + */ + com.google.cloud.dialogflow.cx.v3beta1.EventHandler getEventHandler(); + /** + * + * + *
+     * Event handler.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.EventHandler event_handler = 6; + */ + com.google.cloud.dialogflow.cx.v3beta1.EventHandlerOrBuilder getEventHandlerOrBuilder(); + + public com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition.DetailCase + getDetailCase(); + } + /** + * + * + *
+   * A transition in the agent's graph.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition} + */ + public static final class Transition extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition) + TransitionOrBuilder { + private static final long serialVersionUID = 0L; + // Use Transition.newBuilder() to construct. + private Transition(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Transition() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Transition(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Transition( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode.Builder + subBuilder = null; + if (source_ != null) { + subBuilder = source_.toBuilder(); + } + source_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(source_); + source_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode.Builder + subBuilder = null; + if (target_ != null) { + subBuilder = target_.toBuilder(); + } + target_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(target_); + target_ = subBuilder.buildPartial(); + } + + break; + } + case 24: + { + covered_ = input.readBool(); + break; + } + case 32: + { + index_ = input.readInt32(); + break; + } + case 42: + { + com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.Builder subBuilder = null; + if (detailCase_ == 5) { + subBuilder = + ((com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute) detail_) + .toBuilder(); + } + detail_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute) detail_); + detail_ = subBuilder.buildPartial(); + } + detailCase_ = 5; + break; + } + case 50: + { + com.google.cloud.dialogflow.cx.v3beta1.EventHandler.Builder subBuilder = null; + if (detailCase_ == 6) { + subBuilder = + ((com.google.cloud.dialogflow.cx.v3beta1.EventHandler) detail_).toBuilder(); + } + detail_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.EventHandler.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.dialogflow.cx.v3beta1.EventHandler) detail_); + detail_ = subBuilder.buildPartial(); + } + detailCase_ = 6; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionCoverage_Transition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionCoverage_Transition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition.class, + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition.Builder.class); + } + + private int detailCase_ = 0; + private java.lang.Object detail_; + + public enum DetailCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + TRANSITION_ROUTE(5), + EVENT_HANDLER(6), + DETAIL_NOT_SET(0); + private final int value; + + private DetailCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DetailCase valueOf(int value) { + return forNumber(value); + } + + public static DetailCase forNumber(int value) { + switch (value) { + case 5: + return TRANSITION_ROUTE; + case 6: + return EVENT_HANDLER; + case 0: + return DETAIL_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public DetailCase getDetailCase() { + return DetailCase.forNumber(detailCase_); + } + + public static final int SOURCE_FIELD_NUMBER = 1; + private com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode source_; + /** + * + * + *
+     * The start node of a transition.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode source = 1; + * + * + * @return Whether the source field is set. + */ + @java.lang.Override + public boolean hasSource() { + return source_ != null; + } + /** + * + * + *
+     * The start node of a transition.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode source = 1; + * + * + * @return The source. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode getSource() { + return source_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode + .getDefaultInstance() + : source_; + } + /** + * + * + *
+     * The start node of a transition.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode source = 1; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNodeOrBuilder + getSourceOrBuilder() { + return getSource(); + } + + public static final int INDEX_FIELD_NUMBER = 4; + private int index_; + /** + * + * + *
+     * The index of a transition in the transition list. Starting from 0.
+     * 
+ * + * int32 index = 4; + * + * @return The index. + */ + @java.lang.Override + public int getIndex() { + return index_; + } + + public static final int TARGET_FIELD_NUMBER = 2; + private com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode target_; + /** + * + * + *
+     * The end node of a transition.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode target = 2; + * + * + * @return Whether the target field is set. + */ + @java.lang.Override + public boolean hasTarget() { + return target_ != null; + } + /** + * + * + *
+     * The end node of a transition.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode target = 2; + * + * + * @return The target. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode getTarget() { + return target_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode + .getDefaultInstance() + : target_; + } + /** + * + * + *
+     * The end node of a transition.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode target = 2; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNodeOrBuilder + getTargetOrBuilder() { + return getTarget(); + } + + public static final int COVERED_FIELD_NUMBER = 3; + private boolean covered_; + /** + * + * + *
+     * Whether or not the transition is covered by at least one of the
+     * agent's test cases.
+     * 
+ * + * bool covered = 3; + * + * @return The covered. + */ + @java.lang.Override + public boolean getCovered() { + return covered_; + } + + public static final int TRANSITION_ROUTE_FIELD_NUMBER = 5; + /** + * + * + *
+     * Intent route or condition route.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_route = 5; + * + * @return Whether the transitionRoute field is set. + */ + @java.lang.Override + public boolean hasTransitionRoute() { + return detailCase_ == 5; + } + /** + * + * + *
+     * Intent route or condition route.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_route = 5; + * + * @return The transitionRoute. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute getTransitionRoute() { + if (detailCase_ == 5) { + return (com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute) detail_; + } + return com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.getDefaultInstance(); + } + /** + * + * + *
+     * Intent route or condition route.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_route = 5; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteOrBuilder + getTransitionRouteOrBuilder() { + if (detailCase_ == 5) { + return (com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute) detail_; + } + return com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.getDefaultInstance(); + } + + public static final int EVENT_HANDLER_FIELD_NUMBER = 6; + /** + * + * + *
+     * Event handler.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.EventHandler event_handler = 6; + * + * @return Whether the eventHandler field is set. + */ + @java.lang.Override + public boolean hasEventHandler() { + return detailCase_ == 6; + } + /** + * + * + *
+     * Event handler.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.EventHandler event_handler = 6; + * + * @return The eventHandler. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.EventHandler getEventHandler() { + if (detailCase_ == 6) { + return (com.google.cloud.dialogflow.cx.v3beta1.EventHandler) detail_; + } + return com.google.cloud.dialogflow.cx.v3beta1.EventHandler.getDefaultInstance(); + } + /** + * + * + *
+     * Event handler.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.EventHandler event_handler = 6; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.EventHandlerOrBuilder getEventHandlerOrBuilder() { + if (detailCase_ == 6) { + return (com.google.cloud.dialogflow.cx.v3beta1.EventHandler) detail_; + } + return com.google.cloud.dialogflow.cx.v3beta1.EventHandler.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (source_ != null) { + output.writeMessage(1, getSource()); + } + if (target_ != null) { + output.writeMessage(2, getTarget()); + } + if (covered_ != false) { + output.writeBool(3, covered_); + } + if (index_ != 0) { + output.writeInt32(4, index_); + } + if (detailCase_ == 5) { + output.writeMessage(5, (com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute) detail_); + } + if (detailCase_ == 6) { + output.writeMessage(6, (com.google.cloud.dialogflow.cx.v3beta1.EventHandler) detail_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (source_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getSource()); + } + if (target_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTarget()); + } + if (covered_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, covered_); + } + if (index_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, index_); + } + if (detailCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute) detail_); + } + if (detailCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.cloud.dialogflow.cx.v3beta1.EventHandler) detail_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition other = + (com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition) obj; + + if (hasSource() != other.hasSource()) return false; + if (hasSource()) { + if (!getSource().equals(other.getSource())) return false; + } + if (getIndex() != other.getIndex()) return false; + if (hasTarget() != other.hasTarget()) return false; + if (hasTarget()) { + if (!getTarget().equals(other.getTarget())) return false; + } + if (getCovered() != other.getCovered()) return false; + if (!getDetailCase().equals(other.getDetailCase())) return false; + switch (detailCase_) { + case 5: + if (!getTransitionRoute().equals(other.getTransitionRoute())) return false; + break; + case 6: + if (!getEventHandler().equals(other.getEventHandler())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasSource()) { + hash = (37 * hash) + SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getSource().hashCode(); + } + hash = (37 * hash) + INDEX_FIELD_NUMBER; + hash = (53 * hash) + getIndex(); + if (hasTarget()) { + hash = (37 * hash) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + getTarget().hashCode(); + } + hash = (37 * hash) + COVERED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getCovered()); + switch (detailCase_) { + case 5: + hash = (37 * hash) + TRANSITION_ROUTE_FIELD_NUMBER; + hash = (53 * hash) + getTransitionRoute().hashCode(); + break; + case 6: + hash = (37 * hash) + EVENT_HANDLER_FIELD_NUMBER; + hash = (53 * hash) + getEventHandler().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * A transition in the agent's graph.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition) + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionCoverage_Transition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionCoverage_Transition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition.class, + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition.Builder.class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (sourceBuilder_ == null) { + source_ = null; + } else { + source_ = null; + sourceBuilder_ = null; + } + index_ = 0; + + if (targetBuilder_ == null) { + target_ = null; + } else { + target_ = null; + targetBuilder_ = null; + } + covered_ = false; + + detailCase_ = 0; + detail_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionCoverage_Transition_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition build() { + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition result = + new com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition(this); + if (sourceBuilder_ == null) { + result.source_ = source_; + } else { + result.source_ = sourceBuilder_.build(); + } + result.index_ = index_; + if (targetBuilder_ == null) { + result.target_ = target_; + } else { + result.target_ = targetBuilder_.build(); + } + result.covered_ = covered_; + if (detailCase_ == 5) { + if (transitionRouteBuilder_ == null) { + result.detail_ = detail_; + } else { + result.detail_ = transitionRouteBuilder_.build(); + } + } + if (detailCase_ == 6) { + if (eventHandlerBuilder_ == null) { + result.detail_ = detail_; + } else { + result.detail_ = eventHandlerBuilder_.build(); + } + } + result.detailCase_ = detailCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition + .getDefaultInstance()) return this; + if (other.hasSource()) { + mergeSource(other.getSource()); + } + if (other.getIndex() != 0) { + setIndex(other.getIndex()); + } + if (other.hasTarget()) { + mergeTarget(other.getTarget()); + } + if (other.getCovered() != false) { + setCovered(other.getCovered()); + } + switch (other.getDetailCase()) { + case TRANSITION_ROUTE: + { + mergeTransitionRoute(other.getTransitionRoute()); + break; + } + case EVENT_HANDLER: + { + mergeEventHandler(other.getEventHandler()); + break; + } + case DETAIL_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int detailCase_ = 0; + private java.lang.Object detail_; + + public DetailCase getDetailCase() { + return DetailCase.forNumber(detailCase_); + } + + public Builder clearDetail() { + detailCase_ = 0; + detail_ = null; + onChanged(); + return this; + } + + private com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode source_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode, + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNodeOrBuilder> + sourceBuilder_; + /** + * + * + *
+       * The start node of a transition.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode source = 1; + * + * + * @return Whether the source field is set. + */ + public boolean hasSource() { + return sourceBuilder_ != null || source_ != null; + } + /** + * + * + *
+       * The start node of a transition.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode source = 1; + * + * + * @return The source. + */ + public com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode getSource() { + if (sourceBuilder_ == null) { + return source_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode + .getDefaultInstance() + : source_; + } else { + return sourceBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The start node of a transition.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode source = 1; + * + */ + public Builder setSource( + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode value) { + if (sourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + sourceBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * The start node of a transition.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode source = 1; + * + */ + public Builder setSource( + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode.Builder + builderForValue) { + if (sourceBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + sourceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * The start node of a transition.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode source = 1; + * + */ + public Builder mergeSource( + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode value) { + if (sourceBuilder_ == null) { + if (source_ != null) { + source_ = + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode.newBuilder( + source_) + .mergeFrom(value) + .buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + sourceBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * The start node of a transition.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode source = 1; + * + */ + public Builder clearSource() { + if (sourceBuilder_ == null) { + source_ = null; + onChanged(); + } else { + source_ = null; + sourceBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * The start node of a transition.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode source = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode.Builder + getSourceBuilder() { + + onChanged(); + return getSourceFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The start node of a transition.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode source = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNodeOrBuilder + getSourceOrBuilder() { + if (sourceBuilder_ != null) { + return sourceBuilder_.getMessageOrBuilder(); + } else { + return source_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode + .getDefaultInstance() + : source_; + } + } + /** + * + * + *
+       * The start node of a transition.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode source = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode, + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNodeOrBuilder> + getSourceFieldBuilder() { + if (sourceBuilder_ == null) { + sourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode, + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage + .TransitionNodeOrBuilder>(getSource(), getParentForChildren(), isClean()); + source_ = null; + } + return sourceBuilder_; + } + + private int index_; + /** + * + * + *
+       * The index of a transition in the transition list. Starting from 0.
+       * 
+ * + * int32 index = 4; + * + * @return The index. + */ + @java.lang.Override + public int getIndex() { + return index_; + } + /** + * + * + *
+       * The index of a transition in the transition list. Starting from 0.
+       * 
+ * + * int32 index = 4; + * + * @param value The index to set. + * @return This builder for chaining. + */ + public Builder setIndex(int value) { + + index_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The index of a transition in the transition list. Starting from 0.
+       * 
+ * + * int32 index = 4; + * + * @return This builder for chaining. + */ + public Builder clearIndex() { + + index_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode target_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode, + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNodeOrBuilder> + targetBuilder_; + /** + * + * + *
+       * The end node of a transition.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode target = 2; + * + * + * @return Whether the target field is set. + */ + public boolean hasTarget() { + return targetBuilder_ != null || target_ != null; + } + /** + * + * + *
+       * The end node of a transition.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode target = 2; + * + * + * @return The target. + */ + public com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode getTarget() { + if (targetBuilder_ == null) { + return target_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode + .getDefaultInstance() + : target_; + } else { + return targetBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The end node of a transition.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode target = 2; + * + */ + public Builder setTarget( + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode value) { + if (targetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + target_ = value; + onChanged(); + } else { + targetBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * The end node of a transition.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode target = 2; + * + */ + public Builder setTarget( + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode.Builder + builderForValue) { + if (targetBuilder_ == null) { + target_ = builderForValue.build(); + onChanged(); + } else { + targetBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * The end node of a transition.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode target = 2; + * + */ + public Builder mergeTarget( + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode value) { + if (targetBuilder_ == null) { + if (target_ != null) { + target_ = + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode.newBuilder( + target_) + .mergeFrom(value) + .buildPartial(); + } else { + target_ = value; + } + onChanged(); + } else { + targetBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * The end node of a transition.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode target = 2; + * + */ + public Builder clearTarget() { + if (targetBuilder_ == null) { + target_ = null; + onChanged(); + } else { + target_ = null; + targetBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * The end node of a transition.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode target = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode.Builder + getTargetBuilder() { + + onChanged(); + return getTargetFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The end node of a transition.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode target = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNodeOrBuilder + getTargetOrBuilder() { + if (targetBuilder_ != null) { + return targetBuilder_.getMessageOrBuilder(); + } else { + return target_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode + .getDefaultInstance() + : target_; + } + } + /** + * + * + *
+       * The end node of a transition.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode target = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode, + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNodeOrBuilder> + getTargetFieldBuilder() { + if (targetBuilder_ == null) { + targetBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode, + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage + .TransitionNodeOrBuilder>(getTarget(), getParentForChildren(), isClean()); + target_ = null; + } + return targetBuilder_; + } + + private boolean covered_; + /** + * + * + *
+       * Whether or not the transition is covered by at least one of the
+       * agent's test cases.
+       * 
+ * + * bool covered = 3; + * + * @return The covered. + */ + @java.lang.Override + public boolean getCovered() { + return covered_; + } + /** + * + * + *
+       * Whether or not the transition is covered by at least one of the
+       * agent's test cases.
+       * 
+ * + * bool covered = 3; + * + * @param value The covered to set. + * @return This builder for chaining. + */ + public Builder setCovered(boolean value) { + + covered_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Whether or not the transition is covered by at least one of the
+       * agent's test cases.
+       * 
+ * + * bool covered = 3; + * + * @return This builder for chaining. + */ + public Builder clearCovered() { + + covered_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute, + com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteOrBuilder> + transitionRouteBuilder_; + /** + * + * + *
+       * Intent route or condition route.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_route = 5; + * + * @return Whether the transitionRoute field is set. + */ + @java.lang.Override + public boolean hasTransitionRoute() { + return detailCase_ == 5; + } + /** + * + * + *
+       * Intent route or condition route.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_route = 5; + * + * @return The transitionRoute. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute getTransitionRoute() { + if (transitionRouteBuilder_ == null) { + if (detailCase_ == 5) { + return (com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute) detail_; + } + return com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.getDefaultInstance(); + } else { + if (detailCase_ == 5) { + return transitionRouteBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.getDefaultInstance(); + } + } + /** + * + * + *
+       * Intent route or condition route.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_route = 5; + */ + public Builder setTransitionRoute( + com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute value) { + if (transitionRouteBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + detail_ = value; + onChanged(); + } else { + transitionRouteBuilder_.setMessage(value); + } + detailCase_ = 5; + return this; + } + /** + * + * + *
+       * Intent route or condition route.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_route = 5; + */ + public Builder setTransitionRoute( + com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.Builder builderForValue) { + if (transitionRouteBuilder_ == null) { + detail_ = builderForValue.build(); + onChanged(); + } else { + transitionRouteBuilder_.setMessage(builderForValue.build()); + } + detailCase_ = 5; + return this; + } + /** + * + * + *
+       * Intent route or condition route.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_route = 5; + */ + public Builder mergeTransitionRoute( + com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute value) { + if (transitionRouteBuilder_ == null) { + if (detailCase_ == 5 + && detail_ + != com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.getDefaultInstance()) { + detail_ = + com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.newBuilder( + (com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute) detail_) + .mergeFrom(value) + .buildPartial(); + } else { + detail_ = value; + } + onChanged(); + } else { + if (detailCase_ == 5) { + transitionRouteBuilder_.mergeFrom(value); + } + transitionRouteBuilder_.setMessage(value); + } + detailCase_ = 5; + return this; + } + /** + * + * + *
+       * Intent route or condition route.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_route = 5; + */ + public Builder clearTransitionRoute() { + if (transitionRouteBuilder_ == null) { + if (detailCase_ == 5) { + detailCase_ = 0; + detail_ = null; + onChanged(); + } + } else { + if (detailCase_ == 5) { + detailCase_ = 0; + detail_ = null; + } + transitionRouteBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Intent route or condition route.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_route = 5; + */ + public com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.Builder + getTransitionRouteBuilder() { + return getTransitionRouteFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Intent route or condition route.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_route = 5; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteOrBuilder + getTransitionRouteOrBuilder() { + if ((detailCase_ == 5) && (transitionRouteBuilder_ != null)) { + return transitionRouteBuilder_.getMessageOrBuilder(); + } else { + if (detailCase_ == 5) { + return (com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute) detail_; + } + return com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.getDefaultInstance(); + } + } + /** + * + * + *
+       * Intent route or condition route.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_route = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute, + com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteOrBuilder> + getTransitionRouteFieldBuilder() { + if (transitionRouteBuilder_ == null) { + if (!(detailCase_ == 5)) { + detail_ = com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.getDefaultInstance(); + } + transitionRouteBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute, + com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteOrBuilder>( + (com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute) detail_, + getParentForChildren(), + isClean()); + detail_ = null; + } + detailCase_ = 5; + onChanged(); + ; + return transitionRouteBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.EventHandler, + com.google.cloud.dialogflow.cx.v3beta1.EventHandler.Builder, + com.google.cloud.dialogflow.cx.v3beta1.EventHandlerOrBuilder> + eventHandlerBuilder_; + /** + * + * + *
+       * Event handler.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.EventHandler event_handler = 6; + * + * @return Whether the eventHandler field is set. + */ + @java.lang.Override + public boolean hasEventHandler() { + return detailCase_ == 6; + } + /** + * + * + *
+       * Event handler.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.EventHandler event_handler = 6; + * + * @return The eventHandler. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.EventHandler getEventHandler() { + if (eventHandlerBuilder_ == null) { + if (detailCase_ == 6) { + return (com.google.cloud.dialogflow.cx.v3beta1.EventHandler) detail_; + } + return com.google.cloud.dialogflow.cx.v3beta1.EventHandler.getDefaultInstance(); + } else { + if (detailCase_ == 6) { + return eventHandlerBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3beta1.EventHandler.getDefaultInstance(); + } + } + /** + * + * + *
+       * Event handler.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.EventHandler event_handler = 6; + */ + public Builder setEventHandler(com.google.cloud.dialogflow.cx.v3beta1.EventHandler value) { + if (eventHandlerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + detail_ = value; + onChanged(); + } else { + eventHandlerBuilder_.setMessage(value); + } + detailCase_ = 6; + return this; + } + /** + * + * + *
+       * Event handler.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.EventHandler event_handler = 6; + */ + public Builder setEventHandler( + com.google.cloud.dialogflow.cx.v3beta1.EventHandler.Builder builderForValue) { + if (eventHandlerBuilder_ == null) { + detail_ = builderForValue.build(); + onChanged(); + } else { + eventHandlerBuilder_.setMessage(builderForValue.build()); + } + detailCase_ = 6; + return this; + } + /** + * + * + *
+       * Event handler.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.EventHandler event_handler = 6; + */ + public Builder mergeEventHandler(com.google.cloud.dialogflow.cx.v3beta1.EventHandler value) { + if (eventHandlerBuilder_ == null) { + if (detailCase_ == 6 + && detail_ + != com.google.cloud.dialogflow.cx.v3beta1.EventHandler.getDefaultInstance()) { + detail_ = + com.google.cloud.dialogflow.cx.v3beta1.EventHandler.newBuilder( + (com.google.cloud.dialogflow.cx.v3beta1.EventHandler) detail_) + .mergeFrom(value) + .buildPartial(); + } else { + detail_ = value; + } + onChanged(); + } else { + if (detailCase_ == 6) { + eventHandlerBuilder_.mergeFrom(value); + } + eventHandlerBuilder_.setMessage(value); + } + detailCase_ = 6; + return this; + } + /** + * + * + *
+       * Event handler.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.EventHandler event_handler = 6; + */ + public Builder clearEventHandler() { + if (eventHandlerBuilder_ == null) { + if (detailCase_ == 6) { + detailCase_ = 0; + detail_ = null; + onChanged(); + } + } else { + if (detailCase_ == 6) { + detailCase_ = 0; + detail_ = null; + } + eventHandlerBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Event handler.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.EventHandler event_handler = 6; + */ + public com.google.cloud.dialogflow.cx.v3beta1.EventHandler.Builder getEventHandlerBuilder() { + return getEventHandlerFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Event handler.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.EventHandler event_handler = 6; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.EventHandlerOrBuilder + getEventHandlerOrBuilder() { + if ((detailCase_ == 6) && (eventHandlerBuilder_ != null)) { + return eventHandlerBuilder_.getMessageOrBuilder(); + } else { + if (detailCase_ == 6) { + return (com.google.cloud.dialogflow.cx.v3beta1.EventHandler) detail_; + } + return com.google.cloud.dialogflow.cx.v3beta1.EventHandler.getDefaultInstance(); + } + } + /** + * + * + *
+       * Event handler.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.EventHandler event_handler = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.EventHandler, + com.google.cloud.dialogflow.cx.v3beta1.EventHandler.Builder, + com.google.cloud.dialogflow.cx.v3beta1.EventHandlerOrBuilder> + getEventHandlerFieldBuilder() { + if (eventHandlerBuilder_ == null) { + if (!(detailCase_ == 6)) { + detail_ = com.google.cloud.dialogflow.cx.v3beta1.EventHandler.getDefaultInstance(); + } + eventHandlerBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.EventHandler, + com.google.cloud.dialogflow.cx.v3beta1.EventHandler.Builder, + com.google.cloud.dialogflow.cx.v3beta1.EventHandlerOrBuilder>( + (com.google.cloud.dialogflow.cx.v3beta1.EventHandler) detail_, + getParentForChildren(), + isClean()); + detail_ = null; + } + detailCase_ = 6; + onChanged(); + ; + return eventHandlerBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition) + private static final com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Transition parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Transition(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int TRANSITIONS_FIELD_NUMBER = 1; + private java.util.List + transitions_; + /** + * + * + *
+   * The list of Transitions present in the agent.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition transitions = 1; + * + */ + @java.lang.Override + public java.util.List + getTransitionsList() { + return transitions_; + } + /** + * + * + *
+   * The list of Transitions present in the agent.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition transitions = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionOrBuilder> + getTransitionsOrBuilderList() { + return transitions_; + } + /** + * + * + *
+   * The list of Transitions present in the agent.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition transitions = 1; + * + */ + @java.lang.Override + public int getTransitionsCount() { + return transitions_.size(); + } + /** + * + * + *
+   * The list of Transitions present in the agent.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition transitions = 1; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition getTransitions( + int index) { + return transitions_.get(index); + } + /** + * + * + *
+   * The list of Transitions present in the agent.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition transitions = 1; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionOrBuilder + getTransitionsOrBuilder(int index) { + return transitions_.get(index); + } + + public static final int COVERAGE_SCORE_FIELD_NUMBER = 2; + private float coverageScore_; + /** + * + * + *
+   * The percent of transitions in the agent that are covered.
+   * 
+ * + * float coverage_score = 2; + * + * @return The coverageScore. + */ + @java.lang.Override + public float getCoverageScore() { + return coverageScore_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < transitions_.size(); i++) { + output.writeMessage(1, transitions_.get(i)); + } + if (coverageScore_ != 0F) { + output.writeFloat(2, coverageScore_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < transitions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, transitions_.get(i)); + } + if (coverageScore_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, coverageScore_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage other = + (com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage) obj; + + if (!getTransitionsList().equals(other.getTransitionsList())) return false; + if (java.lang.Float.floatToIntBits(getCoverageScore()) + != java.lang.Float.floatToIntBits(other.getCoverageScore())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getTransitionsCount() > 0) { + hash = (37 * hash) + TRANSITIONS_FIELD_NUMBER; + hash = (53 * hash) + getTransitionsList().hashCode(); + } + hash = (37 * hash) + COVERAGE_SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getCoverageScore()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Transition coverage represents the percentage of all possible transitions
+   * present within any of a parent's test cases.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.TransitionCoverage} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.TransitionCoverage) + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionCoverage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionCoverage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.class, + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getTransitionsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (transitionsBuilder_ == null) { + transitions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + transitionsBuilder_.clear(); + } + coverageScore_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionCoverage_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage build() { + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage result = + new com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage(this); + int from_bitField0_ = bitField0_; + if (transitionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + transitions_ = java.util.Collections.unmodifiableList(transitions_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.transitions_ = transitions_; + } else { + result.transitions_ = transitionsBuilder_.build(); + } + result.coverageScore_ = coverageScore_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.getDefaultInstance()) + return this; + if (transitionsBuilder_ == null) { + if (!other.transitions_.isEmpty()) { + if (transitions_.isEmpty()) { + transitions_ = other.transitions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTransitionsIsMutable(); + transitions_.addAll(other.transitions_); + } + onChanged(); + } + } else { + if (!other.transitions_.isEmpty()) { + if (transitionsBuilder_.isEmpty()) { + transitionsBuilder_.dispose(); + transitionsBuilder_ = null; + transitions_ = other.transitions_; + bitField0_ = (bitField0_ & ~0x00000001); + transitionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTransitionsFieldBuilder() + : null; + } else { + transitionsBuilder_.addAllMessages(other.transitions_); + } + } + } + if (other.getCoverageScore() != 0F) { + setCoverageScore(other.getCoverageScore()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List + transitions_ = java.util.Collections.emptyList(); + + private void ensureTransitionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + transitions_ = + new java.util.ArrayList< + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition>(transitions_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition, + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionOrBuilder> + transitionsBuilder_; + + /** + * + * + *
+     * The list of Transitions present in the agent.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition transitions = 1; + * + */ + public java.util.List + getTransitionsList() { + if (transitionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(transitions_); + } else { + return transitionsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of Transitions present in the agent.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition transitions = 1; + * + */ + public int getTransitionsCount() { + if (transitionsBuilder_ == null) { + return transitions_.size(); + } else { + return transitionsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of Transitions present in the agent.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition transitions = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition getTransitions( + int index) { + if (transitionsBuilder_ == null) { + return transitions_.get(index); + } else { + return transitionsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of Transitions present in the agent.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition transitions = 1; + * + */ + public Builder setTransitions( + int index, com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition value) { + if (transitionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTransitionsIsMutable(); + transitions_.set(index, value); + onChanged(); + } else { + transitionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of Transitions present in the agent.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition transitions = 1; + * + */ + public Builder setTransitions( + int index, + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition.Builder + builderForValue) { + if (transitionsBuilder_ == null) { + ensureTransitionsIsMutable(); + transitions_.set(index, builderForValue.build()); + onChanged(); + } else { + transitionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Transitions present in the agent.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition transitions = 1; + * + */ + public Builder addTransitions( + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition value) { + if (transitionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTransitionsIsMutable(); + transitions_.add(value); + onChanged(); + } else { + transitionsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of Transitions present in the agent.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition transitions = 1; + * + */ + public Builder addTransitions( + int index, com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition value) { + if (transitionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTransitionsIsMutable(); + transitions_.add(index, value); + onChanged(); + } else { + transitionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of Transitions present in the agent.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition transitions = 1; + * + */ + public Builder addTransitions( + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition.Builder + builderForValue) { + if (transitionsBuilder_ == null) { + ensureTransitionsIsMutable(); + transitions_.add(builderForValue.build()); + onChanged(); + } else { + transitionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Transitions present in the agent.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition transitions = 1; + * + */ + public Builder addTransitions( + int index, + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition.Builder + builderForValue) { + if (transitionsBuilder_ == null) { + ensureTransitionsIsMutable(); + transitions_.add(index, builderForValue.build()); + onChanged(); + } else { + transitionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Transitions present in the agent.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition transitions = 1; + * + */ + public Builder addAllTransitions( + java.lang.Iterable< + ? extends com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition> + values) { + if (transitionsBuilder_ == null) { + ensureTransitionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, transitions_); + onChanged(); + } else { + transitionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of Transitions present in the agent.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition transitions = 1; + * + */ + public Builder clearTransitions() { + if (transitionsBuilder_ == null) { + transitions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + transitionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of Transitions present in the agent.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition transitions = 1; + * + */ + public Builder removeTransitions(int index) { + if (transitionsBuilder_ == null) { + ensureTransitionsIsMutable(); + transitions_.remove(index); + onChanged(); + } else { + transitionsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of Transitions present in the agent.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition transitions = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition.Builder + getTransitionsBuilder(int index) { + return getTransitionsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of Transitions present in the agent.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition transitions = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionOrBuilder + getTransitionsOrBuilder(int index) { + if (transitionsBuilder_ == null) { + return transitions_.get(index); + } else { + return transitionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of Transitions present in the agent.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition transitions = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionOrBuilder> + getTransitionsOrBuilderList() { + if (transitionsBuilder_ != null) { + return transitionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(transitions_); + } + } + /** + * + * + *
+     * The list of Transitions present in the agent.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition transitions = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition.Builder + addTransitionsBuilder() { + return getTransitionsFieldBuilder() + .addBuilder( + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition + .getDefaultInstance()); + } + /** + * + * + *
+     * The list of Transitions present in the agent.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition transitions = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition.Builder + addTransitionsBuilder(int index) { + return getTransitionsFieldBuilder() + .addBuilder( + index, + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition + .getDefaultInstance()); + } + /** + * + * + *
+     * The list of Transitions present in the agent.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition transitions = 1; + * + */ + public java.util.List< + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition.Builder> + getTransitionsBuilderList() { + return getTransitionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition, + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionOrBuilder> + getTransitionsFieldBuilder() { + if (transitionsBuilder_ == null) { + transitionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition, + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionOrBuilder>( + transitions_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + transitions_ = null; + } + return transitionsBuilder_; + } + + private float coverageScore_; + /** + * + * + *
+     * The percent of transitions in the agent that are covered.
+     * 
+ * + * float coverage_score = 2; + * + * @return The coverageScore. + */ + @java.lang.Override + public float getCoverageScore() { + return coverageScore_; + } + /** + * + * + *
+     * The percent of transitions in the agent that are covered.
+     * 
+ * + * float coverage_score = 2; + * + * @param value The coverageScore to set. + * @return This builder for chaining. + */ + public Builder setCoverageScore(float value) { + + coverageScore_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The percent of transitions in the agent that are covered.
+     * 
+ * + * float coverage_score = 2; + * + * @return This builder for chaining. + */ + public Builder clearCoverageScore() { + + coverageScore_ = 0F; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.TransitionCoverage) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.TransitionCoverage) + private static final com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TransitionCoverage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TransitionCoverage(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionCoverageOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionCoverageOrBuilder.java new file mode 100644 index 000000000..168836ef7 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionCoverageOrBuilder.java @@ -0,0 +1,103 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface TransitionCoverageOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.TransitionCoverage) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of Transitions present in the agent.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition transitions = 1; + * + */ + java.util.List + getTransitionsList(); + /** + * + * + *
+   * The list of Transitions present in the agent.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition transitions = 1; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition getTransitions(int index); + /** + * + * + *
+   * The list of Transitions present in the agent.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition transitions = 1; + * + */ + int getTransitionsCount(); + /** + * + * + *
+   * The list of Transitions present in the agent.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition transitions = 1; + * + */ + java.util.List< + ? extends com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionOrBuilder> + getTransitionsOrBuilderList(); + /** + * + * + *
+   * The list of Transitions present in the agent.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition transitions = 1; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionOrBuilder + getTransitionsOrBuilder(int index); + + /** + * + * + *
+   * The percent of transitions in the agent that are covered.
+   * 
+ * + * float coverage_score = 2; + * + * @return The coverageScore. + */ + float getCoverageScore(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroup.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroup.java index 4632823df..7da4ff878 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroup.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroup.java @@ -254,10 +254,6 @@ public com.google.protobuf.ByteString getDisplayNameBytes() { * *
    * Transition routes associated with the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup].
-   * Duplicate transition routes (i.e. using the same
-   * [`intent`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.intent]) are not allowed.
-   * Note that the [`name`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.name] field is not used in the
-   * transition route group scope.
    * 
* * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 5; @@ -273,10 +269,6 @@ public com.google.protobuf.ByteString getDisplayNameBytes() { * *
    * Transition routes associated with the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup].
-   * Duplicate transition routes (i.e. using the same
-   * [`intent`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.intent]) are not allowed.
-   * Note that the [`name`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.name] field is not used in the
-   * transition route group scope.
    * 
* * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 5; @@ -292,10 +284,6 @@ public com.google.protobuf.ByteString getDisplayNameBytes() { * *
    * Transition routes associated with the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup].
-   * Duplicate transition routes (i.e. using the same
-   * [`intent`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.intent]) are not allowed.
-   * Note that the [`name`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.name] field is not used in the
-   * transition route group scope.
    * 
* * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 5; @@ -310,10 +298,6 @@ public int getTransitionRoutesCount() { * *
    * Transition routes associated with the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup].
-   * Duplicate transition routes (i.e. using the same
-   * [`intent`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.intent]) are not allowed.
-   * Note that the [`name`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.name] field is not used in the
-   * transition route group scope.
    * 
* * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 5; @@ -328,10 +312,6 @@ public com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute getTransitionRoute * *
    * Transition routes associated with the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup].
-   * Duplicate transition routes (i.e. using the same
-   * [`intent`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.intent]) are not allowed.
-   * Note that the [`name`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.name] field is not used in the
-   * transition route group scope.
    * 
* * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 5; @@ -997,10 +977,6 @@ private void ensureTransitionRoutesIsMutable() { * *
      * Transition routes associated with the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup].
-     * Duplicate transition routes (i.e. using the same
-     * [`intent`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.intent]) are not allowed.
-     * Note that the [`name`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.name] field is not used in the
-     * transition route group scope.
      * 
* * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 5; @@ -1019,10 +995,6 @@ private void ensureTransitionRoutesIsMutable() { * *
      * Transition routes associated with the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup].
-     * Duplicate transition routes (i.e. using the same
-     * [`intent`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.intent]) are not allowed.
-     * Note that the [`name`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.name] field is not used in the
-     * transition route group scope.
      * 
* * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 5; @@ -1040,10 +1012,6 @@ public int getTransitionRoutesCount() { * *
      * Transition routes associated with the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup].
-     * Duplicate transition routes (i.e. using the same
-     * [`intent`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.intent]) are not allowed.
-     * Note that the [`name`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.name] field is not used in the
-     * transition route group scope.
      * 
* * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 5; @@ -1061,10 +1029,6 @@ public com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute getTransitionRoute * *
      * Transition routes associated with the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup].
-     * Duplicate transition routes (i.e. using the same
-     * [`intent`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.intent]) are not allowed.
-     * Note that the [`name`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.name] field is not used in the
-     * transition route group scope.
      * 
* * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 5; @@ -1089,10 +1053,6 @@ public Builder setTransitionRoutes( * *
      * Transition routes associated with the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup].
-     * Duplicate transition routes (i.e. using the same
-     * [`intent`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.intent]) are not allowed.
-     * Note that the [`name`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.name] field is not used in the
-     * transition route group scope.
      * 
* * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 5; @@ -1114,10 +1074,6 @@ public Builder setTransitionRoutes( * *
      * Transition routes associated with the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup].
-     * Duplicate transition routes (i.e. using the same
-     * [`intent`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.intent]) are not allowed.
-     * Note that the [`name`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.name] field is not used in the
-     * transition route group scope.
      * 
* * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 5; @@ -1142,10 +1098,6 @@ public Builder addTransitionRoutes( * *
      * Transition routes associated with the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup].
-     * Duplicate transition routes (i.e. using the same
-     * [`intent`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.intent]) are not allowed.
-     * Note that the [`name`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.name] field is not used in the
-     * transition route group scope.
      * 
* * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 5; @@ -1170,10 +1122,6 @@ public Builder addTransitionRoutes( * *
      * Transition routes associated with the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup].
-     * Duplicate transition routes (i.e. using the same
-     * [`intent`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.intent]) are not allowed.
-     * Note that the [`name`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.name] field is not used in the
-     * transition route group scope.
      * 
* * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 5; @@ -1195,10 +1143,6 @@ public Builder addTransitionRoutes( * *
      * Transition routes associated with the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup].
-     * Duplicate transition routes (i.e. using the same
-     * [`intent`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.intent]) are not allowed.
-     * Note that the [`name`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.name] field is not used in the
-     * transition route group scope.
      * 
* * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 5; @@ -1220,10 +1164,6 @@ public Builder addTransitionRoutes( * *
      * Transition routes associated with the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup].
-     * Duplicate transition routes (i.e. using the same
-     * [`intent`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.intent]) are not allowed.
-     * Note that the [`name`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.name] field is not used in the
-     * transition route group scope.
      * 
* * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 5; @@ -1246,10 +1186,6 @@ public Builder addAllTransitionRoutes( * *
      * Transition routes associated with the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup].
-     * Duplicate transition routes (i.e. using the same
-     * [`intent`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.intent]) are not allowed.
-     * Note that the [`name`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.name] field is not used in the
-     * transition route group scope.
      * 
* * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 5; @@ -1270,10 +1206,6 @@ public Builder clearTransitionRoutes() { * *
      * Transition routes associated with the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup].
-     * Duplicate transition routes (i.e. using the same
-     * [`intent`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.intent]) are not allowed.
-     * Note that the [`name`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.name] field is not used in the
-     * transition route group scope.
      * 
* * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 5; @@ -1294,10 +1226,6 @@ public Builder removeTransitionRoutes(int index) { * *
      * Transition routes associated with the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup].
-     * Duplicate transition routes (i.e. using the same
-     * [`intent`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.intent]) are not allowed.
-     * Note that the [`name`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.name] field is not used in the
-     * transition route group scope.
      * 
* * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 5; @@ -1312,10 +1240,6 @@ public Builder removeTransitionRoutes(int index) { * *
      * Transition routes associated with the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup].
-     * Duplicate transition routes (i.e. using the same
-     * [`intent`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.intent]) are not allowed.
-     * Note that the [`name`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.name] field is not used in the
-     * transition route group scope.
      * 
* * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 5; @@ -1334,10 +1258,6 @@ public Builder removeTransitionRoutes(int index) { * *
      * Transition routes associated with the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup].
-     * Duplicate transition routes (i.e. using the same
-     * [`intent`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.intent]) are not allowed.
-     * Note that the [`name`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.name] field is not used in the
-     * transition route group scope.
      * 
* * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 5; @@ -1356,10 +1276,6 @@ public Builder removeTransitionRoutes(int index) { * *
      * Transition routes associated with the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup].
-     * Duplicate transition routes (i.e. using the same
-     * [`intent`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.intent]) are not allowed.
-     * Note that the [`name`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.name] field is not used in the
-     * transition route group scope.
      * 
* * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 5; @@ -1375,10 +1291,6 @@ public Builder removeTransitionRoutes(int index) { * *
      * Transition routes associated with the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup].
-     * Duplicate transition routes (i.e. using the same
-     * [`intent`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.intent]) are not allowed.
-     * Note that the [`name`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.name] field is not used in the
-     * transition route group scope.
      * 
* * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 5; @@ -1395,10 +1307,6 @@ public Builder removeTransitionRoutes(int index) { * *
      * Transition routes associated with the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup].
-     * Duplicate transition routes (i.e. using the same
-     * [`intent`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.intent]) are not allowed.
-     * Note that the [`name`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.name] field is not used in the
-     * transition route group scope.
      * 
* * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 5; diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupOrBuilder.java index dd0c0ab23..61135e8af 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupOrBuilder.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupOrBuilder.java @@ -88,10 +88,6 @@ public interface TransitionRouteGroupOrBuilder * *
    * Transition routes associated with the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup].
-   * Duplicate transition routes (i.e. using the same
-   * [`intent`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.intent]) are not allowed.
-   * Note that the [`name`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.name] field is not used in the
-   * transition route group scope.
    * 
* * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 5; @@ -103,10 +99,6 @@ public interface TransitionRouteGroupOrBuilder * *
    * Transition routes associated with the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup].
-   * Duplicate transition routes (i.e. using the same
-   * [`intent`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.intent]) are not allowed.
-   * Note that the [`name`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.name] field is not used in the
-   * transition route group scope.
    * 
* * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 5; @@ -118,10 +110,6 @@ public interface TransitionRouteGroupOrBuilder * *
    * Transition routes associated with the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup].
-   * Duplicate transition routes (i.e. using the same
-   * [`intent`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.intent]) are not allowed.
-   * Note that the [`name`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.name] field is not used in the
-   * transition route group scope.
    * 
* * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 5; @@ -133,10 +121,6 @@ public interface TransitionRouteGroupOrBuilder * *
    * Transition routes associated with the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup].
-   * Duplicate transition routes (i.e. using the same
-   * [`intent`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.intent]) are not allowed.
-   * Note that the [`name`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.name] field is not used in the
-   * transition route group scope.
    * 
* * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 5; @@ -149,10 +133,6 @@ public interface TransitionRouteGroupOrBuilder * *
    * Transition routes associated with the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup].
-   * Duplicate transition routes (i.e. using the same
-   * [`intent`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.intent]) are not allowed.
-   * Note that the [`name`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.name] field is not used in the
-   * transition route group scope.
    * 
* * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 5; diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateAgentRequest.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateAgentRequest.java index 438235950..fae08853f 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateAgentRequest.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateAgentRequest.java @@ -22,8 +22,7 @@ * * *
- * The request message for
- * [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent].
+ * The request message for [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent].
  * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest} @@ -420,8 +419,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The request message for
-   * [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent].
+   * The request message for [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent].
    * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateExperimentRequest.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateTestCaseRequest.java similarity index 60% rename from proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateExperimentRequest.java rename to proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateTestCaseRequest.java index e056312ae..2d89572f0 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateExperimentRequest.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateTestCaseRequest.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dialogflow/cx/v3beta1/experiment.proto +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto package com.google.cloud.dialogflow.cx.v3beta1; @@ -22,27 +22,27 @@ * * *
- * The request message for [Experiments.UpdateExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.UpdateExperiment].
+ * The request message for [TestCases.UpdateTestCase][google.cloud.dialogflow.cx.v3beta1.TestCases.UpdateTestCase].
  * 
* - * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest} + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest} */ -public final class UpdateExperimentRequest extends com.google.protobuf.GeneratedMessageV3 +public final class UpdateTestCaseRequest extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest) - UpdateExperimentRequestOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest) + UpdateTestCaseRequestOrBuilder { private static final long serialVersionUID = 0L; - // Use UpdateExperimentRequest.newBuilder() to construct. - private UpdateExperimentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use UpdateTestCaseRequest.newBuilder() to construct. + private UpdateTestCaseRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private UpdateExperimentRequest() {} + private UpdateTestCaseRequest() {} @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UpdateExperimentRequest(); + return new UpdateTestCaseRequest(); } @java.lang.Override @@ -50,7 +50,7 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateExperimentRequest( + private UpdateTestCaseRequest( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -70,17 +70,16 @@ private UpdateExperimentRequest( break; case 10: { - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Builder subBuilder = null; - if (experiment_ != null) { - subBuilder = experiment_.toBuilder(); + com.google.cloud.dialogflow.cx.v3beta1.TestCase.Builder subBuilder = null; + if (testCase_ != null) { + subBuilder = testCase_.toBuilder(); } - experiment_ = + testCase_ = input.readMessage( - com.google.cloud.dialogflow.cx.v3beta1.Experiment.parser(), - extensionRegistry); + com.google.cloud.dialogflow.cx.v3beta1.TestCase.parser(), extensionRegistry); if (subBuilder != null) { - subBuilder.mergeFrom(experiment_); - experiment_ = subBuilder.buildPartial(); + subBuilder.mergeFrom(testCase_); + testCase_ = subBuilder.buildPartial(); } break; @@ -120,72 +119,72 @@ private UpdateExperimentRequest( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateExperimentRequest_descriptor; + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateTestCaseRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateExperimentRequest_fieldAccessorTable + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateTestCaseRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest.class, - com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest.Builder.class); + com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest.Builder.class); } - public static final int EXPERIMENT_FIELD_NUMBER = 1; - private com.google.cloud.dialogflow.cx.v3beta1.Experiment experiment_; + public static final int TEST_CASE_FIELD_NUMBER = 1; + private com.google.cloud.dialogflow.cx.v3beta1.TestCase testCase_; /** * * *
-   * Required. The experiment to update.
+   * Required. The test case to update.
    * 
* * - * .google.cloud.dialogflow.cx.v3beta1.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; * * - * @return Whether the experiment field is set. + * @return Whether the testCase field is set. */ @java.lang.Override - public boolean hasExperiment() { - return experiment_ != null; + public boolean hasTestCase() { + return testCase_ != null; } /** * * *
-   * Required. The experiment to update.
+   * Required. The test case to update.
    * 
* * - * .google.cloud.dialogflow.cx.v3beta1.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; * * - * @return The experiment. + * @return The testCase. */ @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.Experiment getExperiment() { - return experiment_ == null - ? com.google.cloud.dialogflow.cx.v3beta1.Experiment.getDefaultInstance() - : experiment_; + public com.google.cloud.dialogflow.cx.v3beta1.TestCase getTestCase() { + return testCase_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.TestCase.getDefaultInstance() + : testCase_; } /** * * *
-   * Required. The experiment to update.
+   * Required. The test case to update.
    * 
* * - * .google.cloud.dialogflow.cx.v3beta1.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; * */ @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.ExperimentOrBuilder getExperimentOrBuilder() { - return getExperiment(); + public com.google.cloud.dialogflow.cx.v3beta1.TestCaseOrBuilder getTestCaseOrBuilder() { + return getTestCase(); } public static final int UPDATE_MASK_FIELD_NUMBER = 2; @@ -194,7 +193,9 @@ public com.google.cloud.dialogflow.cx.v3beta1.ExperimentOrBuilder getExperimentO * * *
-   * Required. The mask to control which fields get updated.
+   * Required. The mask to specify which fields should be updated. Only a test case's
+   * metadata and replayed_conversation_turns may be updated. The original
+   * test_case_conversation_turns may not be updated.
    * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -210,7 +211,9 @@ public boolean hasUpdateMask() { * * *
-   * Required. The mask to control which fields get updated.
+   * Required. The mask to specify which fields should be updated. Only a test case's
+   * metadata and replayed_conversation_turns may be updated. The original
+   * test_case_conversation_turns may not be updated.
    * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -226,7 +229,9 @@ public com.google.protobuf.FieldMask getUpdateMask() { * * *
-   * Required. The mask to control which fields get updated.
+   * Required. The mask to specify which fields should be updated. Only a test case's
+   * metadata and replayed_conversation_turns may be updated. The original
+   * test_case_conversation_turns may not be updated.
    * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -251,8 +256,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (experiment_ != null) { - output.writeMessage(1, getExperiment()); + if (testCase_ != null) { + output.writeMessage(1, getTestCase()); } if (updateMask_ != null) { output.writeMessage(2, getUpdateMask()); @@ -266,8 +271,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (experiment_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getExperiment()); + if (testCase_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTestCase()); } if (updateMask_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); @@ -282,15 +287,15 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest)) { + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest)) { return super.equals(obj); } - com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest other = - (com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest) obj; + com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest other = + (com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest) obj; - if (hasExperiment() != other.hasExperiment()) return false; - if (hasExperiment()) { - if (!getExperiment().equals(other.getExperiment())) return false; + if (hasTestCase() != other.hasTestCase()) return false; + if (hasTestCase()) { + if (!getTestCase().equals(other.getTestCase())) return false; } if (hasUpdateMask() != other.hasUpdateMask()) return false; if (hasUpdateMask()) { @@ -307,9 +312,9 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (hasExperiment()) { - hash = (37 * hash) + EXPERIMENT_FIELD_NUMBER; - hash = (53 * hash) + getExperiment().hashCode(); + if (hasTestCase()) { + hash = (37 * hash) + TEST_CASE_FIELD_NUMBER; + hash = (53 * hash) + getTestCase().hashCode(); } if (hasUpdateMask()) { hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; @@ -320,71 +325,71 @@ public int hashCode() { return hash; } - public static com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest parseDelimitedFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest parseDelimitedFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -402,7 +407,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest prototype) { + com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -420,31 +425,31 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The request message for [Experiments.UpdateExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.UpdateExperiment].
+   * The request message for [TestCases.UpdateTestCase][google.cloud.dialogflow.cx.v3beta1.TestCases.UpdateTestCase].
    * 
* - * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest} + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest) - com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequestOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest) + com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateExperimentRequest_descriptor; + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateTestCaseRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateExperimentRequest_fieldAccessorTable + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateTestCaseRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest.class, - com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest.Builder.class); + com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest.Builder.class); } - // Construct using com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest.newBuilder() + // Construct using com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -461,11 +466,11 @@ private void maybeForceBuilderInitialization() { @java.lang.Override public Builder clear() { super.clear(); - if (experimentBuilder_ == null) { - experiment_ = null; + if (testCaseBuilder_ == null) { + testCase_ = null; } else { - experiment_ = null; - experimentBuilder_ = null; + testCase_ = null; + testCaseBuilder_ = null; } if (updateMaskBuilder_ == null) { updateMask_ = null; @@ -478,19 +483,19 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateExperimentRequest_descriptor; + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateTestCaseRequest_descriptor; } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest + public com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest getDefaultInstanceForType() { - return com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest.getDefaultInstance(); + return com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest.getDefaultInstance(); } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest build() { - com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest result = buildPartial(); + public com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest build() { + com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -498,13 +503,13 @@ public com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest build() { } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest buildPartial() { - com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest result = - new com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest(this); - if (experimentBuilder_ == null) { - result.experiment_ = experiment_; + public com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest result = + new com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest(this); + if (testCaseBuilder_ == null) { + result.testCase_ = testCase_; } else { - result.experiment_ = experimentBuilder_.build(); + result.testCase_ = testCaseBuilder_.build(); } if (updateMaskBuilder_ == null) { result.updateMask_ = updateMask_; @@ -550,20 +555,20 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest) { - return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest) other); + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest other) { + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest other) { if (other - == com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest.getDefaultInstance()) + == com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest.getDefaultInstance()) return this; - if (other.hasExperiment()) { - mergeExperiment(other.getExperiment()); + if (other.hasTestCase()) { + mergeTestCase(other.getTestCase()); } if (other.hasUpdateMask()) { mergeUpdateMask(other.getUpdateMask()); @@ -583,13 +588,12 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest parsedMessage = null; + com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = - (com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest) - e.getUnfinishedMessage(); + (com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -599,70 +603,70 @@ public Builder mergeFrom( return this; } - private com.google.cloud.dialogflow.cx.v3beta1.Experiment experiment_; + private com.google.cloud.dialogflow.cx.v3beta1.TestCase testCase_; private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.Experiment, - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Builder, - com.google.cloud.dialogflow.cx.v3beta1.ExperimentOrBuilder> - experimentBuilder_; + com.google.cloud.dialogflow.cx.v3beta1.TestCase, + com.google.cloud.dialogflow.cx.v3beta1.TestCase.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TestCaseOrBuilder> + testCaseBuilder_; /** * * *
-     * Required. The experiment to update.
+     * Required. The test case to update.
      * 
* * - * .google.cloud.dialogflow.cx.v3beta1.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; * * - * @return Whether the experiment field is set. + * @return Whether the testCase field is set. */ - public boolean hasExperiment() { - return experimentBuilder_ != null || experiment_ != null; + public boolean hasTestCase() { + return testCaseBuilder_ != null || testCase_ != null; } /** * * *
-     * Required. The experiment to update.
+     * Required. The test case to update.
      * 
* * - * .google.cloud.dialogflow.cx.v3beta1.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; * * - * @return The experiment. + * @return The testCase. */ - public com.google.cloud.dialogflow.cx.v3beta1.Experiment getExperiment() { - if (experimentBuilder_ == null) { - return experiment_ == null - ? com.google.cloud.dialogflow.cx.v3beta1.Experiment.getDefaultInstance() - : experiment_; + public com.google.cloud.dialogflow.cx.v3beta1.TestCase getTestCase() { + if (testCaseBuilder_ == null) { + return testCase_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.TestCase.getDefaultInstance() + : testCase_; } else { - return experimentBuilder_.getMessage(); + return testCaseBuilder_.getMessage(); } } /** * * *
-     * Required. The experiment to update.
+     * Required. The test case to update.
      * 
* * - * .google.cloud.dialogflow.cx.v3beta1.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; * */ - public Builder setExperiment(com.google.cloud.dialogflow.cx.v3beta1.Experiment value) { - if (experimentBuilder_ == null) { + public Builder setTestCase(com.google.cloud.dialogflow.cx.v3beta1.TestCase value) { + if (testCaseBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - experiment_ = value; + testCase_ = value; onChanged(); } else { - experimentBuilder_.setMessage(value); + testCaseBuilder_.setMessage(value); } return this; @@ -671,20 +675,20 @@ public Builder setExperiment(com.google.cloud.dialogflow.cx.v3beta1.Experiment v * * *
-     * Required. The experiment to update.
+     * Required. The test case to update.
      * 
* * - * .google.cloud.dialogflow.cx.v3beta1.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; * */ - public Builder setExperiment( - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Builder builderForValue) { - if (experimentBuilder_ == null) { - experiment_ = builderForValue.build(); + public Builder setTestCase( + com.google.cloud.dialogflow.cx.v3beta1.TestCase.Builder builderForValue) { + if (testCaseBuilder_ == null) { + testCase_ = builderForValue.build(); onChanged(); } else { - experimentBuilder_.setMessage(builderForValue.build()); + testCaseBuilder_.setMessage(builderForValue.build()); } return this; @@ -693,26 +697,26 @@ public Builder setExperiment( * * *
-     * Required. The experiment to update.
+     * Required. The test case to update.
      * 
* * - * .google.cloud.dialogflow.cx.v3beta1.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; * */ - public Builder mergeExperiment(com.google.cloud.dialogflow.cx.v3beta1.Experiment value) { - if (experimentBuilder_ == null) { - if (experiment_ != null) { - experiment_ = - com.google.cloud.dialogflow.cx.v3beta1.Experiment.newBuilder(experiment_) + public Builder mergeTestCase(com.google.cloud.dialogflow.cx.v3beta1.TestCase value) { + if (testCaseBuilder_ == null) { + if (testCase_ != null) { + testCase_ = + com.google.cloud.dialogflow.cx.v3beta1.TestCase.newBuilder(testCase_) .mergeFrom(value) .buildPartial(); } else { - experiment_ = value; + testCase_ = value; } onChanged(); } else { - experimentBuilder_.mergeFrom(value); + testCaseBuilder_.mergeFrom(value); } return this; @@ -721,20 +725,20 @@ public Builder mergeExperiment(com.google.cloud.dialogflow.cx.v3beta1.Experiment * * *
-     * Required. The experiment to update.
+     * Required. The test case to update.
      * 
* * - * .google.cloud.dialogflow.cx.v3beta1.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; * */ - public Builder clearExperiment() { - if (experimentBuilder_ == null) { - experiment_ = null; + public Builder clearTestCase() { + if (testCaseBuilder_ == null) { + testCase_ = null; onChanged(); } else { - experiment_ = null; - experimentBuilder_ = null; + testCase_ = null; + testCaseBuilder_ = null; } return this; @@ -743,64 +747,64 @@ public Builder clearExperiment() { * * *
-     * Required. The experiment to update.
+     * Required. The test case to update.
      * 
* * - * .google.cloud.dialogflow.cx.v3beta1.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; * */ - public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Builder getExperimentBuilder() { + public com.google.cloud.dialogflow.cx.v3beta1.TestCase.Builder getTestCaseBuilder() { onChanged(); - return getExperimentFieldBuilder().getBuilder(); + return getTestCaseFieldBuilder().getBuilder(); } /** * * *
-     * Required. The experiment to update.
+     * Required. The test case to update.
      * 
* * - * .google.cloud.dialogflow.cx.v3beta1.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; * */ - public com.google.cloud.dialogflow.cx.v3beta1.ExperimentOrBuilder getExperimentOrBuilder() { - if (experimentBuilder_ != null) { - return experimentBuilder_.getMessageOrBuilder(); + public com.google.cloud.dialogflow.cx.v3beta1.TestCaseOrBuilder getTestCaseOrBuilder() { + if (testCaseBuilder_ != null) { + return testCaseBuilder_.getMessageOrBuilder(); } else { - return experiment_ == null - ? com.google.cloud.dialogflow.cx.v3beta1.Experiment.getDefaultInstance() - : experiment_; + return testCase_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.TestCase.getDefaultInstance() + : testCase_; } } /** * * *
-     * Required. The experiment to update.
+     * Required. The test case to update.
      * 
* * - * .google.cloud.dialogflow.cx.v3beta1.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; * */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.Experiment, - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Builder, - com.google.cloud.dialogflow.cx.v3beta1.ExperimentOrBuilder> - getExperimentFieldBuilder() { - if (experimentBuilder_ == null) { - experimentBuilder_ = + com.google.cloud.dialogflow.cx.v3beta1.TestCase, + com.google.cloud.dialogflow.cx.v3beta1.TestCase.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TestCaseOrBuilder> + getTestCaseFieldBuilder() { + if (testCaseBuilder_ == null) { + testCaseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.Experiment, - com.google.cloud.dialogflow.cx.v3beta1.Experiment.Builder, - com.google.cloud.dialogflow.cx.v3beta1.ExperimentOrBuilder>( - getExperiment(), getParentForChildren(), isClean()); - experiment_ = null; + com.google.cloud.dialogflow.cx.v3beta1.TestCase, + com.google.cloud.dialogflow.cx.v3beta1.TestCase.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TestCaseOrBuilder>( + getTestCase(), getParentForChildren(), isClean()); + testCase_ = null; } - return experimentBuilder_; + return testCaseBuilder_; } private com.google.protobuf.FieldMask updateMask_; @@ -813,7 +817,9 @@ public com.google.cloud.dialogflow.cx.v3beta1.ExperimentOrBuilder getExperimentO * * *
-     * Required. The mask to control which fields get updated.
+     * Required. The mask to specify which fields should be updated. Only a test case's
+     * metadata and replayed_conversation_turns may be updated. The original
+     * test_case_conversation_turns may not be updated.
      * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -828,7 +834,9 @@ public boolean hasUpdateMask() { * * *
-     * Required. The mask to control which fields get updated.
+     * Required. The mask to specify which fields should be updated. Only a test case's
+     * metadata and replayed_conversation_turns may be updated. The original
+     * test_case_conversation_turns may not be updated.
      * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -849,7 +857,9 @@ public com.google.protobuf.FieldMask getUpdateMask() { * * *
-     * Required. The mask to control which fields get updated.
+     * Required. The mask to specify which fields should be updated. Only a test case's
+     * metadata and replayed_conversation_turns may be updated. The original
+     * test_case_conversation_turns may not be updated.
      * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -872,7 +882,9 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask value) { * * *
-     * Required. The mask to control which fields get updated.
+     * Required. The mask to specify which fields should be updated. Only a test case's
+     * metadata and replayed_conversation_turns may be updated. The original
+     * test_case_conversation_turns may not be updated.
      * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -892,7 +904,9 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForVal * * *
-     * Required. The mask to control which fields get updated.
+     * Required. The mask to specify which fields should be updated. Only a test case's
+     * metadata and replayed_conversation_turns may be updated. The original
+     * test_case_conversation_turns may not be updated.
      * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -917,7 +931,9 @@ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { * * *
-     * Required. The mask to control which fields get updated.
+     * Required. The mask to specify which fields should be updated. Only a test case's
+     * metadata and replayed_conversation_turns may be updated. The original
+     * test_case_conversation_turns may not be updated.
      * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -938,7 +954,9 @@ public Builder clearUpdateMask() { * * *
-     * Required. The mask to control which fields get updated.
+     * Required. The mask to specify which fields should be updated. Only a test case's
+     * metadata and replayed_conversation_turns may be updated. The original
+     * test_case_conversation_turns may not be updated.
      * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -953,7 +971,9 @@ public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { * * *
-     * Required. The mask to control which fields get updated.
+     * Required. The mask to specify which fields should be updated. Only a test case's
+     * metadata and replayed_conversation_turns may be updated. The original
+     * test_case_conversation_turns may not be updated.
      * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -972,7 +992,9 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { * * *
-     * Required. The mask to control which fields get updated.
+     * Required. The mask to specify which fields should be updated. Only a test case's
+     * metadata and replayed_conversation_turns may be updated. The original
+     * test_case_conversation_turns may not be updated.
      * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -1006,45 +1028,43 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest) + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest) } - // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest) - private static final com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest) + private static final com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest(); + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest(); } - public static com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest - getDefaultInstance() { + public static com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public UpdateExperimentRequest parsePartialFrom( + public UpdateTestCaseRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateExperimentRequest(input, extensionRegistry); + return new UpdateTestCaseRequest(input, extensionRegistry); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest - getDefaultInstanceForType() { + public com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateExperimentRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateTestCaseRequestOrBuilder.java similarity index 54% rename from proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateExperimentRequestOrBuilder.java rename to proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateTestCaseRequestOrBuilder.java index 15440bde7..75ba88bd1 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateExperimentRequestOrBuilder.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateTestCaseRequestOrBuilder.java @@ -14,61 +14,63 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dialogflow/cx/v3beta1/experiment.proto +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto package com.google.cloud.dialogflow.cx.v3beta1; -public interface UpdateExperimentRequestOrBuilder +public interface UpdateTestCaseRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest) + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest) com.google.protobuf.MessageOrBuilder { /** * * *
-   * Required. The experiment to update.
+   * Required. The test case to update.
    * 
* * - * .google.cloud.dialogflow.cx.v3beta1.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; * * - * @return Whether the experiment field is set. + * @return Whether the testCase field is set. */ - boolean hasExperiment(); + boolean hasTestCase(); /** * * *
-   * Required. The experiment to update.
+   * Required. The test case to update.
    * 
* * - * .google.cloud.dialogflow.cx.v3beta1.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; * * - * @return The experiment. + * @return The testCase. */ - com.google.cloud.dialogflow.cx.v3beta1.Experiment getExperiment(); + com.google.cloud.dialogflow.cx.v3beta1.TestCase getTestCase(); /** * * *
-   * Required. The experiment to update.
+   * Required. The test case to update.
    * 
* * - * .google.cloud.dialogflow.cx.v3beta1.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; * */ - com.google.cloud.dialogflow.cx.v3beta1.ExperimentOrBuilder getExperimentOrBuilder(); + com.google.cloud.dialogflow.cx.v3beta1.TestCaseOrBuilder getTestCaseOrBuilder(); /** * * *
-   * Required. The mask to control which fields get updated.
+   * Required. The mask to specify which fields should be updated. Only a test case's
+   * metadata and replayed_conversation_turns may be updated. The original
+   * test_case_conversation_turns may not be updated.
    * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -81,7 +83,9 @@ public interface UpdateExperimentRequestOrBuilder * * *
-   * Required. The mask to control which fields get updated.
+   * Required. The mask to specify which fields should be updated. Only a test case's
+   * metadata and replayed_conversation_turns may be updated. The original
+   * test_case_conversation_turns may not be updated.
    * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -94,7 +98,9 @@ public interface UpdateExperimentRequestOrBuilder * * *
-   * Required. The mask to control which fields get updated.
+   * Required. The mask to specify which fields should be updated. Only a test case's
+   * metadata and replayed_conversation_turns may be updated. The original
+   * test_case_conversation_turns may not be updated.
    * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/StartExperimentRequest.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidateAgentRequest.java similarity index 60% rename from proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/StartExperimentRequest.java rename to proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidateAgentRequest.java index 0f926fe27..d00ac2e96 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/StartExperimentRequest.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidateAgentRequest.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dialogflow/cx/v3beta1/experiment.proto +// source: google/cloud/dialogflow/cx/v3beta1/agent.proto package com.google.cloud.dialogflow.cx.v3beta1; @@ -22,29 +22,30 @@ * * *
- * The request message for [Experiments.StartExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.StartExperiment].
+ * The request message for [Agents.ValidateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.ValidateAgent].
  * 
* - * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest} + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest} */ -public final class StartExperimentRequest extends com.google.protobuf.GeneratedMessageV3 +public final class ValidateAgentRequest extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest) - StartExperimentRequestOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest) + ValidateAgentRequestOrBuilder { private static final long serialVersionUID = 0L; - // Use StartExperimentRequest.newBuilder() to construct. - private StartExperimentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use ValidateAgentRequest.newBuilder() to construct. + private ValidateAgentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private StartExperimentRequest() { + private ValidateAgentRequest() { name_ = ""; + languageCode_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new StartExperimentRequest(); + return new ValidateAgentRequest(); } @java.lang.Override @@ -52,7 +53,7 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private StartExperimentRequest( + private ValidateAgentRequest( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -77,6 +78,13 @@ private StartExperimentRequest( name_ = s; break; } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + languageCode_ = s; + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -97,18 +105,18 @@ private StartExperimentRequest( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_StartExperimentRequest_descriptor; + return com.google.cloud.dialogflow.cx.v3beta1.AgentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ValidateAgentRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_StartExperimentRequest_fieldAccessorTable + return com.google.cloud.dialogflow.cx.v3beta1.AgentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ValidateAgentRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest.class, - com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest.Builder.class); + com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest.Builder.class); } public static final int NAME_FIELD_NUMBER = 1; @@ -117,9 +125,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. Resource name of the experiment to start.
-   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * Required. The agent to validate.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
    * 
* * @@ -144,9 +151,8 @@ public java.lang.String getName() { * * *
-   * Required. Resource name of the experiment to start.
-   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * Required. The agent to validate.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
    * 
* * @@ -168,6 +174,55 @@ public com.google.protobuf.ByteString getNameBytes() { } } + public static final int LANGUAGE_CODE_FIELD_NUMBER = 2; + private volatile java.lang.Object languageCode_; + /** + * + * + *
+   * If not specified, the agent's default language is used.
+   * 
+ * + * string language_code = 2; + * + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } + } + /** + * + * + *
+   * If not specified, the agent's default language is used.
+   * 
+ * + * string language_code = 2; + * + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -185,6 +240,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!getNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } + if (!getLanguageCodeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, languageCode_); + } unknownFields.writeTo(output); } @@ -197,6 +255,9 @@ public int getSerializedSize() { if (!getNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } + if (!getLanguageCodeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, languageCode_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -207,13 +268,14 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest)) { + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest)) { return super.equals(obj); } - com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest other = - (com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest) obj; + com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest other = + (com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest) obj; if (!getName().equals(other.getName())) return false; + if (!getLanguageCode().equals(other.getLanguageCode())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -227,76 +289,78 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest parseFrom(byte[] data) + public static com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest parseDelimitedFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest parseDelimitedFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -314,7 +378,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest prototype) { + com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -332,31 +396,31 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The request message for [Experiments.StartExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.StartExperiment].
+   * The request message for [Agents.ValidateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.ValidateAgent].
    * 
* - * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest} + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest) - com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequestOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest) + com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_StartExperimentRequest_descriptor; + return com.google.cloud.dialogflow.cx.v3beta1.AgentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ValidateAgentRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_StartExperimentRequest_fieldAccessorTable + return com.google.cloud.dialogflow.cx.v3beta1.AgentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ValidateAgentRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest.class, - com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest.Builder.class); + com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest.Builder.class); } - // Construct using com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest.newBuilder() + // Construct using com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -375,24 +439,25 @@ public Builder clear() { super.clear(); name_ = ""; + languageCode_ = ""; + return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_StartExperimentRequest_descriptor; + return com.google.cloud.dialogflow.cx.v3beta1.AgentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ValidateAgentRequest_descriptor; } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest - getDefaultInstanceForType() { - return com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest.getDefaultInstance(); + public com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest.getDefaultInstance(); } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest build() { - com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest result = buildPartial(); + public com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest build() { + com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -400,10 +465,11 @@ public com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest build() { } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest buildPartial() { - com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest result = - new com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest(this); + public com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest result = + new com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest(this); result.name_ = name_; + result.languageCode_ = languageCode_; onBuilt(); return result; } @@ -443,22 +509,25 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest) { - return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest) other); + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest other) { - if (other - == com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest.getDefaultInstance()) + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + onChanged(); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -474,13 +543,12 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest parsedMessage = null; + com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = - (com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest) - e.getUnfinishedMessage(); + (com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -495,9 +563,8 @@ public Builder mergeFrom( * * *
-     * Required. Resource name of the experiment to start.
-     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * Required. The agent to validate.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
      * 
* * @@ -521,9 +588,8 @@ public java.lang.String getName() { * * *
-     * Required. Resource name of the experiment to start.
-     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * Required. The agent to validate.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
      * 
* * @@ -547,9 +613,8 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-     * Required. Resource name of the experiment to start.
-     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * Required. The agent to validate.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
      * 
* * @@ -572,9 +637,8 @@ public Builder setName(java.lang.String value) { * * *
-     * Required. Resource name of the experiment to start.
-     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * Required. The agent to validate.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
      * 
* * @@ -593,9 +657,8 @@ public Builder clearName() { * * *
-     * Required. Resource name of the experiment to start.
-     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * Required. The agent to validate.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
      * 
* * @@ -616,6 +679,112 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object languageCode_ = ""; + /** + * + * + *
+     * If not specified, the agent's default language is used.
+     * 
+ * + * string language_code = 2; + * + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * If not specified, the agent's default language is used.
+     * 
+ * + * string language_code = 2; + * + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * If not specified, the agent's default language is used.
+     * 
+ * + * string language_code = 2; + * + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + languageCode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If not specified, the agent's default language is used.
+     * 
+ * + * string language_code = 2; + * + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + + languageCode_ = getDefaultInstance().getLanguageCode(); + onChanged(); + return this; + } + /** + * + * + *
+     * If not specified, the agent's default language is used.
+     * 
+ * + * string language_code = 2; + * + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + languageCode_ = value; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); @@ -627,43 +796,42 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest) + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest) } - // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest) - private static final com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest - DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest) + private static final com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest(); + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest(); } - public static com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest getDefaultInstance() { + public static com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public StartExperimentRequest parsePartialFrom( + public ValidateAgentRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new StartExperimentRequest(input, extensionRegistry); + return new ValidateAgentRequest(input, extensionRegistry); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest getDefaultInstanceForType() { + public com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteExperimentRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidateAgentRequestOrBuilder.java similarity index 65% rename from proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteExperimentRequestOrBuilder.java rename to proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidateAgentRequestOrBuilder.java index a9b954549..378532e41 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteExperimentRequestOrBuilder.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidateAgentRequestOrBuilder.java @@ -14,22 +14,21 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dialogflow/cx/v3beta1/experiment.proto +// source: google/cloud/dialogflow/cx/v3beta1/agent.proto package com.google.cloud.dialogflow.cx.v3beta1; -public interface DeleteExperimentRequestOrBuilder +public interface ValidateAgentRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest) + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest) com.google.protobuf.MessageOrBuilder { /** * * *
-   * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to delete.
-   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * Required. The agent to validate.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
    * 
* * @@ -43,9 +42,8 @@ public interface DeleteExperimentRequestOrBuilder * * *
-   * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to delete.
-   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * Required. The agent to validate.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
    * 
* * @@ -55,4 +53,29 @@ public interface DeleteExperimentRequestOrBuilder * @return The bytes for name. */ com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * If not specified, the agent's default language is used.
+   * 
+ * + * string language_code = 2; + * + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + /** + * + * + *
+   * If not specified, the agent's default language is used.
+   * 
+ * + * string language_code = 2; + * + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString getLanguageCodeBytes(); } diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteExperimentRequest.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidateFlowRequest.java similarity index 61% rename from proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteExperimentRequest.java rename to proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidateFlowRequest.java index 281aebe81..79362d65f 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteExperimentRequest.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidateFlowRequest.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dialogflow/cx/v3beta1/experiment.proto +// source: google/cloud/dialogflow/cx/v3beta1/flow.proto package com.google.cloud.dialogflow.cx.v3beta1; @@ -22,29 +22,30 @@ * * *
- * The request message for [Experiments.DeleteExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.DeleteExperiment].
+ * The request message for [Flows.ValidateFlow][google.cloud.dialogflow.cx.v3beta1.Flows.ValidateFlow].
  * 
* - * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest} + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest} */ -public final class DeleteExperimentRequest extends com.google.protobuf.GeneratedMessageV3 +public final class ValidateFlowRequest extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest) - DeleteExperimentRequestOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest) + ValidateFlowRequestOrBuilder { private static final long serialVersionUID = 0L; - // Use DeleteExperimentRequest.newBuilder() to construct. - private DeleteExperimentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use ValidateFlowRequest.newBuilder() to construct. + private ValidateFlowRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private DeleteExperimentRequest() { + private ValidateFlowRequest() { name_ = ""; + languageCode_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DeleteExperimentRequest(); + return new ValidateFlowRequest(); } @java.lang.Override @@ -52,7 +53,7 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteExperimentRequest( + private ValidateFlowRequest( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -77,6 +78,13 @@ private DeleteExperimentRequest( name_ = s; break; } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + languageCode_ = s; + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -97,18 +105,18 @@ private DeleteExperimentRequest( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_DeleteExperimentRequest_descriptor; + return com.google.cloud.dialogflow.cx.v3beta1.FlowProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ValidateFlowRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_DeleteExperimentRequest_fieldAccessorTable + return com.google.cloud.dialogflow.cx.v3beta1.FlowProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ValidateFlowRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest.class, - com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest.Builder.class); + com.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest.Builder.class); } public static final int NAME_FIELD_NUMBER = 1; @@ -117,9 +125,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to delete.
+   * Required. The flow to validate.
    * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * ID>/flows/<Flow ID>`.
    * 
* * @@ -144,9 +152,9 @@ public java.lang.String getName() { * * *
-   * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to delete.
+   * Required. The flow to validate.
    * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * ID>/flows/<Flow ID>`.
    * 
* * @@ -168,6 +176,55 @@ public com.google.protobuf.ByteString getNameBytes() { } } + public static final int LANGUAGE_CODE_FIELD_NUMBER = 2; + private volatile java.lang.Object languageCode_; + /** + * + * + *
+   * If not specified, the agent's default language is used.
+   * 
+ * + * string language_code = 2; + * + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } + } + /** + * + * + *
+   * If not specified, the agent's default language is used.
+   * 
+ * + * string language_code = 2; + * + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -185,6 +242,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!getNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } + if (!getLanguageCodeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, languageCode_); + } unknownFields.writeTo(output); } @@ -197,6 +257,9 @@ public int getSerializedSize() { if (!getNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } + if (!getLanguageCodeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, languageCode_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -207,13 +270,14 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest)) { + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest)) { return super.equals(obj); } - com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest other = - (com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest) obj; + com.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest other = + (com.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest) obj; if (!getName().equals(other.getName())) return false; + if (!getLanguageCode().equals(other.getLanguageCode())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -227,76 +291,78 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest parseDelimitedFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest parseDelimitedFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -314,7 +380,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest prototype) { + com.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -332,31 +398,31 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The request message for [Experiments.DeleteExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.DeleteExperiment].
+   * The request message for [Flows.ValidateFlow][google.cloud.dialogflow.cx.v3beta1.Flows.ValidateFlow].
    * 
* - * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest} + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest) - com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequestOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest) + com.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_DeleteExperimentRequest_descriptor; + return com.google.cloud.dialogflow.cx.v3beta1.FlowProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ValidateFlowRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_DeleteExperimentRequest_fieldAccessorTable + return com.google.cloud.dialogflow.cx.v3beta1.FlowProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ValidateFlowRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest.class, - com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest.Builder.class); + com.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest.Builder.class); } - // Construct using com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest.newBuilder() + // Construct using com.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -375,24 +441,25 @@ public Builder clear() { super.clear(); name_ = ""; + languageCode_ = ""; + return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_DeleteExperimentRequest_descriptor; + return com.google.cloud.dialogflow.cx.v3beta1.FlowProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ValidateFlowRequest_descriptor; } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest - getDefaultInstanceForType() { - return com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest.getDefaultInstance(); + public com.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest.getDefaultInstance(); } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest build() { - com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest result = buildPartial(); + public com.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest build() { + com.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -400,10 +467,11 @@ public com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest build() { } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest buildPartial() { - com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest result = - new com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest(this); + public com.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest result = + new com.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest(this); result.name_ = name_; + result.languageCode_ = languageCode_; onBuilt(); return result; } @@ -443,22 +511,25 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest) { - return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest) other); + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest other) { - if (other - == com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest.getDefaultInstance()) + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + onChanged(); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -474,13 +545,12 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest parsedMessage = null; + com.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = - (com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest) - e.getUnfinishedMessage(); + (com.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -495,9 +565,9 @@ public Builder mergeFrom( * * *
-     * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to delete.
+     * Required. The flow to validate.
      * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * ID>/flows/<Flow ID>`.
      * 
* * @@ -521,9 +591,9 @@ public java.lang.String getName() { * * *
-     * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to delete.
+     * Required. The flow to validate.
      * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * ID>/flows/<Flow ID>`.
      * 
* * @@ -547,9 +617,9 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-     * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to delete.
+     * Required. The flow to validate.
      * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * ID>/flows/<Flow ID>`.
      * 
* * @@ -572,9 +642,9 @@ public Builder setName(java.lang.String value) { * * *
-     * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to delete.
+     * Required. The flow to validate.
      * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * ID>/flows/<Flow ID>`.
      * 
* * @@ -593,9 +663,9 @@ public Builder clearName() { * * *
-     * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to delete.
+     * Required. The flow to validate.
      * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * ID>/flows/<Flow ID>`.
      * 
* * @@ -616,6 +686,112 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object languageCode_ = ""; + /** + * + * + *
+     * If not specified, the agent's default language is used.
+     * 
+ * + * string language_code = 2; + * + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * If not specified, the agent's default language is used.
+     * 
+ * + * string language_code = 2; + * + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * If not specified, the agent's default language is used.
+     * 
+ * + * string language_code = 2; + * + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + languageCode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If not specified, the agent's default language is used.
+     * 
+ * + * string language_code = 2; + * + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + + languageCode_ = getDefaultInstance().getLanguageCode(); + onChanged(); + return this; + } + /** + * + * + *
+     * If not specified, the agent's default language is used.
+     * 
+ * + * string language_code = 2; + * + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + languageCode_ = value; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); @@ -627,45 +803,42 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest) + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest) } - // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest) - private static final com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest - DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest) + private static final com.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest(); + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest(); } - public static com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest - getDefaultInstance() { + public static com.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public DeleteExperimentRequest parsePartialFrom( + public ValidateFlowRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteExperimentRequest(input, extensionRegistry); + return new ValidateFlowRequest(input, extensionRegistry); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest - getDefaultInstanceForType() { + public com.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/StartExperimentRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidateFlowRequestOrBuilder.java similarity index 65% rename from proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/StartExperimentRequestOrBuilder.java rename to proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidateFlowRequestOrBuilder.java index ca5732d15..08b5634a4 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/StartExperimentRequestOrBuilder.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidateFlowRequestOrBuilder.java @@ -14,22 +14,22 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dialogflow/cx/v3beta1/experiment.proto +// source: google/cloud/dialogflow/cx/v3beta1/flow.proto package com.google.cloud.dialogflow.cx.v3beta1; -public interface StartExperimentRequestOrBuilder +public interface ValidateFlowRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest) + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest) com.google.protobuf.MessageOrBuilder { /** * * *
-   * Required. Resource name of the experiment to start.
+   * Required. The flow to validate.
    * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * ID>/flows/<Flow ID>`.
    * 
* * @@ -43,9 +43,9 @@ public interface StartExperimentRequestOrBuilder * * *
-   * Required. Resource name of the experiment to start.
+   * Required. The flow to validate.
    * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * ID>/flows/<Flow ID>`.
    * 
* * @@ -55,4 +55,29 @@ public interface StartExperimentRequestOrBuilder * @return The bytes for name. */ com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * If not specified, the agent's default language is used.
+   * 
+ * + * string language_code = 2; + * + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + /** + * + * + *
+   * If not specified, the agent's default language is used.
+   * 
+ * + * string language_code = 2; + * + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString getLanguageCodeBytes(); } diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidationMessage.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidationMessage.java new file mode 100644 index 000000000..1251d3987 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidationMessage.java @@ -0,0 +1,2346 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/validation_message.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * Agent/flow validation message.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ValidationMessage} + */ +public final class ValidationMessage extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ValidationMessage) + ValidationMessageOrBuilder { + private static final long serialVersionUID = 0L; + // Use ValidationMessage.newBuilder() to construct. + private ValidationMessage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ValidationMessage() { + resourceType_ = 0; + resources_ = com.google.protobuf.LazyStringArrayList.EMPTY; + resourceNames_ = java.util.Collections.emptyList(); + severity_ = 0; + detail_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ValidationMessage(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ValidationMessage( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + resourceType_ = rawValue; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + resources_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + resources_.add(s); + break; + } + case 24: + { + int rawValue = input.readEnum(); + + severity_ = rawValue; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + detail_ = s; + break; + } + case 50: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + resourceNames_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + resourceNames_.add( + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.ResourceName.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + resources_ = resources_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + resourceNames_ = java.util.Collections.unmodifiableList(resourceNames_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ValidationMessageProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ValidationMessage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ValidationMessageProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ValidationMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.class, + com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.Builder.class); + } + + /** + * + * + *
+   * Resource types.
+   * 
+ * + * Protobuf enum {@code google.cloud.dialogflow.cx.v3beta1.ValidationMessage.ResourceType} + */ + public enum ResourceType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified.
+     * 
+ * + * RESOURCE_TYPE_UNSPECIFIED = 0; + */ + RESOURCE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Agent.
+     * 
+ * + * AGENT = 1; + */ + AGENT(1), + /** + * + * + *
+     * Intent.
+     * 
+ * + * INTENT = 2; + */ + INTENT(2), + /** + * + * + *
+     * Intent training phrase.
+     * 
+ * + * INTENT_TRAINING_PHRASE = 8; + */ + INTENT_TRAINING_PHRASE(8), + /** + * + * + *
+     * Intent parameter.
+     * 
+ * + * INTENT_PARAMETER = 9; + */ + INTENT_PARAMETER(9), + /** + * + * + *
+     * Multiple intents.
+     * 
+ * + * INTENTS = 10; + */ + INTENTS(10), + /** + * + * + *
+     * Multiple training phrases.
+     * 
+ * + * INTENT_TRAINING_PHRASES = 11; + */ + INTENT_TRAINING_PHRASES(11), + /** + * + * + *
+     * Entity type.
+     * 
+ * + * ENTITY_TYPE = 3; + */ + ENTITY_TYPE(3), + /** + * + * + *
+     * Multiple entity types.
+     * 
+ * + * ENTITY_TYPES = 12; + */ + ENTITY_TYPES(12), + /** + * + * + *
+     * Webhook.
+     * 
+ * + * WEBHOOK = 4; + */ + WEBHOOK(4), + /** + * + * + *
+     * Flow.
+     * 
+ * + * FLOW = 5; + */ + FLOW(5), + /** + * + * + *
+     * Page.
+     * 
+ * + * PAGE = 6; + */ + PAGE(6), + /** + * + * + *
+     * Multiple pages.
+     * 
+ * + * PAGES = 13; + */ + PAGES(13), + /** + * + * + *
+     * Transition route group.
+     * 
+ * + * TRANSITION_ROUTE_GROUP = 7; + */ + TRANSITION_ROUTE_GROUP(7), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified.
+     * 
+ * + * RESOURCE_TYPE_UNSPECIFIED = 0; + */ + public static final int RESOURCE_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Agent.
+     * 
+ * + * AGENT = 1; + */ + public static final int AGENT_VALUE = 1; + /** + * + * + *
+     * Intent.
+     * 
+ * + * INTENT = 2; + */ + public static final int INTENT_VALUE = 2; + /** + * + * + *
+     * Intent training phrase.
+     * 
+ * + * INTENT_TRAINING_PHRASE = 8; + */ + public static final int INTENT_TRAINING_PHRASE_VALUE = 8; + /** + * + * + *
+     * Intent parameter.
+     * 
+ * + * INTENT_PARAMETER = 9; + */ + public static final int INTENT_PARAMETER_VALUE = 9; + /** + * + * + *
+     * Multiple intents.
+     * 
+ * + * INTENTS = 10; + */ + public static final int INTENTS_VALUE = 10; + /** + * + * + *
+     * Multiple training phrases.
+     * 
+ * + * INTENT_TRAINING_PHRASES = 11; + */ + public static final int INTENT_TRAINING_PHRASES_VALUE = 11; + /** + * + * + *
+     * Entity type.
+     * 
+ * + * ENTITY_TYPE = 3; + */ + public static final int ENTITY_TYPE_VALUE = 3; + /** + * + * + *
+     * Multiple entity types.
+     * 
+ * + * ENTITY_TYPES = 12; + */ + public static final int ENTITY_TYPES_VALUE = 12; + /** + * + * + *
+     * Webhook.
+     * 
+ * + * WEBHOOK = 4; + */ + public static final int WEBHOOK_VALUE = 4; + /** + * + * + *
+     * Flow.
+     * 
+ * + * FLOW = 5; + */ + public static final int FLOW_VALUE = 5; + /** + * + * + *
+     * Page.
+     * 
+ * + * PAGE = 6; + */ + public static final int PAGE_VALUE = 6; + /** + * + * + *
+     * Multiple pages.
+     * 
+ * + * PAGES = 13; + */ + public static final int PAGES_VALUE = 13; + /** + * + * + *
+     * Transition route group.
+     * 
+ * + * TRANSITION_ROUTE_GROUP = 7; + */ + public static final int TRANSITION_ROUTE_GROUP_VALUE = 7; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ResourceType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ResourceType forNumber(int value) { + switch (value) { + case 0: + return RESOURCE_TYPE_UNSPECIFIED; + case 1: + return AGENT; + case 2: + return INTENT; + case 8: + return INTENT_TRAINING_PHRASE; + case 9: + return INTENT_PARAMETER; + case 10: + return INTENTS; + case 11: + return INTENT_TRAINING_PHRASES; + case 3: + return ENTITY_TYPE; + case 12: + return ENTITY_TYPES; + case 4: + return WEBHOOK; + case 5: + return FLOW; + case 6: + return PAGE; + case 13: + return PAGES; + case 7: + return TRANSITION_ROUTE_GROUP; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ResourceType findValueByNumber(int number) { + return ResourceType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final ResourceType[] VALUES = values(); + + public static ResourceType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ResourceType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3beta1.ValidationMessage.ResourceType) + } + + /** + * + * + *
+   * Severity level.
+   * 
+ * + * Protobuf enum {@code google.cloud.dialogflow.cx.v3beta1.ValidationMessage.Severity} + */ + public enum Severity implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified.
+     * 
+ * + * SEVERITY_UNSPECIFIED = 0; + */ + SEVERITY_UNSPECIFIED(0), + /** + * + * + *
+     * The agent doesn't follow Dialogflow best practices.
+     * 
+ * + * INFO = 1; + */ + INFO(1), + /** + * + * + *
+     * The agent may not behave as expected.
+     * 
+ * + * WARNING = 2; + */ + WARNING(2), + /** + * + * + *
+     * The agent may experience failures.
+     * 
+ * + * ERROR = 3; + */ + ERROR(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified.
+     * 
+ * + * SEVERITY_UNSPECIFIED = 0; + */ + public static final int SEVERITY_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The agent doesn't follow Dialogflow best practices.
+     * 
+ * + * INFO = 1; + */ + public static final int INFO_VALUE = 1; + /** + * + * + *
+     * The agent may not behave as expected.
+     * 
+ * + * WARNING = 2; + */ + public static final int WARNING_VALUE = 2; + /** + * + * + *
+     * The agent may experience failures.
+     * 
+ * + * ERROR = 3; + */ + public static final int ERROR_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Severity valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Severity forNumber(int value) { + switch (value) { + case 0: + return SEVERITY_UNSPECIFIED; + case 1: + return INFO; + case 2: + return WARNING; + case 3: + return ERROR; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Severity findValueByNumber(int number) { + return Severity.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final Severity[] VALUES = values(); + + public static Severity valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Severity(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3beta1.ValidationMessage.Severity) + } + + public static final int RESOURCE_TYPE_FIELD_NUMBER = 1; + private int resourceType_; + /** + * + * + *
+   * The type of the resources where the message is found.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ValidationMessage.ResourceType resource_type = 1; + * + * + * @return The enum numeric value on the wire for resourceType. + */ + @java.lang.Override + public int getResourceTypeValue() { + return resourceType_; + } + /** + * + * + *
+   * The type of the resources where the message is found.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ValidationMessage.ResourceType resource_type = 1; + * + * + * @return The resourceType. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.ResourceType getResourceType() { + @SuppressWarnings("deprecation") + com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.ResourceType result = + com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.ResourceType.valueOf( + resourceType_); + return result == null + ? com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.ResourceType.UNRECOGNIZED + : result; + } + + public static final int RESOURCES_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList resources_; + /** + * + * + *
+   * The names of the resources where the message is found.
+   * 
+ * + * repeated string resources = 2 [deprecated = true]; + * + * @return A list containing the resources. + */ + @java.lang.Deprecated + public com.google.protobuf.ProtocolStringList getResourcesList() { + return resources_; + } + /** + * + * + *
+   * The names of the resources where the message is found.
+   * 
+ * + * repeated string resources = 2 [deprecated = true]; + * + * @return The count of resources. + */ + @java.lang.Deprecated + public int getResourcesCount() { + return resources_.size(); + } + /** + * + * + *
+   * The names of the resources where the message is found.
+   * 
+ * + * repeated string resources = 2 [deprecated = true]; + * + * @param index The index of the element to return. + * @return The resources at the given index. + */ + @java.lang.Deprecated + public java.lang.String getResources(int index) { + return resources_.get(index); + } + /** + * + * + *
+   * The names of the resources where the message is found.
+   * 
+ * + * repeated string resources = 2 [deprecated = true]; + * + * @param index The index of the value to return. + * @return The bytes of the resources at the given index. + */ + @java.lang.Deprecated + public com.google.protobuf.ByteString getResourcesBytes(int index) { + return resources_.getByteString(index); + } + + public static final int RESOURCE_NAMES_FIELD_NUMBER = 6; + private java.util.List resourceNames_; + /** + * + * + *
+   * The resource names of the resources where the message is found.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResourceName resource_names = 6; + */ + @java.lang.Override + public java.util.List + getResourceNamesList() { + return resourceNames_; + } + /** + * + * + *
+   * The resource names of the resources where the message is found.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResourceName resource_names = 6; + */ + @java.lang.Override + public java.util.List + getResourceNamesOrBuilderList() { + return resourceNames_; + } + /** + * + * + *
+   * The resource names of the resources where the message is found.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResourceName resource_names = 6; + */ + @java.lang.Override + public int getResourceNamesCount() { + return resourceNames_.size(); + } + /** + * + * + *
+   * The resource names of the resources where the message is found.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResourceName resource_names = 6; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ResourceName getResourceNames(int index) { + return resourceNames_.get(index); + } + /** + * + * + *
+   * The resource names of the resources where the message is found.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResourceName resource_names = 6; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ResourceNameOrBuilder getResourceNamesOrBuilder( + int index) { + return resourceNames_.get(index); + } + + public static final int SEVERITY_FIELD_NUMBER = 3; + private int severity_; + /** + * + * + *
+   * Indicates the severity of the message.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ValidationMessage.Severity severity = 3; + * + * @return The enum numeric value on the wire for severity. + */ + @java.lang.Override + public int getSeverityValue() { + return severity_; + } + /** + * + * + *
+   * Indicates the severity of the message.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ValidationMessage.Severity severity = 3; + * + * @return The severity. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.Severity getSeverity() { + @SuppressWarnings("deprecation") + com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.Severity result = + com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.Severity.valueOf(severity_); + return result == null + ? com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.Severity.UNRECOGNIZED + : result; + } + + public static final int DETAIL_FIELD_NUMBER = 4; + private volatile java.lang.Object detail_; + /** + * + * + *
+   * The message detail.
+   * 
+ * + * string detail = 4; + * + * @return The detail. + */ + @java.lang.Override + public java.lang.String getDetail() { + java.lang.Object ref = detail_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + detail_ = s; + return s; + } + } + /** + * + * + *
+   * The message detail.
+   * 
+ * + * string detail = 4; + * + * @return The bytes for detail. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDetailBytes() { + java.lang.Object ref = detail_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + detail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (resourceType_ + != com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.ResourceType + .RESOURCE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, resourceType_); + } + for (int i = 0; i < resources_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, resources_.getRaw(i)); + } + if (severity_ + != com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.Severity.SEVERITY_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, severity_); + } + if (!getDetailBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, detail_); + } + for (int i = 0; i < resourceNames_.size(); i++) { + output.writeMessage(6, resourceNames_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (resourceType_ + != com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.ResourceType + .RESOURCE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, resourceType_); + } + { + int dataSize = 0; + for (int i = 0; i < resources_.size(); i++) { + dataSize += computeStringSizeNoTag(resources_.getRaw(i)); + } + size += dataSize; + size += 1 * getResourcesList().size(); + } + if (severity_ + != com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.Severity.SEVERITY_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, severity_); + } + if (!getDetailBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, detail_); + } + for (int i = 0; i < resourceNames_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, resourceNames_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage other = + (com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage) obj; + + if (resourceType_ != other.resourceType_) return false; + if (!getResourcesList().equals(other.getResourcesList())) return false; + if (!getResourceNamesList().equals(other.getResourceNamesList())) return false; + if (severity_ != other.severity_) return false; + if (!getDetail().equals(other.getDetail())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + RESOURCE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + resourceType_; + if (getResourcesCount() > 0) { + hash = (37 * hash) + RESOURCES_FIELD_NUMBER; + hash = (53 * hash) + getResourcesList().hashCode(); + } + if (getResourceNamesCount() > 0) { + hash = (37 * hash) + RESOURCE_NAMES_FIELD_NUMBER; + hash = (53 * hash) + getResourceNamesList().hashCode(); + } + hash = (37 * hash) + SEVERITY_FIELD_NUMBER; + hash = (53 * hash) + severity_; + hash = (37 * hash) + DETAIL_FIELD_NUMBER; + hash = (53 * hash) + getDetail().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Agent/flow validation message.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ValidationMessage} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ValidationMessage) + com.google.cloud.dialogflow.cx.v3beta1.ValidationMessageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ValidationMessageProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ValidationMessage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ValidationMessageProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ValidationMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.class, + com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getResourceNamesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + resourceType_ = 0; + + resources_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + if (resourceNamesBuilder_ == null) { + resourceNames_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + resourceNamesBuilder_.clear(); + } + severity_ = 0; + + detail_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ValidationMessageProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ValidationMessage_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage build() { + com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage result = + new com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage(this); + int from_bitField0_ = bitField0_; + result.resourceType_ = resourceType_; + if (((bitField0_ & 0x00000001) != 0)) { + resources_ = resources_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.resources_ = resources_; + if (resourceNamesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + resourceNames_ = java.util.Collections.unmodifiableList(resourceNames_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.resourceNames_ = resourceNames_; + } else { + result.resourceNames_ = resourceNamesBuilder_.build(); + } + result.severity_ = severity_; + result.detail_ = detail_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.getDefaultInstance()) + return this; + if (other.resourceType_ != 0) { + setResourceTypeValue(other.getResourceTypeValue()); + } + if (!other.resources_.isEmpty()) { + if (resources_.isEmpty()) { + resources_ = other.resources_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureResourcesIsMutable(); + resources_.addAll(other.resources_); + } + onChanged(); + } + if (resourceNamesBuilder_ == null) { + if (!other.resourceNames_.isEmpty()) { + if (resourceNames_.isEmpty()) { + resourceNames_ = other.resourceNames_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureResourceNamesIsMutable(); + resourceNames_.addAll(other.resourceNames_); + } + onChanged(); + } + } else { + if (!other.resourceNames_.isEmpty()) { + if (resourceNamesBuilder_.isEmpty()) { + resourceNamesBuilder_.dispose(); + resourceNamesBuilder_ = null; + resourceNames_ = other.resourceNames_; + bitField0_ = (bitField0_ & ~0x00000002); + resourceNamesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getResourceNamesFieldBuilder() + : null; + } else { + resourceNamesBuilder_.addAllMessages(other.resourceNames_); + } + } + } + if (other.severity_ != 0) { + setSeverityValue(other.getSeverityValue()); + } + if (!other.getDetail().isEmpty()) { + detail_ = other.detail_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private int resourceType_ = 0; + /** + * + * + *
+     * The type of the resources where the message is found.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ValidationMessage.ResourceType resource_type = 1; + * + * + * @return The enum numeric value on the wire for resourceType. + */ + @java.lang.Override + public int getResourceTypeValue() { + return resourceType_; + } + /** + * + * + *
+     * The type of the resources where the message is found.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ValidationMessage.ResourceType resource_type = 1; + * + * + * @param value The enum numeric value on the wire for resourceType to set. + * @return This builder for chaining. + */ + public Builder setResourceTypeValue(int value) { + + resourceType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The type of the resources where the message is found.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ValidationMessage.ResourceType resource_type = 1; + * + * + * @return The resourceType. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.ResourceType getResourceType() { + @SuppressWarnings("deprecation") + com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.ResourceType result = + com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.ResourceType.valueOf( + resourceType_); + return result == null + ? com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.ResourceType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The type of the resources where the message is found.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ValidationMessage.ResourceType resource_type = 1; + * + * + * @param value The resourceType to set. + * @return This builder for chaining. + */ + public Builder setResourceType( + com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.ResourceType value) { + if (value == null) { + throw new NullPointerException(); + } + + resourceType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The type of the resources where the message is found.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ValidationMessage.ResourceType resource_type = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearResourceType() { + + resourceType_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList resources_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureResourcesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + resources_ = new com.google.protobuf.LazyStringArrayList(resources_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * The names of the resources where the message is found.
+     * 
+ * + * repeated string resources = 2 [deprecated = true]; + * + * @return A list containing the resources. + */ + @java.lang.Deprecated + public com.google.protobuf.ProtocolStringList getResourcesList() { + return resources_.getUnmodifiableView(); + } + /** + * + * + *
+     * The names of the resources where the message is found.
+     * 
+ * + * repeated string resources = 2 [deprecated = true]; + * + * @return The count of resources. + */ + @java.lang.Deprecated + public int getResourcesCount() { + return resources_.size(); + } + /** + * + * + *
+     * The names of the resources where the message is found.
+     * 
+ * + * repeated string resources = 2 [deprecated = true]; + * + * @param index The index of the element to return. + * @return The resources at the given index. + */ + @java.lang.Deprecated + public java.lang.String getResources(int index) { + return resources_.get(index); + } + /** + * + * + *
+     * The names of the resources where the message is found.
+     * 
+ * + * repeated string resources = 2 [deprecated = true]; + * + * @param index The index of the value to return. + * @return The bytes of the resources at the given index. + */ + @java.lang.Deprecated + public com.google.protobuf.ByteString getResourcesBytes(int index) { + return resources_.getByteString(index); + } + /** + * + * + *
+     * The names of the resources where the message is found.
+     * 
+ * + * repeated string resources = 2 [deprecated = true]; + * + * @param index The index to set the value at. + * @param value The resources to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setResources(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourcesIsMutable(); + resources_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * The names of the resources where the message is found.
+     * 
+ * + * repeated string resources = 2 [deprecated = true]; + * + * @param value The resources to add. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder addResources(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourcesIsMutable(); + resources_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * The names of the resources where the message is found.
+     * 
+ * + * repeated string resources = 2 [deprecated = true]; + * + * @param values The resources to add. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder addAllResources(java.lang.Iterable values) { + ensureResourcesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, resources_); + onChanged(); + return this; + } + /** + * + * + *
+     * The names of the resources where the message is found.
+     * 
+ * + * repeated string resources = 2 [deprecated = true]; + * + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder clearResources() { + resources_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The names of the resources where the message is found.
+     * 
+ * + * repeated string resources = 2 [deprecated = true]; + * + * @param value The bytes of the resources to add. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder addResourcesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureResourcesIsMutable(); + resources_.add(value); + onChanged(); + return this; + } + + private java.util.List resourceNames_ = + java.util.Collections.emptyList(); + + private void ensureResourceNamesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + resourceNames_ = + new java.util.ArrayList( + resourceNames_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ResourceName, + com.google.cloud.dialogflow.cx.v3beta1.ResourceName.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ResourceNameOrBuilder> + resourceNamesBuilder_; + + /** + * + * + *
+     * The resource names of the resources where the message is found.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResourceName resource_names = 6; + */ + public java.util.List + getResourceNamesList() { + if (resourceNamesBuilder_ == null) { + return java.util.Collections.unmodifiableList(resourceNames_); + } else { + return resourceNamesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The resource names of the resources where the message is found.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResourceName resource_names = 6; + */ + public int getResourceNamesCount() { + if (resourceNamesBuilder_ == null) { + return resourceNames_.size(); + } else { + return resourceNamesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The resource names of the resources where the message is found.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResourceName resource_names = 6; + */ + public com.google.cloud.dialogflow.cx.v3beta1.ResourceName getResourceNames(int index) { + if (resourceNamesBuilder_ == null) { + return resourceNames_.get(index); + } else { + return resourceNamesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The resource names of the resources where the message is found.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResourceName resource_names = 6; + */ + public Builder setResourceNames( + int index, com.google.cloud.dialogflow.cx.v3beta1.ResourceName value) { + if (resourceNamesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourceNamesIsMutable(); + resourceNames_.set(index, value); + onChanged(); + } else { + resourceNamesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The resource names of the resources where the message is found.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResourceName resource_names = 6; + */ + public Builder setResourceNames( + int index, com.google.cloud.dialogflow.cx.v3beta1.ResourceName.Builder builderForValue) { + if (resourceNamesBuilder_ == null) { + ensureResourceNamesIsMutable(); + resourceNames_.set(index, builderForValue.build()); + onChanged(); + } else { + resourceNamesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The resource names of the resources where the message is found.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResourceName resource_names = 6; + */ + public Builder addResourceNames(com.google.cloud.dialogflow.cx.v3beta1.ResourceName value) { + if (resourceNamesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourceNamesIsMutable(); + resourceNames_.add(value); + onChanged(); + } else { + resourceNamesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The resource names of the resources where the message is found.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResourceName resource_names = 6; + */ + public Builder addResourceNames( + int index, com.google.cloud.dialogflow.cx.v3beta1.ResourceName value) { + if (resourceNamesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourceNamesIsMutable(); + resourceNames_.add(index, value); + onChanged(); + } else { + resourceNamesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The resource names of the resources where the message is found.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResourceName resource_names = 6; + */ + public Builder addResourceNames( + com.google.cloud.dialogflow.cx.v3beta1.ResourceName.Builder builderForValue) { + if (resourceNamesBuilder_ == null) { + ensureResourceNamesIsMutable(); + resourceNames_.add(builderForValue.build()); + onChanged(); + } else { + resourceNamesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The resource names of the resources where the message is found.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResourceName resource_names = 6; + */ + public Builder addResourceNames( + int index, com.google.cloud.dialogflow.cx.v3beta1.ResourceName.Builder builderForValue) { + if (resourceNamesBuilder_ == null) { + ensureResourceNamesIsMutable(); + resourceNames_.add(index, builderForValue.build()); + onChanged(); + } else { + resourceNamesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The resource names of the resources where the message is found.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResourceName resource_names = 6; + */ + public Builder addAllResourceNames( + java.lang.Iterable values) { + if (resourceNamesBuilder_ == null) { + ensureResourceNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, resourceNames_); + onChanged(); + } else { + resourceNamesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The resource names of the resources where the message is found.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResourceName resource_names = 6; + */ + public Builder clearResourceNames() { + if (resourceNamesBuilder_ == null) { + resourceNames_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + resourceNamesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The resource names of the resources where the message is found.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResourceName resource_names = 6; + */ + public Builder removeResourceNames(int index) { + if (resourceNamesBuilder_ == null) { + ensureResourceNamesIsMutable(); + resourceNames_.remove(index); + onChanged(); + } else { + resourceNamesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The resource names of the resources where the message is found.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResourceName resource_names = 6; + */ + public com.google.cloud.dialogflow.cx.v3beta1.ResourceName.Builder getResourceNamesBuilder( + int index) { + return getResourceNamesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The resource names of the resources where the message is found.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResourceName resource_names = 6; + */ + public com.google.cloud.dialogflow.cx.v3beta1.ResourceNameOrBuilder getResourceNamesOrBuilder( + int index) { + if (resourceNamesBuilder_ == null) { + return resourceNames_.get(index); + } else { + return resourceNamesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The resource names of the resources where the message is found.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResourceName resource_names = 6; + */ + public java.util.List + getResourceNamesOrBuilderList() { + if (resourceNamesBuilder_ != null) { + return resourceNamesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(resourceNames_); + } + } + /** + * + * + *
+     * The resource names of the resources where the message is found.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResourceName resource_names = 6; + */ + public com.google.cloud.dialogflow.cx.v3beta1.ResourceName.Builder addResourceNamesBuilder() { + return getResourceNamesFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3beta1.ResourceName.getDefaultInstance()); + } + /** + * + * + *
+     * The resource names of the resources where the message is found.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResourceName resource_names = 6; + */ + public com.google.cloud.dialogflow.cx.v3beta1.ResourceName.Builder addResourceNamesBuilder( + int index) { + return getResourceNamesFieldBuilder() + .addBuilder( + index, com.google.cloud.dialogflow.cx.v3beta1.ResourceName.getDefaultInstance()); + } + /** + * + * + *
+     * The resource names of the resources where the message is found.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResourceName resource_names = 6; + */ + public java.util.List + getResourceNamesBuilderList() { + return getResourceNamesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ResourceName, + com.google.cloud.dialogflow.cx.v3beta1.ResourceName.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ResourceNameOrBuilder> + getResourceNamesFieldBuilder() { + if (resourceNamesBuilder_ == null) { + resourceNamesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ResourceName, + com.google.cloud.dialogflow.cx.v3beta1.ResourceName.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ResourceNameOrBuilder>( + resourceNames_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + resourceNames_ = null; + } + return resourceNamesBuilder_; + } + + private int severity_ = 0; + /** + * + * + *
+     * Indicates the severity of the message.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ValidationMessage.Severity severity = 3; + * + * @return The enum numeric value on the wire for severity. + */ + @java.lang.Override + public int getSeverityValue() { + return severity_; + } + /** + * + * + *
+     * Indicates the severity of the message.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ValidationMessage.Severity severity = 3; + * + * @param value The enum numeric value on the wire for severity to set. + * @return This builder for chaining. + */ + public Builder setSeverityValue(int value) { + + severity_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates the severity of the message.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ValidationMessage.Severity severity = 3; + * + * @return The severity. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.Severity getSeverity() { + @SuppressWarnings("deprecation") + com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.Severity result = + com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.Severity.valueOf(severity_); + return result == null + ? com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.Severity.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Indicates the severity of the message.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ValidationMessage.Severity severity = 3; + * + * @param value The severity to set. + * @return This builder for chaining. + */ + public Builder setSeverity( + com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.Severity value) { + if (value == null) { + throw new NullPointerException(); + } + + severity_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates the severity of the message.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ValidationMessage.Severity severity = 3; + * + * @return This builder for chaining. + */ + public Builder clearSeverity() { + + severity_ = 0; + onChanged(); + return this; + } + + private java.lang.Object detail_ = ""; + /** + * + * + *
+     * The message detail.
+     * 
+ * + * string detail = 4; + * + * @return The detail. + */ + public java.lang.String getDetail() { + java.lang.Object ref = detail_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + detail_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The message detail.
+     * 
+ * + * string detail = 4; + * + * @return The bytes for detail. + */ + public com.google.protobuf.ByteString getDetailBytes() { + java.lang.Object ref = detail_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + detail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The message detail.
+     * 
+ * + * string detail = 4; + * + * @param value The detail to set. + * @return This builder for chaining. + */ + public Builder setDetail(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + detail_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The message detail.
+     * 
+ * + * string detail = 4; + * + * @return This builder for chaining. + */ + public Builder clearDetail() { + + detail_ = getDefaultInstance().getDetail(); + onChanged(); + return this; + } + /** + * + * + *
+     * The message detail.
+     * 
+ * + * string detail = 4; + * + * @param value The bytes for detail to set. + * @return This builder for chaining. + */ + public Builder setDetailBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + detail_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ValidationMessage) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ValidationMessage) + private static final com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ValidationMessage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ValidationMessage(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidationMessageOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidationMessageOrBuilder.java new file mode 100644 index 000000000..391b12c4f --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidationMessageOrBuilder.java @@ -0,0 +1,209 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/validation_message.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface ValidationMessageOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ValidationMessage) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The type of the resources where the message is found.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ValidationMessage.ResourceType resource_type = 1; + * + * + * @return The enum numeric value on the wire for resourceType. + */ + int getResourceTypeValue(); + /** + * + * + *
+   * The type of the resources where the message is found.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ValidationMessage.ResourceType resource_type = 1; + * + * + * @return The resourceType. + */ + com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.ResourceType getResourceType(); + + /** + * + * + *
+   * The names of the resources where the message is found.
+   * 
+ * + * repeated string resources = 2 [deprecated = true]; + * + * @return A list containing the resources. + */ + @java.lang.Deprecated + java.util.List getResourcesList(); + /** + * + * + *
+   * The names of the resources where the message is found.
+   * 
+ * + * repeated string resources = 2 [deprecated = true]; + * + * @return The count of resources. + */ + @java.lang.Deprecated + int getResourcesCount(); + /** + * + * + *
+   * The names of the resources where the message is found.
+   * 
+ * + * repeated string resources = 2 [deprecated = true]; + * + * @param index The index of the element to return. + * @return The resources at the given index. + */ + @java.lang.Deprecated + java.lang.String getResources(int index); + /** + * + * + *
+   * The names of the resources where the message is found.
+   * 
+ * + * repeated string resources = 2 [deprecated = true]; + * + * @param index The index of the value to return. + * @return The bytes of the resources at the given index. + */ + @java.lang.Deprecated + com.google.protobuf.ByteString getResourcesBytes(int index); + + /** + * + * + *
+   * The resource names of the resources where the message is found.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResourceName resource_names = 6; + */ + java.util.List getResourceNamesList(); + /** + * + * + *
+   * The resource names of the resources where the message is found.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResourceName resource_names = 6; + */ + com.google.cloud.dialogflow.cx.v3beta1.ResourceName getResourceNames(int index); + /** + * + * + *
+   * The resource names of the resources where the message is found.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResourceName resource_names = 6; + */ + int getResourceNamesCount(); + /** + * + * + *
+   * The resource names of the resources where the message is found.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResourceName resource_names = 6; + */ + java.util.List + getResourceNamesOrBuilderList(); + /** + * + * + *
+   * The resource names of the resources where the message is found.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResourceName resource_names = 6; + */ + com.google.cloud.dialogflow.cx.v3beta1.ResourceNameOrBuilder getResourceNamesOrBuilder(int index); + + /** + * + * + *
+   * Indicates the severity of the message.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ValidationMessage.Severity severity = 3; + * + * @return The enum numeric value on the wire for severity. + */ + int getSeverityValue(); + /** + * + * + *
+   * Indicates the severity of the message.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ValidationMessage.Severity severity = 3; + * + * @return The severity. + */ + com.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.Severity getSeverity(); + + /** + * + * + *
+   * The message detail.
+   * 
+ * + * string detail = 4; + * + * @return The detail. + */ + java.lang.String getDetail(); + /** + * + * + *
+   * The message detail.
+   * 
+ * + * string detail = 4; + * + * @return The bytes for detail. + */ + com.google.protobuf.ByteString getDetailBytes(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidationMessageProto.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidationMessageProto.java new file mode 100644 index 000000000..16e7fa86f --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidationMessageProto.java @@ -0,0 +1,103 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/validation_message.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public final class ValidationMessageProto { + private ValidationMessageProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_ValidationMessage_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_ValidationMessage_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_ResourceName_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_ResourceName_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n;google/cloud/dialogflow/cx/v3beta1/val" + + "idation_message.proto\022\"google.cloud.dial" + + "ogflow.cx.v3beta1\032\034google/protobuf/struc" + + "t.proto\032\034google/api/annotations.proto\"\207\005" + + "\n\021ValidationMessage\022Y\n\rresource_type\030\001 \001" + + "(\0162B.google.cloud.dialogflow.cx.v3beta1." + + "ValidationMessage.ResourceType\022\025\n\tresour" + + "ces\030\002 \003(\tB\002\030\001\022H\n\016resource_names\030\006 \003(\01320." + + "google.cloud.dialogflow.cx.v3beta1.Resou" + + "rceName\022P\n\010severity\030\003 \001(\0162>.google.cloud" + + ".dialogflow.cx.v3beta1.ValidationMessage" + + ".Severity\022\016\n\006detail\030\004 \001(\t\"\213\002\n\014ResourceTy" + + "pe\022\035\n\031RESOURCE_TYPE_UNSPECIFIED\020\000\022\t\n\005AGE" + + "NT\020\001\022\n\n\006INTENT\020\002\022\032\n\026INTENT_TRAINING_PHRA" + + "SE\020\010\022\024\n\020INTENT_PARAMETER\020\t\022\013\n\007INTENTS\020\n\022" + + "\033\n\027INTENT_TRAINING_PHRASES\020\013\022\017\n\013ENTITY_T" + + "YPE\020\003\022\020\n\014ENTITY_TYPES\020\014\022\013\n\007WEBHOOK\020\004\022\010\n\004" + + "FLOW\020\005\022\010\n\004PAGE\020\006\022\t\n\005PAGES\020\r\022\032\n\026TRANSITIO" + + "N_ROUTE_GROUP\020\007\"F\n\010Severity\022\030\n\024SEVERITY_" + + "UNSPECIFIED\020\000\022\010\n\004INFO\020\001\022\013\n\007WARNING\020\002\022\t\n\005" + + "ERROR\020\003\"2\n\014ResourceName\022\014\n\004name\030\001 \001(\t\022\024\n" + + "\014display_name\030\002 \001(\tB\265\001\n&com.google.cloud" + + ".dialogflow.cx.v3beta1B\026ValidationMessag" + + "eProtoP\001ZDgoogle.golang.org/genproto/goo" + + "gleapis/cloud/dialogflow/cx/v3beta1;cx\370\001" + + "\001\242\002\002DF\252\002\"Google.Cloud.Dialogflow.Cx.V3Be" + + "ta1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.StructProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_ValidationMessage_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_dialogflow_cx_v3beta1_ValidationMessage_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_ValidationMessage_descriptor, + new java.lang.String[] { + "ResourceType", "Resources", "ResourceNames", "Severity", "Detail", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_ResourceName_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_dialogflow_cx_v3beta1_ResourceName_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_ResourceName_descriptor, + new java.lang.String[] { + "Name", "DisplayName", + }); + com.google.protobuf.StructProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VariantsHistory.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VariantsHistory.java deleted file mode 100644 index 77706d146..000000000 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VariantsHistory.java +++ /dev/null @@ -1,1118 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dialogflow/cx/v3beta1/experiment.proto - -package com.google.cloud.dialogflow.cx.v3beta1; - -/** - * - * - *
- * The history of variants update.
- * 
- * - * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.VariantsHistory} - */ -public final class VariantsHistory extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.VariantsHistory) - VariantsHistoryOrBuilder { - private static final long serialVersionUID = 0L; - // Use VariantsHistory.newBuilder() to construct. - private VariantsHistory(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private VariantsHistory() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new VariantsHistory(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private VariantsHistory( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Builder subBuilder = null; - if (variantsCase_ == 1) { - subBuilder = - ((com.google.cloud.dialogflow.cx.v3beta1.VersionVariants) variants_) - .toBuilder(); - } - variants_ = - input.readMessage( - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.dialogflow.cx.v3beta1.VersionVariants) variants_); - variants_ = subBuilder.buildPartial(); - } - variantsCase_ = 1; - break; - } - case 18: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (updateTime_ != null) { - subBuilder = updateTime_.toBuilder(); - } - updateTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateTime_); - updateTime_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_VariantsHistory_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_VariantsHistory_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory.class, - com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory.Builder.class); - } - - private int variantsCase_ = 0; - private java.lang.Object variants_; - - public enum VariantsCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - VERSION_VARIANTS(1), - VARIANTS_NOT_SET(0); - private final int value; - - private VariantsCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static VariantsCase valueOf(int value) { - return forNumber(value); - } - - public static VariantsCase forNumber(int value) { - switch (value) { - case 1: - return VERSION_VARIANTS; - case 0: - return VARIANTS_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public VariantsCase getVariantsCase() { - return VariantsCase.forNumber(variantsCase_); - } - - public static final int VERSION_VARIANTS_FIELD_NUMBER = 1; - /** - * - * - *
-   * The flow versions as the variants.
-   * 
- * - * .google.cloud.dialogflow.cx.v3beta1.VersionVariants version_variants = 1; - * - * @return Whether the versionVariants field is set. - */ - @java.lang.Override - public boolean hasVersionVariants() { - return variantsCase_ == 1; - } - /** - * - * - *
-   * The flow versions as the variants.
-   * 
- * - * .google.cloud.dialogflow.cx.v3beta1.VersionVariants version_variants = 1; - * - * @return The versionVariants. - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.VersionVariants getVersionVariants() { - if (variantsCase_ == 1) { - return (com.google.cloud.dialogflow.cx.v3beta1.VersionVariants) variants_; - } - return com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.getDefaultInstance(); - } - /** - * - * - *
-   * The flow versions as the variants.
-   * 
- * - * .google.cloud.dialogflow.cx.v3beta1.VersionVariants version_variants = 1; - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.VersionVariantsOrBuilder - getVersionVariantsOrBuilder() { - if (variantsCase_ == 1) { - return (com.google.cloud.dialogflow.cx.v3beta1.VersionVariants) variants_; - } - return com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.getDefaultInstance(); - } - - public static final int UPDATE_TIME_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp updateTime_; - /** - * - * - *
-   * Update time of the variants.
-   * 
- * - * .google.protobuf.Timestamp update_time = 2; - * - * @return Whether the updateTime field is set. - */ - @java.lang.Override - public boolean hasUpdateTime() { - return updateTime_ != null; - } - /** - * - * - *
-   * Update time of the variants.
-   * 
- * - * .google.protobuf.Timestamp update_time = 2; - * - * @return The updateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getUpdateTime() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - /** - * - * - *
-   * Update time of the variants.
-   * 
- * - * .google.protobuf.Timestamp update_time = 2; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - return getUpdateTime(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (variantsCase_ == 1) { - output.writeMessage(1, (com.google.cloud.dialogflow.cx.v3beta1.VersionVariants) variants_); - } - if (updateTime_ != null) { - output.writeMessage(2, getUpdateTime()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (variantsCase_ == 1) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 1, (com.google.cloud.dialogflow.cx.v3beta1.VersionVariants) variants_); - } - if (updateTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateTime()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory)) { - return super.equals(obj); - } - com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory other = - (com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory) obj; - - if (hasUpdateTime() != other.hasUpdateTime()) return false; - if (hasUpdateTime()) { - if (!getUpdateTime().equals(other.getUpdateTime())) return false; - } - if (!getVariantsCase().equals(other.getVariantsCase())) return false; - switch (variantsCase_) { - case 1: - if (!getVersionVariants().equals(other.getVersionVariants())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasUpdateTime()) { - hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getUpdateTime().hashCode(); - } - switch (variantsCase_) { - case 1: - hash = (37 * hash) + VERSION_VARIANTS_FIELD_NUMBER; - hash = (53 * hash) + getVersionVariants().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * The history of variants update.
-   * 
- * - * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.VariantsHistory} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.VariantsHistory) - com.google.cloud.dialogflow.cx.v3beta1.VariantsHistoryOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_VariantsHistory_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_VariantsHistory_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory.class, - com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory.Builder.class); - } - - // Construct using com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (updateTimeBuilder_ == null) { - updateTime_ = null; - } else { - updateTime_ = null; - updateTimeBuilder_ = null; - } - variantsCase_ = 0; - variants_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_VariantsHistory_descriptor; - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory getDefaultInstanceForType() { - return com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory build() { - com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory buildPartial() { - com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory result = - new com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory(this); - if (variantsCase_ == 1) { - if (versionVariantsBuilder_ == null) { - result.variants_ = variants_; - } else { - result.variants_ = versionVariantsBuilder_.build(); - } - } - if (updateTimeBuilder_ == null) { - result.updateTime_ = updateTime_; - } else { - result.updateTime_ = updateTimeBuilder_.build(); - } - result.variantsCase_ = variantsCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory) { - return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory other) { - if (other == com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory.getDefaultInstance()) - return this; - if (other.hasUpdateTime()) { - mergeUpdateTime(other.getUpdateTime()); - } - switch (other.getVariantsCase()) { - case VERSION_VARIANTS: - { - mergeVersionVariants(other.getVersionVariants()); - break; - } - case VARIANTS_NOT_SET: - { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int variantsCase_ = 0; - private java.lang.Object variants_; - - public VariantsCase getVariantsCase() { - return VariantsCase.forNumber(variantsCase_); - } - - public Builder clearVariants() { - variantsCase_ = 0; - variants_ = null; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants, - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Builder, - com.google.cloud.dialogflow.cx.v3beta1.VersionVariantsOrBuilder> - versionVariantsBuilder_; - /** - * - * - *
-     * The flow versions as the variants.
-     * 
- * - * .google.cloud.dialogflow.cx.v3beta1.VersionVariants version_variants = 1; - * - * @return Whether the versionVariants field is set. - */ - @java.lang.Override - public boolean hasVersionVariants() { - return variantsCase_ == 1; - } - /** - * - * - *
-     * The flow versions as the variants.
-     * 
- * - * .google.cloud.dialogflow.cx.v3beta1.VersionVariants version_variants = 1; - * - * @return The versionVariants. - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.VersionVariants getVersionVariants() { - if (versionVariantsBuilder_ == null) { - if (variantsCase_ == 1) { - return (com.google.cloud.dialogflow.cx.v3beta1.VersionVariants) variants_; - } - return com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.getDefaultInstance(); - } else { - if (variantsCase_ == 1) { - return versionVariantsBuilder_.getMessage(); - } - return com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.getDefaultInstance(); - } - } - /** - * - * - *
-     * The flow versions as the variants.
-     * 
- * - * .google.cloud.dialogflow.cx.v3beta1.VersionVariants version_variants = 1; - */ - public Builder setVersionVariants( - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants value) { - if (versionVariantsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - variants_ = value; - onChanged(); - } else { - versionVariantsBuilder_.setMessage(value); - } - variantsCase_ = 1; - return this; - } - /** - * - * - *
-     * The flow versions as the variants.
-     * 
- * - * .google.cloud.dialogflow.cx.v3beta1.VersionVariants version_variants = 1; - */ - public Builder setVersionVariants( - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Builder builderForValue) { - if (versionVariantsBuilder_ == null) { - variants_ = builderForValue.build(); - onChanged(); - } else { - versionVariantsBuilder_.setMessage(builderForValue.build()); - } - variantsCase_ = 1; - return this; - } - /** - * - * - *
-     * The flow versions as the variants.
-     * 
- * - * .google.cloud.dialogflow.cx.v3beta1.VersionVariants version_variants = 1; - */ - public Builder mergeVersionVariants( - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants value) { - if (versionVariantsBuilder_ == null) { - if (variantsCase_ == 1 - && variants_ - != com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.getDefaultInstance()) { - variants_ = - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.newBuilder( - (com.google.cloud.dialogflow.cx.v3beta1.VersionVariants) variants_) - .mergeFrom(value) - .buildPartial(); - } else { - variants_ = value; - } - onChanged(); - } else { - if (variantsCase_ == 1) { - versionVariantsBuilder_.mergeFrom(value); - } - versionVariantsBuilder_.setMessage(value); - } - variantsCase_ = 1; - return this; - } - /** - * - * - *
-     * The flow versions as the variants.
-     * 
- * - * .google.cloud.dialogflow.cx.v3beta1.VersionVariants version_variants = 1; - */ - public Builder clearVersionVariants() { - if (versionVariantsBuilder_ == null) { - if (variantsCase_ == 1) { - variantsCase_ = 0; - variants_ = null; - onChanged(); - } - } else { - if (variantsCase_ == 1) { - variantsCase_ = 0; - variants_ = null; - } - versionVariantsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * The flow versions as the variants.
-     * 
- * - * .google.cloud.dialogflow.cx.v3beta1.VersionVariants version_variants = 1; - */ - public com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Builder - getVersionVariantsBuilder() { - return getVersionVariantsFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The flow versions as the variants.
-     * 
- * - * .google.cloud.dialogflow.cx.v3beta1.VersionVariants version_variants = 1; - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.VersionVariantsOrBuilder - getVersionVariantsOrBuilder() { - if ((variantsCase_ == 1) && (versionVariantsBuilder_ != null)) { - return versionVariantsBuilder_.getMessageOrBuilder(); - } else { - if (variantsCase_ == 1) { - return (com.google.cloud.dialogflow.cx.v3beta1.VersionVariants) variants_; - } - return com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.getDefaultInstance(); - } - } - /** - * - * - *
-     * The flow versions as the variants.
-     * 
- * - * .google.cloud.dialogflow.cx.v3beta1.VersionVariants version_variants = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants, - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Builder, - com.google.cloud.dialogflow.cx.v3beta1.VersionVariantsOrBuilder> - getVersionVariantsFieldBuilder() { - if (versionVariantsBuilder_ == null) { - if (!(variantsCase_ == 1)) { - variants_ = com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.getDefaultInstance(); - } - versionVariantsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants, - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Builder, - com.google.cloud.dialogflow.cx.v3beta1.VersionVariantsOrBuilder>( - (com.google.cloud.dialogflow.cx.v3beta1.VersionVariants) variants_, - getParentForChildren(), - isClean()); - variants_ = null; - } - variantsCase_ = 1; - onChanged(); - ; - return versionVariantsBuilder_; - } - - private com.google.protobuf.Timestamp updateTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - updateTimeBuilder_; - /** - * - * - *
-     * Update time of the variants.
-     * 
- * - * .google.protobuf.Timestamp update_time = 2; - * - * @return Whether the updateTime field is set. - */ - public boolean hasUpdateTime() { - return updateTimeBuilder_ != null || updateTime_ != null; - } - /** - * - * - *
-     * Update time of the variants.
-     * 
- * - * .google.protobuf.Timestamp update_time = 2; - * - * @return The updateTime. - */ - public com.google.protobuf.Timestamp getUpdateTime() { - if (updateTimeBuilder_ == null) { - return updateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : updateTime_; - } else { - return updateTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Update time of the variants.
-     * 
- * - * .google.protobuf.Timestamp update_time = 2; - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateTime_ = value; - onChanged(); - } else { - updateTimeBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Update time of the variants.
-     * 
- * - * .google.protobuf.Timestamp update_time = 2; - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (updateTimeBuilder_ == null) { - updateTime_ = builderForValue.build(); - onChanged(); - } else { - updateTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Update time of the variants.
-     * 
- * - * .google.protobuf.Timestamp update_time = 2; - */ - public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (updateTime_ != null) { - updateTime_ = - com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); - } else { - updateTime_ = value; - } - onChanged(); - } else { - updateTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Update time of the variants.
-     * 
- * - * .google.protobuf.Timestamp update_time = 2; - */ - public Builder clearUpdateTime() { - if (updateTimeBuilder_ == null) { - updateTime_ = null; - onChanged(); - } else { - updateTime_ = null; - updateTimeBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Update time of the variants.
-     * 
- * - * .google.protobuf.Timestamp update_time = 2; - */ - public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { - - onChanged(); - return getUpdateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Update time of the variants.
-     * 
- * - * .google.protobuf.Timestamp update_time = 2; - */ - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - if (updateTimeBuilder_ != null) { - return updateTimeBuilder_.getMessageOrBuilder(); - } else { - return updateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : updateTime_; - } - } - /** - * - * - *
-     * Update time of the variants.
-     * 
- * - * .google.protobuf.Timestamp update_time = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getUpdateTimeFieldBuilder() { - if (updateTimeBuilder_ == null) { - updateTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getUpdateTime(), getParentForChildren(), isClean()); - updateTime_ = null; - } - return updateTimeBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.VariantsHistory) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.VariantsHistory) - private static final com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory(); - } - - public static com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public VariantsHistory parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new VariantsHistory(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VariantsHistoryOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VariantsHistoryOrBuilder.java deleted file mode 100644 index 053593084..000000000 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VariantsHistoryOrBuilder.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dialogflow/cx/v3beta1/experiment.proto - -package com.google.cloud.dialogflow.cx.v3beta1; - -public interface VariantsHistoryOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.VariantsHistory) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The flow versions as the variants.
-   * 
- * - * .google.cloud.dialogflow.cx.v3beta1.VersionVariants version_variants = 1; - * - * @return Whether the versionVariants field is set. - */ - boolean hasVersionVariants(); - /** - * - * - *
-   * The flow versions as the variants.
-   * 
- * - * .google.cloud.dialogflow.cx.v3beta1.VersionVariants version_variants = 1; - * - * @return The versionVariants. - */ - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants getVersionVariants(); - /** - * - * - *
-   * The flow versions as the variants.
-   * 
- * - * .google.cloud.dialogflow.cx.v3beta1.VersionVariants version_variants = 1; - */ - com.google.cloud.dialogflow.cx.v3beta1.VersionVariantsOrBuilder getVersionVariantsOrBuilder(); - - /** - * - * - *
-   * Update time of the variants.
-   * 
- * - * .google.protobuf.Timestamp update_time = 2; - * - * @return Whether the updateTime field is set. - */ - boolean hasUpdateTime(); - /** - * - * - *
-   * Update time of the variants.
-   * 
- * - * .google.protobuf.Timestamp update_time = 2; - * - * @return The updateTime. - */ - com.google.protobuf.Timestamp getUpdateTime(); - /** - * - * - *
-   * Update time of the variants.
-   * 
- * - * .google.protobuf.Timestamp update_time = 2; - */ - com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); - - public com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory.VariantsCase getVariantsCase(); -} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VersionVariantsOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VersionVariantsOrBuilder.java deleted file mode 100644 index a76704633..000000000 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VersionVariantsOrBuilder.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dialogflow/cx/v3beta1/experiment.proto - -package com.google.cloud.dialogflow.cx.v3beta1; - -public interface VersionVariantsOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.VersionVariants) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * A list of flow version variants.
-   * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant variants = 1; - */ - java.util.List getVariantsList(); - /** - * - * - *
-   * A list of flow version variants.
-   * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant variants = 1; - */ - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant getVariants(int index); - /** - * - * - *
-   * A list of flow version variants.
-   * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant variants = 1; - */ - int getVariantsCount(); - /** - * - * - *
-   * A list of flow version variants.
-   * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant variants = 1; - */ - java.util.List - getVariantsOrBuilderList(); - /** - * - * - *
-   * A list of flow version variants.
-   * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant variants = 1; - */ - com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.VariantOrBuilder getVariantsOrBuilder( - int index); -} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VoiceSelectionParams.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VoiceSelectionParams.java index f03e09502..58d0eae52 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VoiceSelectionParams.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VoiceSelectionParams.java @@ -128,6 +128,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * 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.v3beta1.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). * * * string name = 1; @@ -153,6 +155,8 @@ public java.lang.String getName() { * 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.v3beta1.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). * * * string name = 1; @@ -564,6 +568,8 @@ public Builder mergeFrom( * 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.v3beta1.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). * * * string name = 1; @@ -588,6 +594,8 @@ public java.lang.String getName() { * 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.v3beta1.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). * * * string name = 1; @@ -612,6 +620,8 @@ public com.google.protobuf.ByteString getNameBytes() { * 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.v3beta1.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). * * * string name = 1; @@ -635,6 +645,8 @@ public Builder setName(java.lang.String value) { * 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.v3beta1.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). * * * string name = 1; @@ -654,6 +666,8 @@ public Builder clearName() { * 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.v3beta1.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). * * * string name = 1; diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VoiceSelectionParamsOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VoiceSelectionParamsOrBuilder.java index 4ab2d9bc3..735aebadc 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VoiceSelectionParamsOrBuilder.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VoiceSelectionParamsOrBuilder.java @@ -30,6 +30,8 @@ public interface VoiceSelectionParamsOrBuilder * 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.v3beta1.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). * * * string name = 1; @@ -44,6 +46,8 @@ public interface VoiceSelectionParamsOrBuilder * 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.v3beta1.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). * * * string name = 1; diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/WebhookProto.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/WebhookProto.java index 6fd4723aa..3c71d785c 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/WebhookProto.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/WebhookProto.java @@ -251,11 +251,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "/*}\332A\004name\032x\312A\031dialogflow.googleapis.com" + "\322AYhttps://www.googleapis.com/auth/cloud" + "-platform,https://www.googleapis.com/aut" - + "h/dialogflowB\253\001\n&com.google.cloud.dialog" + + "h/dialogflowB\252\002\n&com.google.cloud.dialog" + "flow.cx.v3beta1B\014WebhookProtoP\001ZDgoogle." + "golang.org/genproto/googleapis/cloud/dia" + "logflow/cx/v3beta1;cx\370\001\001\242\002\002DF\252\002\"Google.C" - + "loud.Dialogflow.Cx.V3Beta1b\006proto3" + + "loud.Dialogflow.Cx.V3Beta1\352A|\n\'servicedi" + + "rectory.googleapis.com/Service\022Qprojects" + + "/{project}/locations/{location}/namespac" + + "es/{namespace}/services/{service}b\006proto" + + "3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -479,6 +483,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { registry.add(com.google.api.ClientProto.methodSignature); registry.add(com.google.api.ClientProto.oauthScopes); registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceDefinition); registry.add(com.google.api.ResourceProto.resourceReference); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/agent.proto b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/agent.proto index ba80999fd..f6fb4b424 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/agent.proto +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/agent.proto @@ -109,6 +109,25 @@ service Agents { metadata_type: "google.protobuf.Struct" }; } + + // 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. + rpc ValidateAgent(ValidateAgentRequest) returns (AgentValidationResult) { + option (google.api.http) = { + post: "/v3beta1/{name=projects/*/locations/*/agents/*}:validate" + body: "*" + }; + } + + // Gets the latest agent validation result. Agent validation is performed + // when ValidateAgent is called. + rpc GetAgentValidationResult(GetAgentValidationResultRequest) returns (AgentValidationResult) { + option (google.api.http) = { + get: "/v3beta1/{name=projects/*/locations/*/agents/*/validationResult}" + }; + option (google.api.method_signature) = "name"; + } } // Settings related to speech recognition. @@ -122,13 +141,9 @@ message SpeechToTextSettings { // in your app, product, or service to determine user intent and respond to the // user in a natural way. // -// After you create an agent, you can add -// [Intents][google.cloud.dialogflow.cx.v3beta1.Intent], [Entity -// Types][google.cloud.dialogflow.cx.v3beta1.EntityType], -// [Flows][google.cloud.dialogflow.cx.v3beta1.Flow], -// [Fulfillments][google.cloud.dialogflow.cx.v3beta1.Fulfillment], -// [Webhooks][google.cloud.dialogflow.cx.v3beta1.Webhook], and so on to manage -// the conversation flows.. +// After you create an agent, you can add [Intents][google.cloud.dialogflow.cx.v3beta1.Intent], +// [Entity Types][google.cloud.dialogflow.cx.v3beta1.EntityType], [Flows][google.cloud.dialogflow.cx.v3beta1.Flow], [Fulfillments][google.cloud.dialogflow.cx.v3beta1.Fulfillment], +// [Webhooks][google.cloud.dialogflow.cx.v3beta1.Webhook], and so on to manage the conversation flows.. message Agent { option (google.api.resource) = { type: "dialogflow.googleapis.com/Agent" @@ -136,10 +151,7 @@ message Agent { }; // The unique identifier of the agent. - // Required for the - // [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent] - // method. - // [Agents.CreateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.CreateAgent] + // Required for the [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent] method. [Agents.CreateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.CreateAgent] // populates the name automatically. // Format: `projects//locations//agents/`. string name = 1; @@ -151,9 +163,7 @@ message Agent { // See [Language // Support](https://cloud.google.com/dialogflow/docs/reference/language) // for a list of the currently supported language codes. - // This field cannot be set by the - // [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent] - // method. + // This field cannot be set by the [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent] method. string default_language_code = 3 [(google.api.field_behavior) = IMMUTABLE]; // Required. The time zone of the agent from the [time zone @@ -174,15 +184,25 @@ message Agent { // Speech recognition related settings. SpeechToTextSettings speech_to_text_settings = 13; - // 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/`. + // 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/`. string start_flow = 16 [ (google.api.field_behavior) = IMMUTABLE, - (google.api.resource_reference) = { type: "dialogflow.googleapis.com/Flow" } + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Flow" + } ]; + // Name of the [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettings] reference for the agent. + // Format: `projects//locations//securitySettings/`. + string security_settings = 17 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/SecuritySettings" + }]; + // Indicates if stackdriver logging is enabled for the agent. bool enable_stackdriver_logging = 18; @@ -191,8 +211,7 @@ message Agent { bool enable_spell_correction = 20; } -// The request message for -// [Agents.ListAgents][google.cloud.dialogflow.cx.v3beta1.Agents.ListAgents]. +// The request message for [Agents.ListAgents][google.cloud.dialogflow.cx.v3beta1.Agents.ListAgents]. message ListAgentsRequest { // Required. The location to list all agents for. // Format: `projects//locations/`. @@ -211,8 +230,7 @@ message ListAgentsRequest { string page_token = 3; } -// The response message for -// [Agents.ListAgents][google.cloud.dialogflow.cx.v3beta1.Agents.ListAgents]. +// The response message for [Agents.ListAgents][google.cloud.dialogflow.cx.v3beta1.Agents.ListAgents]. message ListAgentsResponse { // The list of agents. There will be a maximum number of items returned based // on the page_size field in the request. @@ -223,8 +241,7 @@ message ListAgentsResponse { string next_page_token = 2; } -// The request message for -// [Agents.GetAgent][google.cloud.dialogflow.cx.v3beta1.Agents.GetAgent]. +// The request message for [Agents.GetAgent][google.cloud.dialogflow.cx.v3beta1.Agents.GetAgent]. message GetAgentRequest { // Required. The name of the agent. // Format: `projects//locations//agents/`. @@ -236,8 +253,7 @@ message GetAgentRequest { ]; } -// The request message for -// [Agents.CreateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.CreateAgent]. +// The request message for [Agents.CreateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.CreateAgent]. message CreateAgentRequest { // Required. The location to create a agent for. // Format: `projects//locations/`. @@ -252,8 +268,7 @@ message CreateAgentRequest { Agent agent = 2 [(google.api.field_behavior) = REQUIRED]; } -// The request message for -// [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent]. +// The request message for [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent]. message UpdateAgentRequest { // Required. The agent to update. Agent agent = 1 [(google.api.field_behavior) = REQUIRED]; @@ -263,8 +278,7 @@ message UpdateAgentRequest { google.protobuf.FieldMask update_mask = 2; } -// The request message for -// [Agents.DeleteAgent][google.cloud.dialogflow.cx.v3beta1.Agents.DeleteAgent]. +// The request message for [Agents.DeleteAgent][google.cloud.dialogflow.cx.v3beta1.Agents.DeleteAgent]. message DeleteAgentRequest { // Required. The name of the agent to delete. // Format: `projects//locations//agents/`. @@ -276,8 +290,7 @@ message DeleteAgentRequest { ]; } -// The request message for -// [Agents.ExportAgent][google.cloud.dialogflow.cx.v3beta1.Agents.ExportAgent]. +// The request message for [Agents.ExportAgent][google.cloud.dialogflow.cx.v3beta1.Agents.ExportAgent]. message ExportAgentRequest { // Required. The name of the agent to export. // Format: `projects//locations//agents/`. @@ -288,21 +301,19 @@ message ExportAgentRequest { } ]; - // 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. + // 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. string agent_uri = 2 [(google.api.field_behavior) = OPTIONAL]; } -// The response message for -// [Agents.ExportAgent][google.cloud.dialogflow.cx.v3beta1.Agents.ExportAgent]. +// The response message for [Agents.ExportAgent][google.cloud.dialogflow.cx.v3beta1.Agents.ExportAgent]. message ExportAgentResponse { // The exported agent. oneof agent { // The URI to a file containing the exported agent. This field is populated - // only if `agent_uri` is specified in - // [ExportAgentRequest][google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest]. + // only if `agent_uri` is specified in [ExportAgentRequest][google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest]. string agent_uri = 1; // Uncompressed raw byte content for agent. @@ -310,8 +321,7 @@ message ExportAgentResponse { } } -// The request message for -// [Agents.RestoreAgent][google.cloud.dialogflow.cx.v3beta1.Agents.RestoreAgent]. +// The request message for [Agents.RestoreAgent][google.cloud.dialogflow.cx.v3beta1.Agents.RestoreAgent]. message RestoreAgentRequest { // Required. The name of the agent to restore into. // Format: `projects//locations//agents/`. @@ -333,3 +343,50 @@ message RestoreAgentRequest { bytes agent_content = 3; } } + +// The request message for [Agents.ValidateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.ValidateAgent]. +message ValidateAgentRequest { + // Required. The agent to validate. + // Format: `projects//locations//agents/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Agent" + } + ]; + + // If not specified, the agent's default language is used. + string language_code = 2; +} + +// The request message for [Agents.GetAgentValidationResult][google.cloud.dialogflow.cx.v3beta1.Agents.GetAgentValidationResult]. +message GetAgentValidationResultRequest { + // Required. The agent name. + // Format: `projects//locations//agents//validationResult`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/AgentValidationResult" + } + ]; + + // If not specified, the agent's default language is used. + string language_code = 2; +} + +// The response message for [Agents.GetAgentValidationResult][google.cloud.dialogflow.cx.v3beta1.Agents.GetAgentValidationResult]. +message AgentValidationResult { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/AgentValidationResult" + pattern: "projects/{project}/locations/{location}/agents/{agent}/validationResult" + }; + + // The unique identifier of the agent validation result. + // Format: `projects//locations//agents//validationResult`. + string name = 1; + + // Contains all flow validation results. + repeated FlowValidationResult flow_validation_results = 2; +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/audio_config.proto b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/audio_config.proto index c0043a529..93234328b 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/audio_config.proto +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/audio_config.proto @@ -204,6 +204,9 @@ message VoiceSelectionParams { // 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.v3beta1.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). string name = 1; // Optional. The preferred gender of the voice. If not set, the service will diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/entity_type.proto b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/entity_type.proto index 8c5571a18..01cd25add 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/entity_type.proto +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/entity_type.proto @@ -115,7 +115,6 @@ message EntityType { }; // An **entity entry** for an associated entity type. - // Next Id = 8 message Entity { // Required. The primary value associated with this entity entry. // For example, if the entity type is *vegetable*, the value could be diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/experiment.proto b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/experiment.proto deleted file mode 100644 index 491ce2177..000000000 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/experiment.proto +++ /dev/null @@ -1,415 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.dialogflow.cx.v3beta1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3Beta1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1;cx"; -option java_multiple_files = true; -option java_outer_classname = "ExperimentProto"; -option java_package = "com.google.cloud.dialogflow.cx.v3beta1"; -option objc_class_prefix = "DF"; - -// Service for managing [Experiments][google.cloud.dialogflow.cx.v3beta1.Experiment]. -service Experiments { - option (google.api.default_host) = "dialogflow.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform," - "https://www.googleapis.com/auth/dialogflow"; - - // Returns the list of all experiments in the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. - rpc ListExperiments(ListExperimentsRequest) returns (ListExperimentsResponse) { - option (google.api.http) = { - get: "/v3beta1/{parent=projects/*/locations/*/agents/*/environments/*}/experiments" - }; - option (google.api.method_signature) = "parent"; - } - - // Retrieves the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. - rpc GetExperiment(GetExperimentRequest) returns (Experiment) { - option (google.api.http) = { - get: "/v3beta1/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates an [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment] in the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. - rpc CreateExperiment(CreateExperimentRequest) returns (Experiment) { - option (google.api.http) = { - post: "/v3beta1/{parent=projects/*/locations/*/agents/*/environments/*}/experiments" - body: "experiment" - }; - option (google.api.method_signature) = "parent,experiment"; - } - - // Updates the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. - rpc UpdateExperiment(UpdateExperimentRequest) returns (Experiment) { - option (google.api.http) = { - patch: "/v3beta1/{experiment.name=projects/*/locations/*/agents/*/environments/*/experiments/*}" - body: "experiment" - }; - option (google.api.method_signature) = "experiment,update_mask"; - } - - // Deletes the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. - rpc DeleteExperiment(DeleteExperimentRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v3beta1/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Starts the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only changes the state of - // experiment from PENDING to RUNNING. - rpc StartExperiment(StartExperimentRequest) returns (Experiment) { - option (google.api.http) = { - post: "/v3beta1/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}:start" - body: "*" - }; - option (google.api.method_signature) = "name"; - } - - // Stops the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only changes the state of - // experiment from RUNNING to DONE. - rpc StopExperiment(StopExperimentRequest) returns (Experiment) { - option (google.api.http) = { - post: "/v3beta1/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}:stop" - body: "*" - }; - option (google.api.method_signature) = "name"; - } -} - -// Represents an experiment in an environment. -// Next ID: 13 -message Experiment { - option (google.api.resource) = { - type: "dialogflow.googleapis.com/Experiment" - pattern: "projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}" - }; - - // Definition of the experiment. - // Next ID: 3 - message Definition { - // 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). - string condition = 1; - - // The variants of the experiment. We currently only support single variant - // experiment. - oneof variants { - // The flow versions as the variants of this experiment. - VersionVariants version_variants = 2; - } - } - - // The inference result which includes an objective metric to optimize and the - // confidence interval. - message Result { - // A confidence interval is a range of possible values for the experiment - // objective you are trying to measure. - message ConfidenceInterval { - // The confidence level used to construct the interval, i.e. there is X% - // chance that the true value is within this interval. - double confidence_level = 1; - - // The percent change between an experiment metric's value and the value - // for its control. - double ratio = 2; - - // Lower bound of the interval. - double lower_bound = 3; - - // Upper bound of the interval. - double upper_bound = 4; - } - - // Metric and corresponding confidence intervals. - message Metric { - // The type of the metric. - MetricType type = 1; - - // The actual value of the metric. - oneof value { - // Ratio value of a metric. - double ratio = 2; - } - - // The probability that the treatment is better than all other treatments - // in the experiment - ConfidenceInterval confidence_interval = 3; - } - - // Version variant and associated metrics. - message VersionMetrics { - // The name of the flow [Version][google.cloud.dialogflow.cx.v3beta1.Version]. - // Format: `projects//locations//agents//flows//versions/`. - string version = 1 [(google.api.resource_reference) = { - type: "dialogflow.googleapis.com/Version" - }]; - - // The metrics and corresponding confidence intervals in the inference - // result. - repeated Metric metrics = 2; - - // Number of sessions that were allocated to this version. - int32 session_count = 3; - } - - // Types of metric for Dialogflow experiment. - enum MetricType { - // Metric unspecified. - METRIC_UNSPECIFIED = 0; - - // Percentage of contained sessions without user calling back in 24 hours. - CONTAINED_SESSION_NO_CALLBACK_RATE = 1; - - // Percentage of sessions that were handed to a human agent. - LIVE_AGENT_HANDOFF_RATE = 2; - - // Percentage of sessions with the same user calling back. - CALLBACK_SESSION_RATE = 3; - - // Percentage of sessions where user hung up. - ABANDONED_SESSION_RATE = 4; - - // Percentage of sessions reached Dialogflow 'END_PAGE' or - // 'END_SESSION'. - SESSION_END_RATE = 5; - } - - // Version variants and metrics. - repeated VersionMetrics version_metrics = 1; - - // The last time the experiment's stats data was updated. Will have default - // value if stats have never been computed for this experiment. - google.protobuf.Timestamp last_update_time = 2; - } - - // The state of the experiment. - enum State { - // State unspecified. - STATE_UNSPECIFIED = 0; - - // The experiment is created but not started yet. - DRAFT = 1; - - // The experiment is running. - RUNNING = 2; - - // The experiment is done. - DONE = 3; - } - - // The name of the experiment. - // Format: projects//locations//agents//environments//experiments/.. - string name = 1; - - // Required. The human-readable name of the experiment (unique in an environment). Limit - // of 64 characters. - string display_name = 2 [(google.api.field_behavior) = REQUIRED]; - - // The human-readable description of the experiment. - string description = 3; - - // The current state of the experiment. - // Transition triggered by Expriments.StartExperiment: PENDING->RUNNING. - // Transition triggered by Expriments.CancelExperiment: PENDING->CANCELLED or - // RUNNING->CANCELLED. - State state = 4; - - // The definition of the experiment. - Definition definition = 5; - - // Inference result of the experiment. - Result result = 6; - - // Creation time of this experiment. - google.protobuf.Timestamp create_time = 7; - - // Start time of this experiment. - google.protobuf.Timestamp start_time = 8; - - // End time of this experiment. - google.protobuf.Timestamp end_time = 9; - - // Last update time of this experiment. - google.protobuf.Timestamp last_update_time = 10; - - // Maximum number of days to run the experiment. - google.protobuf.Duration experiment_length = 11; - - // The history of updates to the experiment variants. - repeated VariantsHistory variants_history = 12; -} - -// A list of flow version variants. -message VersionVariants { - // A single flow version with specified traffic allocation. - message Variant { - // The name of the flow version. - // Format: `projects//locations//agents//flows//versions/`. - string version = 1; - - // 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. - float traffic_allocation = 2; - - // Whether the variant is for the control group. - bool is_control_group = 3; - } - - // A list of flow version variants. - repeated Variant variants = 1; -} - -// The history of variants update. -message VariantsHistory { - // The variants updated. We currently only support single variant - // experiment. - oneof variants { - // The flow versions as the variants. - VersionVariants version_variants = 1; - } - - // Update time of the variants. - google.protobuf.Timestamp update_time = 2; -} - -// The request message for [Experiments.ListExperiments][google.cloud.dialogflow.cx.v3beta1.Experiments.ListExperiments]. -message ListExperimentsRequest { - // Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to list all environments for. - // Format: `projects//locations//agents//environments/`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/Experiment" - } - ]; - - // The maximum number of items to return in a single page. By default 20 and - // at most 100. - int32 page_size = 2; - - // The next_page_token value returned from a previous list request. - string page_token = 3; -} - -// The response message for [Experiments.ListExperiments][google.cloud.dialogflow.cx.v3beta1.Experiments.ListExperiments]. -message ListExperimentsResponse { - // 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. - repeated Experiment experiments = 1; - - // Token to retrieve the next page of results, or empty if there are no more - // results in the list. - string next_page_token = 2; -} - -// The request message for [Experiments.GetExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.GetExperiment]. -message GetExperimentRequest { - // Required. The name of the [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. - // Format: `projects//locations//agents//environments//experiments/`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/Experiment" - } - ]; -} - -// The request message for [Experiments.CreateExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.CreateExperiment]. -message CreateExperimentRequest { - // Required. The [Agent][google.cloud.dialogflow.cx.v3beta1.Agent] to create an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] for. - // Format: `projects//locations//agents//environments/`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/Experiment" - } - ]; - - // Required. The experiment to create. - Experiment experiment = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// The request message for [Experiments.UpdateExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.UpdateExperiment]. -message UpdateExperimentRequest { - // Required. The experiment to update. - Experiment experiment = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The mask to control which fields get updated. - google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// The request message for [Experiments.DeleteExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.DeleteExperiment]. -message DeleteExperimentRequest { - // Required. The name of the [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to delete. - // Format: `projects//locations//agents//environments//experiments/`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/Experiment" - } - ]; -} - -// The request message for [Experiments.StartExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.StartExperiment]. -message StartExperimentRequest { - // Required. Resource name of the experiment to start. - // Format: `projects//locations//agents//environments//experiments/`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/Experiment" - } - ]; -} - -// The request message for [Experiments.StopExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.StopExperiment]. -message StopExperimentRequest { - // Required. Resource name of the experiment to stop. - // Format: `projects//locations//agents//environments//experiments/`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/Experiment" - } - ]; -} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/flow.proto b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/flow.proto index fefd0abe4..e5aeef4ca 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/flow.proto +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/flow.proto @@ -21,6 +21,7 @@ import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/dialogflow/cx/v3beta1/page.proto"; +import "google/cloud/dialogflow/cx/v3beta1/validation_message.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; @@ -96,6 +97,25 @@ service Flows { metadata_type: "google.protobuf.Struct" }; } + + // 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. + rpc ValidateFlow(ValidateFlowRequest) returns (FlowValidationResult) { + option (google.api.http) = { + post: "/v3beta1/{name=projects/*/locations/*/agents/*/flows/*}:validate" + body: "*" + }; + } + + // Gets the latest flow validation result. Flow validation is performed + // when ValidateFlow is called. + rpc GetFlowValidationResult(GetFlowValidationResultRequest) returns (FlowValidationResult) { + option (google.api.http) = { + get: "/v3beta1/{name=projects/*/locations/*/agents/*/flows/*/validationResult}" + }; + option (google.api.method_signature) = "name"; + } } // Settings related to NLU. @@ -364,3 +384,54 @@ message TrainFlowRequest { } ]; } + +// The request message for [Flows.ValidateFlow][google.cloud.dialogflow.cx.v3beta1.Flows.ValidateFlow]. +message ValidateFlowRequest { + // Required. The flow to validate. + // Format: `projects//locations//agents//flows/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Flow" + } + ]; + + // If not specified, the agent's default language is used. + string language_code = 2; +} + +// The request message for [Flows.GetFlowValidationResult][google.cloud.dialogflow.cx.v3beta1.Flows.GetFlowValidationResult]. +message GetFlowValidationResultRequest { + // Required. The flow name. + // Format: `projects//locations//agents//flows//validationResult`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/FlowValidationResult" + } + ]; + + // If not specified, the agent's default language is used. + string language_code = 2; +} + +// The response message for [Flows.GetFlowValidationResult][google.cloud.dialogflow.cx.v3beta1.Flows.GetFlowValidationResult]. +message FlowValidationResult { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/FlowValidationResult" + pattern: "projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/validationResult" + }; + + // The unique identifier of the flow validation result. + // Format: `projects//locations//agents//flows//validationResult`. + string name = 1; + + // Contains all validation messages. + repeated ValidationMessage validation_messages = 2; + + // Last time the flow was validated. + google.protobuf.Timestamp update_time = 3; +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/intent.proto b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/intent.proto index 53b74fae2..6cbe2a62c 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/intent.proto +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/intent.proto @@ -155,9 +155,12 @@ message Intent { // Indicates whether the parameter represents a list of values. bool is_list = 3; - // Indicates whether the parameter content is logged in text and audio. If - // it is set to true, the parameter content will be replaced to parameter - // id in both request and response. The default value is false. + // Indicates whether the parameter content should be redacted in text and + // audio. If the flag is set to true, the parameter content will be replaced + // by parameter name in both request and response. + // Note: the parameter content is subject to redaction if either parameter + // level redaction or [entity type level redaction][google.cloud.dialogflow.cx.v3beta1.EntityType.redact] is + // enabled. bool redact = 4; } diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/page.proto b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/page.proto index f63dcfae4..53a57a0a8 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/page.proto +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/page.proto @@ -147,9 +147,13 @@ message Page { // // * TransitionRoutes defined in the page with intent specified. // * TransitionRoutes defined in the - // [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups]. + // [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with intent + // specified. // * TransitionRoutes defined in flow with intent specified. // * TransitionRoutes defined in the page with only condition specified. + // * TransitionRoutes defined in the + // [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with only + // condition specified. repeated TransitionRoute transition_routes = 9; // Handlers associated with the page to handle events such as webhook errors, @@ -238,9 +242,12 @@ message Form { // the default value will be ignored. google.protobuf.Value default_value = 9; - // Indicates whether the parameter content is logged in text and audio. If - // it is set to true, the parameter content will be replaced to parameter - // name in both request and response. The default value is false. + // Indicates whether the parameter content should be redacted in text and + // audio. If the flag is set to true, the parameter content will be replaced + // by parameter name in both request and response. + // Note: the parameter content is subject to redaction if either parameter + // level redaction or [entity type level redaction][google.cloud.dialogflow.cx.v3beta1.EntityType.redact] is + // enabled. bool redact = 11; } diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/response_message.proto b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/response_message.proto index 7a9f96500..1627520eb 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/response_message.proto +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/response_message.proto @@ -113,6 +113,25 @@ message ResponseMessage { bool allow_playback_interruption = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } + // Indicates that interaction with the Dialogflow agent has ended. + // This message is generated by Dialogflow only and not supposed to be + // defined by the user. + message EndInteraction { + + } + + // Specifies an audio clip to be played by the client as part of the response. + message PlayAudio { + // Required. URI of the audio clip. Dialogflow does not impose any validation on this + // value. It is specific to the client that reads it. + string audio_uri = 1 [(google.api.field_behavior) = REQUIRED]; + + // 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. + bool allow_playback_interruption = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + // Represents an audio message that is composed of both segments // synthesized from the Dialogflow agent prompts and ones hosted externally // at the specified URIs. @@ -144,25 +163,6 @@ message ResponseMessage { repeated Segment segments = 1; } - // Indicates that interaction with the Dialogflow agent has ended. - // This message is generated by Dialogflow only and not supposed to be - // defined by the user. - message EndInteraction { - - } - - // Specifies an audio clip to be played by the client as part of the response. - message PlayAudio { - // Required. URI of the audio clip. Dialogflow does not impose any validation on this - // value. It is specific to the client that reads it. - string audio_uri = 1 [(google.api.field_behavior) = REQUIRED]; - - // 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. - bool allow_playback_interruption = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - } - // Required. The rich response message. oneof message { // Returns a text response. diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/test_case.proto b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/test_case.proto new file mode 100644 index 000000000..c0c1eae6c --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/test_case.proto @@ -0,0 +1,835 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dialogflow.cx.v3beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/dialogflow/cx/v3beta1/flow.proto"; +import "google/cloud/dialogflow/cx/v3beta1/intent.proto"; +import "google/cloud/dialogflow/cx/v3beta1/page.proto"; +import "google/cloud/dialogflow/cx/v3beta1/response_message.proto"; +import "google/cloud/dialogflow/cx/v3beta1/session.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1;cx"; +option java_multiple_files = true; +option java_outer_classname = "TestCaseProto"; +option java_package = "com.google.cloud.dialogflow.cx.v3beta1"; +option objc_class_prefix = "DF"; + +// Service for managing [Test Cases][google.cloud.dialogflow.cx.v3beta1.TestCase] and +// [Test Case Results][google.cloud.dialogflow.cx.v3beta1.TestCaseResult]. +service TestCases { + option (google.api.default_host) = "dialogflow.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/dialogflow"; + + // Fetches a list of test cases for a given agent. + rpc ListTestCases(ListTestCasesRequest) returns (ListTestCasesResponse) { + option (google.api.http) = { + get: "/v3beta1/{parent=projects/*/locations/*/agents/*}/testCases" + }; + option (google.api.method_signature) = "parent"; + } + + // Batch deletes test cases. + rpc BatchDeleteTestCases(BatchDeleteTestCasesRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v3beta1/{parent=projects/*/locations/*/agents/*}/testCases:batchDelete" + body: "*" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets a test case. + rpc GetTestCase(GetTestCaseRequest) returns (TestCase) { + option (google.api.http) = { + get: "/v3beta1/{name=projects/*/locations/*/agents/*/testCases/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a test case for the given agent. + rpc CreateTestCase(CreateTestCaseRequest) returns (TestCase) { + option (google.api.http) = { + post: "/v3beta1/{parent=projects/*/locations/*/agents/*}/testCases" + body: "test_case" + }; + option (google.api.method_signature) = "parent,test_case"; + } + + // Updates the specified test case. + rpc UpdateTestCase(UpdateTestCaseRequest) returns (TestCase) { + option (google.api.http) = { + patch: "/v3beta1/{test_case.name=projects/*/locations/*/agents/*/testCases/*}" + body: "test_case" + }; + option (google.api.method_signature) = "test_case,update_mask"; + } + + // Kicks off a test case run. + rpc RunTestCase(RunTestCaseRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v3beta1/projects/*/locations/*/agents/*/testCases:run" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "RunTestCaseResponse" + metadata_type: "RunTestCaseMetadata" + }; + } + + // Kicks off a batch run of test cases. + rpc BatchRunTestCases(BatchRunTestCasesRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v3beta1/{parent=projects/*/locations/*/agents/*}/testCases:batchRun" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "BatchRunTestCasesResponse" + metadata_type: "BatchRunTestCasesMetadata" + }; + } + + // Calculates the test coverage for an agent. + rpc CalculateCoverage(CalculateCoverageRequest) returns (CalculateCoverageResponse) { + option (google.api.http) = { + get: "/v3beta1/{agent=projects/*/locations/*/agents/*}/testCases:calculateCoverage" + }; + } + + // Imports the test cases from a Cloud Storage bucket or a local file. It + // always creates new test cases and won't overwite any existing ones. The + // provided ID in the imported test case is neglected. + rpc ImportTestCases(ImportTestCasesRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v3beta1/{parent=projects/*/locations/*/agents/*}/testCases:import" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "ImportTestCasesResponse" + metadata_type: "ImportTestCasesMetadata" + }; + } + + // 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. + rpc ExportTestCases(ExportTestCasesRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v3beta1/{parent=projects/*/locations/*/agents/*}/testCases:export" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "ExportTestCasesResponse" + metadata_type: "ExportTestCasesMetadata" + }; + } + + // Fetches a list of results for a given test case. + rpc ListTestCaseResults(ListTestCaseResultsRequest) returns (ListTestCaseResultsResponse) { + option (google.api.http) = { + get: "/v3beta1/{parent=projects/*/locations/*/agents/*/testCases/*}/results" + }; + option (google.api.method_signature) = "parent"; + } +} + +// Represents a test case. +message TestCase { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/TestCase" + pattern: "projects/{project}/locations/{location}/agents/{agent}/testCases/{test_case}" + }; + + // The unique identifier of the test case. + // [TestCases.CreateTestCase][google.cloud.dialogflow.cx.v3beta1.TestCases.CreateTestCase] will populate the name automatically. + // Otherwise use format: `projects//locations//agents/ + // /testCases/`. + string name = 1; + + // 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. + repeated string tags = 2; + + // Required. The human-readable name of the test case, unique within the agent. Limit of + // 200 characters. + string display_name = 3 [(google.api.field_behavior) = REQUIRED]; + + // Additional freeform notes about the test case. Limit of 400 characters. + string notes = 4; + + // Config for the test case. + TestConfig test_config = 13; + + // 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. + repeated ConversationTurn test_case_conversation_turns = 5; + + // Output only. When the test was created. + google.protobuf.Timestamp creation_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The latest test result. + TestCaseResult last_test_result = 12; +} + +// Represents a result from running a test case in an agent environment. +message TestCaseResult { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/TestCaseResult" + pattern: "projects/{project}/locations/{location}/agents/{agent}/testCases/{test_case}/results/{result}" + }; + + // The resource name for the test case result. Format: + // `projects//locations//agents//testCases/ + // /results/`. + string name = 1; + + // Optional. Environment where the test was run. If not set, it indicates the draft + // environment. + string environment = 2 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Environment" + } + ]; + + // The conversation turns uttered during the test case replay in chronological + // order. + repeated ConversationTurn conversation_turns = 3; + + // Whether the test case passed in the agent environment. + TestResult test_result = 4; + + // The time that the test was run. + google.protobuf.Timestamp test_time = 5; +} + +// Represents configurations for a test case. +message TestConfig { + // Session parameters to be compared when calculating differences. + repeated string tracking_parameters = 1; + + // Flow name. If not set, default start flow is assumed. + // Format: `projects//locations//agents//flows/`. + string flow = 2 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Flow" + }]; +} + +// One interaction between a human and virtual agent. The human provides some +// input and the virtual agent provides a response. +message ConversationTurn { + // The input from the human user. + message UserInput { + // Supports [text input][google.cloud.dialogflow.cx.v3beta1.QueryInput.text], [event input][google.cloud.dialogflow.cx.v3beta1.QueryInput.event], + // [dtmf input][google.cloud.dialogflow.cx.v3beta1.QueryInput.dtmf] in the test case. + QueryInput input = 5; + + // Parameters that need to be injected into the conversation during intent + // detection. + google.protobuf.Struct injected_parameters = 2; + + // If webhooks should be allowed to trigger in response to the user + // utterance. Often if parameters are injected, webhooks should not be + // enabled. + bool is_webhook_enabled = 3; + } + + // The output from the virtual agent. + message VirtualAgentOutput { + // The session parameters available to the bot at this point. + google.protobuf.Struct session_parameters = 4; + + // 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. + repeated TestRunDifference differences = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Input only. The diagnostic + // [info][Session.DetectIntentResponse.QueryResult.diagnostic_info] + // output for the turn. + google.protobuf.Struct diagnostic_info = 6 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = INPUT_ONLY + ]; + + // The [Intent][google.cloud.dialogflow.cx.v3beta1.Intent] that triggered the response. Only some fields such as + // name and displayname will be set. + Intent triggered_intent = 7; + + // The [Page][google.cloud.dialogflow.cx.v3beta1.Page] on which the utterance was spoken. Only some fields such as + // name and displayname will be set. + Page current_page = 8; + + // The [text][google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text] responses from the agent for the turn. + repeated ResponseMessage.Text text_responses = 9; + + // Response error from the agent in the test result. If set, other output + // is empty. + google.rpc.Status status = 10; + } + + // The user input. + UserInput user_input = 1; + + // The virtual agent output. + VirtualAgentOutput virtual_agent_output = 2; +} + +// The description of differences between original and replayed agent output. +message TestRunDifference { + // What part of the message replay differs from the test case. + enum DiffType { + // Should never be used. + DIFF_TYPE_UNSPECIFIED = 0; + + // The intent. + INTENT = 1; + + // The page. + PAGE = 2; + + // The parameters. + PARAMETERS = 3; + + // The message utterance. + UTTERANCE = 4; + } + + // The type of diff. + DiffType type = 1; + + // A description of the diff, showing the actual output vs expected output. + string description = 2; +} + +// Transition coverage represents the percentage of all possible transitions +// present within any of a parent's test cases. +message TransitionCoverage { + // The source or target of a transition. + message TransitionNode { + // A TransitionNode can be either a page or a flow. + oneof kind { + // Indicates a transition to a [Page][google.cloud.dialogflow.cx.v3beta1.Page]. Only some fields such as name and + // displayname will be set. + Page page = 1; + + // Indicates a transition to a [Flow][google.cloud.dialogflow.cx.v3beta1.Flow]. Only some fields such as name and + // displayname will be set. + Flow flow = 2; + } + } + + // A transition in the agent's graph. + message Transition { + // The start node of a transition. + TransitionNode source = 1; + + // The index of a transition in the transition list. Starting from 0. + int32 index = 4; + + // The end node of a transition. + TransitionNode target = 2; + + // Whether or not the transition is covered by at least one of the + // agent's test cases. + bool covered = 3; + + // The detailed transition. + oneof detail { + // Intent route or condition route. + TransitionRoute transition_route = 5; + + // Event handler. + EventHandler event_handler = 6; + } + } + + // The list of Transitions present in the agent. + repeated Transition transitions = 1; + + // The percent of transitions in the agent that are covered. + float coverage_score = 2; +} + +// Intent coverage represents the percentage of all possible intents in the +// agent that are triggered in any of a parent's test cases. +message IntentCoverage { + // The agent's intent. + message Intent { + // The intent full resource name + string intent = 1 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Intent" + }]; + + // Whether or not the intent is covered by at least one of the agent's + // test cases. + bool covered = 2; + } + + // The list of Intents present in the agent + repeated Intent intents = 1; + + // The percent of intents in the agent that are covered. + float coverage_score = 2; +} + +// The request message for [TestCases.CalculateCoverage][google.cloud.dialogflow.cx.v3beta1.TestCases.CalculateCoverage]. +message CalculateCoverageRequest { + // The type of coverage score requested. + enum CoverageType { + // Should never be used. + COVERAGE_TYPE_UNSPECIFIED = 0; + + // Intent coverage. + INTENT = 1; + + // Page transition coverage + PAGE_TRANSITION = 2; + } + + // Required. The agent to calculate coverage for. + // Format: `projects//locations//agents/`. + string agent = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Agent" + } + ]; + + // Required. The type of coverage requested. + CoverageType type = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The response message for [TestCases.CalculateCoverage][google.cloud.dialogflow.cx.v3beta1.TestCases.CalculateCoverage]. +message CalculateCoverageResponse { + // The agent to calculate coverage for. + // Format: `projects//locations//agents/`. + string agent = 5 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Agent" + }]; + + // The type of coverage requested. + oneof coverage_type { + // Intent coverage. + IntentCoverage intent_coverage = 2; + + // Transition coverage. + TransitionCoverage transition_coverage = 4; + } +} + +// The request message for [TestCases.ListTestCases][google.cloud.dialogflow.cx.v3beta1.TestCases.ListTestCases]. +message ListTestCasesRequest { + // Specifies how much test case information to include in the response. + enum TestCaseView { + // The default / unset value. + // The API will default to the BASIC view. + TEST_CASE_VIEW_UNSPECIFIED = 0; + + // Include basic metadata about the test case, but not the conversation + // turns. This is the default value. + BASIC = 1; + + // Include everything. + FULL = 2; + } + + // Required. The agent to list all pages for. + // Format: `projects//locations//agents/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/TestCase" + } + ]; + + // 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. + int32 page_size = 2; + + // The next_page_token value returned from a previous list request. + string page_token = 3; + + // Specifies whether response should include all fields or just the metadata. + TestCaseView view = 4; +} + +// The response message for [TestCases.ListTestCases][google.cloud.dialogflow.cx.v3beta1.TestCases.ListTestCases]. +message ListTestCasesResponse { + // The list of test cases. There will be a maximum number of items returned + // based on the page_size field in the request. + repeated TestCase test_cases = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// The request message for [TestCases.BatchDeleteTestCases][google.cloud.dialogflow.cx.v3beta1.TestCases.BatchDeleteTestCases]. +message BatchDeleteTestCasesRequest { + // Required. The agent to delete test cases from. + // Format: `projects//locations//agents/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/TestCase" + } + ]; + + // Required. Format of test case names: `projects//locations/ + // /agents//testCases/`. + repeated string names = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/TestCase" + } + ]; +} + +// The request message for [TestCases.CreateTestCase][google.cloud.dialogflow.cx.v3beta1.TestCases.CreateTestCase]. +message CreateTestCaseRequest { + // Required. The agent to create the test case for. + // Format: `projects//locations//agents/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/TestCase" + } + ]; + + // Required. The test case to create. + TestCase test_case = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The request message for [TestCases.UpdateTestCase][google.cloud.dialogflow.cx.v3beta1.TestCases.UpdateTestCase]. +message UpdateTestCaseRequest { + // Required. The test case to update. + TestCase test_case = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The mask to specify which fields should be updated. Only a test case's + // metadata and replayed_conversation_turns may be updated. The original + // test_case_conversation_turns may not be updated. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The request message for [TestCases.GetTestCase][google.cloud.dialogflow.cx.v3beta1.TestCases.GetTestCase]. +message GetTestCaseRequest { + // Required. The name of the testcase. + // Format: `projects//locations//agents//testCases/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/TestCase" + } + ]; +} + +// The request message for [TestCases.RunTestCase][google.cloud.dialogflow.cx.v3beta1.TestCases.RunTestCase]. +message RunTestCaseRequest { + // Required. Format of test case name to run: `projects//locations/ + // /agents//testCases/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/TestCase" + } + ]; + + // Optional. Environment name. If not set, draft environment is assumed. + // Format: `projects//locations//agents//environments/`. + string environment = 2 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Environment" + } + ]; +} + +// The response message for [TestCases.RunTestCase][google.cloud.dialogflow.cx.v3beta1.TestCases.RunTestCase]. +message RunTestCaseResponse { + // The result. + TestCaseResult result = 2; +} + +// Metadata returned for the [TestCases.RunTestCase][google.cloud.dialogflow.cx.v3beta1.TestCases.RunTestCase] long running operation. +message RunTestCaseMetadata { + +} + +// The request message for [TestCases.BatchRunTestCases][google.cloud.dialogflow.cx.v3beta1.TestCases.BatchRunTestCases]. +message BatchRunTestCasesRequest { + // Required. Agent name. Format: `projects//locations//agents/ + // `. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/TestCase" + } + ]; + + // Optional. If not set, draft environment is assumed. Format: `projects//locations//agents//environments/`. + string environment = 2 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Environment" + } + ]; + + // Required. Format: `projects//locations//agents//testCases/`. + repeated string test_cases = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/TestCase" + } + ]; +} + +// The response message for [TestCases.BatchRunTestCases][google.cloud.dialogflow.cx.v3beta1.TestCases.BatchRunTestCases]. +message BatchRunTestCasesResponse { + // The test case results. The detailed + // [conversation turns][google.cloud.dialogflow.cx.v3beta1.TestCaseResult.conversation_turns] are empty in this + // response. + repeated TestCaseResult results = 1; +} + +// Metadata returned for the [TestCases.BatchRunTestCases][google.cloud.dialogflow.cx.v3beta1.TestCases.BatchRunTestCases] long running +// operation. +message BatchRunTestCasesMetadata { + // The test errors. + repeated TestError errors = 1; +} + +// Error info for running a test. +message TestError { + // The test case resource name. + string test_case = 1 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/TestCase" + }]; + + // The status associated with the test. + google.rpc.Status status = 2; + + // The timestamp when the test was completed. + google.protobuf.Timestamp test_time = 3; +} + +// The request message for [TestCases.ImportTestCases][google.cloud.dialogflow.cx.v3beta1.TestCases.ImportTestCases]. +message ImportTestCasesRequest { + // Required. The agent to import test cases to. + // Format: `projects//locations//agents/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/TestCase" + } + ]; + + // Required. The source to import. + oneof source { + // The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI + // to import test cases from. The format of this URI must be + // `gs:///`. + string gcs_uri = 2; + + // Uncompressed raw byte content for test cases. + bytes content = 3; + } +} + +// The response message for [TestCases.ImportTestCases][google.cloud.dialogflow.cx.v3beta1.TestCases.ImportTestCases]. +message ImportTestCasesResponse { + // The unique identifiers of the new test cases. + // Format: `projects//locations//agents//testCases/`. + repeated string names = 1 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/TestCase" + }]; +} + +// Metadata returned for the [TestCases.ImportTestCases][google.cloud.dialogflow.cx.v3beta1.TestCases.ImportTestCases] long running +// operation. +message ImportTestCasesMetadata { + // Errors for failed test cases. + repeated TestCaseError errors = 1; +} + +// Error info for importing a test. +message TestCaseError { + // The test case. + TestCase test_case = 1; + + // The status associated with the test case. + google.rpc.Status status = 2; +} + +// The request message for [TestCases.ExportTestCases][google.cloud.dialogflow.cx.v3beta1.TestCases.ExportTestCases]. +message ExportTestCasesRequest { + // Data format of the exported test cases. + enum DataFormat { + // Unspecified format. + DATA_FORMAT_UNSPECIFIED = 0; + + // Raw bytes. + BLOB = 1; + + // JSON format. + JSON = 2; + } + + // Required. The agent where to export test cases from. + // Format: `projects//locations//agents/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/TestCase" + } + ]; + + // The destination to export. + oneof destination { + // 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. + string gcs_uri = 2; + } + + // The data format of the exported test cases. If not specified, `BLOB` is + // assumed. + DataFormat data_format = 3; + + // 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". + string filter = 4; +} + +// The response message for [TestCases.ExportTestCases][google.cloud.dialogflow.cx.v3beta1.TestCases.ExportTestCases]. +message ExportTestCasesResponse { + // The exported test cases. + oneof destination { + // 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.v3beta1.ExportTestCasesRequest]. + string gcs_uri = 1; + + // Uncompressed raw byte content for test cases. + bytes content = 2; + } +} + +// Metadata returned for the [TestCases.ExportTestCases][google.cloud.dialogflow.cx.v3beta1.TestCases.ExportTestCases] long running +// operation. +message ExportTestCasesMetadata { + +} + +// The request message for [TestCases.ListTestCaseResults][google.cloud.dialogflow.cx.v3beta1.TestCases.ListTestCaseResults]. +message ListTestCaseResultsRequest { + // 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. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/TestCaseResult" + } + ]; + + // The maximum number of items to return in a single page. By default 100 and + // at most 1000. + int32 page_size = 2; + + // The next_page_token value returned from a previous list request. + string page_token = 3; + + // 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. + string filter = 4; +} + +// The response message for [TestCases.ListTestCaseResults][google.cloud.dialogflow.cx.v3beta1.TestCases.ListTestCaseResults]. +message ListTestCaseResultsResponse { + // The list of test case results. + repeated TestCaseResult test_case_results = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// The test result for a test case and an agent environment. +enum TestResult { + // Not specified. Should never be used. + TEST_RESULT_UNSPECIFIED = 0; + + // The test passed. + PASSED = 1; + + // The test did not pass. + FAILED = 2; +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/transition_route_group.proto b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/transition_route_group.proto index a2eed7b4a..13d62fdbd 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/transition_route_group.proto +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/transition_route_group.proto @@ -102,11 +102,6 @@ message TransitionRouteGroup { string display_name = 2 [(google.api.field_behavior) = REQUIRED]; // Transition routes associated with the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup]. - // Duplicate transition routes (i.e. using the same - // [`intent`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.intent]) are not allowed. - // - // Note that the [`name`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.name] field is not used in the - // transition route group scope. repeated TransitionRoute transition_routes = 5; } diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/validation_message.proto b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/validation_message.proto new file mode 100644 index 000000000..6c50177c3 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/validation_message.proto @@ -0,0 +1,115 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dialogflow.cx.v3beta1; + +import "google/protobuf/struct.proto"; +import "google/api/annotations.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1;cx"; +option java_multiple_files = true; +option java_outer_classname = "ValidationMessageProto"; +option java_package = "com.google.cloud.dialogflow.cx.v3beta1"; +option objc_class_prefix = "DF"; + +// Agent/flow validation message. +message ValidationMessage { + // Resource types. + enum ResourceType { + // Unspecified. + RESOURCE_TYPE_UNSPECIFIED = 0; + + // Agent. + AGENT = 1; + + // Intent. + INTENT = 2; + + // Intent training phrase. + INTENT_TRAINING_PHRASE = 8; + + // Intent parameter. + INTENT_PARAMETER = 9; + + // Multiple intents. + INTENTS = 10; + + // Multiple training phrases. + INTENT_TRAINING_PHRASES = 11; + + // Entity type. + ENTITY_TYPE = 3; + + // Multiple entity types. + ENTITY_TYPES = 12; + + // Webhook. + WEBHOOK = 4; + + // Flow. + FLOW = 5; + + // Page. + PAGE = 6; + + // Multiple pages. + PAGES = 13; + + // Transition route group. + TRANSITION_ROUTE_GROUP = 7; + } + + // Severity level. + enum Severity { + // Unspecified. + SEVERITY_UNSPECIFIED = 0; + + // The agent doesn't follow Dialogflow best practices. + INFO = 1; + + // The agent may not behave as expected. + WARNING = 2; + + // The agent may experience failures. + ERROR = 3; + } + + // The type of the resources where the message is found. + ResourceType resource_type = 1; + + // The names of the resources where the message is found. + repeated string resources = 2 [deprecated = true]; + + // The resource names of the resources where the message is found. + repeated ResourceName resource_names = 6; + + // Indicates the severity of the message. + Severity severity = 3; + + // The message detail. + string detail = 4; +} + +// Resource name and display name. +message ResourceName { + // Name. + string name = 1; + + // Display name. + string display_name = 2; +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/webhook.proto b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/webhook.proto index e813bf304..3439bd49e 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/webhook.proto +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/webhook.proto @@ -33,6 +33,10 @@ option java_multiple_files = true; option java_outer_classname = "WebhookProto"; option java_package = "com.google.cloud.dialogflow.cx.v3beta1"; option objc_class_prefix = "DF"; +option (google.api.resource_definition) = { + type: "servicedirectory.googleapis.com/Service" + pattern: "projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}" +}; // Service for managing [Webhooks][google.cloud.dialogflow.cx.v3beta1.Webhook]. service Webhooks { @@ -424,9 +428,11 @@ message PageInfo { message SessionInfo { // Always present for [WebhookRequest][google.cloud.dialogflow.cx.v3beta1.WebhookRequest]. Ignored for [WebhookResponse][google.cloud.dialogflow.cx.v3beta1.WebhookResponse]. // The unique identifier of the [session][google.cloud.dialogflow.cx.v3beta1.DetectIntentRequest.session]. This - // field can be used by the webhook to identify a user. + // field can be used by the webhook to identify a session. // Format: `projects//locations//agents//sessions/`. + // ID>/sessions/` or `projects//locations//agents//environments//sessions/` + // if environment is specified. string session = 1 [(google.api.resource_reference) = { type: "dialogflow.googleapis.com/Session" }]; diff --git a/synth.metadata b/synth.metadata index c35b26326..2aa8f3741 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,23 +4,23 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-dialogflow-cx.git", - "sha": "5a6c5d127d298c4d3acd5fdf13839c17b9f64d08" + "sha": "6f4657b1fa012e1e29bb722533a4b3328f57730e" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "91e206bcfeaf8948ea03fe3cb1b7616108496cd3", - "internalRef": "350949863" + "sha": "f83715b48369c8d43548cc3cd84015e60be94cf2", + "internalRef": "352834280" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "91e206bcfeaf8948ea03fe3cb1b7616108496cd3", - "internalRef": "350949863" + "sha": "f83715b48369c8d43548cc3cd84015e60be94cf2", + "internalRef": "352834280" } }, { @@ -203,8 +203,6 @@ "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesSettings.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentsClient.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentsSettings.java", - "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsClient.java", - "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsSettings.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsClient.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsSettings.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/IntentsClient.java", @@ -217,6 +215,8 @@ "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionEntityTypesSettings.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionsClient.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionsSettings.java", + "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCasesClient.java", + "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCasesSettings.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupsClient.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupsSettings.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VersionsClient.java", @@ -230,8 +230,6 @@ "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/EntityTypesStubSettings.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/EnvironmentsStub.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/EnvironmentsStubSettings.java", - "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/ExperimentsStub.java", - "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/ExperimentsStubSettings.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/FlowsStub.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/FlowsStubSettings.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcAgentsCallableFactory.java", @@ -240,8 +238,6 @@ "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcEntityTypesStub.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcEnvironmentsCallableFactory.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcEnvironmentsStub.java", - "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcExperimentsCallableFactory.java", - "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcExperimentsStub.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcFlowsCallableFactory.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcFlowsStub.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcIntentsCallableFactory.java", @@ -254,6 +250,8 @@ "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcSessionEntityTypesStub.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcSessionsCallableFactory.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcSessionsStub.java", + "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcTestCasesCallableFactory.java", + "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcTestCasesStub.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcTransitionRouteGroupsCallableFactory.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcTransitionRouteGroupsStub.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcVersionsCallableFactory.java", @@ -270,6 +268,8 @@ "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/SessionEntityTypesStubSettings.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/SessionsStub.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/SessionsStubSettings.java", + "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/TestCasesStub.java", + "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/TestCasesStubSettings.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/TransitionRouteGroupsStub.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/TransitionRouteGroupsStubSettings.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/VersionsStub.java", @@ -318,7 +318,6 @@ "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClientTest.java", "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesClientTest.java", "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentsClientTest.java", - "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsClientTest.java", "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsClientTest.java", "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/IntentsClientTest.java", "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockAgents.java", @@ -327,8 +326,6 @@ "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockEntityTypesImpl.java", "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockEnvironments.java", "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockEnvironmentsImpl.java", - "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockExperiments.java", - "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockExperimentsImpl.java", "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockFlows.java", "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockFlowsImpl.java", "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockIntents.java", @@ -341,6 +338,8 @@ "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockSessionEntityTypesImpl.java", "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockSessions.java", "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockSessionsImpl.java", + "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockTestCases.java", + "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockTestCasesImpl.java", "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockTransitionRouteGroups.java", "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockTransitionRouteGroupsImpl.java", "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockVersions.java", @@ -351,6 +350,7 @@ "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/SecuritySettingsServiceClientTest.java", "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/SessionEntityTypesClientTest.java", "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/SessionsClientTest.java", + "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/TestCasesClientTest.java", "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupsClientTest.java", "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/VersionsClientTest.java", "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/WebhooksClientTest.java", @@ -370,13 +370,13 @@ "grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsGrpc.java", "grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesGrpc.java", "grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentsGrpc.java", - "grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsGrpc.java", "grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsGrpc.java", "grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/IntentsGrpc.java", "grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PagesGrpc.java", "grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SecuritySettingsServiceGrpc.java", "grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionEntityTypesGrpc.java", "grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionsGrpc.java", + "grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCasesGrpc.java", "grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupsGrpc.java", "grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VersionsGrpc.java", "grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/WebhooksGrpc.java", @@ -699,18 +699,33 @@ "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentName.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentProto.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentValidationResult.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentValidationResultName.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentValidationResultOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AudioConfigProto.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AudioEncoding.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AudioInput.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AudioInputOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BatchDeleteTestCasesRequest.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BatchDeleteTestCasesRequestOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BatchRunTestCasesMetadata.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BatchRunTestCasesMetadataOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BatchRunTestCasesRequest.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BatchRunTestCasesRequestOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BatchRunTestCasesResponse.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/BatchRunTestCasesResponseOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CalculateCoverageRequest.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CalculateCoverageRequestOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CalculateCoverageResponse.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CalculateCoverageResponseOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ConversationTurn.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ConversationTurnOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateAgentRequest.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateAgentRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateEntityTypeRequest.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateEntityTypeRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateEnvironmentRequest.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateEnvironmentRequestOrBuilder.java", - "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateExperimentRequest.java", - "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateExperimentRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateFlowRequest.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateFlowRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateIntentRequest.java", @@ -721,6 +736,8 @@ "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateSecuritySettingsRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateSessionEntityTypeRequest.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateSessionEntityTypeRequestOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateTestCaseRequest.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateTestCaseRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateTransitionRouteGroupRequest.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateTransitionRouteGroupRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateVersionOperationMetadata.java", @@ -735,8 +752,6 @@ "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteEntityTypeRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteEnvironmentRequest.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteEnvironmentRequestOrBuilder.java", - "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteExperimentRequest.java", - "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteExperimentRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteFlowRequest.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteFlowRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteIntentRequest.java", @@ -771,18 +786,23 @@ "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EventHandlerOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EventInput.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EventInputOrBuilder.java", - "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Experiment.java", - "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentName.java", - "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentOrBuilder.java", - "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentProto.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportAgentRequest.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportAgentRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportAgentResponse.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportAgentResponseOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportTestCasesMetadata.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportTestCasesMetadataOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportTestCasesRequest.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportTestCasesRequestOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportTestCasesResponse.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportTestCasesResponseOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Flow.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowName.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowProto.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowValidationResult.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowValidationResultName.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowValidationResultOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Form.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FormOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FulfillIntentRequest.java", @@ -794,14 +814,16 @@ "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FulfillmentProto.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetAgentRequest.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetAgentRequestOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetAgentValidationResultRequest.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetAgentValidationResultRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetEntityTypeRequest.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetEntityTypeRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetEnvironmentRequest.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetEnvironmentRequestOrBuilder.java", - "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetExperimentRequest.java", - "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetExperimentRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetFlowRequest.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetFlowRequestOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetFlowValidationResultRequest.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetFlowValidationResultRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetIntentRequest.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetIntentRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetPageRequest.java", @@ -810,15 +832,25 @@ "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetSecuritySettingsRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetSessionEntityTypeRequest.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetSessionEntityTypeRequestOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetTestCaseRequest.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetTestCaseRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetTransitionRouteGroupRequest.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetTransitionRouteGroupRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetVersionRequest.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetVersionRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetWebhookRequest.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetWebhookRequestOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportTestCasesMetadata.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportTestCasesMetadataOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportTestCasesRequest.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportTestCasesRequestOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportTestCasesResponse.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportTestCasesResponseOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/InputAudioConfig.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/InputAudioConfigOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Intent.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/IntentCoverage.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/IntentCoverageOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/IntentInput.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/IntentInputOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/IntentName.java", @@ -837,10 +869,6 @@ "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListEnvironmentsRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListEnvironmentsResponse.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListEnvironmentsResponseOrBuilder.java", - "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExperimentsRequest.java", - "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExperimentsRequestOrBuilder.java", - "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExperimentsResponse.java", - "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExperimentsResponseOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListFlowsRequest.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListFlowsRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListFlowsResponse.java", @@ -861,6 +889,14 @@ "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListSessionEntityTypesRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListSessionEntityTypesResponse.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListSessionEntityTypesResponseOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListTestCaseResultsRequest.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListTestCaseResultsRequestOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListTestCaseResultsResponse.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListTestCaseResultsResponseOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListTestCasesRequest.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListTestCasesRequestOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListTestCasesResponse.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListTestCasesResponseOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListTransitionRouteGroupsRequest.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListTransitionRouteGroupsRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListTransitionRouteGroupsResponse.java", @@ -903,11 +939,19 @@ "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/QueryParametersOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/QueryResult.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/QueryResultOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ResourceName.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ResourceNameOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ResponseMessage.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ResponseMessageOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ResponseMessageProto.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RestoreAgentRequest.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RestoreAgentRequestOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunTestCaseMetadata.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunTestCaseMetadataOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunTestCaseRequest.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunTestCaseRequestOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunTestCaseResponse.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunTestCaseResponseOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SecuritySettings.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SecuritySettingsName.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SecuritySettingsOrBuilder.java", @@ -928,10 +972,6 @@ "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SpeechWordInfo.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SpeechWordInfoOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SsmlVoiceGender.java", - "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/StartExperimentRequest.java", - "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/StartExperimentRequestOrBuilder.java", - "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/StopExperimentRequest.java", - "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/StopExperimentRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/StreamingDetectIntentRequest.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/StreamingDetectIntentRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/StreamingDetectIntentResponse.java", @@ -940,10 +980,28 @@ "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/StreamingRecognitionResultOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SynthesizeSpeechConfig.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SynthesizeSpeechConfigOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCase.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseError.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseErrorOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseName.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseProto.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseResult.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseResultName.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseResultOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestConfig.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestConfigOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestError.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestErrorOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestResult.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestRunDifference.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestRunDifferenceOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TextInput.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TextInputOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TrainFlowRequest.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TrainFlowRequestOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionCoverage.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionCoverageOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRoute.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroup.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupName.java", @@ -956,8 +1014,6 @@ "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateEntityTypeRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateEnvironmentRequest.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateEnvironmentRequestOrBuilder.java", - "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateExperimentRequest.java", - "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateExperimentRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateFlowRequest.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateFlowRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateIntentRequest.java", @@ -968,20 +1024,25 @@ "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateSecuritySettingsRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateSessionEntityTypeRequest.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateSessionEntityTypeRequestOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateTestCaseRequest.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateTestCaseRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateTransitionRouteGroupRequest.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateTransitionRouteGroupRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateVersionRequest.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateVersionRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateWebhookRequest.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateWebhookRequestOrBuilder.java", - "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VariantsHistory.java", - "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VariantsHistoryOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidateAgentRequest.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidateAgentRequestOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidateFlowRequest.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidateFlowRequestOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidationMessage.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidationMessageOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidationMessageProto.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Version.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VersionName.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VersionOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VersionProto.java", - "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VersionVariants.java", - "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VersionVariantsOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VoiceSelectionParams.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VoiceSelectionParamsOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Webhook.java", @@ -996,7 +1057,6 @@ "proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/audio_config.proto", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/entity_type.proto", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/environment.proto", - "proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/experiment.proto", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/flow.proto", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/intent.proto", @@ -1005,7 +1065,9 @@ "proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/security_settings.proto", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/session.proto", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/session_entity_type.proto", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/test_case.proto", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/transition_route_group.proto", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/validation_message.proto", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/version.proto", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/webhook.proto", "renovate.json", From 42e85b0334d0c03d97643d077d8f92a60260f8a6 Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Tue, 16 Feb 2021 18:53:09 -0800 Subject: [PATCH 02/12] feat: added support for test cases and agent validation PiperOrigin-RevId: 353075593 Source-Author: Google APIs Source-Date: Thu Jan 21 12:25:58 2021 -0800 Source-Repo: googleapis/googleapis Source-Sha: cb932c5caa751435dfd0a9a15f655a0626d8a1cb Source-Link: https://github.com/googleapis/googleapis/commit/cb932c5caa751435dfd0a9a15f655a0626d8a1cb --- .../cloud/dialogflow/cx/v3/AgentsClient.java | 82 + .../dialogflow/cx/v3/AgentsSettings.java | 23 + .../dialogflow/cx/v3/ExperimentsClient.java | 635 - .../dialogflow/cx/v3/ExperimentsSettings.java | 250 - .../cloud/dialogflow/cx/v3/FlowsClient.java | 82 + .../cloud/dialogflow/cx/v3/FlowsSettings.java | 23 + .../dialogflow/cx/v3/TestCasesClient.java | 845 ++ .../dialogflow/cx/v3/TestCasesSettings.java | 355 + .../cloud/dialogflow/cx/v3/package-info.java | 14 +- .../dialogflow/cx/v3/stub/AgentsStub.java | 12 + .../cx/v3/stub/AgentsStubSettings.java | 58 +- .../cx/v3/stub/ExperimentsStub.java | 79 - .../cx/v3/stub/ExperimentsStubSettings.java | 491 - .../dialogflow/cx/v3/stub/FlowsStub.java | 12 + .../cx/v3/stub/FlowsStubSettings.java | 57 +- .../dialogflow/cx/v3/stub/GrpcAgentsStub.java | 72 + .../cx/v3/stub/GrpcExperimentsStub.java | 368 - .../dialogflow/cx/v3/stub/GrpcFlowsStub.java | 71 + ...java => GrpcTestCasesCallableFactory.java} | 4 +- .../cx/v3/stub/GrpcTestCasesStub.java | 576 + .../dialogflow/cx/v3/stub/TestCasesStub.java | 146 + .../cx/v3/stub/TestCasesStubSettings.java | 867 ++ .../dialogflow/cx/v3/AgentsClientTest.java | 146 + .../cx/v3/ExperimentsClientTest.java | 721 -- .../dialogflow/cx/v3/FlowsClientTest.java | 140 + .../dialogflow/cx/v3/MockAgentsImpl.java | 31 + .../cloud/dialogflow/cx/v3/MockFlowsImpl.java | 31 + ...ockExperiments.java => MockTestCases.java} | 8 +- ...imentsImpl.java => MockTestCasesImpl.java} | 123 +- .../dialogflow/cx/v3/TestCasesClientTest.java | 852 ++ .../cloud/dialogflow/cx/v3/AgentsGrpc.java | 254 + .../dialogflow/cx/v3/ExperimentsGrpc.java | 1074 -- .../cloud/dialogflow/cx/v3/FlowsGrpc.java | 253 + .../cloud/dialogflow/cx/v3/TestCasesGrpc.java | 1524 +++ .../google/cloud/dialogflow/cx/v3/Agent.java | 193 + .../dialogflow/cx/v3/AgentOrBuilder.java | 29 + .../cloud/dialogflow/cx/v3/AgentProto.java | 137 +- .../cx/v3/AgentValidationResult.java | 1210 ++ .../cx/v3/AgentValidationResultName.java | 224 + .../cx/v3/AgentValidationResultOrBuilder.java | 113 + .../cx/v3/BatchDeleteTestCasesRequest.java | 981 ++ .../BatchDeleteTestCasesRequestOrBuilder.java | 119 + .../cx/v3/BatchRunTestCasesMetadata.java | 952 ++ .../BatchRunTestCasesMetadataOrBuilder.java | 77 + .../cx/v3/BatchRunTestCasesRequest.java | 1184 ++ .../v3/BatchRunTestCasesRequestOrBuilder.java | 152 + .../cx/v3/BatchRunTestCasesResponse.java | 1001 ++ .../BatchRunTestCasesResponseOrBuilder.java | 87 + .../cx/v3/CalculateCoverageRequest.java | 992 ++ .../v3/CalculateCoverageRequestOrBuilder.java | 85 + .../cx/v3/CalculateCoverageResponse.java | 1342 ++ .../CalculateCoverageResponseOrBuilder.java | 125 + .../dialogflow/cx/v3/ConversationTurn.java | 5653 +++++++++ .../cx/v3/ConversationTurnOrBuilder.java | 102 + ...equest.java => CreateTestCaseRequest.java} | 412 +- ...va => CreateTestCaseRequestOrBuilder.java} | 38 +- .../cloud/dialogflow/cx/v3/EntityType.java | 2 - .../cloud/dialogflow/cx/v3/Experiment.java | 10084 ---------------- .../dialogflow/cx/v3/ExperimentOrBuilder.java | 434 - .../dialogflow/cx/v3/ExperimentProto.java | 427 - .../cx/v3/ExportTestCasesMetadata.java | 459 + .../v3/ExportTestCasesMetadataOrBuilder.java | 24 + .../cx/v3/ExportTestCasesRequest.java | 1513 +++ .../v3/ExportTestCasesRequestOrBuilder.java | 154 + .../cx/v3/ExportTestCasesResponse.java | 862 ++ .../v3/ExportTestCasesResponseOrBuilder.java | 70 + .../cloud/dialogflow/cx/v3/FlowProto.java | 223 +- .../cx/v3/FlowValidationResult.java | 1453 +++ .../cx/v3/FlowValidationResultName.java | 261 + .../cx/v3/FlowValidationResultOrBuilder.java | 142 + .../google/cloud/dialogflow/cx/v3/Form.java | 45 +- .../v3/GetAgentValidationResultRequest.java | 854 ++ ...gentValidationResultRequestOrBuilder.java} | 39 +- .../cx/v3/GetFlowValidationResultRequest.java | 852 ++ ...tFlowValidationResultRequestOrBuilder.java | 83 + ...ntRequest.java => GetTestCaseRequest.java} | 171 +- ....java => GetTestCaseRequestOrBuilder.java} | 14 +- .../cx/v3/ImportTestCasesMetadata.java | 954 ++ .../v3/ImportTestCasesMetadataOrBuilder.java | 77 + ...quest.java => ImportTestCasesRequest.java} | 593 +- .../v3/ImportTestCasesRequestOrBuilder.java | 100 + .../cx/v3/ImportTestCasesResponse.java | 764 ++ .../v3/ImportTestCasesResponseOrBuilder.java | 84 + .../google/cloud/dialogflow/cx/v3/Intent.java | 45 +- ...rsionVariants.java => IntentCoverage.java} | 1118 +- .../cx/v3/IntentCoverageOrBuilder.java | 90 + .../cx/v3/ListExperimentsResponse.java | 1209 -- .../v3/ListExperimentsResponseOrBuilder.java | 119 - .../cx/v3/ListTestCaseResultsRequest.java | 1253 ++ .../ListTestCaseResultsRequestOrBuilder.java | 160 + .../cx/v3/ListTestCaseResultsResponse.java | 1155 ++ .../ListTestCaseResultsResponseOrBuilder.java | 104 + .../cx/v3/ListTestCasesRequest.java | 1259 ++ ...ava => ListTestCasesRequestOrBuilder.java} | 46 +- .../cx/v3/ListTestCasesResponse.java | 1161 ++ .../cx/v3/ListTestCasesResponseOrBuilder.java | 109 + .../google/cloud/dialogflow/cx/v3/Page.java | 138 +- .../cloud/dialogflow/cx/v3/PageOrBuilder.java | 30 +- ...perimentRequest.java => ResourceName.java} | 384 +- .../cx/v3/ResourceNameOrBuilder.java | 75 + .../dialogflow/cx/v3/ResponseMessage.java | 4396 +++---- .../cx/v3/ResponseMessageProto.java | 46 +- .../dialogflow/cx/v3/RunTestCaseMetadata.java | 457 + .../cx/v3/RunTestCaseMetadataOrBuilder.java | 24 + .../dialogflow/cx/v3/RunTestCaseRequest.java | 864 ++ .../cx/v3/RunTestCaseRequestOrBuilder.java | 89 + .../dialogflow/cx/v3/RunTestCaseResponse.java | 735 ++ .../cx/v3/RunTestCaseResponseOrBuilder.java | 60 + .../cloud/dialogflow/cx/v3/SessionInfo.java | 42 +- .../cx/v3/SessionInfoOrBuilder.java | 12 +- .../cloud/dialogflow/cx/v3/TestCase.java | 2789 +++++ .../cloud/dialogflow/cx/v3/TestCaseError.java | 993 ++ .../cx/v3/TestCaseErrorOrBuilder.java | 95 + .../cloud/dialogflow/cx/v3/TestCaseName.java | 257 + .../dialogflow/cx/v3/TestCaseOrBuilder.java | 352 + .../cloud/dialogflow/cx/v3/TestCaseProto.java | 779 ++ .../dialogflow/cx/v3/TestCaseResult.java | 1803 +++ ...imentName.java => TestCaseResultName.java} | 130 +- .../cx/v3/TestCaseResultOrBuilder.java | 203 + .../cloud/dialogflow/cx/v3/TestConfig.java | 928 ++ .../dialogflow/cx/v3/TestConfigOrBuilder.java | 105 + .../cloud/dialogflow/cx/v3/TestError.java | 1163 ++ .../dialogflow/cx/v3/TestErrorOrBuilder.java | 120 + .../cloud/dialogflow/cx/v3/TestResult.java | 176 + .../dialogflow/cx/v3/TestRunDifference.java | 997 ++ .../cx/v3/TestRunDifferenceOrBuilder.java | 75 + .../dialogflow/cx/v3/TransitionCoverage.java | 4421 +++++++ .../cx/v3/TransitionCoverageOrBuilder.java | 97 + .../cx/v3/TransitionRouteGroup.java | 92 - .../cx/v3/TransitionRouteGroupOrBuilder.java | 20 - ...equest.java => UpdateTestCaseRequest.java} | 425 +- ...va => UpdateTestCaseRequestOrBuilder.java} | 40 +- ...Request.java => ValidateAgentRequest.java} | 356 +- ...ava => ValidateAgentRequestOrBuilder.java} | 41 +- ...tRequest.java => ValidateFlowRequest.java} | 349 +- ...java => ValidateFlowRequestOrBuilder.java} | 39 +- .../dialogflow/cx/v3/ValidationMessage.java | 2330 ++++ .../cx/v3/ValidationMessageOrBuilder.java | 207 + .../cx/v3/ValidationMessageProto.java | 102 + .../dialogflow/cx/v3/VariantsHistory.java | 1111 -- .../cx/v3/VariantsHistoryOrBuilder.java | 97 - .../cx/v3/VersionVariantsOrBuilder.java | 78 - .../cx/v3/VoiceSelectionParams.java | 49 +- .../cx/v3/VoiceSelectionParamsOrBuilder.java | 14 +- .../cloud/dialogflow/cx/v3/WebhookProto.java | 8 +- .../google/cloud/dialogflow/cx/v3/agent.proto | 73 + .../cloud/dialogflow/cx/v3/audio_config.proto | 58 +- .../cloud/dialogflow/cx/v3/entity_type.proto | 1 - .../cloud/dialogflow/cx/v3/experiment.proto | 415 - .../google/cloud/dialogflow/cx/v3/flow.proto | 71 + .../cloud/dialogflow/cx/v3/intent.proto | 9 +- .../google/cloud/dialogflow/cx/v3/page.proto | 15 +- .../dialogflow/cx/v3/response_message.proto | 24 +- .../cloud/dialogflow/cx/v3/test_case.proto | 835 ++ .../cx/v3/transition_route_group.proto | 5 - .../dialogflow/cx/v3/validation_message.proto | 115 + .../cloud/dialogflow/cx/v3/webhook.proto | 10 +- synth.metadata | 140 +- 158 files changed, 61990 insertions(+), 22027 deletions(-) delete mode 100644 google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentsClient.java delete mode 100644 google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentsSettings.java create mode 100644 google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCasesClient.java create mode 100644 google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCasesSettings.java delete mode 100644 google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/ExperimentsStub.java delete mode 100644 google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/ExperimentsStubSettings.java delete mode 100644 google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcExperimentsStub.java rename google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/{GrpcExperimentsCallableFactory.java => GrpcTestCasesCallableFactory.java} (96%) create mode 100644 google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcTestCasesStub.java create mode 100644 google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/TestCasesStub.java create mode 100644 google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/TestCasesStubSettings.java delete mode 100644 google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/ExperimentsClientTest.java rename google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/{MockExperiments.java => MockTestCases.java} (88%) rename google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/{MockExperimentsImpl.java => MockTestCasesImpl.java} (51%) create mode 100644 google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/TestCasesClientTest.java delete mode 100644 grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentsGrpc.java create mode 100644 grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCasesGrpc.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentValidationResult.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentValidationResultName.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentValidationResultOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BatchDeleteTestCasesRequest.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BatchDeleteTestCasesRequestOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BatchRunTestCasesMetadata.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BatchRunTestCasesMetadataOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BatchRunTestCasesRequest.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BatchRunTestCasesRequestOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BatchRunTestCasesResponse.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BatchRunTestCasesResponseOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CalculateCoverageRequest.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CalculateCoverageRequestOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CalculateCoverageResponse.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CalculateCoverageResponseOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ConversationTurn.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ConversationTurnOrBuilder.java rename proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/{CreateExperimentRequest.java => CreateTestCaseRequest.java} (58%) rename proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/{CreateExperimentRequestOrBuilder.java => CreateTestCaseRequestOrBuilder.java} (57%) delete mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Experiment.java delete mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentOrBuilder.java delete mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentProto.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportTestCasesMetadata.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportTestCasesMetadataOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportTestCasesRequest.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportTestCasesRequestOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportTestCasesResponse.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportTestCasesResponseOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowValidationResult.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowValidationResultName.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowValidationResultOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetAgentValidationResultRequest.java rename proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/{GetExperimentRequestOrBuilder.java => GetAgentValidationResultRequestOrBuilder.java} (66%) create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetFlowValidationResultRequest.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetFlowValidationResultRequestOrBuilder.java rename proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/{GetExperimentRequest.java => GetTestCaseRequest.java} (72%) rename proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/{StopExperimentRequestOrBuilder.java => GetTestCaseRequestOrBuilder.java} (78%) create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportTestCasesMetadata.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportTestCasesMetadataOrBuilder.java rename proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/{ListExperimentsRequest.java => ImportTestCasesRequest.java} (60%) create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportTestCasesRequestOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportTestCasesResponse.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportTestCasesResponseOrBuilder.java rename proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/{VersionVariants.java => IntentCoverage.java} (50%) create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/IntentCoverageOrBuilder.java delete mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListExperimentsResponse.java delete mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListExperimentsResponseOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListTestCaseResultsRequest.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListTestCaseResultsRequestOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListTestCaseResultsResponse.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListTestCaseResultsResponseOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListTestCasesRequest.java rename proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/{ListExperimentsRequestOrBuilder.java => ListTestCasesRequestOrBuilder.java} (66%) create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListTestCasesResponse.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListTestCasesResponseOrBuilder.java rename proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/{DeleteExperimentRequest.java => ResourceName.java} (59%) create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResourceNameOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RunTestCaseMetadata.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RunTestCaseMetadataOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RunTestCaseRequest.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RunTestCaseRequestOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RunTestCaseResponse.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RunTestCaseResponseOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCase.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseError.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseErrorOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseName.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseProto.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseResult.java rename proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/{ExperimentName.java => TestCaseResultName.java} (62%) create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseResultOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestConfig.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestConfigOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestError.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestErrorOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestResult.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestRunDifference.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestRunDifferenceOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionCoverage.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionCoverageOrBuilder.java rename proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/{UpdateExperimentRequest.java => UpdateTestCaseRequest.java} (60%) rename proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/{UpdateExperimentRequestOrBuilder.java => UpdateTestCaseRequestOrBuilder.java} (54%) rename proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/{StartExperimentRequest.java => ValidateAgentRequest.java} (60%) rename proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/{DeleteExperimentRequestOrBuilder.java => ValidateAgentRequestOrBuilder.java} (65%) rename proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/{StopExperimentRequest.java => ValidateFlowRequest.java} (60%) rename proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/{StartExperimentRequestOrBuilder.java => ValidateFlowRequestOrBuilder.java} (66%) create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidationMessage.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidationMessageOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidationMessageProto.java delete mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VariantsHistory.java delete mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VariantsHistoryOrBuilder.java delete mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VersionVariantsOrBuilder.java delete mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/experiment.proto create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/test_case.proto create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/validation_message.proto diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentsClient.java index fcf763aea..e62dd01ce 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentsClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentsClient.java @@ -473,6 +473,88 @@ public final UnaryCallable restoreAgentCallable( return stub.restoreAgentCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AgentValidationResult validateAgent(ValidateAgentRequest request) { + return validateAgentCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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. + * + *

Sample code: + */ + public final UnaryCallable validateAgentCallable() { + return stub.validateAgentCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the latest agent validation result. Agent validation is performed when ValidateAgent is + * called. + * + * @param name Required. The agent name. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>/validationResult`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AgentValidationResult getAgentValidationResult(AgentValidationResultName name) { + GetAgentValidationResultRequest request = + GetAgentValidationResultRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getAgentValidationResult(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the latest agent validation result. Agent validation is performed when ValidateAgent is + * called. + * + * @param name Required. The agent name. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>/validationResult`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AgentValidationResult getAgentValidationResult(String name) { + GetAgentValidationResultRequest request = + GetAgentValidationResultRequest.newBuilder().setName(name).build(); + return getAgentValidationResult(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the latest agent validation result. Agent validation is performed when ValidateAgent is + * called. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AgentValidationResult getAgentValidationResult( + GetAgentValidationResultRequest request) { + return getAgentValidationResultCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the latest agent validation result. Agent validation is performed when ValidateAgent is + * called. + * + *

Sample code: + */ + public final UnaryCallable + getAgentValidationResultCallable() { + return stub.getAgentValidationResultCallable(); + } + @Override public final void close() { stub.close(); diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentsSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentsSettings.java index c620b8163..1890b0441 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentsSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentsSettings.java @@ -119,6 +119,17 @@ public OperationCallSettings restoreAgentOpe return ((AgentsStubSettings) getStubSettings()).restoreAgentOperationSettings(); } + /** Returns the object with the settings used for calls to validateAgent. */ + public UnaryCallSettings validateAgentSettings() { + return ((AgentsStubSettings) getStubSettings()).validateAgentSettings(); + } + + /** Returns the object with the settings used for calls to getAgentValidationResult. */ + public UnaryCallSettings + getAgentValidationResultSettings() { + return ((AgentsStubSettings) getStubSettings()).getAgentValidationResultSettings(); + } + public static final AgentsSettings create(AgentsStubSettings stub) throws IOException { return new AgentsSettings.Builder(stub.toBuilder()).build(); } @@ -264,6 +275,18 @@ public UnaryCallSettings.Builder restoreAgentSet return getStubSettingsBuilder().restoreAgentOperationSettings(); } + /** Returns the builder for the settings used for calls to validateAgent. */ + public UnaryCallSettings.Builder + validateAgentSettings() { + return getStubSettingsBuilder().validateAgentSettings(); + } + + /** Returns the builder for the settings used for calls to getAgentValidationResult. */ + public UnaryCallSettings.Builder + getAgentValidationResultSettings() { + return getStubSettingsBuilder().getAgentValidationResultSettings(); + } + @Override public AgentsSettings build() throws IOException { return new AgentsSettings(this); diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentsClient.java deleted file mode 100644 index 9c917cfc5..000000000 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentsClient.java +++ /dev/null @@ -1,635 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.dialogflow.cx.v3; - -import com.google.api.core.ApiFunction; -import com.google.api.core.ApiFuture; -import com.google.api.core.ApiFutures; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.paging.AbstractFixedSizeCollection; -import com.google.api.gax.paging.AbstractPage; -import com.google.api.gax.paging.AbstractPagedListResponse; -import com.google.api.gax.rpc.PageContext; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.dialogflow.cx.v3.stub.ExperimentsStub; -import com.google.cloud.dialogflow.cx.v3.stub.ExperimentsStubSettings; -import com.google.common.util.concurrent.MoreExecutors; -import com.google.protobuf.Empty; -import com.google.protobuf.FieldMask; -import java.io.IOException; -import java.util.List; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Service Description: Service for managing - * [Experiments][google.cloud.dialogflow.cx.v3.Experiment]. - * - *

This class provides the ability to make remote calls to the backing service through method - * calls that map to API methods. Sample code to get started: - * - *

Note: close() needs to be called on the ExperimentsClient object to clean up resources such as - * threads. In the example above, try-with-resources is used, which automatically calls close(). - * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
- * - *

See the individual methods for example code. - * - *

Many parameters require resource names to be formatted in a particular way. To assist with - * these names, this class includes a format method for each type of name, and additionally a parse - * method to extract the individual identifiers contained within names that are returned. - * - *

This class can be customized by passing in a custom instance of ExperimentsSettings to - * create(). For example: - * - *

To customize credentials: - * - *

{@code
- * ExperimentsSettings experimentsSettings =
- *     ExperimentsSettings.newBuilder()
- *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- *         .build();
- * ExperimentsClient experimentsClient = ExperimentsClient.create(experimentsSettings);
- * }
- * - *

To customize the endpoint: - * - *

{@code
- * ExperimentsSettings experimentsSettings =
- *     ExperimentsSettings.newBuilder().setEndpoint(myEndpoint).build();
- * ExperimentsClient experimentsClient = ExperimentsClient.create(experimentsSettings);
- * }
- * - *

Please refer to the GitHub repository's samples for more quickstart code snippets. - */ -@Generated("by gapic-generator-java") -public class ExperimentsClient implements BackgroundResource { - private final ExperimentsSettings settings; - private final ExperimentsStub stub; - - /** Constructs an instance of ExperimentsClient with default settings. */ - public static final ExperimentsClient create() throws IOException { - return create(ExperimentsSettings.newBuilder().build()); - } - - /** - * Constructs an instance of ExperimentsClient, using the given settings. The channels are created - * based on the settings passed in, or defaults for any settings that are not set. - */ - public static final ExperimentsClient create(ExperimentsSettings settings) throws IOException { - return new ExperimentsClient(settings); - } - - /** - * Constructs an instance of ExperimentsClient, using the given stub for making calls. This is for - * advanced usage - prefer using create(ExperimentsSettings). - */ - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") - public static final ExperimentsClient create(ExperimentsStub stub) { - return new ExperimentsClient(stub); - } - - /** - * Constructs an instance of ExperimentsClient, using the given settings. This is protected so - * that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected ExperimentsClient(ExperimentsSettings settings) throws IOException { - this.settings = settings; - this.stub = ((ExperimentsStubSettings) settings.getStubSettings()).createStub(); - } - - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") - protected ExperimentsClient(ExperimentsStub stub) { - this.settings = null; - this.stub = stub; - } - - public final ExperimentsSettings getSettings() { - return settings; - } - - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") - public ExperimentsStub getStub() { - return stub; - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns the list of all experiments in the specified - * [Environment][google.cloud.dialogflow.cx.v3.Environment]. - * - * @param parent Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to list - * all environments for. Format: `projects/<Project ID>/locations/<Location - * ID>/agents/<Agent ID>/environments/<Environment ID>`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListExperimentsPagedResponse listExperiments(EnvironmentName parent) { - ListExperimentsRequest request = - ListExperimentsRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listExperiments(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns the list of all experiments in the specified - * [Environment][google.cloud.dialogflow.cx.v3.Environment]. - * - * @param parent Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to list - * all environments for. Format: `projects/<Project ID>/locations/<Location - * ID>/agents/<Agent ID>/environments/<Environment ID>`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListExperimentsPagedResponse listExperiments(String parent) { - ListExperimentsRequest request = ListExperimentsRequest.newBuilder().setParent(parent).build(); - return listExperiments(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns the list of all experiments in the specified - * [Environment][google.cloud.dialogflow.cx.v3.Environment]. - * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListExperimentsPagedResponse listExperiments(ListExperimentsRequest request) { - return listExperimentsPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns the list of all experiments in the specified - * [Environment][google.cloud.dialogflow.cx.v3.Environment]. - * - *

Sample code: - */ - public final UnaryCallable - listExperimentsPagedCallable() { - return stub.listExperimentsPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns the list of all experiments in the specified - * [Environment][google.cloud.dialogflow.cx.v3.Environment]. - * - *

Sample code: - */ - public final UnaryCallable - listExperimentsCallable() { - return stub.listExperimentsCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Retrieves the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. - * - * @param name Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment]. - * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/environments/<Environment ID>/experiments/<Experiment ID>`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Experiment getExperiment(ExperimentName name) { - GetExperimentRequest request = - GetExperimentRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return getExperiment(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Retrieves the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. - * - * @param name Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment]. - * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>/environments/<Environment ID>/experiments/<Experiment ID>`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Experiment getExperiment(String name) { - GetExperimentRequest request = GetExperimentRequest.newBuilder().setName(name).build(); - return getExperiment(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Retrieves the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. - * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Experiment getExperiment(GetExperimentRequest request) { - return getExperimentCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Retrieves the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. - * - *

Sample code: - */ - public final UnaryCallable getExperimentCallable() { - return stub.getExperimentCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates an [Experiment][google.cloud.dialogflow.cx.v3.Experiment] in the specified - * [Environment][google.cloud.dialogflow.cx.v3.Environment]. - * - * @param parent Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to create an - * [Environment][google.cloud.dialogflow.cx.v3.Environment] for. Format: `projects/<Project - * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment - * ID>`. - * @param experiment Required. The experiment to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Experiment createExperiment(EnvironmentName parent, Experiment experiment) { - CreateExperimentRequest request = - CreateExperimentRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setExperiment(experiment) - .build(); - return createExperiment(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates an [Experiment][google.cloud.dialogflow.cx.v3.Experiment] in the specified - * [Environment][google.cloud.dialogflow.cx.v3.Environment]. - * - * @param parent Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to create an - * [Environment][google.cloud.dialogflow.cx.v3.Environment] for. Format: `projects/<Project - * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment - * ID>`. - * @param experiment Required. The experiment to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Experiment createExperiment(String parent, Experiment experiment) { - CreateExperimentRequest request = - CreateExperimentRequest.newBuilder().setParent(parent).setExperiment(experiment).build(); - return createExperiment(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates an [Experiment][google.cloud.dialogflow.cx.v3.Experiment] in the specified - * [Environment][google.cloud.dialogflow.cx.v3.Environment]. - * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Experiment createExperiment(CreateExperimentRequest request) { - return createExperimentCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates an [Experiment][google.cloud.dialogflow.cx.v3.Experiment] in the specified - * [Environment][google.cloud.dialogflow.cx.v3.Environment]. - * - *

Sample code: - */ - public final UnaryCallable createExperimentCallable() { - return stub.createExperimentCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. - * - * @param experiment Required. The experiment to update. - * @param updateMask Required. The mask to control which fields get updated. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Experiment updateExperiment(Experiment experiment, FieldMask updateMask) { - UpdateExperimentRequest request = - UpdateExperimentRequest.newBuilder() - .setExperiment(experiment) - .setUpdateMask(updateMask) - .build(); - return updateExperiment(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. - * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Experiment updateExperiment(UpdateExperimentRequest request) { - return updateExperimentCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. - * - *

Sample code: - */ - public final UnaryCallable updateExperimentCallable() { - return stub.updateExperimentCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. - * - * @param name Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment] - * to delete. Format: `projects/<Project ID>/locations/<Location - * ID>/agents/<Agent ID>/environments/<Environment - * ID>/experiments/<Experiment ID>`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteExperiment(ExperimentName name) { - DeleteExperimentRequest request = - DeleteExperimentRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - deleteExperiment(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. - * - * @param name Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment] - * to delete. Format: `projects/<Project ID>/locations/<Location - * ID>/agents/<Agent ID>/environments/<Environment - * ID>/experiments/<Experiment ID>`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteExperiment(String name) { - DeleteExperimentRequest request = DeleteExperimentRequest.newBuilder().setName(name).build(); - deleteExperiment(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. - * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteExperiment(DeleteExperimentRequest request) { - deleteExperimentCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. - * - *

Sample code: - */ - public final UnaryCallable deleteExperimentCallable() { - return stub.deleteExperimentCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Starts the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. This rpc only - * changes the state of experiment from PENDING to RUNNING. - * - * @param name Required. Resource name of the experiment to start. Format: `projects/<Project - * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment - * ID>/experiments/<Experiment ID>`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Experiment startExperiment(ExperimentName name) { - StartExperimentRequest request = - StartExperimentRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return startExperiment(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Starts the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. This rpc only - * changes the state of experiment from PENDING to RUNNING. - * - * @param name Required. Resource name of the experiment to start. Format: `projects/<Project - * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment - * ID>/experiments/<Experiment ID>`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Experiment startExperiment(String name) { - StartExperimentRequest request = StartExperimentRequest.newBuilder().setName(name).build(); - return startExperiment(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Starts the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. This rpc only - * changes the state of experiment from PENDING to RUNNING. - * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Experiment startExperiment(StartExperimentRequest request) { - return startExperimentCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Starts the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. This rpc only - * changes the state of experiment from PENDING to RUNNING. - * - *

Sample code: - */ - public final UnaryCallable startExperimentCallable() { - return stub.startExperimentCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Stops the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. This rpc only - * changes the state of experiment from RUNNING to DONE. - * - * @param name Required. Resource name of the experiment to stop. Format: `projects/<Project - * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment - * ID>/experiments/<Experiment ID>`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Experiment stopExperiment(ExperimentName name) { - StopExperimentRequest request = - StopExperimentRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return stopExperiment(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Stops the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. This rpc only - * changes the state of experiment from RUNNING to DONE. - * - * @param name Required. Resource name of the experiment to stop. Format: `projects/<Project - * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment - * ID>/experiments/<Experiment ID>`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Experiment stopExperiment(String name) { - StopExperimentRequest request = StopExperimentRequest.newBuilder().setName(name).build(); - return stopExperiment(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Stops the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. This rpc only - * changes the state of experiment from RUNNING to DONE. - * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Experiment stopExperiment(StopExperimentRequest request) { - return stopExperimentCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Stops the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. This rpc only - * changes the state of experiment from RUNNING to DONE. - * - *

Sample code: - */ - public final UnaryCallable stopExperimentCallable() { - return stub.stopExperimentCallable(); - } - - @Override - public final void close() { - stub.close(); - } - - @Override - public void shutdown() { - stub.shutdown(); - } - - @Override - public boolean isShutdown() { - return stub.isShutdown(); - } - - @Override - public boolean isTerminated() { - return stub.isTerminated(); - } - - @Override - public void shutdownNow() { - stub.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return stub.awaitTermination(duration, unit); - } - - public static class ListExperimentsPagedResponse - extends AbstractPagedListResponse< - ListExperimentsRequest, - ListExperimentsResponse, - Experiment, - ListExperimentsPage, - ListExperimentsFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListExperimentsPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - new ApiFunction() { - @Override - public ListExperimentsPagedResponse apply(ListExperimentsPage input) { - return new ListExperimentsPagedResponse(input); - } - }, - MoreExecutors.directExecutor()); - } - - private ListExperimentsPagedResponse(ListExperimentsPage page) { - super(page, ListExperimentsFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListExperimentsPage - extends AbstractPage< - ListExperimentsRequest, ListExperimentsResponse, Experiment, ListExperimentsPage> { - - private ListExperimentsPage( - PageContext context, - ListExperimentsResponse response) { - super(context, response); - } - - private static ListExperimentsPage createEmptyPage() { - return new ListExperimentsPage(null, null); - } - - @Override - protected ListExperimentsPage createPage( - PageContext context, - ListExperimentsResponse response) { - return new ListExperimentsPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListExperimentsFixedSizeCollection - extends AbstractFixedSizeCollection< - ListExperimentsRequest, - ListExperimentsResponse, - Experiment, - ListExperimentsPage, - ListExperimentsFixedSizeCollection> { - - private ListExperimentsFixedSizeCollection( - List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListExperimentsFixedSizeCollection createEmptyCollection() { - return new ListExperimentsFixedSizeCollection(null, 0); - } - - @Override - protected ListExperimentsFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListExperimentsFixedSizeCollection(pages, collectionSize); - } - } -} diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentsSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentsSettings.java deleted file mode 100644 index f48869a41..000000000 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentsSettings.java +++ /dev/null @@ -1,250 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.dialogflow.cx.v3; - -import static com.google.cloud.dialogflow.cx.v3.ExperimentsClient.ListExperimentsPagedResponse; - -import com.google.api.core.ApiFunction; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientSettings; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.cloud.dialogflow.cx.v3.stub.ExperimentsStubSettings; -import com.google.protobuf.Empty; -import java.io.IOException; -import java.util.List; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Settings class to configure an instance of {@link ExperimentsClient}. - * - *

The default instance has everything set to sensible defaults: - * - *

    - *
  • The default service address (dialogflow.googleapis.com) and default port (443) are used. - *
  • Credentials are acquired automatically through Application Default Credentials. - *
  • Retries are configured for idempotent methods but not for non-idempotent methods. - *
- * - *

The builder of this class is recursive, so contained classes are themselves builders. When - * build() is called, the tree of builders is called to create the complete settings object. - * - *

For example, to set the total timeout of getExperiment to 30 seconds: - * - *

{@code
- * ExperimentsSettings.Builder experimentsSettingsBuilder = ExperimentsSettings.newBuilder();
- * experimentsSettingsBuilder
- *     .getExperimentSettings()
- *     .setRetrySettings(
- *         experimentsSettingsBuilder
- *             .getExperimentSettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * ExperimentsSettings experimentsSettings = experimentsSettingsBuilder.build();
- * }
- */ -@Generated("by gapic-generator-java") -public class ExperimentsSettings extends ClientSettings { - - /** Returns the object with the settings used for calls to listExperiments. */ - public PagedCallSettings< - ListExperimentsRequest, ListExperimentsResponse, ListExperimentsPagedResponse> - listExperimentsSettings() { - return ((ExperimentsStubSettings) getStubSettings()).listExperimentsSettings(); - } - - /** Returns the object with the settings used for calls to getExperiment. */ - public UnaryCallSettings getExperimentSettings() { - return ((ExperimentsStubSettings) getStubSettings()).getExperimentSettings(); - } - - /** Returns the object with the settings used for calls to createExperiment. */ - public UnaryCallSettings createExperimentSettings() { - return ((ExperimentsStubSettings) getStubSettings()).createExperimentSettings(); - } - - /** Returns the object with the settings used for calls to updateExperiment. */ - public UnaryCallSettings updateExperimentSettings() { - return ((ExperimentsStubSettings) getStubSettings()).updateExperimentSettings(); - } - - /** Returns the object with the settings used for calls to deleteExperiment. */ - public UnaryCallSettings deleteExperimentSettings() { - return ((ExperimentsStubSettings) getStubSettings()).deleteExperimentSettings(); - } - - /** Returns the object with the settings used for calls to startExperiment. */ - public UnaryCallSettings startExperimentSettings() { - return ((ExperimentsStubSettings) getStubSettings()).startExperimentSettings(); - } - - /** Returns the object with the settings used for calls to stopExperiment. */ - public UnaryCallSettings stopExperimentSettings() { - return ((ExperimentsStubSettings) getStubSettings()).stopExperimentSettings(); - } - - public static final ExperimentsSettings create(ExperimentsStubSettings stub) throws IOException { - return new ExperimentsSettings.Builder(stub.toBuilder()).build(); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return ExperimentsStubSettings.defaultExecutorProviderBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return ExperimentsStubSettings.getDefaultEndpoint(); - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return ExperimentsStubSettings.getDefaultServiceScopes(); - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return ExperimentsStubSettings.defaultCredentialsProviderBuilder(); - } - - /** Returns a builder for the default ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return ExperimentsStubSettings.defaultGrpcTransportProviderBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return ExperimentsStubSettings.defaultTransportChannelProvider(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return ExperimentsStubSettings.defaultApiClientHeaderProviderBuilder(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(ClientContext clientContext) { - return new Builder(clientContext); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected ExperimentsSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - } - - /** Builder for ExperimentsSettings. */ - public static class Builder extends ClientSettings.Builder { - - protected Builder() throws IOException { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(ExperimentsStubSettings.newBuilder(clientContext)); - } - - protected Builder(ExperimentsSettings settings) { - super(settings.getStubSettings().toBuilder()); - } - - protected Builder(ExperimentsStubSettings.Builder stubSettings) { - super(stubSettings); - } - - private static Builder createDefault() { - return new Builder(ExperimentsStubSettings.newBuilder()); - } - - public ExperimentsStubSettings.Builder getStubSettingsBuilder() { - return ((ExperimentsStubSettings.Builder) getStubSettings()); - } - - // NEXT_MAJOR_VER: remove 'throws Exception'. - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { - super.applyToAllUnaryMethods( - getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); - return this; - } - - /** Returns the builder for the settings used for calls to listExperiments. */ - public PagedCallSettings.Builder< - ListExperimentsRequest, ListExperimentsResponse, ListExperimentsPagedResponse> - listExperimentsSettings() { - return getStubSettingsBuilder().listExperimentsSettings(); - } - - /** Returns the builder for the settings used for calls to getExperiment. */ - public UnaryCallSettings.Builder getExperimentSettings() { - return getStubSettingsBuilder().getExperimentSettings(); - } - - /** Returns the builder for the settings used for calls to createExperiment. */ - public UnaryCallSettings.Builder - createExperimentSettings() { - return getStubSettingsBuilder().createExperimentSettings(); - } - - /** Returns the builder for the settings used for calls to updateExperiment. */ - public UnaryCallSettings.Builder - updateExperimentSettings() { - return getStubSettingsBuilder().updateExperimentSettings(); - } - - /** Returns the builder for the settings used for calls to deleteExperiment. */ - public UnaryCallSettings.Builder deleteExperimentSettings() { - return getStubSettingsBuilder().deleteExperimentSettings(); - } - - /** Returns the builder for the settings used for calls to startExperiment. */ - public UnaryCallSettings.Builder startExperimentSettings() { - return getStubSettingsBuilder().startExperimentSettings(); - } - - /** Returns the builder for the settings used for calls to stopExperiment. */ - public UnaryCallSettings.Builder stopExperimentSettings() { - return getStubSettingsBuilder().stopExperimentSettings(); - } - - @Override - public ExperimentsSettings build() throws IOException { - return new ExperimentsSettings(this); - } - } -} diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowsClient.java index 4197076d9..672fd5b56 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowsClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowsClient.java @@ -457,6 +457,88 @@ public final UnaryCallable trainFlowCallable() { return stub.trainFlowCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final FlowValidationResult validateFlow(ValidateFlowRequest request) { + return validateFlowCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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. + * + *

Sample code: + */ + public final UnaryCallable validateFlowCallable() { + return stub.validateFlowCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the latest flow validation result. Flow validation is performed when ValidateFlow is + * called. + * + * @param name Required. The flow name. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow + * ID>/validationResult`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final FlowValidationResult getFlowValidationResult(FlowValidationResultName name) { + GetFlowValidationResultRequest request = + GetFlowValidationResultRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getFlowValidationResult(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the latest flow validation result. Flow validation is performed when ValidateFlow is + * called. + * + * @param name Required. The flow name. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow + * ID>/validationResult`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final FlowValidationResult getFlowValidationResult(String name) { + GetFlowValidationResultRequest request = + GetFlowValidationResultRequest.newBuilder().setName(name).build(); + return getFlowValidationResult(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the latest flow validation result. Flow validation is performed when ValidateFlow is + * called. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final FlowValidationResult getFlowValidationResult( + GetFlowValidationResultRequest request) { + return getFlowValidationResultCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the latest flow validation result. Flow validation is performed when ValidateFlow is + * called. + * + *

Sample code: + */ + public final UnaryCallable + getFlowValidationResultCallable() { + return stub.getFlowValidationResultCallable(); + } + @Override public final void close() { stub.close(); diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowsSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowsSettings.java index 1d282cd1e..6dc84d131 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowsSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowsSettings.java @@ -108,6 +108,17 @@ public OperationCallSettings trainFlowOperation return ((FlowsStubSettings) getStubSettings()).trainFlowOperationSettings(); } + /** Returns the object with the settings used for calls to validateFlow. */ + public UnaryCallSettings validateFlowSettings() { + return ((FlowsStubSettings) getStubSettings()).validateFlowSettings(); + } + + /** Returns the object with the settings used for calls to getFlowValidationResult. */ + public UnaryCallSettings + getFlowValidationResultSettings() { + return ((FlowsStubSettings) getStubSettings()).getFlowValidationResultSettings(); + } + public static final FlowsSettings create(FlowsStubSettings stub) throws IOException { return new FlowsSettings.Builder(stub.toBuilder()).build(); } @@ -242,6 +253,18 @@ public UnaryCallSettings.Builder trainFlowSettings( return getStubSettingsBuilder().trainFlowOperationSettings(); } + /** Returns the builder for the settings used for calls to validateFlow. */ + public UnaryCallSettings.Builder + validateFlowSettings() { + return getStubSettingsBuilder().validateFlowSettings(); + } + + /** Returns the builder for the settings used for calls to getFlowValidationResult. */ + public UnaryCallSettings.Builder + getFlowValidationResultSettings() { + return getStubSettingsBuilder().getFlowValidationResultSettings(); + } + @Override public FlowsSettings build() throws IOException { return new FlowsSettings(this); diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCasesClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCasesClient.java new file mode 100644 index 000000000..673c2d90b --- /dev/null +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCasesClient.java @@ -0,0 +1,845 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.cx.v3; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dialogflow.cx.v3.stub.TestCasesStub; +import com.google.cloud.dialogflow.cx.v3.stub.TestCasesStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; +import com.google.longrunning.OperationsClient; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Service for managing [Test Cases][google.cloud.dialogflow.cx.v3.TestCase] + * and [Test Case Results][google.cloud.dialogflow.cx.v3.TestCaseResult]. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

Note: close() needs to be called on the TestCasesClient object to clean up resources such as + * threads. In the example above, try-with-resources is used, which automatically calls close(). + * + *

The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of TestCasesSettings to create(). + * For example: + * + *

To customize credentials: + * + *

{@code
+ * TestCasesSettings testCasesSettings =
+ *     TestCasesSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * TestCasesClient testCasesClient = TestCasesClient.create(testCasesSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * TestCasesSettings testCasesSettings =
+ *     TestCasesSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * TestCasesClient testCasesClient = TestCasesClient.create(testCasesSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class TestCasesClient implements BackgroundResource { + private final TestCasesSettings settings; + private final TestCasesStub stub; + private final OperationsClient operationsClient; + + /** Constructs an instance of TestCasesClient with default settings. */ + public static final TestCasesClient create() throws IOException { + return create(TestCasesSettings.newBuilder().build()); + } + + /** + * Constructs an instance of TestCasesClient, using the given settings. The channels are created + * based on the settings passed in, or defaults for any settings that are not set. + */ + public static final TestCasesClient create(TestCasesSettings settings) throws IOException { + return new TestCasesClient(settings); + } + + /** + * Constructs an instance of TestCasesClient, using the given stub for making calls. This is for + * advanced usage - prefer using create(TestCasesSettings). + */ + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public static final TestCasesClient create(TestCasesStub stub) { + return new TestCasesClient(stub); + } + + /** + * Constructs an instance of TestCasesClient, using the given settings. This is protected so that + * it is easy to make a subclass, but otherwise, the static factory methods should be preferred. + */ + protected TestCasesClient(TestCasesSettings settings) throws IOException { + this.settings = settings; + this.stub = ((TestCasesStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + protected TestCasesClient(TestCasesStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + public final TestCasesSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public TestCasesStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final OperationsClient getOperationsClient() { + return operationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Fetches a list of test cases for a given agent. + * + * @param parent Required. The agent to list all pages for. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListTestCasesPagedResponse listTestCases(AgentName parent) { + ListTestCasesRequest request = + ListTestCasesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listTestCases(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Fetches a list of test cases for a given agent. + * + * @param parent Required. The agent to list all pages for. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListTestCasesPagedResponse listTestCases(String parent) { + ListTestCasesRequest request = ListTestCasesRequest.newBuilder().setParent(parent).build(); + return listTestCases(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Fetches a list of test cases for a given agent. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListTestCasesPagedResponse listTestCases(ListTestCasesRequest request) { + return listTestCasesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Fetches a list of test cases for a given agent. + * + *

Sample code: + */ + public final UnaryCallable + listTestCasesPagedCallable() { + return stub.listTestCasesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Fetches a list of test cases for a given agent. + * + *

Sample code: + */ + public final UnaryCallable listTestCasesCallable() { + return stub.listTestCasesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Batch deletes test cases. + * + * @param parent Required. The agent to delete test cases from. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void batchDeleteTestCases(AgentName parent) { + BatchDeleteTestCasesRequest request = + BatchDeleteTestCasesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + batchDeleteTestCases(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Batch deletes test cases. + * + * @param parent Required. The agent to delete test cases from. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void batchDeleteTestCases(String parent) { + BatchDeleteTestCasesRequest request = + BatchDeleteTestCasesRequest.newBuilder().setParent(parent).build(); + batchDeleteTestCases(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Batch deletes test cases. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void batchDeleteTestCases(BatchDeleteTestCasesRequest request) { + batchDeleteTestCasesCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Batch deletes test cases. + * + *

Sample code: + */ + public final UnaryCallable batchDeleteTestCasesCallable() { + return stub.batchDeleteTestCasesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a test case. + * + * @param name Required. The name of the testcase. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>/testCases/<TestCase + * ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TestCase getTestCase(TestCaseName name) { + GetTestCaseRequest request = + GetTestCaseRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getTestCase(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a test case. + * + * @param name Required. The name of the testcase. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>/testCases/<TestCase + * ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TestCase getTestCase(String name) { + GetTestCaseRequest request = GetTestCaseRequest.newBuilder().setName(name).build(); + return getTestCase(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a test case. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TestCase getTestCase(GetTestCaseRequest request) { + return getTestCaseCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a test case. + * + *

Sample code: + */ + public final UnaryCallable getTestCaseCallable() { + return stub.getTestCaseCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a test case for the given agent. + * + * @param parent Required. The agent to create the test case for. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>`. + * @param testCase Required. The test case to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TestCase createTestCase(AgentName parent, TestCase testCase) { + CreateTestCaseRequest request = + CreateTestCaseRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setTestCase(testCase) + .build(); + return createTestCase(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a test case for the given agent. + * + * @param parent Required. The agent to create the test case for. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>`. + * @param testCase Required. The test case to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TestCase createTestCase(String parent, TestCase testCase) { + CreateTestCaseRequest request = + CreateTestCaseRequest.newBuilder().setParent(parent).setTestCase(testCase).build(); + return createTestCase(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a test case for the given agent. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TestCase createTestCase(CreateTestCaseRequest request) { + return createTestCaseCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a test case for the given agent. + * + *

Sample code: + */ + public final UnaryCallable createTestCaseCallable() { + return stub.createTestCaseCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the specified test case. + * + * @param testCase Required. The test case to update. + * @param updateMask Required. The mask to specify which fields should be updated. Only a test + * case's metadata and replayed_conversation_turns may be updated. The original + * test_case_conversation_turns may not be updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TestCase updateTestCase(TestCase testCase, FieldMask updateMask) { + UpdateTestCaseRequest request = + UpdateTestCaseRequest.newBuilder().setTestCase(testCase).setUpdateMask(updateMask).build(); + return updateTestCase(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the specified test case. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TestCase updateTestCase(UpdateTestCaseRequest request) { + return updateTestCaseCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the specified test case. + * + *

Sample code: + */ + public final UnaryCallable updateTestCaseCallable() { + return stub.updateTestCaseCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Kicks off a test case run. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture runTestCaseAsync( + RunTestCaseRequest request) { + return runTestCaseOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Kicks off a test case run. + * + *

Sample code: + */ + public final OperationCallable + runTestCaseOperationCallable() { + return stub.runTestCaseOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Kicks off a test case run. + * + *

Sample code: + */ + public final UnaryCallable runTestCaseCallable() { + return stub.runTestCaseCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Kicks off a batch run of test cases. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + batchRunTestCasesAsync(BatchRunTestCasesRequest request) { + return batchRunTestCasesOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Kicks off a batch run of test cases. + * + *

Sample code: + */ + public final OperationCallable< + BatchRunTestCasesRequest, BatchRunTestCasesResponse, BatchRunTestCasesMetadata> + batchRunTestCasesOperationCallable() { + return stub.batchRunTestCasesOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Kicks off a batch run of test cases. + * + *

Sample code: + */ + public final UnaryCallable batchRunTestCasesCallable() { + return stub.batchRunTestCasesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Calculates the test coverage for an agent. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final CalculateCoverageResponse calculateCoverage(CalculateCoverageRequest request) { + return calculateCoverageCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Calculates the test coverage for an agent. + * + *

Sample code: + */ + public final UnaryCallable + calculateCoverageCallable() { + return stub.calculateCoverageCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Imports the test cases from a Cloud Storage bucket or a local file. It always creates new test + * cases and won't overwite any existing ones. The provided ID in the imported test case is + * neglected. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + importTestCasesAsync(ImportTestCasesRequest request) { + return importTestCasesOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Imports the test cases from a Cloud Storage bucket or a local file. It always creates new test + * cases and won't overwite any existing ones. The provided ID in the imported test case is + * neglected. + * + *

Sample code: + */ + public final OperationCallable< + ImportTestCasesRequest, ImportTestCasesResponse, ImportTestCasesMetadata> + importTestCasesOperationCallable() { + return stub.importTestCasesOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Imports the test cases from a Cloud Storage bucket or a local file. It always creates new test + * cases and won't overwite any existing ones. The provided ID in the imported test case is + * neglected. + * + *

Sample code: + */ + public final UnaryCallable importTestCasesCallable() { + return stub.importTestCasesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + exportTestCasesAsync(ExportTestCasesRequest request) { + return exportTestCasesOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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. + * + *

Sample code: + */ + public final OperationCallable< + ExportTestCasesRequest, ExportTestCasesResponse, ExportTestCasesMetadata> + exportTestCasesOperationCallable() { + return stub.exportTestCasesOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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. + * + *

Sample code: + */ + public final UnaryCallable exportTestCasesCallable() { + return stub.exportTestCasesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Fetches a list of results for a given test case. + * + * @param parent Required. The test case to list results for. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>/ testCases/<TestCase + * ID>`. Specify a `-` as a wildcard for TestCase ID to list results across multiple test + * cases. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListTestCaseResultsPagedResponse listTestCaseResults(TestCaseName parent) { + ListTestCaseResultsRequest request = + ListTestCaseResultsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listTestCaseResults(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Fetches a list of results for a given test case. + * + * @param parent Required. The test case to list results for. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>/ testCases/<TestCase + * ID>`. Specify a `-` as a wildcard for TestCase ID to list results across multiple test + * cases. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListTestCaseResultsPagedResponse listTestCaseResults(String parent) { + ListTestCaseResultsRequest request = + ListTestCaseResultsRequest.newBuilder().setParent(parent).build(); + return listTestCaseResults(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Fetches a list of results for a given test case. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListTestCaseResultsPagedResponse listTestCaseResults( + ListTestCaseResultsRequest request) { + return listTestCaseResultsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Fetches a list of results for a given test case. + * + *

Sample code: + */ + public final UnaryCallable + listTestCaseResultsPagedCallable() { + return stub.listTestCaseResultsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Fetches a list of results for a given test case. + * + *

Sample code: + */ + public final UnaryCallable + listTestCaseResultsCallable() { + return stub.listTestCaseResultsCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListTestCasesPagedResponse + extends AbstractPagedListResponse< + ListTestCasesRequest, + ListTestCasesResponse, + TestCase, + ListTestCasesPage, + ListTestCasesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListTestCasesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListTestCasesPagedResponse apply(ListTestCasesPage input) { + return new ListTestCasesPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListTestCasesPagedResponse(ListTestCasesPage page) { + super(page, ListTestCasesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListTestCasesPage + extends AbstractPage< + ListTestCasesRequest, ListTestCasesResponse, TestCase, ListTestCasesPage> { + + private ListTestCasesPage( + PageContext context, + ListTestCasesResponse response) { + super(context, response); + } + + private static ListTestCasesPage createEmptyPage() { + return new ListTestCasesPage(null, null); + } + + @Override + protected ListTestCasesPage createPage( + PageContext context, + ListTestCasesResponse response) { + return new ListTestCasesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListTestCasesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListTestCasesRequest, + ListTestCasesResponse, + TestCase, + ListTestCasesPage, + ListTestCasesFixedSizeCollection> { + + private ListTestCasesFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListTestCasesFixedSizeCollection createEmptyCollection() { + return new ListTestCasesFixedSizeCollection(null, 0); + } + + @Override + protected ListTestCasesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListTestCasesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListTestCaseResultsPagedResponse + extends AbstractPagedListResponse< + ListTestCaseResultsRequest, + ListTestCaseResultsResponse, + TestCaseResult, + ListTestCaseResultsPage, + ListTestCaseResultsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListTestCaseResultsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListTestCaseResultsPagedResponse apply(ListTestCaseResultsPage input) { + return new ListTestCaseResultsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListTestCaseResultsPagedResponse(ListTestCaseResultsPage page) { + super(page, ListTestCaseResultsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListTestCaseResultsPage + extends AbstractPage< + ListTestCaseResultsRequest, + ListTestCaseResultsResponse, + TestCaseResult, + ListTestCaseResultsPage> { + + private ListTestCaseResultsPage( + PageContext + context, + ListTestCaseResultsResponse response) { + super(context, response); + } + + private static ListTestCaseResultsPage createEmptyPage() { + return new ListTestCaseResultsPage(null, null); + } + + @Override + protected ListTestCaseResultsPage createPage( + PageContext + context, + ListTestCaseResultsResponse response) { + return new ListTestCaseResultsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListTestCaseResultsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListTestCaseResultsRequest, + ListTestCaseResultsResponse, + TestCaseResult, + ListTestCaseResultsPage, + ListTestCaseResultsFixedSizeCollection> { + + private ListTestCaseResultsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListTestCaseResultsFixedSizeCollection createEmptyCollection() { + return new ListTestCaseResultsFixedSizeCollection(null, 0); + } + + @Override + protected ListTestCaseResultsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListTestCaseResultsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCasesSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCasesSettings.java new file mode 100644 index 000000000..dcf2c1ce8 --- /dev/null +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCasesSettings.java @@ -0,0 +1,355 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.cx.v3; + +import static com.google.cloud.dialogflow.cx.v3.TestCasesClient.ListTestCaseResultsPagedResponse; +import static com.google.cloud.dialogflow.cx.v3.TestCasesClient.ListTestCasesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.dialogflow.cx.v3.stub.TestCasesStubSettings; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link TestCasesClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (dialogflow.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of batchDeleteTestCases to 30 seconds: + * + *

{@code
+ * TestCasesSettings.Builder testCasesSettingsBuilder = TestCasesSettings.newBuilder();
+ * testCasesSettingsBuilder
+ *     .batchDeleteTestCasesSettings()
+ *     .setRetrySettings(
+ *         testCasesSettingsBuilder
+ *             .batchDeleteTestCasesSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * TestCasesSettings testCasesSettings = testCasesSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class TestCasesSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to listTestCases. */ + public PagedCallSettings + listTestCasesSettings() { + return ((TestCasesStubSettings) getStubSettings()).listTestCasesSettings(); + } + + /** Returns the object with the settings used for calls to batchDeleteTestCases. */ + public UnaryCallSettings batchDeleteTestCasesSettings() { + return ((TestCasesStubSettings) getStubSettings()).batchDeleteTestCasesSettings(); + } + + /** Returns the object with the settings used for calls to getTestCase. */ + public UnaryCallSettings getTestCaseSettings() { + return ((TestCasesStubSettings) getStubSettings()).getTestCaseSettings(); + } + + /** Returns the object with the settings used for calls to createTestCase. */ + public UnaryCallSettings createTestCaseSettings() { + return ((TestCasesStubSettings) getStubSettings()).createTestCaseSettings(); + } + + /** Returns the object with the settings used for calls to updateTestCase. */ + public UnaryCallSettings updateTestCaseSettings() { + return ((TestCasesStubSettings) getStubSettings()).updateTestCaseSettings(); + } + + /** Returns the object with the settings used for calls to runTestCase. */ + public UnaryCallSettings runTestCaseSettings() { + return ((TestCasesStubSettings) getStubSettings()).runTestCaseSettings(); + } + + /** Returns the object with the settings used for calls to runTestCase. */ + public OperationCallSettings + runTestCaseOperationSettings() { + return ((TestCasesStubSettings) getStubSettings()).runTestCaseOperationSettings(); + } + + /** Returns the object with the settings used for calls to batchRunTestCases. */ + public UnaryCallSettings batchRunTestCasesSettings() { + return ((TestCasesStubSettings) getStubSettings()).batchRunTestCasesSettings(); + } + + /** Returns the object with the settings used for calls to batchRunTestCases. */ + public OperationCallSettings< + BatchRunTestCasesRequest, BatchRunTestCasesResponse, BatchRunTestCasesMetadata> + batchRunTestCasesOperationSettings() { + return ((TestCasesStubSettings) getStubSettings()).batchRunTestCasesOperationSettings(); + } + + /** Returns the object with the settings used for calls to calculateCoverage. */ + public UnaryCallSettings + calculateCoverageSettings() { + return ((TestCasesStubSettings) getStubSettings()).calculateCoverageSettings(); + } + + /** Returns the object with the settings used for calls to importTestCases. */ + public UnaryCallSettings importTestCasesSettings() { + return ((TestCasesStubSettings) getStubSettings()).importTestCasesSettings(); + } + + /** Returns the object with the settings used for calls to importTestCases. */ + public OperationCallSettings< + ImportTestCasesRequest, ImportTestCasesResponse, ImportTestCasesMetadata> + importTestCasesOperationSettings() { + return ((TestCasesStubSettings) getStubSettings()).importTestCasesOperationSettings(); + } + + /** Returns the object with the settings used for calls to exportTestCases. */ + public UnaryCallSettings exportTestCasesSettings() { + return ((TestCasesStubSettings) getStubSettings()).exportTestCasesSettings(); + } + + /** Returns the object with the settings used for calls to exportTestCases. */ + public OperationCallSettings< + ExportTestCasesRequest, ExportTestCasesResponse, ExportTestCasesMetadata> + exportTestCasesOperationSettings() { + return ((TestCasesStubSettings) getStubSettings()).exportTestCasesOperationSettings(); + } + + /** Returns the object with the settings used for calls to listTestCaseResults. */ + public PagedCallSettings< + ListTestCaseResultsRequest, ListTestCaseResultsResponse, ListTestCaseResultsPagedResponse> + listTestCaseResultsSettings() { + return ((TestCasesStubSettings) getStubSettings()).listTestCaseResultsSettings(); + } + + public static final TestCasesSettings create(TestCasesStubSettings stub) throws IOException { + return new TestCasesSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return TestCasesStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return TestCasesStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return TestCasesStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return TestCasesStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return TestCasesStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return TestCasesStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return TestCasesStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected TestCasesSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for TestCasesSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(TestCasesStubSettings.newBuilder(clientContext)); + } + + protected Builder(TestCasesSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(TestCasesStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(TestCasesStubSettings.newBuilder()); + } + + public TestCasesStubSettings.Builder getStubSettingsBuilder() { + return ((TestCasesStubSettings.Builder) getStubSettings()); + } + + // NEXT_MAJOR_VER: remove 'throws Exception'. + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to listTestCases. */ + public PagedCallSettings.Builder< + ListTestCasesRequest, ListTestCasesResponse, ListTestCasesPagedResponse> + listTestCasesSettings() { + return getStubSettingsBuilder().listTestCasesSettings(); + } + + /** Returns the builder for the settings used for calls to batchDeleteTestCases. */ + public UnaryCallSettings.Builder + batchDeleteTestCasesSettings() { + return getStubSettingsBuilder().batchDeleteTestCasesSettings(); + } + + /** Returns the builder for the settings used for calls to getTestCase. */ + public UnaryCallSettings.Builder getTestCaseSettings() { + return getStubSettingsBuilder().getTestCaseSettings(); + } + + /** Returns the builder for the settings used for calls to createTestCase. */ + public UnaryCallSettings.Builder createTestCaseSettings() { + return getStubSettingsBuilder().createTestCaseSettings(); + } + + /** Returns the builder for the settings used for calls to updateTestCase. */ + public UnaryCallSettings.Builder updateTestCaseSettings() { + return getStubSettingsBuilder().updateTestCaseSettings(); + } + + /** Returns the builder for the settings used for calls to runTestCase. */ + public UnaryCallSettings.Builder runTestCaseSettings() { + return getStubSettingsBuilder().runTestCaseSettings(); + } + + /** Returns the builder for the settings used for calls to runTestCase. */ + public OperationCallSettings.Builder< + RunTestCaseRequest, RunTestCaseResponse, RunTestCaseMetadata> + runTestCaseOperationSettings() { + return getStubSettingsBuilder().runTestCaseOperationSettings(); + } + + /** Returns the builder for the settings used for calls to batchRunTestCases. */ + public UnaryCallSettings.Builder + batchRunTestCasesSettings() { + return getStubSettingsBuilder().batchRunTestCasesSettings(); + } + + /** Returns the builder for the settings used for calls to batchRunTestCases. */ + public OperationCallSettings.Builder< + BatchRunTestCasesRequest, BatchRunTestCasesResponse, BatchRunTestCasesMetadata> + batchRunTestCasesOperationSettings() { + return getStubSettingsBuilder().batchRunTestCasesOperationSettings(); + } + + /** Returns the builder for the settings used for calls to calculateCoverage. */ + public UnaryCallSettings.Builder + calculateCoverageSettings() { + return getStubSettingsBuilder().calculateCoverageSettings(); + } + + /** Returns the builder for the settings used for calls to importTestCases. */ + public UnaryCallSettings.Builder importTestCasesSettings() { + return getStubSettingsBuilder().importTestCasesSettings(); + } + + /** Returns the builder for the settings used for calls to importTestCases. */ + public OperationCallSettings.Builder< + ImportTestCasesRequest, ImportTestCasesResponse, ImportTestCasesMetadata> + importTestCasesOperationSettings() { + return getStubSettingsBuilder().importTestCasesOperationSettings(); + } + + /** Returns the builder for the settings used for calls to exportTestCases. */ + public UnaryCallSettings.Builder exportTestCasesSettings() { + return getStubSettingsBuilder().exportTestCasesSettings(); + } + + /** Returns the builder for the settings used for calls to exportTestCases. */ + public OperationCallSettings.Builder< + ExportTestCasesRequest, ExportTestCasesResponse, ExportTestCasesMetadata> + exportTestCasesOperationSettings() { + return getStubSettingsBuilder().exportTestCasesOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listTestCaseResults. */ + public PagedCallSettings.Builder< + ListTestCaseResultsRequest, + ListTestCaseResultsResponse, + ListTestCaseResultsPagedResponse> + listTestCaseResultsSettings() { + return getStubSettingsBuilder().listTestCaseResultsSettings(); + } + + @Override + public TestCasesSettings build() throws IOException { + return new TestCasesSettings(this); + } + } +} diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/package-info.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/package-info.java index bc9b75f67..ac242fb95 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/package-info.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/package-info.java @@ -37,13 +37,6 @@ * *

Sample for EnvironmentsClient: * - *

======================= ExperimentsClient ======================= - * - *

Service Description: Service for managing - * [Experiments][google.cloud.dialogflow.cx.v3.Experiment]. - * - *

Sample for ExperimentsClient: - * *

======================= FlowsClient ======================= * *

Service Description: Service for managing [Flows][google.cloud.dialogflow.cx.v3.Flow]. @@ -83,6 +76,13 @@ * *

Sample for SessionEntityTypesClient: * + *

======================= TestCasesClient ======================= + * + *

Service Description: Service for managing [Test Cases][google.cloud.dialogflow.cx.v3.TestCase] + * and [Test Case Results][google.cloud.dialogflow.cx.v3.TestCaseResult]. + * + *

Sample for TestCasesClient: + * *

======================= TransitionRouteGroupsClient ======================= * *

Service Description: Service for managing diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/AgentsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/AgentsStub.java index 9742165ad..9e9cdb6d3 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/AgentsStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/AgentsStub.java @@ -22,15 +22,18 @@ import com.google.api.gax.rpc.OperationCallable; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.cx.v3.Agent; +import com.google.cloud.dialogflow.cx.v3.AgentValidationResult; import com.google.cloud.dialogflow.cx.v3.CreateAgentRequest; import com.google.cloud.dialogflow.cx.v3.DeleteAgentRequest; import com.google.cloud.dialogflow.cx.v3.ExportAgentRequest; import com.google.cloud.dialogflow.cx.v3.ExportAgentResponse; import com.google.cloud.dialogflow.cx.v3.GetAgentRequest; +import com.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest; import com.google.cloud.dialogflow.cx.v3.ListAgentsRequest; import com.google.cloud.dialogflow.cx.v3.ListAgentsResponse; import com.google.cloud.dialogflow.cx.v3.RestoreAgentRequest; import com.google.cloud.dialogflow.cx.v3.UpdateAgentRequest; +import com.google.cloud.dialogflow.cx.v3.ValidateAgentRequest; import com.google.longrunning.Operation; import com.google.longrunning.stub.OperationsStub; import com.google.protobuf.Empty; @@ -91,6 +94,15 @@ public UnaryCallable restoreAgentCallable() { throw new UnsupportedOperationException("Not implemented: restoreAgentCallable()"); } + public UnaryCallable validateAgentCallable() { + throw new UnsupportedOperationException("Not implemented: validateAgentCallable()"); + } + + public UnaryCallable + getAgentValidationResultCallable() { + throw new UnsupportedOperationException("Not implemented: getAgentValidationResultCallable()"); + } + @Override public abstract void close(); } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/AgentsStubSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/AgentsStubSettings.java index e4c3c4eb4..3b5913489 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/AgentsStubSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/AgentsStubSettings.java @@ -45,15 +45,18 @@ import com.google.api.gax.rpc.UnaryCallSettings; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.cx.v3.Agent; +import com.google.cloud.dialogflow.cx.v3.AgentValidationResult; import com.google.cloud.dialogflow.cx.v3.CreateAgentRequest; import com.google.cloud.dialogflow.cx.v3.DeleteAgentRequest; import com.google.cloud.dialogflow.cx.v3.ExportAgentRequest; import com.google.cloud.dialogflow.cx.v3.ExportAgentResponse; import com.google.cloud.dialogflow.cx.v3.GetAgentRequest; +import com.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest; import com.google.cloud.dialogflow.cx.v3.ListAgentsRequest; import com.google.cloud.dialogflow.cx.v3.ListAgentsResponse; import com.google.cloud.dialogflow.cx.v3.RestoreAgentRequest; import com.google.cloud.dialogflow.cx.v3.UpdateAgentRequest; +import com.google.cloud.dialogflow.cx.v3.ValidateAgentRequest; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; @@ -118,6 +121,10 @@ public class AgentsStubSettings extends StubSettings { private final UnaryCallSettings restoreAgentSettings; private final OperationCallSettings restoreAgentOperationSettings; + private final UnaryCallSettings + validateAgentSettings; + private final UnaryCallSettings + getAgentValidationResultSettings; private static final PagedListDescriptor LIST_AGENTS_PAGE_STR_DESC = @@ -219,6 +226,17 @@ public OperationCallSettings restoreAgentOpe return restoreAgentOperationSettings; } + /** Returns the object with the settings used for calls to validateAgent. */ + public UnaryCallSettings validateAgentSettings() { + return validateAgentSettings; + } + + /** Returns the object with the settings used for calls to getAgentValidationResult. */ + public UnaryCallSettings + getAgentValidationResultSettings() { + return getAgentValidationResultSettings; + } + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public AgentsStub createStub() throws IOException { if (getTransportChannelProvider() @@ -296,6 +314,8 @@ protected AgentsStubSettings(Builder settingsBuilder) throws IOException { exportAgentOperationSettings = settingsBuilder.exportAgentOperationSettings().build(); restoreAgentSettings = settingsBuilder.restoreAgentSettings().build(); restoreAgentOperationSettings = settingsBuilder.restoreAgentOperationSettings().build(); + validateAgentSettings = settingsBuilder.validateAgentSettings().build(); + getAgentValidationResultSettings = settingsBuilder.getAgentValidationResultSettings().build(); } /** Builder for AgentsStubSettings. */ @@ -314,6 +334,10 @@ public static class Builder extends StubSettings.Builder restoreAgentSettings; private final OperationCallSettings.Builder restoreAgentOperationSettings; + private final UnaryCallSettings.Builder + validateAgentSettings; + private final UnaryCallSettings.Builder + getAgentValidationResultSettings; private static final ImmutableMap> RETRYABLE_CODE_DEFINITIONS; @@ -361,6 +385,8 @@ protected Builder(ClientContext clientContext) { exportAgentOperationSettings = OperationCallSettings.newBuilder(); restoreAgentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); restoreAgentOperationSettings = OperationCallSettings.newBuilder(); + validateAgentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getAgentValidationResultSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -370,7 +396,9 @@ protected Builder(ClientContext clientContext) { updateAgentSettings, deleteAgentSettings, exportAgentSettings, - restoreAgentSettings); + restoreAgentSettings, + validateAgentSettings, + getAgentValidationResultSettings); initDefaults(this); } @@ -386,6 +414,8 @@ protected Builder(AgentsStubSettings settings) { exportAgentOperationSettings = settings.exportAgentOperationSettings.toBuilder(); restoreAgentSettings = settings.restoreAgentSettings.toBuilder(); restoreAgentOperationSettings = settings.restoreAgentOperationSettings.toBuilder(); + validateAgentSettings = settings.validateAgentSettings.toBuilder(); + getAgentValidationResultSettings = settings.getAgentValidationResultSettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -395,7 +425,9 @@ protected Builder(AgentsStubSettings settings) { updateAgentSettings, deleteAgentSettings, exportAgentSettings, - restoreAgentSettings); + restoreAgentSettings, + validateAgentSettings, + getAgentValidationResultSettings); } private static Builder createDefault() { @@ -445,6 +477,16 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + builder + .validateAgentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getAgentValidationResultSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + builder .exportAgentOperationSettings() .setInitialCallSettings( @@ -563,6 +605,18 @@ public UnaryCallSettings.Builder restoreAgentSet return restoreAgentOperationSettings; } + /** Returns the builder for the settings used for calls to validateAgent. */ + public UnaryCallSettings.Builder + validateAgentSettings() { + return validateAgentSettings; + } + + /** Returns the builder for the settings used for calls to getAgentValidationResult. */ + public UnaryCallSettings.Builder + getAgentValidationResultSettings() { + return getAgentValidationResultSettings; + } + @Override public AgentsStubSettings build() throws IOException { return new AgentsStubSettings(this); diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/ExperimentsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/ExperimentsStub.java deleted file mode 100644 index 8a69671e4..000000000 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/ExperimentsStub.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.dialogflow.cx.v3.stub; - -import static com.google.cloud.dialogflow.cx.v3.ExperimentsClient.ListExperimentsPagedResponse; - -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest; -import com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest; -import com.google.cloud.dialogflow.cx.v3.Experiment; -import com.google.cloud.dialogflow.cx.v3.GetExperimentRequest; -import com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest; -import com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse; -import com.google.cloud.dialogflow.cx.v3.StartExperimentRequest; -import com.google.cloud.dialogflow.cx.v3.StopExperimentRequest; -import com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest; -import com.google.protobuf.Empty; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Base stub class for the Experiments service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -public abstract class ExperimentsStub implements BackgroundResource { - - public UnaryCallable - listExperimentsPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listExperimentsPagedCallable()"); - } - - public UnaryCallable listExperimentsCallable() { - throw new UnsupportedOperationException("Not implemented: listExperimentsCallable()"); - } - - public UnaryCallable getExperimentCallable() { - throw new UnsupportedOperationException("Not implemented: getExperimentCallable()"); - } - - public UnaryCallable createExperimentCallable() { - throw new UnsupportedOperationException("Not implemented: createExperimentCallable()"); - } - - public UnaryCallable updateExperimentCallable() { - throw new UnsupportedOperationException("Not implemented: updateExperimentCallable()"); - } - - public UnaryCallable deleteExperimentCallable() { - throw new UnsupportedOperationException("Not implemented: deleteExperimentCallable()"); - } - - public UnaryCallable startExperimentCallable() { - throw new UnsupportedOperationException("Not implemented: startExperimentCallable()"); - } - - public UnaryCallable stopExperimentCallable() { - throw new UnsupportedOperationException("Not implemented: stopExperimentCallable()"); - } - - @Override - public abstract void close(); -} diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/ExperimentsStubSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/ExperimentsStubSettings.java deleted file mode 100644 index 46665a0b8..000000000 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/ExperimentsStubSettings.java +++ /dev/null @@ -1,491 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.dialogflow.cx.v3.stub; - -import static com.google.cloud.dialogflow.cx.v3.ExperimentsClient.ListExperimentsPagedResponse; - -import com.google.api.core.ApiFunction; -import com.google.api.core.ApiFuture; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GaxProperties; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.GrpcTransportChannel; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.retrying.RetrySettings; -import com.google.api.gax.rpc.ApiCallContext; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.PageContext; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.PagedListDescriptor; -import com.google.api.gax.rpc.PagedListResponseFactory; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.StubSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest; -import com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest; -import com.google.cloud.dialogflow.cx.v3.Experiment; -import com.google.cloud.dialogflow.cx.v3.GetExperimentRequest; -import com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest; -import com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse; -import com.google.cloud.dialogflow.cx.v3.StartExperimentRequest; -import com.google.cloud.dialogflow.cx.v3.StopExperimentRequest; -import com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableSet; -import com.google.common.collect.Lists; -import com.google.protobuf.Empty; -import java.io.IOException; -import java.util.List; -import javax.annotation.Generated; -import org.threeten.bp.Duration; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Settings class to configure an instance of {@link ExperimentsStub}. - * - *

The default instance has everything set to sensible defaults: - * - *

    - *
  • The default service address (dialogflow.googleapis.com) and default port (443) are used. - *
  • Credentials are acquired automatically through Application Default Credentials. - *
  • Retries are configured for idempotent methods but not for non-idempotent methods. - *
- * - *

The builder of this class is recursive, so contained classes are themselves builders. When - * build() is called, the tree of builders is called to create the complete settings object. - * - *

For example, to set the total timeout of getExperiment to 30 seconds: - * - *

{@code
- * ExperimentsStubSettings.Builder experimentsSettingsBuilder =
- *     ExperimentsStubSettings.newBuilder();
- * experimentsSettingsBuilder
- *     .getExperimentSettings()
- *     .setRetrySettings(
- *         experimentsSettingsBuilder
- *             .getExperimentSettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * ExperimentsStubSettings experimentsSettings = experimentsSettingsBuilder.build();
- * }
- */ -@Generated("by gapic-generator-java") -public class ExperimentsStubSettings extends StubSettings { - /** The default scopes of the service. */ - private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder() - .add("https://www.googleapis.com/auth/cloud-platform") - .add("https://www.googleapis.com/auth/dialogflow") - .build(); - - private final PagedCallSettings< - ListExperimentsRequest, ListExperimentsResponse, ListExperimentsPagedResponse> - listExperimentsSettings; - private final UnaryCallSettings getExperimentSettings; - private final UnaryCallSettings createExperimentSettings; - private final UnaryCallSettings updateExperimentSettings; - private final UnaryCallSettings deleteExperimentSettings; - private final UnaryCallSettings startExperimentSettings; - private final UnaryCallSettings stopExperimentSettings; - - private static final PagedListDescriptor< - ListExperimentsRequest, ListExperimentsResponse, Experiment> - LIST_EXPERIMENTS_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListExperimentsRequest injectToken( - ListExperimentsRequest payload, String token) { - return ListExperimentsRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListExperimentsRequest injectPageSize( - ListExperimentsRequest payload, int pageSize) { - return ListExperimentsRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListExperimentsRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListExperimentsResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListExperimentsResponse payload) { - return payload.getExperimentsList() == null - ? ImmutableList.of() - : payload.getExperimentsList(); - } - }; - - private static final PagedListResponseFactory< - ListExperimentsRequest, ListExperimentsResponse, ListExperimentsPagedResponse> - LIST_EXPERIMENTS_PAGE_STR_FACT = - new PagedListResponseFactory< - ListExperimentsRequest, ListExperimentsResponse, ListExperimentsPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListExperimentsRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext pageContext = - PageContext.create(callable, LIST_EXPERIMENTS_PAGE_STR_DESC, request, context); - return ListExperimentsPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - /** Returns the object with the settings used for calls to listExperiments. */ - public PagedCallSettings< - ListExperimentsRequest, ListExperimentsResponse, ListExperimentsPagedResponse> - listExperimentsSettings() { - return listExperimentsSettings; - } - - /** Returns the object with the settings used for calls to getExperiment. */ - public UnaryCallSettings getExperimentSettings() { - return getExperimentSettings; - } - - /** Returns the object with the settings used for calls to createExperiment. */ - public UnaryCallSettings createExperimentSettings() { - return createExperimentSettings; - } - - /** Returns the object with the settings used for calls to updateExperiment. */ - public UnaryCallSettings updateExperimentSettings() { - return updateExperimentSettings; - } - - /** Returns the object with the settings used for calls to deleteExperiment. */ - public UnaryCallSettings deleteExperimentSettings() { - return deleteExperimentSettings; - } - - /** Returns the object with the settings used for calls to startExperiment. */ - public UnaryCallSettings startExperimentSettings() { - return startExperimentSettings; - } - - /** Returns the object with the settings used for calls to stopExperiment. */ - public UnaryCallSettings stopExperimentSettings() { - return stopExperimentSettings; - } - - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") - public ExperimentsStub createStub() throws IOException { - if (getTransportChannelProvider() - .getTransportName() - .equals(GrpcTransportChannel.getGrpcTransportName())) { - return GrpcExperimentsStub.create(this); - } - throw new UnsupportedOperationException( - String.format( - "Transport not supported: %s", getTransportChannelProvider().getTransportName())); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return InstantiatingExecutorProvider.newBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return "dialogflow.googleapis.com:443"; - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return DEFAULT_SERVICE_SCOPES; - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES); - } - - /** Returns a builder for the default ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return InstantiatingGrpcChannelProvider.newBuilder() - .setMaxInboundMessageSize(Integer.MAX_VALUE); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return defaultGrpcTransportProviderBuilder().build(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(ExperimentsStubSettings.class)) - .setTransportToken( - GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(ClientContext clientContext) { - return new Builder(clientContext); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected ExperimentsStubSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - - listExperimentsSettings = settingsBuilder.listExperimentsSettings().build(); - getExperimentSettings = settingsBuilder.getExperimentSettings().build(); - createExperimentSettings = settingsBuilder.createExperimentSettings().build(); - updateExperimentSettings = settingsBuilder.updateExperimentSettings().build(); - deleteExperimentSettings = settingsBuilder.deleteExperimentSettings().build(); - startExperimentSettings = settingsBuilder.startExperimentSettings().build(); - stopExperimentSettings = settingsBuilder.stopExperimentSettings().build(); - } - - /** Builder for ExperimentsStubSettings. */ - public static class Builder extends StubSettings.Builder { - private final ImmutableList> unaryMethodSettingsBuilders; - private final PagedCallSettings.Builder< - ListExperimentsRequest, ListExperimentsResponse, ListExperimentsPagedResponse> - listExperimentsSettings; - private final UnaryCallSettings.Builder getExperimentSettings; - private final UnaryCallSettings.Builder - createExperimentSettings; - private final UnaryCallSettings.Builder - updateExperimentSettings; - private final UnaryCallSettings.Builder - deleteExperimentSettings; - private final UnaryCallSettings.Builder - startExperimentSettings; - private final UnaryCallSettings.Builder - stopExperimentSettings; - private static final ImmutableMap> - RETRYABLE_CODE_DEFINITIONS; - - static { - ImmutableMap.Builder> definitions = - ImmutableMap.builder(); - definitions.put( - "retry_policy_0_codes", - ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); - RETRYABLE_CODE_DEFINITIONS = definitions.build(); - } - - private static final ImmutableMap RETRY_PARAM_DEFINITIONS; - - static { - ImmutableMap.Builder definitions = ImmutableMap.builder(); - RetrySettings settings = null; - settings = - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(100L)) - .setRetryDelayMultiplier(1.3) - .setMaxRetryDelay(Duration.ofMillis(60000L)) - .setInitialRpcTimeout(Duration.ofMillis(60000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(60000L)) - .setTotalTimeout(Duration.ofMillis(60000L)) - .build(); - definitions.put("retry_policy_0_params", settings); - RETRY_PARAM_DEFINITIONS = definitions.build(); - } - - protected Builder() { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(clientContext); - - listExperimentsSettings = PagedCallSettings.newBuilder(LIST_EXPERIMENTS_PAGE_STR_FACT); - getExperimentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createExperimentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateExperimentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteExperimentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - startExperimentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - stopExperimentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - listExperimentsSettings, - getExperimentSettings, - createExperimentSettings, - updateExperimentSettings, - deleteExperimentSettings, - startExperimentSettings, - stopExperimentSettings); - initDefaults(this); - } - - protected Builder(ExperimentsStubSettings settings) { - super(settings); - - listExperimentsSettings = settings.listExperimentsSettings.toBuilder(); - getExperimentSettings = settings.getExperimentSettings.toBuilder(); - createExperimentSettings = settings.createExperimentSettings.toBuilder(); - updateExperimentSettings = settings.updateExperimentSettings.toBuilder(); - deleteExperimentSettings = settings.deleteExperimentSettings.toBuilder(); - startExperimentSettings = settings.startExperimentSettings.toBuilder(); - stopExperimentSettings = settings.stopExperimentSettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - listExperimentsSettings, - getExperimentSettings, - createExperimentSettings, - updateExperimentSettings, - deleteExperimentSettings, - startExperimentSettings, - stopExperimentSettings); - } - - private static Builder createDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultTransportChannelProvider()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - - return initDefaults(builder); - } - - private static Builder initDefaults(Builder builder) { - builder - .listExperimentsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .getExperimentSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .createExperimentSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .updateExperimentSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .deleteExperimentSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .startExperimentSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .stopExperimentSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - return builder; - } - - // NEXT_MAJOR_VER: remove 'throws Exception'. - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { - super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); - return this; - } - - public ImmutableList> unaryMethodSettingsBuilders() { - return unaryMethodSettingsBuilders; - } - - /** Returns the builder for the settings used for calls to listExperiments. */ - public PagedCallSettings.Builder< - ListExperimentsRequest, ListExperimentsResponse, ListExperimentsPagedResponse> - listExperimentsSettings() { - return listExperimentsSettings; - } - - /** Returns the builder for the settings used for calls to getExperiment. */ - public UnaryCallSettings.Builder getExperimentSettings() { - return getExperimentSettings; - } - - /** Returns the builder for the settings used for calls to createExperiment. */ - public UnaryCallSettings.Builder - createExperimentSettings() { - return createExperimentSettings; - } - - /** Returns the builder for the settings used for calls to updateExperiment. */ - public UnaryCallSettings.Builder - updateExperimentSettings() { - return updateExperimentSettings; - } - - /** Returns the builder for the settings used for calls to deleteExperiment. */ - public UnaryCallSettings.Builder deleteExperimentSettings() { - return deleteExperimentSettings; - } - - /** Returns the builder for the settings used for calls to startExperiment. */ - public UnaryCallSettings.Builder startExperimentSettings() { - return startExperimentSettings; - } - - /** Returns the builder for the settings used for calls to stopExperiment. */ - public UnaryCallSettings.Builder stopExperimentSettings() { - return stopExperimentSettings; - } - - @Override - public ExperimentsStubSettings build() throws IOException { - return new ExperimentsStubSettings(this); - } - } -} diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/FlowsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/FlowsStub.java index 84c9b9707..03aa37027 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/FlowsStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/FlowsStub.java @@ -24,11 +24,14 @@ import com.google.cloud.dialogflow.cx.v3.CreateFlowRequest; import com.google.cloud.dialogflow.cx.v3.DeleteFlowRequest; import com.google.cloud.dialogflow.cx.v3.Flow; +import com.google.cloud.dialogflow.cx.v3.FlowValidationResult; import com.google.cloud.dialogflow.cx.v3.GetFlowRequest; +import com.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest; import com.google.cloud.dialogflow.cx.v3.ListFlowsRequest; import com.google.cloud.dialogflow.cx.v3.ListFlowsResponse; import com.google.cloud.dialogflow.cx.v3.TrainFlowRequest; import com.google.cloud.dialogflow.cx.v3.UpdateFlowRequest; +import com.google.cloud.dialogflow.cx.v3.ValidateFlowRequest; import com.google.longrunning.Operation; import com.google.longrunning.stub.OperationsStub; import com.google.protobuf.Empty; @@ -80,6 +83,15 @@ public UnaryCallable trainFlowCallable() { throw new UnsupportedOperationException("Not implemented: trainFlowCallable()"); } + public UnaryCallable validateFlowCallable() { + throw new UnsupportedOperationException("Not implemented: validateFlowCallable()"); + } + + public UnaryCallable + getFlowValidationResultCallable() { + throw new UnsupportedOperationException("Not implemented: getFlowValidationResultCallable()"); + } + @Override public abstract void close(); } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/FlowsStubSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/FlowsStubSettings.java index 9da33359f..63e02a431 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/FlowsStubSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/FlowsStubSettings.java @@ -47,11 +47,14 @@ import com.google.cloud.dialogflow.cx.v3.CreateFlowRequest; import com.google.cloud.dialogflow.cx.v3.DeleteFlowRequest; import com.google.cloud.dialogflow.cx.v3.Flow; +import com.google.cloud.dialogflow.cx.v3.FlowValidationResult; import com.google.cloud.dialogflow.cx.v3.GetFlowRequest; +import com.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest; import com.google.cloud.dialogflow.cx.v3.ListFlowsRequest; import com.google.cloud.dialogflow.cx.v3.ListFlowsResponse; import com.google.cloud.dialogflow.cx.v3.TrainFlowRequest; import com.google.cloud.dialogflow.cx.v3.UpdateFlowRequest; +import com.google.cloud.dialogflow.cx.v3.ValidateFlowRequest; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; @@ -112,6 +115,9 @@ public class FlowsStubSettings extends StubSettings { private final UnaryCallSettings updateFlowSettings; private final UnaryCallSettings trainFlowSettings; private final OperationCallSettings trainFlowOperationSettings; + private final UnaryCallSettings validateFlowSettings; + private final UnaryCallSettings + getFlowValidationResultSettings; private static final PagedListDescriptor LIST_FLOWS_PAGE_STR_DESC = @@ -202,6 +208,17 @@ public OperationCallSettings trainFlowOperation return trainFlowOperationSettings; } + /** Returns the object with the settings used for calls to validateFlow. */ + public UnaryCallSettings validateFlowSettings() { + return validateFlowSettings; + } + + /** Returns the object with the settings used for calls to getFlowValidationResult. */ + public UnaryCallSettings + getFlowValidationResultSettings() { + return getFlowValidationResultSettings; + } + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public FlowsStub createStub() throws IOException { if (getTransportChannelProvider() @@ -277,6 +294,8 @@ protected FlowsStubSettings(Builder settingsBuilder) throws IOException { updateFlowSettings = settingsBuilder.updateFlowSettings().build(); trainFlowSettings = settingsBuilder.trainFlowSettings().build(); trainFlowOperationSettings = settingsBuilder.trainFlowOperationSettings().build(); + validateFlowSettings = settingsBuilder.validateFlowSettings().build(); + getFlowValidationResultSettings = settingsBuilder.getFlowValidationResultSettings().build(); } /** Builder for FlowsStubSettings. */ @@ -292,6 +311,10 @@ public static class Builder extends StubSettings.Builder trainFlowSettings; private final OperationCallSettings.Builder trainFlowOperationSettings; + private final UnaryCallSettings.Builder + validateFlowSettings; + private final UnaryCallSettings.Builder + getFlowValidationResultSettings; private static final ImmutableMap> RETRYABLE_CODE_DEFINITIONS; @@ -337,6 +360,8 @@ protected Builder(ClientContext clientContext) { updateFlowSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); trainFlowSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); trainFlowOperationSettings = OperationCallSettings.newBuilder(); + validateFlowSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getFlowValidationResultSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -345,7 +370,9 @@ protected Builder(ClientContext clientContext) { listFlowsSettings, getFlowSettings, updateFlowSettings, - trainFlowSettings); + trainFlowSettings, + validateFlowSettings, + getFlowValidationResultSettings); initDefaults(this); } @@ -359,6 +386,8 @@ protected Builder(FlowsStubSettings settings) { updateFlowSettings = settings.updateFlowSettings.toBuilder(); trainFlowSettings = settings.trainFlowSettings.toBuilder(); trainFlowOperationSettings = settings.trainFlowOperationSettings.toBuilder(); + validateFlowSettings = settings.validateFlowSettings.toBuilder(); + getFlowValidationResultSettings = settings.getFlowValidationResultSettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -367,7 +396,9 @@ protected Builder(FlowsStubSettings settings) { listFlowsSettings, getFlowSettings, updateFlowSettings, - trainFlowSettings); + trainFlowSettings, + validateFlowSettings, + getFlowValidationResultSettings); } private static Builder createDefault() { @@ -412,6 +443,16 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + builder + .validateFlowSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getFlowValidationResultSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + builder .trainFlowOperationSettings() .setInitialCallSettings( @@ -493,6 +534,18 @@ public UnaryCallSettings.Builder trainFlowSettings( return trainFlowOperationSettings; } + /** Returns the builder for the settings used for calls to validateFlow. */ + public UnaryCallSettings.Builder + validateFlowSettings() { + return validateFlowSettings; + } + + /** Returns the builder for the settings used for calls to getFlowValidationResult. */ + public UnaryCallSettings.Builder + getFlowValidationResultSettings() { + return getFlowValidationResultSettings; + } + @Override public FlowsStubSettings build() throws IOException { return new FlowsStubSettings(this); diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcAgentsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcAgentsStub.java index 47f4a8ec8..e263fe117 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcAgentsStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcAgentsStub.java @@ -27,15 +27,18 @@ import com.google.api.gax.rpc.RequestParamsExtractor; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.cx.v3.Agent; +import com.google.cloud.dialogflow.cx.v3.AgentValidationResult; import com.google.cloud.dialogflow.cx.v3.CreateAgentRequest; import com.google.cloud.dialogflow.cx.v3.DeleteAgentRequest; import com.google.cloud.dialogflow.cx.v3.ExportAgentRequest; import com.google.cloud.dialogflow.cx.v3.ExportAgentResponse; import com.google.cloud.dialogflow.cx.v3.GetAgentRequest; +import com.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest; import com.google.cloud.dialogflow.cx.v3.ListAgentsRequest; import com.google.cloud.dialogflow.cx.v3.ListAgentsResponse; import com.google.cloud.dialogflow.cx.v3.RestoreAgentRequest; import com.google.cloud.dialogflow.cx.v3.UpdateAgentRequest; +import com.google.cloud.dialogflow.cx.v3.ValidateAgentRequest; import com.google.common.collect.ImmutableMap; import com.google.longrunning.Operation; import com.google.longrunning.stub.GrpcOperationsStub; @@ -114,6 +117,28 @@ public class GrpcAgentsStub extends AgentsStub { .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); + private static final MethodDescriptor + validateAgentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3.Agents/ValidateAgent") + .setRequestMarshaller( + ProtoUtils.marshaller(ValidateAgentRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(AgentValidationResult.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getAgentValidationResultMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3.Agents/GetAgentValidationResult") + .setRequestMarshaller( + ProtoUtils.marshaller(GetAgentValidationResultRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(AgentValidationResult.getDefaultInstance())) + .build(); + private final UnaryCallable listAgentsCallable; private final UnaryCallable listAgentsPagedCallable; private final UnaryCallable getAgentCallable; @@ -125,6 +150,9 @@ public class GrpcAgentsStub extends AgentsStub { exportAgentOperationCallable; private final UnaryCallable restoreAgentCallable; private final OperationCallable restoreAgentOperationCallable; + private final UnaryCallable validateAgentCallable; + private final UnaryCallable + getAgentValidationResultCallable; private final BackgroundResource backgroundResources; private final GrpcOperationsStub operationsStub; @@ -256,6 +284,33 @@ public Map extract(RestoreAgentRequest request) { } }) .build(); + GrpcCallSettings validateAgentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(validateAgentMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ValidateAgentRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + getAgentValidationResultTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getAgentValidationResultMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetAgentValidationResultRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); this.listAgentsCallable = callableFactory.createUnaryCallable( @@ -293,6 +348,14 @@ public Map extract(RestoreAgentRequest request) { settings.restoreAgentOperationSettings(), clientContext, operationsStub); + this.validateAgentCallable = + callableFactory.createUnaryCallable( + validateAgentTransportSettings, settings.validateAgentSettings(), clientContext); + this.getAgentValidationResultCallable = + callableFactory.createUnaryCallable( + getAgentValidationResultTransportSettings, + settings.getAgentValidationResultSettings(), + clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); @@ -343,6 +406,15 @@ public OperationCallable restoreAgentOperati return restoreAgentOperationCallable; } + public UnaryCallable validateAgentCallable() { + return validateAgentCallable; + } + + public UnaryCallable + getAgentValidationResultCallable() { + return getAgentValidationResultCallable; + } + @Override public final void close() { shutdown(); diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcExperimentsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcExperimentsStub.java deleted file mode 100644 index e33c42ae1..000000000 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcExperimentsStub.java +++ /dev/null @@ -1,368 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.dialogflow.cx.v3.stub; - -import static com.google.cloud.dialogflow.cx.v3.ExperimentsClient.ListExperimentsPagedResponse; - -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.RequestParamsExtractor; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest; -import com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest; -import com.google.cloud.dialogflow.cx.v3.Experiment; -import com.google.cloud.dialogflow.cx.v3.GetExperimentRequest; -import com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest; -import com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse; -import com.google.cloud.dialogflow.cx.v3.StartExperimentRequest; -import com.google.cloud.dialogflow.cx.v3.StopExperimentRequest; -import com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest; -import com.google.common.collect.ImmutableMap; -import com.google.longrunning.stub.GrpcOperationsStub; -import com.google.protobuf.Empty; -import io.grpc.MethodDescriptor; -import io.grpc.protobuf.ProtoUtils; -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC stub implementation for the Experiments service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -public class GrpcExperimentsStub extends ExperimentsStub { - private static final MethodDescriptor - listExperimentsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.dialogflow.cx.v3.Experiments/ListExperiments") - .setRequestMarshaller( - ProtoUtils.marshaller(ListExperimentsRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListExperimentsResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - getExperimentMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.dialogflow.cx.v3.Experiments/GetExperiment") - .setRequestMarshaller( - ProtoUtils.marshaller(GetExperimentRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Experiment.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - createExperimentMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.dialogflow.cx.v3.Experiments/CreateExperiment") - .setRequestMarshaller( - ProtoUtils.marshaller(CreateExperimentRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Experiment.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - updateExperimentMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.dialogflow.cx.v3.Experiments/UpdateExperiment") - .setRequestMarshaller( - ProtoUtils.marshaller(UpdateExperimentRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Experiment.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - deleteExperimentMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.dialogflow.cx.v3.Experiments/DeleteExperiment") - .setRequestMarshaller( - ProtoUtils.marshaller(DeleteExperimentRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - startExperimentMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.dialogflow.cx.v3.Experiments/StartExperiment") - .setRequestMarshaller( - ProtoUtils.marshaller(StartExperimentRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Experiment.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - stopExperimentMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.dialogflow.cx.v3.Experiments/StopExperiment") - .setRequestMarshaller( - ProtoUtils.marshaller(StopExperimentRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Experiment.getDefaultInstance())) - .build(); - - private final UnaryCallable - listExperimentsCallable; - private final UnaryCallable - listExperimentsPagedCallable; - private final UnaryCallable getExperimentCallable; - private final UnaryCallable createExperimentCallable; - private final UnaryCallable updateExperimentCallable; - private final UnaryCallable deleteExperimentCallable; - private final UnaryCallable startExperimentCallable; - private final UnaryCallable stopExperimentCallable; - - private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - private final GrpcStubCallableFactory callableFactory; - - public static final GrpcExperimentsStub create(ExperimentsStubSettings settings) - throws IOException { - return new GrpcExperimentsStub(settings, ClientContext.create(settings)); - } - - public static final GrpcExperimentsStub create(ClientContext clientContext) throws IOException { - return new GrpcExperimentsStub(ExperimentsStubSettings.newBuilder().build(), clientContext); - } - - public static final GrpcExperimentsStub create( - ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { - return new GrpcExperimentsStub( - ExperimentsStubSettings.newBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of GrpcExperimentsStub, using the given settings. This is protected so - * that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected GrpcExperimentsStub(ExperimentsStubSettings settings, ClientContext clientContext) - throws IOException { - this(settings, clientContext, new GrpcExperimentsCallableFactory()); - } - - /** - * Constructs an instance of GrpcExperimentsStub, using the given settings. This is protected so - * that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected GrpcExperimentsStub( - ExperimentsStubSettings settings, - ClientContext clientContext, - GrpcStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); - - GrpcCallSettings - listExperimentsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listExperimentsMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(ListExperimentsRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } - }) - .build(); - GrpcCallSettings getExperimentTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getExperimentMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(GetExperimentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } - }) - .build(); - GrpcCallSettings createExperimentTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createExperimentMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(CreateExperimentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } - }) - .build(); - GrpcCallSettings updateExperimentTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateExperimentMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(UpdateExperimentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put( - "experiment.name", String.valueOf(request.getExperiment().getName())); - return params.build(); - } - }) - .build(); - GrpcCallSettings deleteExperimentTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteExperimentMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(DeleteExperimentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } - }) - .build(); - GrpcCallSettings startExperimentTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(startExperimentMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(StartExperimentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } - }) - .build(); - GrpcCallSettings stopExperimentTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(stopExperimentMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(StopExperimentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } - }) - .build(); - - this.listExperimentsCallable = - callableFactory.createUnaryCallable( - listExperimentsTransportSettings, settings.listExperimentsSettings(), clientContext); - this.listExperimentsPagedCallable = - callableFactory.createPagedCallable( - listExperimentsTransportSettings, settings.listExperimentsSettings(), clientContext); - this.getExperimentCallable = - callableFactory.createUnaryCallable( - getExperimentTransportSettings, settings.getExperimentSettings(), clientContext); - this.createExperimentCallable = - callableFactory.createUnaryCallable( - createExperimentTransportSettings, settings.createExperimentSettings(), clientContext); - this.updateExperimentCallable = - callableFactory.createUnaryCallable( - updateExperimentTransportSettings, settings.updateExperimentSettings(), clientContext); - this.deleteExperimentCallable = - callableFactory.createUnaryCallable( - deleteExperimentTransportSettings, settings.deleteExperimentSettings(), clientContext); - this.startExperimentCallable = - callableFactory.createUnaryCallable( - startExperimentTransportSettings, settings.startExperimentSettings(), clientContext); - this.stopExperimentCallable = - callableFactory.createUnaryCallable( - stopExperimentTransportSettings, settings.stopExperimentSettings(), clientContext); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - public GrpcOperationsStub getOperationsStub() { - return operationsStub; - } - - public UnaryCallable listExperimentsCallable() { - return listExperimentsCallable; - } - - public UnaryCallable - listExperimentsPagedCallable() { - return listExperimentsPagedCallable; - } - - public UnaryCallable getExperimentCallable() { - return getExperimentCallable; - } - - public UnaryCallable createExperimentCallable() { - return createExperimentCallable; - } - - public UnaryCallable updateExperimentCallable() { - return updateExperimentCallable; - } - - public UnaryCallable deleteExperimentCallable() { - return deleteExperimentCallable; - } - - public UnaryCallable startExperimentCallable() { - return startExperimentCallable; - } - - public UnaryCallable stopExperimentCallable() { - return stopExperimentCallable; - } - - @Override - public final void close() { - shutdown(); - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcFlowsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcFlowsStub.java index 6d07ec3dc..a7b4fd206 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcFlowsStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcFlowsStub.java @@ -29,11 +29,14 @@ import com.google.cloud.dialogflow.cx.v3.CreateFlowRequest; import com.google.cloud.dialogflow.cx.v3.DeleteFlowRequest; import com.google.cloud.dialogflow.cx.v3.Flow; +import com.google.cloud.dialogflow.cx.v3.FlowValidationResult; import com.google.cloud.dialogflow.cx.v3.GetFlowRequest; +import com.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest; import com.google.cloud.dialogflow.cx.v3.ListFlowsRequest; import com.google.cloud.dialogflow.cx.v3.ListFlowsResponse; import com.google.cloud.dialogflow.cx.v3.TrainFlowRequest; import com.google.cloud.dialogflow.cx.v3.UpdateFlowRequest; +import com.google.cloud.dialogflow.cx.v3.ValidateFlowRequest; import com.google.common.collect.ImmutableMap; import com.google.longrunning.Operation; import com.google.longrunning.stub.GrpcOperationsStub; @@ -103,6 +106,27 @@ public class GrpcFlowsStub extends FlowsStub { .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); + private static final MethodDescriptor + validateFlowMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3.Flows/ValidateFlow") + .setRequestMarshaller(ProtoUtils.marshaller(ValidateFlowRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(FlowValidationResult.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getFlowValidationResultMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3.Flows/GetFlowValidationResult") + .setRequestMarshaller( + ProtoUtils.marshaller(GetFlowValidationResultRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(FlowValidationResult.getDefaultInstance())) + .build(); + private final UnaryCallable createFlowCallable; private final UnaryCallable deleteFlowCallable; private final UnaryCallable listFlowsCallable; @@ -111,6 +135,9 @@ public class GrpcFlowsStub extends FlowsStub { private final UnaryCallable updateFlowCallable; private final UnaryCallable trainFlowCallable; private final OperationCallable trainFlowOperationCallable; + private final UnaryCallable validateFlowCallable; + private final UnaryCallable + getFlowValidationResultCallable; private final BackgroundResource backgroundResources; private final GrpcOperationsStub operationsStub; @@ -229,6 +256,33 @@ public Map extract(TrainFlowRequest request) { } }) .build(); + GrpcCallSettings validateFlowTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(validateFlowMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ValidateFlowRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + getFlowValidationResultTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getFlowValidationResultMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetFlowValidationResultRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); this.createFlowCallable = callableFactory.createUnaryCallable( @@ -257,6 +311,14 @@ public Map extract(TrainFlowRequest request) { settings.trainFlowOperationSettings(), clientContext, operationsStub); + this.validateFlowCallable = + callableFactory.createUnaryCallable( + validateFlowTransportSettings, settings.validateFlowSettings(), clientContext); + this.getFlowValidationResultCallable = + callableFactory.createUnaryCallable( + getFlowValidationResultTransportSettings, + settings.getFlowValidationResultSettings(), + clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); @@ -298,6 +360,15 @@ public OperationCallable trainFlowOperationCall return trainFlowOperationCallable; } + public UnaryCallable validateFlowCallable() { + return validateFlowCallable; + } + + public UnaryCallable + getFlowValidationResultCallable() { + return getFlowValidationResultCallable; + } + @Override public final void close() { shutdown(); diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcExperimentsCallableFactory.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcTestCasesCallableFactory.java similarity index 96% rename from google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcExperimentsCallableFactory.java rename to google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcTestCasesCallableFactory.java index da36542d1..a4e62052f 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcExperimentsCallableFactory.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcTestCasesCallableFactory.java @@ -37,12 +37,12 @@ // AUTO-GENERATED DOCUMENTATION AND CLASS. /** - * gRPC callable factory implementation for the Experiments service API. + * gRPC callable factory implementation for the TestCases service API. * *

This class is for advanced usage. */ @Generated("by gapic-generator-java") -public class GrpcExperimentsCallableFactory implements GrpcStubCallableFactory { +public class GrpcTestCasesCallableFactory implements GrpcStubCallableFactory { @Override public UnaryCallable createUnaryCallable( diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcTestCasesStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcTestCasesStub.java new file mode 100644 index 000000000..7211a865b --- /dev/null +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcTestCasesStub.java @@ -0,0 +1,576 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.cx.v3.stub; + +import static com.google.cloud.dialogflow.cx.v3.TestCasesClient.ListTestCaseResultsPagedResponse; +import static com.google.cloud.dialogflow.cx.v3.TestCasesClient.ListTestCasesPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsExtractor; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest; +import com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata; +import com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest; +import com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse; +import com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest; +import com.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse; +import com.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest; +import com.google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata; +import com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest; +import com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse; +import com.google.cloud.dialogflow.cx.v3.GetTestCaseRequest; +import com.google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata; +import com.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest; +import com.google.cloud.dialogflow.cx.v3.ImportTestCasesResponse; +import com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest; +import com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse; +import com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest; +import com.google.cloud.dialogflow.cx.v3.ListTestCasesResponse; +import com.google.cloud.dialogflow.cx.v3.RunTestCaseMetadata; +import com.google.cloud.dialogflow.cx.v3.RunTestCaseRequest; +import com.google.cloud.dialogflow.cx.v3.RunTestCaseResponse; +import com.google.cloud.dialogflow.cx.v3.TestCase; +import com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the TestCases service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcTestCasesStub extends TestCasesStub { + private static final MethodDescriptor + listTestCasesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3.TestCases/ListTestCases") + .setRequestMarshaller( + ProtoUtils.marshaller(ListTestCasesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListTestCasesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + batchDeleteTestCasesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3.TestCases/BatchDeleteTestCases") + .setRequestMarshaller( + ProtoUtils.marshaller(BatchDeleteTestCasesRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getTestCaseMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3.TestCases/GetTestCase") + .setRequestMarshaller(ProtoUtils.marshaller(GetTestCaseRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(TestCase.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createTestCaseMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3.TestCases/CreateTestCase") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateTestCaseRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(TestCase.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateTestCaseMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3.TestCases/UpdateTestCase") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateTestCaseRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(TestCase.getDefaultInstance())) + .build(); + + private static final MethodDescriptor runTestCaseMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3.TestCases/RunTestCase") + .setRequestMarshaller(ProtoUtils.marshaller(RunTestCaseRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + batchRunTestCasesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3.TestCases/BatchRunTestCases") + .setRequestMarshaller( + ProtoUtils.marshaller(BatchRunTestCasesRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + calculateCoverageMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3.TestCases/CalculateCoverage") + .setRequestMarshaller( + ProtoUtils.marshaller(CalculateCoverageRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(CalculateCoverageResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + importTestCasesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3.TestCases/ImportTestCases") + .setRequestMarshaller( + ProtoUtils.marshaller(ImportTestCasesRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + exportTestCasesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3.TestCases/ExportTestCases") + .setRequestMarshaller( + ProtoUtils.marshaller(ExportTestCasesRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listTestCaseResultsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3.TestCases/ListTestCaseResults") + .setRequestMarshaller( + ProtoUtils.marshaller(ListTestCaseResultsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListTestCaseResultsResponse.getDefaultInstance())) + .build(); + + private final UnaryCallable listTestCasesCallable; + private final UnaryCallable + listTestCasesPagedCallable; + private final UnaryCallable batchDeleteTestCasesCallable; + private final UnaryCallable getTestCaseCallable; + private final UnaryCallable createTestCaseCallable; + private final UnaryCallable updateTestCaseCallable; + private final UnaryCallable runTestCaseCallable; + private final OperationCallable + runTestCaseOperationCallable; + private final UnaryCallable batchRunTestCasesCallable; + private final OperationCallable< + BatchRunTestCasesRequest, BatchRunTestCasesResponse, BatchRunTestCasesMetadata> + batchRunTestCasesOperationCallable; + private final UnaryCallable + calculateCoverageCallable; + private final UnaryCallable importTestCasesCallable; + private final OperationCallable< + ImportTestCasesRequest, ImportTestCasesResponse, ImportTestCasesMetadata> + importTestCasesOperationCallable; + private final UnaryCallable exportTestCasesCallable; + private final OperationCallable< + ExportTestCasesRequest, ExportTestCasesResponse, ExportTestCasesMetadata> + exportTestCasesOperationCallable; + private final UnaryCallable + listTestCaseResultsCallable; + private final UnaryCallable + listTestCaseResultsPagedCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcTestCasesStub create(TestCasesStubSettings settings) throws IOException { + return new GrpcTestCasesStub(settings, ClientContext.create(settings)); + } + + public static final GrpcTestCasesStub create(ClientContext clientContext) throws IOException { + return new GrpcTestCasesStub(TestCasesStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcTestCasesStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcTestCasesStub( + TestCasesStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcTestCasesStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcTestCasesStub(TestCasesStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcTestCasesCallableFactory()); + } + + /** + * Constructs an instance of GrpcTestCasesStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcTestCasesStub( + TestCasesStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings listTestCasesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listTestCasesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListTestCasesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings batchDeleteTestCasesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(batchDeleteTestCasesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(BatchDeleteTestCasesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings getTestCaseTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getTestCaseMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetTestCaseRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings createTestCaseTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createTestCaseMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateTestCaseRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings updateTestCaseTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateTestCaseMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateTestCaseRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("test_case.name", String.valueOf(request.getTestCase().getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings runTestCaseTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(runTestCaseMethodDescriptor) + .build(); + GrpcCallSettings batchRunTestCasesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(batchRunTestCasesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(BatchRunTestCasesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + calculateCoverageTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(calculateCoverageMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CalculateCoverageRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("agent", String.valueOf(request.getAgent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings importTestCasesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(importTestCasesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ImportTestCasesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings exportTestCasesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(exportTestCasesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ExportTestCasesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + listTestCaseResultsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listTestCaseResultsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListTestCaseResultsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + + this.listTestCasesCallable = + callableFactory.createUnaryCallable( + listTestCasesTransportSettings, settings.listTestCasesSettings(), clientContext); + this.listTestCasesPagedCallable = + callableFactory.createPagedCallable( + listTestCasesTransportSettings, settings.listTestCasesSettings(), clientContext); + this.batchDeleteTestCasesCallable = + callableFactory.createUnaryCallable( + batchDeleteTestCasesTransportSettings, + settings.batchDeleteTestCasesSettings(), + clientContext); + this.getTestCaseCallable = + callableFactory.createUnaryCallable( + getTestCaseTransportSettings, settings.getTestCaseSettings(), clientContext); + this.createTestCaseCallable = + callableFactory.createUnaryCallable( + createTestCaseTransportSettings, settings.createTestCaseSettings(), clientContext); + this.updateTestCaseCallable = + callableFactory.createUnaryCallable( + updateTestCaseTransportSettings, settings.updateTestCaseSettings(), clientContext); + this.runTestCaseCallable = + callableFactory.createUnaryCallable( + runTestCaseTransportSettings, settings.runTestCaseSettings(), clientContext); + this.runTestCaseOperationCallable = + callableFactory.createOperationCallable( + runTestCaseTransportSettings, + settings.runTestCaseOperationSettings(), + clientContext, + operationsStub); + this.batchRunTestCasesCallable = + callableFactory.createUnaryCallable( + batchRunTestCasesTransportSettings, + settings.batchRunTestCasesSettings(), + clientContext); + this.batchRunTestCasesOperationCallable = + callableFactory.createOperationCallable( + batchRunTestCasesTransportSettings, + settings.batchRunTestCasesOperationSettings(), + clientContext, + operationsStub); + this.calculateCoverageCallable = + callableFactory.createUnaryCallable( + calculateCoverageTransportSettings, + settings.calculateCoverageSettings(), + clientContext); + this.importTestCasesCallable = + callableFactory.createUnaryCallable( + importTestCasesTransportSettings, settings.importTestCasesSettings(), clientContext); + this.importTestCasesOperationCallable = + callableFactory.createOperationCallable( + importTestCasesTransportSettings, + settings.importTestCasesOperationSettings(), + clientContext, + operationsStub); + this.exportTestCasesCallable = + callableFactory.createUnaryCallable( + exportTestCasesTransportSettings, settings.exportTestCasesSettings(), clientContext); + this.exportTestCasesOperationCallable = + callableFactory.createOperationCallable( + exportTestCasesTransportSettings, + settings.exportTestCasesOperationSettings(), + clientContext, + operationsStub); + this.listTestCaseResultsCallable = + callableFactory.createUnaryCallable( + listTestCaseResultsTransportSettings, + settings.listTestCaseResultsSettings(), + clientContext); + this.listTestCaseResultsPagedCallable = + callableFactory.createPagedCallable( + listTestCaseResultsTransportSettings, + settings.listTestCaseResultsSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + public UnaryCallable listTestCasesCallable() { + return listTestCasesCallable; + } + + public UnaryCallable + listTestCasesPagedCallable() { + return listTestCasesPagedCallable; + } + + public UnaryCallable batchDeleteTestCasesCallable() { + return batchDeleteTestCasesCallable; + } + + public UnaryCallable getTestCaseCallable() { + return getTestCaseCallable; + } + + public UnaryCallable createTestCaseCallable() { + return createTestCaseCallable; + } + + public UnaryCallable updateTestCaseCallable() { + return updateTestCaseCallable; + } + + public UnaryCallable runTestCaseCallable() { + return runTestCaseCallable; + } + + public OperationCallable + runTestCaseOperationCallable() { + return runTestCaseOperationCallable; + } + + public UnaryCallable batchRunTestCasesCallable() { + return batchRunTestCasesCallable; + } + + public OperationCallable< + BatchRunTestCasesRequest, BatchRunTestCasesResponse, BatchRunTestCasesMetadata> + batchRunTestCasesOperationCallable() { + return batchRunTestCasesOperationCallable; + } + + public UnaryCallable + calculateCoverageCallable() { + return calculateCoverageCallable; + } + + public UnaryCallable importTestCasesCallable() { + return importTestCasesCallable; + } + + public OperationCallable + importTestCasesOperationCallable() { + return importTestCasesOperationCallable; + } + + public UnaryCallable exportTestCasesCallable() { + return exportTestCasesCallable; + } + + public OperationCallable + exportTestCasesOperationCallable() { + return exportTestCasesOperationCallable; + } + + public UnaryCallable + listTestCaseResultsCallable() { + return listTestCaseResultsCallable; + } + + public UnaryCallable + listTestCaseResultsPagedCallable() { + return listTestCaseResultsPagedCallable; + } + + @Override + public final void close() { + shutdown(); + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/TestCasesStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/TestCasesStub.java new file mode 100644 index 000000000..2ab411a55 --- /dev/null +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/TestCasesStub.java @@ -0,0 +1,146 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.cx.v3.stub; + +import static com.google.cloud.dialogflow.cx.v3.TestCasesClient.ListTestCaseResultsPagedResponse; +import static com.google.cloud.dialogflow.cx.v3.TestCasesClient.ListTestCasesPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest; +import com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata; +import com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest; +import com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse; +import com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest; +import com.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse; +import com.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest; +import com.google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata; +import com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest; +import com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse; +import com.google.cloud.dialogflow.cx.v3.GetTestCaseRequest; +import com.google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata; +import com.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest; +import com.google.cloud.dialogflow.cx.v3.ImportTestCasesResponse; +import com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest; +import com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse; +import com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest; +import com.google.cloud.dialogflow.cx.v3.ListTestCasesResponse; +import com.google.cloud.dialogflow.cx.v3.RunTestCaseMetadata; +import com.google.cloud.dialogflow.cx.v3.RunTestCaseRequest; +import com.google.cloud.dialogflow.cx.v3.RunTestCaseResponse; +import com.google.cloud.dialogflow.cx.v3.TestCase; +import com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the TestCases service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class TestCasesStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); + } + + public UnaryCallable + listTestCasesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listTestCasesPagedCallable()"); + } + + public UnaryCallable listTestCasesCallable() { + throw new UnsupportedOperationException("Not implemented: listTestCasesCallable()"); + } + + public UnaryCallable batchDeleteTestCasesCallable() { + throw new UnsupportedOperationException("Not implemented: batchDeleteTestCasesCallable()"); + } + + public UnaryCallable getTestCaseCallable() { + throw new UnsupportedOperationException("Not implemented: getTestCaseCallable()"); + } + + public UnaryCallable createTestCaseCallable() { + throw new UnsupportedOperationException("Not implemented: createTestCaseCallable()"); + } + + public UnaryCallable updateTestCaseCallable() { + throw new UnsupportedOperationException("Not implemented: updateTestCaseCallable()"); + } + + public OperationCallable + runTestCaseOperationCallable() { + throw new UnsupportedOperationException("Not implemented: runTestCaseOperationCallable()"); + } + + public UnaryCallable runTestCaseCallable() { + throw new UnsupportedOperationException("Not implemented: runTestCaseCallable()"); + } + + public OperationCallable< + BatchRunTestCasesRequest, BatchRunTestCasesResponse, BatchRunTestCasesMetadata> + batchRunTestCasesOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: batchRunTestCasesOperationCallable()"); + } + + public UnaryCallable batchRunTestCasesCallable() { + throw new UnsupportedOperationException("Not implemented: batchRunTestCasesCallable()"); + } + + public UnaryCallable + calculateCoverageCallable() { + throw new UnsupportedOperationException("Not implemented: calculateCoverageCallable()"); + } + + public OperationCallable + importTestCasesOperationCallable() { + throw new UnsupportedOperationException("Not implemented: importTestCasesOperationCallable()"); + } + + public UnaryCallable importTestCasesCallable() { + throw new UnsupportedOperationException("Not implemented: importTestCasesCallable()"); + } + + public OperationCallable + exportTestCasesOperationCallable() { + throw new UnsupportedOperationException("Not implemented: exportTestCasesOperationCallable()"); + } + + public UnaryCallable exportTestCasesCallable() { + throw new UnsupportedOperationException("Not implemented: exportTestCasesCallable()"); + } + + public UnaryCallable + listTestCaseResultsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listTestCaseResultsPagedCallable()"); + } + + public UnaryCallable + listTestCaseResultsCallable() { + throw new UnsupportedOperationException("Not implemented: listTestCaseResultsCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/TestCasesStubSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/TestCasesStubSettings.java new file mode 100644 index 000000000..30ec81b72 --- /dev/null +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/TestCasesStubSettings.java @@ -0,0 +1,867 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.cx.v3.stub; + +import static com.google.cloud.dialogflow.cx.v3.TestCasesClient.ListTestCaseResultsPagedResponse; +import static com.google.cloud.dialogflow.cx.v3.TestCasesClient.ListTestCasesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest; +import com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata; +import com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest; +import com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse; +import com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest; +import com.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse; +import com.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest; +import com.google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata; +import com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest; +import com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse; +import com.google.cloud.dialogflow.cx.v3.GetTestCaseRequest; +import com.google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata; +import com.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest; +import com.google.cloud.dialogflow.cx.v3.ImportTestCasesResponse; +import com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest; +import com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse; +import com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest; +import com.google.cloud.dialogflow.cx.v3.ListTestCasesResponse; +import com.google.cloud.dialogflow.cx.v3.RunTestCaseMetadata; +import com.google.cloud.dialogflow.cx.v3.RunTestCaseRequest; +import com.google.cloud.dialogflow.cx.v3.RunTestCaseResponse; +import com.google.cloud.dialogflow.cx.v3.TestCase; +import com.google.cloud.dialogflow.cx.v3.TestCaseResult; +import com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link TestCasesStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (dialogflow.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of batchDeleteTestCases to 30 seconds: + * + *

{@code
+ * TestCasesStubSettings.Builder testCasesSettingsBuilder = TestCasesStubSettings.newBuilder();
+ * testCasesSettingsBuilder
+ *     .batchDeleteTestCasesSettings()
+ *     .setRetrySettings(
+ *         testCasesSettingsBuilder
+ *             .batchDeleteTestCasesSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * TestCasesStubSettings testCasesSettings = testCasesSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class TestCasesStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder() + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/dialogflow") + .build(); + + private final PagedCallSettings< + ListTestCasesRequest, ListTestCasesResponse, ListTestCasesPagedResponse> + listTestCasesSettings; + private final UnaryCallSettings batchDeleteTestCasesSettings; + private final UnaryCallSettings getTestCaseSettings; + private final UnaryCallSettings createTestCaseSettings; + private final UnaryCallSettings updateTestCaseSettings; + private final UnaryCallSettings runTestCaseSettings; + private final OperationCallSettings + runTestCaseOperationSettings; + private final UnaryCallSettings batchRunTestCasesSettings; + private final OperationCallSettings< + BatchRunTestCasesRequest, BatchRunTestCasesResponse, BatchRunTestCasesMetadata> + batchRunTestCasesOperationSettings; + private final UnaryCallSettings + calculateCoverageSettings; + private final UnaryCallSettings importTestCasesSettings; + private final OperationCallSettings< + ImportTestCasesRequest, ImportTestCasesResponse, ImportTestCasesMetadata> + importTestCasesOperationSettings; + private final UnaryCallSettings exportTestCasesSettings; + private final OperationCallSettings< + ExportTestCasesRequest, ExportTestCasesResponse, ExportTestCasesMetadata> + exportTestCasesOperationSettings; + private final PagedCallSettings< + ListTestCaseResultsRequest, ListTestCaseResultsResponse, ListTestCaseResultsPagedResponse> + listTestCaseResultsSettings; + + private static final PagedListDescriptor + LIST_TEST_CASES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListTestCasesRequest injectToken(ListTestCasesRequest payload, String token) { + return ListTestCasesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListTestCasesRequest injectPageSize(ListTestCasesRequest payload, int pageSize) { + return ListTestCasesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListTestCasesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListTestCasesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListTestCasesResponse payload) { + return payload.getTestCasesList() == null + ? ImmutableList.of() + : payload.getTestCasesList(); + } + }; + + private static final PagedListDescriptor< + ListTestCaseResultsRequest, ListTestCaseResultsResponse, TestCaseResult> + LIST_TEST_CASE_RESULTS_PAGE_STR_DESC = + new PagedListDescriptor< + ListTestCaseResultsRequest, ListTestCaseResultsResponse, TestCaseResult>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListTestCaseResultsRequest injectToken( + ListTestCaseResultsRequest payload, String token) { + return ListTestCaseResultsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListTestCaseResultsRequest injectPageSize( + ListTestCaseResultsRequest payload, int pageSize) { + return ListTestCaseResultsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListTestCaseResultsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListTestCaseResultsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListTestCaseResultsResponse payload) { + return payload.getTestCaseResultsList() == null + ? ImmutableList.of() + : payload.getTestCaseResultsList(); + } + }; + + private static final PagedListResponseFactory< + ListTestCasesRequest, ListTestCasesResponse, ListTestCasesPagedResponse> + LIST_TEST_CASES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListTestCasesRequest, ListTestCasesResponse, ListTestCasesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListTestCasesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_TEST_CASES_PAGE_STR_DESC, request, context); + return ListTestCasesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListTestCaseResultsRequest, ListTestCaseResultsResponse, ListTestCaseResultsPagedResponse> + LIST_TEST_CASE_RESULTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListTestCaseResultsRequest, + ListTestCaseResultsResponse, + ListTestCaseResultsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListTestCaseResultsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_TEST_CASE_RESULTS_PAGE_STR_DESC, request, context); + return ListTestCaseResultsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to listTestCases. */ + public PagedCallSettings + listTestCasesSettings() { + return listTestCasesSettings; + } + + /** Returns the object with the settings used for calls to batchDeleteTestCases. */ + public UnaryCallSettings batchDeleteTestCasesSettings() { + return batchDeleteTestCasesSettings; + } + + /** Returns the object with the settings used for calls to getTestCase. */ + public UnaryCallSettings getTestCaseSettings() { + return getTestCaseSettings; + } + + /** Returns the object with the settings used for calls to createTestCase. */ + public UnaryCallSettings createTestCaseSettings() { + return createTestCaseSettings; + } + + /** Returns the object with the settings used for calls to updateTestCase. */ + public UnaryCallSettings updateTestCaseSettings() { + return updateTestCaseSettings; + } + + /** Returns the object with the settings used for calls to runTestCase. */ + public UnaryCallSettings runTestCaseSettings() { + return runTestCaseSettings; + } + + /** Returns the object with the settings used for calls to runTestCase. */ + public OperationCallSettings + runTestCaseOperationSettings() { + return runTestCaseOperationSettings; + } + + /** Returns the object with the settings used for calls to batchRunTestCases. */ + public UnaryCallSettings batchRunTestCasesSettings() { + return batchRunTestCasesSettings; + } + + /** Returns the object with the settings used for calls to batchRunTestCases. */ + public OperationCallSettings< + BatchRunTestCasesRequest, BatchRunTestCasesResponse, BatchRunTestCasesMetadata> + batchRunTestCasesOperationSettings() { + return batchRunTestCasesOperationSettings; + } + + /** Returns the object with the settings used for calls to calculateCoverage. */ + public UnaryCallSettings + calculateCoverageSettings() { + return calculateCoverageSettings; + } + + /** Returns the object with the settings used for calls to importTestCases. */ + public UnaryCallSettings importTestCasesSettings() { + return importTestCasesSettings; + } + + /** Returns the object with the settings used for calls to importTestCases. */ + public OperationCallSettings< + ImportTestCasesRequest, ImportTestCasesResponse, ImportTestCasesMetadata> + importTestCasesOperationSettings() { + return importTestCasesOperationSettings; + } + + /** Returns the object with the settings used for calls to exportTestCases. */ + public UnaryCallSettings exportTestCasesSettings() { + return exportTestCasesSettings; + } + + /** Returns the object with the settings used for calls to exportTestCases. */ + public OperationCallSettings< + ExportTestCasesRequest, ExportTestCasesResponse, ExportTestCasesMetadata> + exportTestCasesOperationSettings() { + return exportTestCasesOperationSettings; + } + + /** Returns the object with the settings used for calls to listTestCaseResults. */ + public PagedCallSettings< + ListTestCaseResultsRequest, ListTestCaseResultsResponse, ListTestCaseResultsPagedResponse> + listTestCaseResultsSettings() { + return listTestCaseResultsSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public TestCasesStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcTestCasesStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "dialogflow.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken("gapic", GaxProperties.getLibraryVersion(TestCasesStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected TestCasesStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listTestCasesSettings = settingsBuilder.listTestCasesSettings().build(); + batchDeleteTestCasesSettings = settingsBuilder.batchDeleteTestCasesSettings().build(); + getTestCaseSettings = settingsBuilder.getTestCaseSettings().build(); + createTestCaseSettings = settingsBuilder.createTestCaseSettings().build(); + updateTestCaseSettings = settingsBuilder.updateTestCaseSettings().build(); + runTestCaseSettings = settingsBuilder.runTestCaseSettings().build(); + runTestCaseOperationSettings = settingsBuilder.runTestCaseOperationSettings().build(); + batchRunTestCasesSettings = settingsBuilder.batchRunTestCasesSettings().build(); + batchRunTestCasesOperationSettings = + settingsBuilder.batchRunTestCasesOperationSettings().build(); + calculateCoverageSettings = settingsBuilder.calculateCoverageSettings().build(); + importTestCasesSettings = settingsBuilder.importTestCasesSettings().build(); + importTestCasesOperationSettings = settingsBuilder.importTestCasesOperationSettings().build(); + exportTestCasesSettings = settingsBuilder.exportTestCasesSettings().build(); + exportTestCasesOperationSettings = settingsBuilder.exportTestCasesOperationSettings().build(); + listTestCaseResultsSettings = settingsBuilder.listTestCaseResultsSettings().build(); + } + + /** Builder for TestCasesStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + ListTestCasesRequest, ListTestCasesResponse, ListTestCasesPagedResponse> + listTestCasesSettings; + private final UnaryCallSettings.Builder + batchDeleteTestCasesSettings; + private final UnaryCallSettings.Builder getTestCaseSettings; + private final UnaryCallSettings.Builder createTestCaseSettings; + private final UnaryCallSettings.Builder updateTestCaseSettings; + private final UnaryCallSettings.Builder runTestCaseSettings; + private final OperationCallSettings.Builder< + RunTestCaseRequest, RunTestCaseResponse, RunTestCaseMetadata> + runTestCaseOperationSettings; + private final UnaryCallSettings.Builder + batchRunTestCasesSettings; + private final OperationCallSettings.Builder< + BatchRunTestCasesRequest, BatchRunTestCasesResponse, BatchRunTestCasesMetadata> + batchRunTestCasesOperationSettings; + private final UnaryCallSettings.Builder + calculateCoverageSettings; + private final UnaryCallSettings.Builder + importTestCasesSettings; + private final OperationCallSettings.Builder< + ImportTestCasesRequest, ImportTestCasesResponse, ImportTestCasesMetadata> + importTestCasesOperationSettings; + private final UnaryCallSettings.Builder + exportTestCasesSettings; + private final OperationCallSettings.Builder< + ExportTestCasesRequest, ExportTestCasesResponse, ExportTestCasesMetadata> + exportTestCasesOperationSettings; + private final PagedCallSettings.Builder< + ListTestCaseResultsRequest, + ListTestCaseResultsResponse, + ListTestCaseResultsPagedResponse> + listTestCaseResultsSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + listTestCasesSettings = PagedCallSettings.newBuilder(LIST_TEST_CASES_PAGE_STR_FACT); + batchDeleteTestCasesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getTestCaseSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createTestCaseSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateTestCaseSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + runTestCaseSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + runTestCaseOperationSettings = OperationCallSettings.newBuilder(); + batchRunTestCasesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + batchRunTestCasesOperationSettings = OperationCallSettings.newBuilder(); + calculateCoverageSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + importTestCasesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + importTestCasesOperationSettings = OperationCallSettings.newBuilder(); + exportTestCasesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + exportTestCasesOperationSettings = OperationCallSettings.newBuilder(); + listTestCaseResultsSettings = + PagedCallSettings.newBuilder(LIST_TEST_CASE_RESULTS_PAGE_STR_FACT); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listTestCasesSettings, + batchDeleteTestCasesSettings, + getTestCaseSettings, + createTestCaseSettings, + updateTestCaseSettings, + runTestCaseSettings, + batchRunTestCasesSettings, + calculateCoverageSettings, + importTestCasesSettings, + exportTestCasesSettings, + listTestCaseResultsSettings); + initDefaults(this); + } + + protected Builder(TestCasesStubSettings settings) { + super(settings); + + listTestCasesSettings = settings.listTestCasesSettings.toBuilder(); + batchDeleteTestCasesSettings = settings.batchDeleteTestCasesSettings.toBuilder(); + getTestCaseSettings = settings.getTestCaseSettings.toBuilder(); + createTestCaseSettings = settings.createTestCaseSettings.toBuilder(); + updateTestCaseSettings = settings.updateTestCaseSettings.toBuilder(); + runTestCaseSettings = settings.runTestCaseSettings.toBuilder(); + runTestCaseOperationSettings = settings.runTestCaseOperationSettings.toBuilder(); + batchRunTestCasesSettings = settings.batchRunTestCasesSettings.toBuilder(); + batchRunTestCasesOperationSettings = settings.batchRunTestCasesOperationSettings.toBuilder(); + calculateCoverageSettings = settings.calculateCoverageSettings.toBuilder(); + importTestCasesSettings = settings.importTestCasesSettings.toBuilder(); + importTestCasesOperationSettings = settings.importTestCasesOperationSettings.toBuilder(); + exportTestCasesSettings = settings.exportTestCasesSettings.toBuilder(); + exportTestCasesOperationSettings = settings.exportTestCasesOperationSettings.toBuilder(); + listTestCaseResultsSettings = settings.listTestCaseResultsSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listTestCasesSettings, + batchDeleteTestCasesSettings, + getTestCaseSettings, + createTestCaseSettings, + updateTestCaseSettings, + runTestCaseSettings, + batchRunTestCasesSettings, + calculateCoverageSettings, + importTestCasesSettings, + exportTestCasesSettings, + listTestCaseResultsSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .listTestCasesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .batchDeleteTestCasesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getTestCaseSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createTestCaseSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateTestCaseSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .runTestCaseSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .batchRunTestCasesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .calculateCoverageSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .importTestCasesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .exportTestCasesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listTestCaseResultsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .runTestCaseOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(RunTestCaseResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(RunTestCaseMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .batchRunTestCasesOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + BatchRunTestCasesResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + BatchRunTestCasesMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .importTestCasesOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(ImportTestCasesResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(ImportTestCasesMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .exportTestCasesOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(ExportTestCasesResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(ExportTestCasesMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + // NEXT_MAJOR_VER: remove 'throws Exception'. + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to listTestCases. */ + public PagedCallSettings.Builder< + ListTestCasesRequest, ListTestCasesResponse, ListTestCasesPagedResponse> + listTestCasesSettings() { + return listTestCasesSettings; + } + + /** Returns the builder for the settings used for calls to batchDeleteTestCases. */ + public UnaryCallSettings.Builder + batchDeleteTestCasesSettings() { + return batchDeleteTestCasesSettings; + } + + /** Returns the builder for the settings used for calls to getTestCase. */ + public UnaryCallSettings.Builder getTestCaseSettings() { + return getTestCaseSettings; + } + + /** Returns the builder for the settings used for calls to createTestCase. */ + public UnaryCallSettings.Builder createTestCaseSettings() { + return createTestCaseSettings; + } + + /** Returns the builder for the settings used for calls to updateTestCase. */ + public UnaryCallSettings.Builder updateTestCaseSettings() { + return updateTestCaseSettings; + } + + /** Returns the builder for the settings used for calls to runTestCase. */ + public UnaryCallSettings.Builder runTestCaseSettings() { + return runTestCaseSettings; + } + + /** Returns the builder for the settings used for calls to runTestCase. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + RunTestCaseRequest, RunTestCaseResponse, RunTestCaseMetadata> + runTestCaseOperationSettings() { + return runTestCaseOperationSettings; + } + + /** Returns the builder for the settings used for calls to batchRunTestCases. */ + public UnaryCallSettings.Builder + batchRunTestCasesSettings() { + return batchRunTestCasesSettings; + } + + /** Returns the builder for the settings used for calls to batchRunTestCases. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + BatchRunTestCasesRequest, BatchRunTestCasesResponse, BatchRunTestCasesMetadata> + batchRunTestCasesOperationSettings() { + return batchRunTestCasesOperationSettings; + } + + /** Returns the builder for the settings used for calls to calculateCoverage. */ + public UnaryCallSettings.Builder + calculateCoverageSettings() { + return calculateCoverageSettings; + } + + /** Returns the builder for the settings used for calls to importTestCases. */ + public UnaryCallSettings.Builder importTestCasesSettings() { + return importTestCasesSettings; + } + + /** Returns the builder for the settings used for calls to importTestCases. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + ImportTestCasesRequest, ImportTestCasesResponse, ImportTestCasesMetadata> + importTestCasesOperationSettings() { + return importTestCasesOperationSettings; + } + + /** Returns the builder for the settings used for calls to exportTestCases. */ + public UnaryCallSettings.Builder exportTestCasesSettings() { + return exportTestCasesSettings; + } + + /** Returns the builder for the settings used for calls to exportTestCases. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + ExportTestCasesRequest, ExportTestCasesResponse, ExportTestCasesMetadata> + exportTestCasesOperationSettings() { + return exportTestCasesOperationSettings; + } + + /** Returns the builder for the settings used for calls to listTestCaseResults. */ + public PagedCallSettings.Builder< + ListTestCaseResultsRequest, + ListTestCaseResultsResponse, + ListTestCaseResultsPagedResponse> + listTestCaseResultsSettings() { + return listTestCaseResultsSettings; + } + + @Override + public TestCasesStubSettings build() throws IOException { + return new TestCasesStubSettings(this); + } + } +} diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/AgentsClientTest.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/AgentsClientTest.java index 262bea6e2..1e50c393f 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/AgentsClientTest.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/AgentsClientTest.java @@ -34,6 +34,7 @@ import com.google.protobuf.FieldMask; import io.grpc.StatusRuntimeException; import java.io.IOException; +import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.UUID; @@ -184,6 +185,9 @@ public void getAgentTest() throws Exception { .setAvatarUri("avatarUri-428646061") .setSpeechToTextSettings(SpeechToTextSettings.newBuilder().build()) .setStartFlow(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString()) + .setSecuritySettings( + SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]") + .toString()) .setEnableStackdriverLogging(true) .setEnableSpellCorrection(true) .build(); @@ -231,6 +235,9 @@ public void getAgentTest2() throws Exception { .setAvatarUri("avatarUri-428646061") .setSpeechToTextSettings(SpeechToTextSettings.newBuilder().build()) .setStartFlow(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString()) + .setSecuritySettings( + SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]") + .toString()) .setEnableStackdriverLogging(true) .setEnableSpellCorrection(true) .build(); @@ -278,6 +285,9 @@ public void createAgentTest() throws Exception { .setAvatarUri("avatarUri-428646061") .setSpeechToTextSettings(SpeechToTextSettings.newBuilder().build()) .setStartFlow(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString()) + .setSecuritySettings( + SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]") + .toString()) .setEnableStackdriverLogging(true) .setEnableSpellCorrection(true) .build(); @@ -328,6 +338,9 @@ public void createAgentTest2() throws Exception { .setAvatarUri("avatarUri-428646061") .setSpeechToTextSettings(SpeechToTextSettings.newBuilder().build()) .setStartFlow(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString()) + .setSecuritySettings( + SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]") + .toString()) .setEnableStackdriverLogging(true) .setEnableSpellCorrection(true) .build(); @@ -378,6 +391,9 @@ public void updateAgentTest() throws Exception { .setAvatarUri("avatarUri-428646061") .setSpeechToTextSettings(SpeechToTextSettings.newBuilder().build()) .setStartFlow(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString()) + .setSecuritySettings( + SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]") + .toString()) .setEnableStackdriverLogging(true) .setEnableSpellCorrection(true) .build(); @@ -585,4 +601,134 @@ public void restoreAgentExceptionTest() throws Exception { Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } + + @Test + public void validateAgentTest() throws Exception { + AgentValidationResult expectedResponse = + AgentValidationResult.newBuilder() + .setName(AgentValidationResultName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .addAllFlowValidationResults(new ArrayList()) + .build(); + mockAgents.addResponse(expectedResponse); + + ValidateAgentRequest request = + ValidateAgentRequest.newBuilder() + .setName(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setLanguageCode("languageCode-2092349083") + .build(); + + AgentValidationResult actualResponse = client.validateAgent(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAgents.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ValidateAgentRequest actualRequest = ((ValidateAgentRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getLanguageCode(), actualRequest.getLanguageCode()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void validateAgentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAgents.addException(exception); + + try { + ValidateAgentRequest request = + ValidateAgentRequest.newBuilder() + .setName(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setLanguageCode("languageCode-2092349083") + .build(); + client.validateAgent(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAgentValidationResultTest() throws Exception { + AgentValidationResult expectedResponse = + AgentValidationResult.newBuilder() + .setName(AgentValidationResultName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .addAllFlowValidationResults(new ArrayList()) + .build(); + mockAgents.addResponse(expectedResponse); + + AgentValidationResultName name = + AgentValidationResultName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + + AgentValidationResult actualResponse = client.getAgentValidationResult(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAgents.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAgentValidationResultRequest actualRequest = + ((GetAgentValidationResultRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAgentValidationResultExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAgents.addException(exception); + + try { + AgentValidationResultName name = + AgentValidationResultName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + client.getAgentValidationResult(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAgentValidationResultTest2() throws Exception { + AgentValidationResult expectedResponse = + AgentValidationResult.newBuilder() + .setName(AgentValidationResultName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .addAllFlowValidationResults(new ArrayList()) + .build(); + mockAgents.addResponse(expectedResponse); + + String name = "name3373707"; + + AgentValidationResult actualResponse = client.getAgentValidationResult(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAgents.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAgentValidationResultRequest actualRequest = + ((GetAgentValidationResultRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAgentValidationResultExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAgents.addException(exception); + + try { + String name = "name3373707"; + client.getAgentValidationResult(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } } diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/ExperimentsClientTest.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/ExperimentsClientTest.java deleted file mode 100644 index 2ec0fbdd4..000000000 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/ExperimentsClientTest.java +++ /dev/null @@ -1,721 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.dialogflow.cx.v3; - -import static com.google.cloud.dialogflow.cx.v3.ExperimentsClient.ListExperimentsPagedResponse; - -import com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.testing.LocalChannelProvider; -import com.google.api.gax.grpc.testing.MockGrpcService; -import com.google.api.gax.grpc.testing.MockServiceHelper; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.common.collect.Lists; -import com.google.protobuf.AbstractMessage; -import com.google.protobuf.Duration; -import com.google.protobuf.Empty; -import com.google.protobuf.FieldMask; -import com.google.protobuf.Timestamp; -import io.grpc.StatusRuntimeException; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import javax.annotation.Generated; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -@Generated("by gapic-generator-java") -public class ExperimentsClientTest { - private static MockExperiments mockExperiments; - private static MockServiceHelper mockServiceHelper; - private ExperimentsClient client; - private LocalChannelProvider channelProvider; - - @BeforeClass - public static void startStaticServer() { - mockExperiments = new MockExperiments(); - mockServiceHelper = - new MockServiceHelper( - UUID.randomUUID().toString(), Arrays.asList(mockExperiments)); - mockServiceHelper.start(); - } - - @AfterClass - public static void stopServer() { - mockServiceHelper.stop(); - } - - @Before - public void setUp() throws IOException { - mockServiceHelper.reset(); - channelProvider = mockServiceHelper.createChannelProvider(); - ExperimentsSettings settings = - ExperimentsSettings.newBuilder() - .setTransportChannelProvider(channelProvider) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = ExperimentsClient.create(settings); - } - - @After - public void tearDown() throws Exception { - client.close(); - } - - @Test - public void listExperimentsTest() throws Exception { - Experiment responsesElement = Experiment.newBuilder().build(); - ListExperimentsResponse expectedResponse = - ListExperimentsResponse.newBuilder() - .setNextPageToken("") - .addAllExperiments(Arrays.asList(responsesElement)) - .build(); - mockExperiments.addResponse(expectedResponse); - - EnvironmentName parent = - EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]"); - - ListExperimentsPagedResponse pagedListResponse = client.listExperiments(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getExperimentsList().get(0), resources.get(0)); - - List actualRequests = mockExperiments.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListExperimentsRequest actualRequest = ((ListExperimentsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listExperimentsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockExperiments.addException(exception); - - try { - EnvironmentName parent = - EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]"); - client.listExperiments(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listExperimentsTest2() throws Exception { - Experiment responsesElement = Experiment.newBuilder().build(); - ListExperimentsResponse expectedResponse = - ListExperimentsResponse.newBuilder() - .setNextPageToken("") - .addAllExperiments(Arrays.asList(responsesElement)) - .build(); - mockExperiments.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListExperimentsPagedResponse pagedListResponse = client.listExperiments(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getExperimentsList().get(0), resources.get(0)); - - List actualRequests = mockExperiments.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListExperimentsRequest actualRequest = ((ListExperimentsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listExperimentsExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockExperiments.addException(exception); - - try { - String parent = "parent-995424086"; - client.listExperiments(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getExperimentTest() throws Exception { - Experiment expectedResponse = - Experiment.newBuilder() - .setName( - ExperimentName.of( - "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setDefinition(Experiment.Definition.newBuilder().build()) - .setResult(Experiment.Result.newBuilder().build()) - .setCreateTime(Timestamp.newBuilder().build()) - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setLastUpdateTime(Timestamp.newBuilder().build()) - .setExperimentLength(Duration.newBuilder().build()) - .addAllVariantsHistory(new ArrayList()) - .build(); - mockExperiments.addResponse(expectedResponse); - - ExperimentName name = - ExperimentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]"); - - Experiment actualResponse = client.getExperiment(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockExperiments.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetExperimentRequest actualRequest = ((GetExperimentRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getExperimentExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockExperiments.addException(exception); - - try { - ExperimentName name = - ExperimentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]"); - client.getExperiment(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getExperimentTest2() throws Exception { - Experiment expectedResponse = - Experiment.newBuilder() - .setName( - ExperimentName.of( - "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setDefinition(Experiment.Definition.newBuilder().build()) - .setResult(Experiment.Result.newBuilder().build()) - .setCreateTime(Timestamp.newBuilder().build()) - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setLastUpdateTime(Timestamp.newBuilder().build()) - .setExperimentLength(Duration.newBuilder().build()) - .addAllVariantsHistory(new ArrayList()) - .build(); - mockExperiments.addResponse(expectedResponse); - - String name = "name3373707"; - - Experiment actualResponse = client.getExperiment(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockExperiments.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetExperimentRequest actualRequest = ((GetExperimentRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getExperimentExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockExperiments.addException(exception); - - try { - String name = "name3373707"; - client.getExperiment(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createExperimentTest() throws Exception { - Experiment expectedResponse = - Experiment.newBuilder() - .setName( - ExperimentName.of( - "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setDefinition(Experiment.Definition.newBuilder().build()) - .setResult(Experiment.Result.newBuilder().build()) - .setCreateTime(Timestamp.newBuilder().build()) - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setLastUpdateTime(Timestamp.newBuilder().build()) - .setExperimentLength(Duration.newBuilder().build()) - .addAllVariantsHistory(new ArrayList()) - .build(); - mockExperiments.addResponse(expectedResponse); - - EnvironmentName parent = - EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]"); - Experiment experiment = Experiment.newBuilder().build(); - - Experiment actualResponse = client.createExperiment(parent, experiment); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockExperiments.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateExperimentRequest actualRequest = ((CreateExperimentRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(experiment, actualRequest.getExperiment()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createExperimentExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockExperiments.addException(exception); - - try { - EnvironmentName parent = - EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]"); - Experiment experiment = Experiment.newBuilder().build(); - client.createExperiment(parent, experiment); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createExperimentTest2() throws Exception { - Experiment expectedResponse = - Experiment.newBuilder() - .setName( - ExperimentName.of( - "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setDefinition(Experiment.Definition.newBuilder().build()) - .setResult(Experiment.Result.newBuilder().build()) - .setCreateTime(Timestamp.newBuilder().build()) - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setLastUpdateTime(Timestamp.newBuilder().build()) - .setExperimentLength(Duration.newBuilder().build()) - .addAllVariantsHistory(new ArrayList()) - .build(); - mockExperiments.addResponse(expectedResponse); - - String parent = "parent-995424086"; - Experiment experiment = Experiment.newBuilder().build(); - - Experiment actualResponse = client.createExperiment(parent, experiment); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockExperiments.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateExperimentRequest actualRequest = ((CreateExperimentRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(experiment, actualRequest.getExperiment()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createExperimentExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockExperiments.addException(exception); - - try { - String parent = "parent-995424086"; - Experiment experiment = Experiment.newBuilder().build(); - client.createExperiment(parent, experiment); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateExperimentTest() throws Exception { - Experiment expectedResponse = - Experiment.newBuilder() - .setName( - ExperimentName.of( - "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setDefinition(Experiment.Definition.newBuilder().build()) - .setResult(Experiment.Result.newBuilder().build()) - .setCreateTime(Timestamp.newBuilder().build()) - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setLastUpdateTime(Timestamp.newBuilder().build()) - .setExperimentLength(Duration.newBuilder().build()) - .addAllVariantsHistory(new ArrayList()) - .build(); - mockExperiments.addResponse(expectedResponse); - - Experiment experiment = Experiment.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - Experiment actualResponse = client.updateExperiment(experiment, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockExperiments.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateExperimentRequest actualRequest = ((UpdateExperimentRequest) actualRequests.get(0)); - - Assert.assertEquals(experiment, actualRequest.getExperiment()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateExperimentExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockExperiments.addException(exception); - - try { - Experiment experiment = Experiment.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateExperiment(experiment, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteExperimentTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockExperiments.addResponse(expectedResponse); - - ExperimentName name = - ExperimentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]"); - - client.deleteExperiment(name); - - List actualRequests = mockExperiments.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteExperimentRequest actualRequest = ((DeleteExperimentRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteExperimentExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockExperiments.addException(exception); - - try { - ExperimentName name = - ExperimentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]"); - client.deleteExperiment(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteExperimentTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockExperiments.addResponse(expectedResponse); - - String name = "name3373707"; - - client.deleteExperiment(name); - - List actualRequests = mockExperiments.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteExperimentRequest actualRequest = ((DeleteExperimentRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteExperimentExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockExperiments.addException(exception); - - try { - String name = "name3373707"; - client.deleteExperiment(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void startExperimentTest() throws Exception { - Experiment expectedResponse = - Experiment.newBuilder() - .setName( - ExperimentName.of( - "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setDefinition(Experiment.Definition.newBuilder().build()) - .setResult(Experiment.Result.newBuilder().build()) - .setCreateTime(Timestamp.newBuilder().build()) - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setLastUpdateTime(Timestamp.newBuilder().build()) - .setExperimentLength(Duration.newBuilder().build()) - .addAllVariantsHistory(new ArrayList()) - .build(); - mockExperiments.addResponse(expectedResponse); - - ExperimentName name = - ExperimentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]"); - - Experiment actualResponse = client.startExperiment(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockExperiments.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - StartExperimentRequest actualRequest = ((StartExperimentRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void startExperimentExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockExperiments.addException(exception); - - try { - ExperimentName name = - ExperimentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]"); - client.startExperiment(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void startExperimentTest2() throws Exception { - Experiment expectedResponse = - Experiment.newBuilder() - .setName( - ExperimentName.of( - "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setDefinition(Experiment.Definition.newBuilder().build()) - .setResult(Experiment.Result.newBuilder().build()) - .setCreateTime(Timestamp.newBuilder().build()) - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setLastUpdateTime(Timestamp.newBuilder().build()) - .setExperimentLength(Duration.newBuilder().build()) - .addAllVariantsHistory(new ArrayList()) - .build(); - mockExperiments.addResponse(expectedResponse); - - String name = "name3373707"; - - Experiment actualResponse = client.startExperiment(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockExperiments.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - StartExperimentRequest actualRequest = ((StartExperimentRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void startExperimentExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockExperiments.addException(exception); - - try { - String name = "name3373707"; - client.startExperiment(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void stopExperimentTest() throws Exception { - Experiment expectedResponse = - Experiment.newBuilder() - .setName( - ExperimentName.of( - "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setDefinition(Experiment.Definition.newBuilder().build()) - .setResult(Experiment.Result.newBuilder().build()) - .setCreateTime(Timestamp.newBuilder().build()) - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setLastUpdateTime(Timestamp.newBuilder().build()) - .setExperimentLength(Duration.newBuilder().build()) - .addAllVariantsHistory(new ArrayList()) - .build(); - mockExperiments.addResponse(expectedResponse); - - ExperimentName name = - ExperimentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]"); - - Experiment actualResponse = client.stopExperiment(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockExperiments.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - StopExperimentRequest actualRequest = ((StopExperimentRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void stopExperimentExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockExperiments.addException(exception); - - try { - ExperimentName name = - ExperimentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]"); - client.stopExperiment(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void stopExperimentTest2() throws Exception { - Experiment expectedResponse = - Experiment.newBuilder() - .setName( - ExperimentName.of( - "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setDefinition(Experiment.Definition.newBuilder().build()) - .setResult(Experiment.Result.newBuilder().build()) - .setCreateTime(Timestamp.newBuilder().build()) - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setLastUpdateTime(Timestamp.newBuilder().build()) - .setExperimentLength(Duration.newBuilder().build()) - .addAllVariantsHistory(new ArrayList()) - .build(); - mockExperiments.addResponse(expectedResponse); - - String name = "name3373707"; - - Experiment actualResponse = client.stopExperiment(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockExperiments.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - StopExperimentRequest actualRequest = ((StopExperimentRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void stopExperimentExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockExperiments.addException(exception); - - try { - String name = "name3373707"; - client.stopExperiment(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } -} diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/FlowsClientTest.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/FlowsClientTest.java index 1e630dd95..3562ac0ec 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/FlowsClientTest.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/FlowsClientTest.java @@ -32,6 +32,7 @@ import com.google.protobuf.Any; import com.google.protobuf.Empty; import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; import io.grpc.StatusRuntimeException; import java.io.IOException; import java.util.ArrayList; @@ -548,4 +549,143 @@ public void trainFlowExceptionTest2() throws Exception { Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } + + @Test + public void validateFlowTest() throws Exception { + FlowValidationResult expectedResponse = + FlowValidationResult.newBuilder() + .setName( + FlowValidationResultName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]") + .toString()) + .addAllValidationMessages(new ArrayList()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockFlows.addResponse(expectedResponse); + + ValidateFlowRequest request = + ValidateFlowRequest.newBuilder() + .setName(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString()) + .setLanguageCode("languageCode-2092349083") + .build(); + + FlowValidationResult actualResponse = client.validateFlow(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockFlows.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ValidateFlowRequest actualRequest = ((ValidateFlowRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getLanguageCode(), actualRequest.getLanguageCode()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void validateFlowExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFlows.addException(exception); + + try { + ValidateFlowRequest request = + ValidateFlowRequest.newBuilder() + .setName(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString()) + .setLanguageCode("languageCode-2092349083") + .build(); + client.validateFlow(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getFlowValidationResultTest() throws Exception { + FlowValidationResult expectedResponse = + FlowValidationResult.newBuilder() + .setName( + FlowValidationResultName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]") + .toString()) + .addAllValidationMessages(new ArrayList()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockFlows.addResponse(expectedResponse); + + FlowValidationResultName name = + FlowValidationResultName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"); + + FlowValidationResult actualResponse = client.getFlowValidationResult(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockFlows.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetFlowValidationResultRequest actualRequest = + ((GetFlowValidationResultRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getFlowValidationResultExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFlows.addException(exception); + + try { + FlowValidationResultName name = + FlowValidationResultName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"); + client.getFlowValidationResult(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getFlowValidationResultTest2() throws Exception { + FlowValidationResult expectedResponse = + FlowValidationResult.newBuilder() + .setName( + FlowValidationResultName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]") + .toString()) + .addAllValidationMessages(new ArrayList()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockFlows.addResponse(expectedResponse); + + String name = "name3373707"; + + FlowValidationResult actualResponse = client.getFlowValidationResult(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockFlows.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetFlowValidationResultRequest actualRequest = + ((GetFlowValidationResultRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getFlowValidationResultExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFlows.addException(exception); + + try { + String name = "name3373707"; + client.getFlowValidationResult(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } } diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockAgentsImpl.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockAgentsImpl.java index 426b233e8..f4dffe7cf 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockAgentsImpl.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockAgentsImpl.java @@ -159,4 +159,35 @@ public void restoreAgent( responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } } + + @Override + public void validateAgent( + ValidateAgentRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof AgentValidationResult) { + requests.add(request); + responseObserver.onNext(((AgentValidationResult) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void getAgentValidationResult( + GetAgentValidationResultRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof AgentValidationResult) { + requests.add(request); + responseObserver.onNext(((AgentValidationResult) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } } diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockFlowsImpl.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockFlowsImpl.java index 766767054..680ccb1e2 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockFlowsImpl.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockFlowsImpl.java @@ -144,4 +144,35 @@ public void trainFlow(TrainFlowRequest request, StreamObserver respon responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } } + + @Override + public void validateFlow( + ValidateFlowRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof FlowValidationResult) { + requests.add(request); + responseObserver.onNext(((FlowValidationResult) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void getFlowValidationResult( + GetFlowValidationResultRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof FlowValidationResult) { + requests.add(request); + responseObserver.onNext(((FlowValidationResult) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } } diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockExperiments.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockTestCases.java similarity index 88% rename from google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockExperiments.java rename to google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockTestCases.java index 7de1a382d..d43a70c7c 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockExperiments.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockTestCases.java @@ -25,11 +25,11 @@ @BetaApi @Generated("by gapic-generator-java") -public class MockExperiments implements MockGrpcService { - private final MockExperimentsImpl serviceImpl; +public class MockTestCases implements MockGrpcService { + private final MockTestCasesImpl serviceImpl; - public MockExperiments() { - serviceImpl = new MockExperimentsImpl(); + public MockTestCases() { + serviceImpl = new MockTestCasesImpl(); } @Override diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockExperimentsImpl.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockTestCasesImpl.java similarity index 51% rename from google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockExperimentsImpl.java rename to google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockTestCasesImpl.java index e5b7570dc..8f68599b4 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockExperimentsImpl.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockTestCasesImpl.java @@ -17,7 +17,8 @@ package com.google.cloud.dialogflow.cx.v3; import com.google.api.core.BetaApi; -import com.google.cloud.dialogflow.cx.v3.ExperimentsGrpc.ExperimentsImplBase; +import com.google.cloud.dialogflow.cx.v3.TestCasesGrpc.TestCasesImplBase; +import com.google.longrunning.Operation; import com.google.protobuf.AbstractMessage; import com.google.protobuf.Empty; import io.grpc.stub.StreamObserver; @@ -29,11 +30,11 @@ @BetaApi @Generated("by gapic-generator-java") -public class MockExperimentsImpl extends ExperimentsImplBase { +public class MockTestCasesImpl extends TestCasesImplBase { private List requests; private Queue responses; - public MockExperimentsImpl() { + public MockTestCasesImpl() { requests = new ArrayList<>(); responses = new LinkedList<>(); } @@ -60,12 +61,12 @@ public void reset() { } @Override - public void listExperiments( - ListExperimentsRequest request, StreamObserver responseObserver) { + public void listTestCases( + ListTestCasesRequest request, StreamObserver responseObserver) { Object response = responses.remove(); - if (response instanceof ListExperimentsResponse) { + if (response instanceof ListTestCasesResponse) { requests.add(request); - responseObserver.onNext(((ListExperimentsResponse) response)); + responseObserver.onNext(((ListTestCasesResponse) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); @@ -75,12 +76,12 @@ public void listExperiments( } @Override - public void getExperiment( - GetExperimentRequest request, StreamObserver responseObserver) { + public void batchDeleteTestCases( + BatchDeleteTestCasesRequest request, StreamObserver responseObserver) { Object response = responses.remove(); - if (response instanceof Experiment) { + if (response instanceof Empty) { requests.add(request); - responseObserver.onNext(((Experiment) response)); + responseObserver.onNext(((Empty) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); @@ -90,12 +91,11 @@ public void getExperiment( } @Override - public void createExperiment( - CreateExperimentRequest request, StreamObserver responseObserver) { + public void getTestCase(GetTestCaseRequest request, StreamObserver responseObserver) { Object response = responses.remove(); - if (response instanceof Experiment) { + if (response instanceof TestCase) { requests.add(request); - responseObserver.onNext(((Experiment) response)); + responseObserver.onNext(((TestCase) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); @@ -105,12 +105,12 @@ public void createExperiment( } @Override - public void updateExperiment( - UpdateExperimentRequest request, StreamObserver responseObserver) { + public void createTestCase( + CreateTestCaseRequest request, StreamObserver responseObserver) { Object response = responses.remove(); - if (response instanceof Experiment) { + if (response instanceof TestCase) { requests.add(request); - responseObserver.onNext(((Experiment) response)); + responseObserver.onNext(((TestCase) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); @@ -120,12 +120,72 @@ public void updateExperiment( } @Override - public void deleteExperiment( - DeleteExperimentRequest request, StreamObserver responseObserver) { + public void updateTestCase( + UpdateTestCaseRequest request, StreamObserver responseObserver) { Object response = responses.remove(); - if (response instanceof Empty) { + if (response instanceof TestCase) { requests.add(request); - responseObserver.onNext(((Empty) response)); + responseObserver.onNext(((TestCase) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void runTestCase(RunTestCaseRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void batchRunTestCases( + BatchRunTestCasesRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void calculateCoverage( + CalculateCoverageRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof CalculateCoverageResponse) { + requests.add(request); + responseObserver.onNext(((CalculateCoverageResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void importTestCases( + ImportTestCasesRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); @@ -135,12 +195,12 @@ public void deleteExperiment( } @Override - public void startExperiment( - StartExperimentRequest request, StreamObserver responseObserver) { + public void exportTestCases( + ExportTestCasesRequest request, StreamObserver responseObserver) { Object response = responses.remove(); - if (response instanceof Experiment) { + if (response instanceof Operation) { requests.add(request); - responseObserver.onNext(((Experiment) response)); + responseObserver.onNext(((Operation) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); @@ -150,12 +210,13 @@ public void startExperiment( } @Override - public void stopExperiment( - StopExperimentRequest request, StreamObserver responseObserver) { + public void listTestCaseResults( + ListTestCaseResultsRequest request, + StreamObserver responseObserver) { Object response = responses.remove(); - if (response instanceof Experiment) { + if (response instanceof ListTestCaseResultsResponse) { requests.add(request); - responseObserver.onNext(((Experiment) response)); + responseObserver.onNext(((ListTestCaseResultsResponse) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/TestCasesClientTest.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/TestCasesClientTest.java new file mode 100644 index 000000000..832f4a545 --- /dev/null +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/TestCasesClientTest.java @@ -0,0 +1,852 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.cx.v3; + +import static com.google.cloud.dialogflow.cx.v3.TestCasesClient.ListTestCaseResultsPagedResponse; +import static com.google.cloud.dialogflow.cx.v3.TestCasesClient.ListTestCasesPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class TestCasesClientTest { + private static MockServiceHelper mockServiceHelper; + private TestCasesClient client; + private static MockTestCases mockTestCases; + private LocalChannelProvider channelProvider; + + @BeforeClass + public static void startStaticServer() { + mockTestCases = new MockTestCases(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockTestCases)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + TestCasesSettings settings = + TestCasesSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = TestCasesClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void listTestCasesTest() throws Exception { + TestCase responsesElement = TestCase.newBuilder().build(); + ListTestCasesResponse expectedResponse = + ListTestCasesResponse.newBuilder() + .setNextPageToken("") + .addAllTestCases(Arrays.asList(responsesElement)) + .build(); + mockTestCases.addResponse(expectedResponse); + + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + + ListTestCasesPagedResponse pagedListResponse = client.listTestCases(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getTestCasesList().get(0), resources.get(0)); + + List actualRequests = mockTestCases.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListTestCasesRequest actualRequest = ((ListTestCasesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listTestCasesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTestCases.addException(exception); + + try { + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + client.listTestCases(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listTestCasesTest2() throws Exception { + TestCase responsesElement = TestCase.newBuilder().build(); + ListTestCasesResponse expectedResponse = + ListTestCasesResponse.newBuilder() + .setNextPageToken("") + .addAllTestCases(Arrays.asList(responsesElement)) + .build(); + mockTestCases.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListTestCasesPagedResponse pagedListResponse = client.listTestCases(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getTestCasesList().get(0), resources.get(0)); + + List actualRequests = mockTestCases.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListTestCasesRequest actualRequest = ((ListTestCasesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listTestCasesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTestCases.addException(exception); + + try { + String parent = "parent-995424086"; + client.listTestCases(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void batchDeleteTestCasesTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockTestCases.addResponse(expectedResponse); + + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + + client.batchDeleteTestCases(parent); + + List actualRequests = mockTestCases.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchDeleteTestCasesRequest actualRequest = + ((BatchDeleteTestCasesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void batchDeleteTestCasesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTestCases.addException(exception); + + try { + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + client.batchDeleteTestCases(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void batchDeleteTestCasesTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockTestCases.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + client.batchDeleteTestCases(parent); + + List actualRequests = mockTestCases.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchDeleteTestCasesRequest actualRequest = + ((BatchDeleteTestCasesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void batchDeleteTestCasesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTestCases.addException(exception); + + try { + String parent = "parent-995424086"; + client.batchDeleteTestCases(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getTestCaseTest() throws Exception { + TestCase expectedResponse = + TestCase.newBuilder() + .setName( + TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString()) + .addAllTags(new ArrayList()) + .setDisplayName("displayName1714148973") + .setNotes("notes105008833") + .setTestConfig(TestConfig.newBuilder().build()) + .addAllTestCaseConversationTurns(new ArrayList()) + .setCreationTime(Timestamp.newBuilder().build()) + .setLastTestResult(TestCaseResult.newBuilder().build()) + .build(); + mockTestCases.addResponse(expectedResponse); + + TestCaseName name = TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]"); + + TestCase actualResponse = client.getTestCase(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTestCases.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetTestCaseRequest actualRequest = ((GetTestCaseRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getTestCaseExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTestCases.addException(exception); + + try { + TestCaseName name = TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]"); + client.getTestCase(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getTestCaseTest2() throws Exception { + TestCase expectedResponse = + TestCase.newBuilder() + .setName( + TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString()) + .addAllTags(new ArrayList()) + .setDisplayName("displayName1714148973") + .setNotes("notes105008833") + .setTestConfig(TestConfig.newBuilder().build()) + .addAllTestCaseConversationTurns(new ArrayList()) + .setCreationTime(Timestamp.newBuilder().build()) + .setLastTestResult(TestCaseResult.newBuilder().build()) + .build(); + mockTestCases.addResponse(expectedResponse); + + String name = "name3373707"; + + TestCase actualResponse = client.getTestCase(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTestCases.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetTestCaseRequest actualRequest = ((GetTestCaseRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getTestCaseExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTestCases.addException(exception); + + try { + String name = "name3373707"; + client.getTestCase(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createTestCaseTest() throws Exception { + TestCase expectedResponse = + TestCase.newBuilder() + .setName( + TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString()) + .addAllTags(new ArrayList()) + .setDisplayName("displayName1714148973") + .setNotes("notes105008833") + .setTestConfig(TestConfig.newBuilder().build()) + .addAllTestCaseConversationTurns(new ArrayList()) + .setCreationTime(Timestamp.newBuilder().build()) + .setLastTestResult(TestCaseResult.newBuilder().build()) + .build(); + mockTestCases.addResponse(expectedResponse); + + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + TestCase testCase = TestCase.newBuilder().build(); + + TestCase actualResponse = client.createTestCase(parent, testCase); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTestCases.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateTestCaseRequest actualRequest = ((CreateTestCaseRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(testCase, actualRequest.getTestCase()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createTestCaseExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTestCases.addException(exception); + + try { + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + TestCase testCase = TestCase.newBuilder().build(); + client.createTestCase(parent, testCase); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createTestCaseTest2() throws Exception { + TestCase expectedResponse = + TestCase.newBuilder() + .setName( + TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString()) + .addAllTags(new ArrayList()) + .setDisplayName("displayName1714148973") + .setNotes("notes105008833") + .setTestConfig(TestConfig.newBuilder().build()) + .addAllTestCaseConversationTurns(new ArrayList()) + .setCreationTime(Timestamp.newBuilder().build()) + .setLastTestResult(TestCaseResult.newBuilder().build()) + .build(); + mockTestCases.addResponse(expectedResponse); + + String parent = "parent-995424086"; + TestCase testCase = TestCase.newBuilder().build(); + + TestCase actualResponse = client.createTestCase(parent, testCase); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTestCases.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateTestCaseRequest actualRequest = ((CreateTestCaseRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(testCase, actualRequest.getTestCase()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createTestCaseExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTestCases.addException(exception); + + try { + String parent = "parent-995424086"; + TestCase testCase = TestCase.newBuilder().build(); + client.createTestCase(parent, testCase); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateTestCaseTest() throws Exception { + TestCase expectedResponse = + TestCase.newBuilder() + .setName( + TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString()) + .addAllTags(new ArrayList()) + .setDisplayName("displayName1714148973") + .setNotes("notes105008833") + .setTestConfig(TestConfig.newBuilder().build()) + .addAllTestCaseConversationTurns(new ArrayList()) + .setCreationTime(Timestamp.newBuilder().build()) + .setLastTestResult(TestCaseResult.newBuilder().build()) + .build(); + mockTestCases.addResponse(expectedResponse); + + TestCase testCase = TestCase.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + TestCase actualResponse = client.updateTestCase(testCase, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTestCases.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateTestCaseRequest actualRequest = ((UpdateTestCaseRequest) actualRequests.get(0)); + + Assert.assertEquals(testCase, actualRequest.getTestCase()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateTestCaseExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTestCases.addException(exception); + + try { + TestCase testCase = TestCase.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateTestCase(testCase, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void runTestCaseTest() throws Exception { + RunTestCaseResponse expectedResponse = + RunTestCaseResponse.newBuilder().setResult(TestCaseResult.newBuilder().build()).build(); + Operation resultOperation = + Operation.newBuilder() + .setName("runTestCaseTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockTestCases.addResponse(resultOperation); + + RunTestCaseRequest request = + RunTestCaseRequest.newBuilder() + .setName( + TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString()) + .setEnvironment( + EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]") + .toString()) + .build(); + + RunTestCaseResponse actualResponse = client.runTestCaseAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTestCases.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RunTestCaseRequest actualRequest = ((RunTestCaseRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getEnvironment(), actualRequest.getEnvironment()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void runTestCaseExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTestCases.addException(exception); + + try { + RunTestCaseRequest request = + RunTestCaseRequest.newBuilder() + .setName( + TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString()) + .setEnvironment( + EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]") + .toString()) + .build(); + client.runTestCaseAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void batchRunTestCasesTest() throws Exception { + BatchRunTestCasesResponse expectedResponse = + BatchRunTestCasesResponse.newBuilder() + .addAllResults(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("batchRunTestCasesTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockTestCases.addResponse(resultOperation); + + BatchRunTestCasesRequest request = + BatchRunTestCasesRequest.newBuilder() + .setParent( + TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString()) + .setEnvironment( + EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]") + .toString()) + .addAllTestCases(new ArrayList()) + .build(); + + BatchRunTestCasesResponse actualResponse = client.batchRunTestCasesAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTestCases.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchRunTestCasesRequest actualRequest = ((BatchRunTestCasesRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getEnvironment(), actualRequest.getEnvironment()); + Assert.assertEquals(request.getTestCasesList(), actualRequest.getTestCasesList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void batchRunTestCasesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTestCases.addException(exception); + + try { + BatchRunTestCasesRequest request = + BatchRunTestCasesRequest.newBuilder() + .setParent( + TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString()) + .setEnvironment( + EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]") + .toString()) + .addAllTestCases(new ArrayList()) + .build(); + client.batchRunTestCasesAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void calculateCoverageTest() throws Exception { + CalculateCoverageResponse expectedResponse = + CalculateCoverageResponse.newBuilder() + .setAgent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .build(); + mockTestCases.addResponse(expectedResponse); + + CalculateCoverageRequest request = + CalculateCoverageRequest.newBuilder() + .setAgent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .build(); + + CalculateCoverageResponse actualResponse = client.calculateCoverage(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTestCases.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CalculateCoverageRequest actualRequest = ((CalculateCoverageRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getAgent(), actualRequest.getAgent()); + Assert.assertEquals(request.getType(), actualRequest.getType()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void calculateCoverageExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTestCases.addException(exception); + + try { + CalculateCoverageRequest request = + CalculateCoverageRequest.newBuilder() + .setAgent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .build(); + client.calculateCoverage(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void importTestCasesTest() throws Exception { + ImportTestCasesResponse expectedResponse = + ImportTestCasesResponse.newBuilder().addAllNames(new ArrayList()).build(); + Operation resultOperation = + Operation.newBuilder() + .setName("importTestCasesTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockTestCases.addResponse(resultOperation); + + ImportTestCasesRequest request = + ImportTestCasesRequest.newBuilder() + .setParent( + TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString()) + .build(); + + ImportTestCasesResponse actualResponse = client.importTestCasesAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTestCases.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ImportTestCasesRequest actualRequest = ((ImportTestCasesRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getGcsUri(), actualRequest.getGcsUri()); + Assert.assertEquals(request.getContent(), actualRequest.getContent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void importTestCasesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTestCases.addException(exception); + + try { + ImportTestCasesRequest request = + ImportTestCasesRequest.newBuilder() + .setParent( + TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString()) + .build(); + client.importTestCasesAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void exportTestCasesTest() throws Exception { + ExportTestCasesResponse expectedResponse = ExportTestCasesResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("exportTestCasesTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockTestCases.addResponse(resultOperation); + + ExportTestCasesRequest request = + ExportTestCasesRequest.newBuilder() + .setParent( + TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString()) + .setFilter("filter-1274492040") + .build(); + + ExportTestCasesResponse actualResponse = client.exportTestCasesAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTestCases.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ExportTestCasesRequest actualRequest = ((ExportTestCasesRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getGcsUri(), actualRequest.getGcsUri()); + Assert.assertEquals(request.getDataFormat(), actualRequest.getDataFormat()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void exportTestCasesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTestCases.addException(exception); + + try { + ExportTestCasesRequest request = + ExportTestCasesRequest.newBuilder() + .setParent( + TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString()) + .setFilter("filter-1274492040") + .build(); + client.exportTestCasesAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void listTestCaseResultsTest() throws Exception { + TestCaseResult responsesElement = TestCaseResult.newBuilder().build(); + ListTestCaseResultsResponse expectedResponse = + ListTestCaseResultsResponse.newBuilder() + .setNextPageToken("") + .addAllTestCaseResults(Arrays.asList(responsesElement)) + .build(); + mockTestCases.addResponse(expectedResponse); + + TestCaseName parent = TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]"); + + ListTestCaseResultsPagedResponse pagedListResponse = client.listTestCaseResults(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getTestCaseResultsList().get(0), resources.get(0)); + + List actualRequests = mockTestCases.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListTestCaseResultsRequest actualRequest = ((ListTestCaseResultsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listTestCaseResultsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTestCases.addException(exception); + + try { + TestCaseName parent = TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]"); + client.listTestCaseResults(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listTestCaseResultsTest2() throws Exception { + TestCaseResult responsesElement = TestCaseResult.newBuilder().build(); + ListTestCaseResultsResponse expectedResponse = + ListTestCaseResultsResponse.newBuilder() + .setNextPageToken("") + .addAllTestCaseResults(Arrays.asList(responsesElement)) + .build(); + mockTestCases.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListTestCaseResultsPagedResponse pagedListResponse = client.listTestCaseResults(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getTestCaseResultsList().get(0), resources.get(0)); + + List actualRequests = mockTestCases.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListTestCaseResultsRequest actualRequest = ((ListTestCaseResultsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listTestCaseResultsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTestCases.addException(exception); + + try { + String parent = "parent-995424086"; + client.listTestCaseResults(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentsGrpc.java b/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentsGrpc.java index 9bbccdfbf..501000f22 100644 --- a/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentsGrpc.java +++ b/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentsGrpc.java @@ -346,6 +346,102 @@ private AgentsGrpc() {} return getRestoreAgentMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.ValidateAgentRequest, + com.google.cloud.dialogflow.cx.v3.AgentValidationResult> + getValidateAgentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ValidateAgent", + requestType = com.google.cloud.dialogflow.cx.v3.ValidateAgentRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3.AgentValidationResult.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.ValidateAgentRequest, + com.google.cloud.dialogflow.cx.v3.AgentValidationResult> + getValidateAgentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.ValidateAgentRequest, + com.google.cloud.dialogflow.cx.v3.AgentValidationResult> + getValidateAgentMethod; + if ((getValidateAgentMethod = AgentsGrpc.getValidateAgentMethod) == null) { + synchronized (AgentsGrpc.class) { + if ((getValidateAgentMethod = AgentsGrpc.getValidateAgentMethod) == null) { + AgentsGrpc.getValidateAgentMethod = + getValidateAgentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ValidateAgent")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.ValidateAgentRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.AgentValidationResult + .getDefaultInstance())) + .setSchemaDescriptor(new AgentsMethodDescriptorSupplier("ValidateAgent")) + .build(); + } + } + } + return getValidateAgentMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest, + com.google.cloud.dialogflow.cx.v3.AgentValidationResult> + getGetAgentValidationResultMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetAgentValidationResult", + requestType = com.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3.AgentValidationResult.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest, + com.google.cloud.dialogflow.cx.v3.AgentValidationResult> + getGetAgentValidationResultMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest, + com.google.cloud.dialogflow.cx.v3.AgentValidationResult> + getGetAgentValidationResultMethod; + if ((getGetAgentValidationResultMethod = AgentsGrpc.getGetAgentValidationResultMethod) + == null) { + synchronized (AgentsGrpc.class) { + if ((getGetAgentValidationResultMethod = AgentsGrpc.getGetAgentValidationResultMethod) + == null) { + AgentsGrpc.getGetAgentValidationResultMethod = + getGetAgentValidationResultMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetAgentValidationResult")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.AgentValidationResult + .getDefaultInstance())) + .setSchemaDescriptor( + new AgentsMethodDescriptorSupplier("GetAgentValidationResult")) + .build(); + } + } + } + return getGetAgentValidationResultMethod; + } + /** Creates a new async stub that supports all call types for the service */ public static AgentsStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = @@ -489,6 +585,37 @@ public void restoreAgent( asyncUnimplementedUnaryCall(getRestoreAgentMethod(), responseObserver); } + /** + * + * + *
+     * 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.
+     * 
+ */ + public void validateAgent( + com.google.cloud.dialogflow.cx.v3.ValidateAgentRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getValidateAgentMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets the latest agent validation result. Agent validation is performed
+     * when ValidateAgent is called.
+     * 
+ */ + public void getAgentValidationResult( + com.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getGetAgentValidationResultMethod(), responseObserver); + } + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) @@ -535,6 +662,20 @@ public final io.grpc.ServerServiceDefinition bindService() { new MethodHandlers< com.google.cloud.dialogflow.cx.v3.RestoreAgentRequest, com.google.longrunning.Operation>(this, METHODID_RESTORE_AGENT))) + .addMethod( + getValidateAgentMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3.ValidateAgentRequest, + com.google.cloud.dialogflow.cx.v3.AgentValidationResult>( + this, METHODID_VALIDATE_AGENT))) + .addMethod( + getGetAgentValidationResultMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest, + com.google.cloud.dialogflow.cx.v3.AgentValidationResult>( + this, METHODID_GET_AGENT_VALIDATION_RESULT))) .build(); } } @@ -666,6 +807,43 @@ public void restoreAgent( request, responseObserver); } + + /** + * + * + *
+     * 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.
+     * 
+ */ + public void validateAgent( + com.google.cloud.dialogflow.cx.v3.ValidateAgentRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getValidateAgentMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets the latest agent validation result. Agent validation is performed
+     * when ValidateAgent is called.
+     * 
+ */ + public void getAgentValidationResult( + com.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetAgentValidationResultMethod(), getCallOptions()), + request, + responseObserver); + } } /** @@ -771,6 +949,34 @@ public com.google.longrunning.Operation restoreAgent( com.google.cloud.dialogflow.cx.v3.RestoreAgentRequest request) { return blockingUnaryCall(getChannel(), getRestoreAgentMethod(), getCallOptions(), request); } + + /** + * + * + *
+     * 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.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.AgentValidationResult validateAgent( + com.google.cloud.dialogflow.cx.v3.ValidateAgentRequest request) { + return blockingUnaryCall(getChannel(), getValidateAgentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets the latest agent validation result. Agent validation is performed
+     * when ValidateAgent is called.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.AgentValidationResult getAgentValidationResult( + com.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest request) { + return blockingUnaryCall( + getChannel(), getGetAgentValidationResultMethod(), getCallOptions(), request); + } } /** @@ -886,6 +1092,38 @@ protected AgentsFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions ca return futureUnaryCall( getChannel().newCall(getRestoreAgentMethod(), getCallOptions()), request); } + + /** + * + * + *
+     * 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.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3.AgentValidationResult> + validateAgent(com.google.cloud.dialogflow.cx.v3.ValidateAgentRequest request) { + return futureUnaryCall( + getChannel().newCall(getValidateAgentMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets the latest agent validation result. Agent validation is performed
+     * when ValidateAgent is called.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3.AgentValidationResult> + getAgentValidationResult( + com.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetAgentValidationResultMethod(), getCallOptions()), request); + } } private static final int METHODID_LIST_AGENTS = 0; @@ -895,6 +1133,8 @@ protected AgentsFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions ca private static final int METHODID_DELETE_AGENT = 4; private static final int METHODID_EXPORT_AGENT = 5; private static final int METHODID_RESTORE_AGENT = 6; + private static final int METHODID_VALIDATE_AGENT = 7; + private static final int METHODID_GET_AGENT_VALIDATION_RESULT = 8; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -952,6 +1192,18 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.cloud.dialogflow.cx.v3.RestoreAgentRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_VALIDATE_AGENT: + serviceImpl.validateAgent( + (com.google.cloud.dialogflow.cx.v3.ValidateAgentRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_AGENT_VALIDATION_RESULT: + serviceImpl.getAgentValidationResult( + (com.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; default: throw new AssertionError(); } @@ -1021,6 +1273,8 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getDeleteAgentMethod()) .addMethod(getExportAgentMethod()) .addMethod(getRestoreAgentMethod()) + .addMethod(getValidateAgentMethod()) + .addMethod(getGetAgentValidationResultMethod()) .build(); } } diff --git a/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentsGrpc.java b/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentsGrpc.java deleted file mode 100644 index 2f08892f8..000000000 --- a/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentsGrpc.java +++ /dev/null @@ -1,1074 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.google.cloud.dialogflow.cx.v3; - -import static io.grpc.MethodDescriptor.generateFullMethodName; -import static io.grpc.stub.ClientCalls.asyncUnaryCall; -import static io.grpc.stub.ClientCalls.blockingUnaryCall; -import static io.grpc.stub.ClientCalls.futureUnaryCall; -import static io.grpc.stub.ServerCalls.asyncUnaryCall; -import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; - -/** - * - * - *
- * Service for managing [Experiments][google.cloud.dialogflow.cx.v3.Experiment].
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/cloud/dialogflow/cx/v3/experiment.proto") -public final class ExperimentsGrpc { - - private ExperimentsGrpc() {} - - public static final String SERVICE_NAME = "google.cloud.dialogflow.cx.v3.Experiments"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest, - com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse> - getListExperimentsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListExperiments", - requestType = com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest.class, - responseType = com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest, - com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse> - getListExperimentsMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest, - com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse> - getListExperimentsMethod; - if ((getListExperimentsMethod = ExperimentsGrpc.getListExperimentsMethod) == null) { - synchronized (ExperimentsGrpc.class) { - if ((getListExperimentsMethod = ExperimentsGrpc.getListExperimentsMethod) == null) { - ExperimentsGrpc.getListExperimentsMethod = - getListExperimentsMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListExperiments")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new ExperimentsMethodDescriptorSupplier("ListExperiments")) - .build(); - } - } - } - return getListExperimentsMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dialogflow.cx.v3.GetExperimentRequest, - com.google.cloud.dialogflow.cx.v3.Experiment> - getGetExperimentMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetExperiment", - requestType = com.google.cloud.dialogflow.cx.v3.GetExperimentRequest.class, - responseType = com.google.cloud.dialogflow.cx.v3.Experiment.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dialogflow.cx.v3.GetExperimentRequest, - com.google.cloud.dialogflow.cx.v3.Experiment> - getGetExperimentMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dialogflow.cx.v3.GetExperimentRequest, - com.google.cloud.dialogflow.cx.v3.Experiment> - getGetExperimentMethod; - if ((getGetExperimentMethod = ExperimentsGrpc.getGetExperimentMethod) == null) { - synchronized (ExperimentsGrpc.class) { - if ((getGetExperimentMethod = ExperimentsGrpc.getGetExperimentMethod) == null) { - ExperimentsGrpc.getGetExperimentMethod = - getGetExperimentMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetExperiment")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dialogflow.cx.v3.GetExperimentRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dialogflow.cx.v3.Experiment.getDefaultInstance())) - .setSchemaDescriptor(new ExperimentsMethodDescriptorSupplier("GetExperiment")) - .build(); - } - } - } - return getGetExperimentMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest, - com.google.cloud.dialogflow.cx.v3.Experiment> - getCreateExperimentMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateExperiment", - requestType = com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest.class, - responseType = com.google.cloud.dialogflow.cx.v3.Experiment.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest, - com.google.cloud.dialogflow.cx.v3.Experiment> - getCreateExperimentMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest, - com.google.cloud.dialogflow.cx.v3.Experiment> - getCreateExperimentMethod; - if ((getCreateExperimentMethod = ExperimentsGrpc.getCreateExperimentMethod) == null) { - synchronized (ExperimentsGrpc.class) { - if ((getCreateExperimentMethod = ExperimentsGrpc.getCreateExperimentMethod) == null) { - ExperimentsGrpc.getCreateExperimentMethod = - getCreateExperimentMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateExperiment")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dialogflow.cx.v3.Experiment.getDefaultInstance())) - .setSchemaDescriptor( - new ExperimentsMethodDescriptorSupplier("CreateExperiment")) - .build(); - } - } - } - return getCreateExperimentMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest, - com.google.cloud.dialogflow.cx.v3.Experiment> - getUpdateExperimentMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateExperiment", - requestType = com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest.class, - responseType = com.google.cloud.dialogflow.cx.v3.Experiment.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest, - com.google.cloud.dialogflow.cx.v3.Experiment> - getUpdateExperimentMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest, - com.google.cloud.dialogflow.cx.v3.Experiment> - getUpdateExperimentMethod; - if ((getUpdateExperimentMethod = ExperimentsGrpc.getUpdateExperimentMethod) == null) { - synchronized (ExperimentsGrpc.class) { - if ((getUpdateExperimentMethod = ExperimentsGrpc.getUpdateExperimentMethod) == null) { - ExperimentsGrpc.getUpdateExperimentMethod = - getUpdateExperimentMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateExperiment")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dialogflow.cx.v3.Experiment.getDefaultInstance())) - .setSchemaDescriptor( - new ExperimentsMethodDescriptorSupplier("UpdateExperiment")) - .build(); - } - } - } - return getUpdateExperimentMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest, com.google.protobuf.Empty> - getDeleteExperimentMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteExperiment", - requestType = com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest.class, - responseType = com.google.protobuf.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest, com.google.protobuf.Empty> - getDeleteExperimentMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest, com.google.protobuf.Empty> - getDeleteExperimentMethod; - if ((getDeleteExperimentMethod = ExperimentsGrpc.getDeleteExperimentMethod) == null) { - synchronized (ExperimentsGrpc.class) { - if ((getDeleteExperimentMethod = ExperimentsGrpc.getDeleteExperimentMethod) == null) { - ExperimentsGrpc.getDeleteExperimentMethod = - getDeleteExperimentMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteExperiment")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protobuf.Empty.getDefaultInstance())) - .setSchemaDescriptor( - new ExperimentsMethodDescriptorSupplier("DeleteExperiment")) - .build(); - } - } - } - return getDeleteExperimentMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dialogflow.cx.v3.StartExperimentRequest, - com.google.cloud.dialogflow.cx.v3.Experiment> - getStartExperimentMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "StartExperiment", - requestType = com.google.cloud.dialogflow.cx.v3.StartExperimentRequest.class, - responseType = com.google.cloud.dialogflow.cx.v3.Experiment.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dialogflow.cx.v3.StartExperimentRequest, - com.google.cloud.dialogflow.cx.v3.Experiment> - getStartExperimentMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dialogflow.cx.v3.StartExperimentRequest, - com.google.cloud.dialogflow.cx.v3.Experiment> - getStartExperimentMethod; - if ((getStartExperimentMethod = ExperimentsGrpc.getStartExperimentMethod) == null) { - synchronized (ExperimentsGrpc.class) { - if ((getStartExperimentMethod = ExperimentsGrpc.getStartExperimentMethod) == null) { - ExperimentsGrpc.getStartExperimentMethod = - getStartExperimentMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "StartExperiment")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dialogflow.cx.v3.StartExperimentRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dialogflow.cx.v3.Experiment.getDefaultInstance())) - .setSchemaDescriptor( - new ExperimentsMethodDescriptorSupplier("StartExperiment")) - .build(); - } - } - } - return getStartExperimentMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dialogflow.cx.v3.StopExperimentRequest, - com.google.cloud.dialogflow.cx.v3.Experiment> - getStopExperimentMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "StopExperiment", - requestType = com.google.cloud.dialogflow.cx.v3.StopExperimentRequest.class, - responseType = com.google.cloud.dialogflow.cx.v3.Experiment.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dialogflow.cx.v3.StopExperimentRequest, - com.google.cloud.dialogflow.cx.v3.Experiment> - getStopExperimentMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dialogflow.cx.v3.StopExperimentRequest, - com.google.cloud.dialogflow.cx.v3.Experiment> - getStopExperimentMethod; - if ((getStopExperimentMethod = ExperimentsGrpc.getStopExperimentMethod) == null) { - synchronized (ExperimentsGrpc.class) { - if ((getStopExperimentMethod = ExperimentsGrpc.getStopExperimentMethod) == null) { - ExperimentsGrpc.getStopExperimentMethod = - getStopExperimentMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "StopExperiment")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dialogflow.cx.v3.StopExperimentRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dialogflow.cx.v3.Experiment.getDefaultInstance())) - .setSchemaDescriptor( - new ExperimentsMethodDescriptorSupplier("StopExperiment")) - .build(); - } - } - } - return getStopExperimentMethod; - } - - /** Creates a new async stub that supports all call types for the service */ - public static ExperimentsStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public ExperimentsStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ExperimentsStub(channel, callOptions); - } - }; - return ExperimentsStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static ExperimentsBlockingStub newBlockingStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public ExperimentsBlockingStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ExperimentsBlockingStub(channel, callOptions); - } - }; - return ExperimentsBlockingStub.newStub(factory, channel); - } - - /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ - public static ExperimentsFutureStub newFutureStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public ExperimentsFutureStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ExperimentsFutureStub(channel, callOptions); - } - }; - return ExperimentsFutureStub.newStub(factory, channel); - } - - /** - * - * - *
-   * Service for managing [Experiments][google.cloud.dialogflow.cx.v3.Experiment].
-   * 
- */ - public abstract static class ExperimentsImplBase implements io.grpc.BindableService { - - /** - * - * - *
-     * Returns the list of all experiments in the specified [Environment][google.cloud.dialogflow.cx.v3.Environment].
-     * 
- */ - public void listExperiments( - com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnimplementedUnaryCall(getListExperimentsMethod(), responseObserver); - } - - /** - * - * - *
-     * Retrieves the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment].
-     * 
- */ - public void getExperiment( - com.google.cloud.dialogflow.cx.v3.GetExperimentRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnimplementedUnaryCall(getGetExperimentMethod(), responseObserver); - } - - /** - * - * - *
-     * Creates an [Experiment][google.cloud.dialogflow.cx.v3.Experiment] in the specified [Environment][google.cloud.dialogflow.cx.v3.Environment].
-     * 
- */ - public void createExperiment( - com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnimplementedUnaryCall(getCreateExperimentMethod(), responseObserver); - } - - /** - * - * - *
-     * Updates the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment].
-     * 
- */ - public void updateExperiment( - com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnimplementedUnaryCall(getUpdateExperimentMethod(), responseObserver); - } - - /** - * - * - *
-     * Deletes the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment].
-     * 
- */ - public void deleteExperiment( - com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getDeleteExperimentMethod(), responseObserver); - } - - /** - * - * - *
-     * Starts the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. This rpc only changes the state of
-     * experiment from PENDING to RUNNING.
-     * 
- */ - public void startExperiment( - com.google.cloud.dialogflow.cx.v3.StartExperimentRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnimplementedUnaryCall(getStartExperimentMethod(), responseObserver); - } - - /** - * - * - *
-     * Stops the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. This rpc only changes the state of
-     * experiment from RUNNING to DONE.
-     * 
- */ - public void stopExperiment( - com.google.cloud.dialogflow.cx.v3.StopExperimentRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnimplementedUnaryCall(getStopExperimentMethod(), responseObserver); - } - - @java.lang.Override - public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getListExperimentsMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest, - com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse>( - this, METHODID_LIST_EXPERIMENTS))) - .addMethod( - getGetExperimentMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dialogflow.cx.v3.GetExperimentRequest, - com.google.cloud.dialogflow.cx.v3.Experiment>(this, METHODID_GET_EXPERIMENT))) - .addMethod( - getCreateExperimentMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest, - com.google.cloud.dialogflow.cx.v3.Experiment>( - this, METHODID_CREATE_EXPERIMENT))) - .addMethod( - getUpdateExperimentMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest, - com.google.cloud.dialogflow.cx.v3.Experiment>( - this, METHODID_UPDATE_EXPERIMENT))) - .addMethod( - getDeleteExperimentMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest, - com.google.protobuf.Empty>(this, METHODID_DELETE_EXPERIMENT))) - .addMethod( - getStartExperimentMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dialogflow.cx.v3.StartExperimentRequest, - com.google.cloud.dialogflow.cx.v3.Experiment>( - this, METHODID_START_EXPERIMENT))) - .addMethod( - getStopExperimentMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dialogflow.cx.v3.StopExperimentRequest, - com.google.cloud.dialogflow.cx.v3.Experiment>( - this, METHODID_STOP_EXPERIMENT))) - .build(); - } - } - - /** - * - * - *
-   * Service for managing [Experiments][google.cloud.dialogflow.cx.v3.Experiment].
-   * 
- */ - public static final class ExperimentsStub - extends io.grpc.stub.AbstractAsyncStub { - private ExperimentsStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected ExperimentsStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ExperimentsStub(channel, callOptions); - } - - /** - * - * - *
-     * Returns the list of all experiments in the specified [Environment][google.cloud.dialogflow.cx.v3.Environment].
-     * 
- */ - public void listExperiments( - com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnaryCall( - getChannel().newCall(getListExperimentsMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Retrieves the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment].
-     * 
- */ - public void getExperiment( - com.google.cloud.dialogflow.cx.v3.GetExperimentRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnaryCall( - getChannel().newCall(getGetExperimentMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Creates an [Experiment][google.cloud.dialogflow.cx.v3.Experiment] in the specified [Environment][google.cloud.dialogflow.cx.v3.Environment].
-     * 
- */ - public void createExperiment( - com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnaryCall( - getChannel().newCall(getCreateExperimentMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Updates the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment].
-     * 
- */ - public void updateExperiment( - com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnaryCall( - getChannel().newCall(getUpdateExperimentMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Deletes the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment].
-     * 
- */ - public void deleteExperiment( - com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( - getChannel().newCall(getDeleteExperimentMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Starts the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. This rpc only changes the state of
-     * experiment from PENDING to RUNNING.
-     * 
- */ - public void startExperiment( - com.google.cloud.dialogflow.cx.v3.StartExperimentRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnaryCall( - getChannel().newCall(getStartExperimentMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Stops the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. This rpc only changes the state of
-     * experiment from RUNNING to DONE.
-     * 
- */ - public void stopExperiment( - com.google.cloud.dialogflow.cx.v3.StopExperimentRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnaryCall( - getChannel().newCall(getStopExperimentMethod(), getCallOptions()), - request, - responseObserver); - } - } - - /** - * - * - *
-   * Service for managing [Experiments][google.cloud.dialogflow.cx.v3.Experiment].
-   * 
- */ - public static final class ExperimentsBlockingStub - extends io.grpc.stub.AbstractBlockingStub { - private ExperimentsBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected ExperimentsBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ExperimentsBlockingStub(channel, callOptions); - } - - /** - * - * - *
-     * Returns the list of all experiments in the specified [Environment][google.cloud.dialogflow.cx.v3.Environment].
-     * 
- */ - public com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse listExperiments( - com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest request) { - return blockingUnaryCall(getChannel(), getListExperimentsMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Retrieves the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment].
-     * 
- */ - public com.google.cloud.dialogflow.cx.v3.Experiment getExperiment( - com.google.cloud.dialogflow.cx.v3.GetExperimentRequest request) { - return blockingUnaryCall(getChannel(), getGetExperimentMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Creates an [Experiment][google.cloud.dialogflow.cx.v3.Experiment] in the specified [Environment][google.cloud.dialogflow.cx.v3.Environment].
-     * 
- */ - public com.google.cloud.dialogflow.cx.v3.Experiment createExperiment( - com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest request) { - return blockingUnaryCall( - getChannel(), getCreateExperimentMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Updates the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment].
-     * 
- */ - public com.google.cloud.dialogflow.cx.v3.Experiment updateExperiment( - com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest request) { - return blockingUnaryCall( - getChannel(), getUpdateExperimentMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Deletes the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment].
-     * 
- */ - public com.google.protobuf.Empty deleteExperiment( - com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest request) { - return blockingUnaryCall( - getChannel(), getDeleteExperimentMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Starts the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. This rpc only changes the state of
-     * experiment from PENDING to RUNNING.
-     * 
- */ - public com.google.cloud.dialogflow.cx.v3.Experiment startExperiment( - com.google.cloud.dialogflow.cx.v3.StartExperimentRequest request) { - return blockingUnaryCall(getChannel(), getStartExperimentMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Stops the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. This rpc only changes the state of
-     * experiment from RUNNING to DONE.
-     * 
- */ - public com.google.cloud.dialogflow.cx.v3.Experiment stopExperiment( - com.google.cloud.dialogflow.cx.v3.StopExperimentRequest request) { - return blockingUnaryCall(getChannel(), getStopExperimentMethod(), getCallOptions(), request); - } - } - - /** - * - * - *
-   * Service for managing [Experiments][google.cloud.dialogflow.cx.v3.Experiment].
-   * 
- */ - public static final class ExperimentsFutureStub - extends io.grpc.stub.AbstractFutureStub { - private ExperimentsFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected ExperimentsFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ExperimentsFutureStub(channel, callOptions); - } - - /** - * - * - *
-     * Returns the list of all experiments in the specified [Environment][google.cloud.dialogflow.cx.v3.Environment].
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse> - listExperiments(com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest request) { - return futureUnaryCall( - getChannel().newCall(getListExperimentsMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Retrieves the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment].
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.dialogflow.cx.v3.Experiment> - getExperiment(com.google.cloud.dialogflow.cx.v3.GetExperimentRequest request) { - return futureUnaryCall( - getChannel().newCall(getGetExperimentMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Creates an [Experiment][google.cloud.dialogflow.cx.v3.Experiment] in the specified [Environment][google.cloud.dialogflow.cx.v3.Environment].
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.dialogflow.cx.v3.Experiment> - createExperiment(com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest request) { - return futureUnaryCall( - getChannel().newCall(getCreateExperimentMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Updates the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment].
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.dialogflow.cx.v3.Experiment> - updateExperiment(com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest request) { - return futureUnaryCall( - getChannel().newCall(getUpdateExperimentMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Deletes the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment].
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - deleteExperiment(com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest request) { - return futureUnaryCall( - getChannel().newCall(getDeleteExperimentMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Starts the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. This rpc only changes the state of
-     * experiment from PENDING to RUNNING.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.dialogflow.cx.v3.Experiment> - startExperiment(com.google.cloud.dialogflow.cx.v3.StartExperimentRequest request) { - return futureUnaryCall( - getChannel().newCall(getStartExperimentMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Stops the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. This rpc only changes the state of
-     * experiment from RUNNING to DONE.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.dialogflow.cx.v3.Experiment> - stopExperiment(com.google.cloud.dialogflow.cx.v3.StopExperimentRequest request) { - return futureUnaryCall( - getChannel().newCall(getStopExperimentMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_LIST_EXPERIMENTS = 0; - private static final int METHODID_GET_EXPERIMENT = 1; - private static final int METHODID_CREATE_EXPERIMENT = 2; - private static final int METHODID_UPDATE_EXPERIMENT = 3; - private static final int METHODID_DELETE_EXPERIMENT = 4; - private static final int METHODID_START_EXPERIMENT = 5; - private static final int METHODID_STOP_EXPERIMENT = 6; - - private static final class MethodHandlers - implements io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final ExperimentsImplBase serviceImpl; - private final int methodId; - - MethodHandlers(ExperimentsImplBase serviceImpl, int methodId) { - this.serviceImpl = serviceImpl; - this.methodId = methodId; - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - case METHODID_LIST_EXPERIMENTS: - serviceImpl.listExperiments( - (com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest) request, - (io.grpc.stub.StreamObserver< - com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse>) - responseObserver); - break; - case METHODID_GET_EXPERIMENT: - serviceImpl.getExperiment( - (com.google.cloud.dialogflow.cx.v3.GetExperimentRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_CREATE_EXPERIMENT: - serviceImpl.createExperiment( - (com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_UPDATE_EXPERIMENT: - serviceImpl.updateExperiment( - (com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_DELETE_EXPERIMENT: - serviceImpl.deleteExperiment( - (com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_START_EXPERIMENT: - serviceImpl.startExperiment( - (com.google.cloud.dialogflow.cx.v3.StartExperimentRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_STOP_EXPERIMENT: - serviceImpl.stopExperiment( - (com.google.cloud.dialogflow.cx.v3.StopExperimentRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - default: - throw new AssertionError(); - } - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public io.grpc.stub.StreamObserver invoke( - io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - default: - throw new AssertionError(); - } - } - } - - private abstract static class ExperimentsBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, - io.grpc.protobuf.ProtoServiceDescriptorSupplier { - ExperimentsBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("Experiments"); - } - } - - private static final class ExperimentsFileDescriptorSupplier - extends ExperimentsBaseDescriptorSupplier { - ExperimentsFileDescriptorSupplier() {} - } - - private static final class ExperimentsMethodDescriptorSupplier - extends ExperimentsBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; - - ExperimentsMethodDescriptorSupplier(String methodName) { - this.methodName = methodName; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { - return getServiceDescriptor().findMethodByName(methodName); - } - } - - private static volatile io.grpc.ServiceDescriptor serviceDescriptor; - - public static io.grpc.ServiceDescriptor getServiceDescriptor() { - io.grpc.ServiceDescriptor result = serviceDescriptor; - if (result == null) { - synchronized (ExperimentsGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = - result = - io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new ExperimentsFileDescriptorSupplier()) - .addMethod(getListExperimentsMethod()) - .addMethod(getGetExperimentMethod()) - .addMethod(getCreateExperimentMethod()) - .addMethod(getUpdateExperimentMethod()) - .addMethod(getDeleteExperimentMethod()) - .addMethod(getStartExperimentMethod()) - .addMethod(getStopExperimentMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowsGrpc.java b/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowsGrpc.java index 3ad301886..fb00b86f0 100644 --- a/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowsGrpc.java +++ b/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowsGrpc.java @@ -302,6 +302,101 @@ private FlowsGrpc() {} return getTrainFlowMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.ValidateFlowRequest, + com.google.cloud.dialogflow.cx.v3.FlowValidationResult> + getValidateFlowMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ValidateFlow", + requestType = com.google.cloud.dialogflow.cx.v3.ValidateFlowRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3.FlowValidationResult.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.ValidateFlowRequest, + com.google.cloud.dialogflow.cx.v3.FlowValidationResult> + getValidateFlowMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.ValidateFlowRequest, + com.google.cloud.dialogflow.cx.v3.FlowValidationResult> + getValidateFlowMethod; + if ((getValidateFlowMethod = FlowsGrpc.getValidateFlowMethod) == null) { + synchronized (FlowsGrpc.class) { + if ((getValidateFlowMethod = FlowsGrpc.getValidateFlowMethod) == null) { + FlowsGrpc.getValidateFlowMethod = + getValidateFlowMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ValidateFlow")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.ValidateFlowRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.FlowValidationResult + .getDefaultInstance())) + .setSchemaDescriptor(new FlowsMethodDescriptorSupplier("ValidateFlow")) + .build(); + } + } + } + return getValidateFlowMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest, + com.google.cloud.dialogflow.cx.v3.FlowValidationResult> + getGetFlowValidationResultMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetFlowValidationResult", + requestType = com.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3.FlowValidationResult.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest, + com.google.cloud.dialogflow.cx.v3.FlowValidationResult> + getGetFlowValidationResultMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest, + com.google.cloud.dialogflow.cx.v3.FlowValidationResult> + getGetFlowValidationResultMethod; + if ((getGetFlowValidationResultMethod = FlowsGrpc.getGetFlowValidationResultMethod) == null) { + synchronized (FlowsGrpc.class) { + if ((getGetFlowValidationResultMethod = FlowsGrpc.getGetFlowValidationResultMethod) + == null) { + FlowsGrpc.getGetFlowValidationResultMethod = + getGetFlowValidationResultMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetFlowValidationResult")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.FlowValidationResult + .getDefaultInstance())) + .setSchemaDescriptor( + new FlowsMethodDescriptorSupplier("GetFlowValidationResult")) + .build(); + } + } + } + return getGetFlowValidationResultMethod; + } + /** Creates a new async stub that supports all call types for the service */ public static FlowsStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = @@ -430,6 +525,37 @@ public void trainFlow( asyncUnimplementedUnaryCall(getTrainFlowMethod(), responseObserver); } + /** + * + * + *
+     * 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.
+     * 
+ */ + public void validateFlow( + com.google.cloud.dialogflow.cx.v3.ValidateFlowRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getValidateFlowMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets the latest flow validation result. Flow validation is performed
+     * when ValidateFlow is called.
+     * 
+ */ + public void getFlowValidationResult( + com.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getGetFlowValidationResultMethod(), responseObserver); + } + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) @@ -470,6 +596,20 @@ public final io.grpc.ServerServiceDefinition bindService() { new MethodHandlers< com.google.cloud.dialogflow.cx.v3.TrainFlowRequest, com.google.longrunning.Operation>(this, METHODID_TRAIN_FLOW))) + .addMethod( + getValidateFlowMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3.ValidateFlowRequest, + com.google.cloud.dialogflow.cx.v3.FlowValidationResult>( + this, METHODID_VALIDATE_FLOW))) + .addMethod( + getGetFlowValidationResultMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest, + com.google.cloud.dialogflow.cx.v3.FlowValidationResult>( + this, METHODID_GET_FLOW_VALIDATION_RESULT))) .build(); } } @@ -576,6 +716,43 @@ public void trainFlow( asyncUnaryCall( getChannel().newCall(getTrainFlowMethod(), getCallOptions()), request, responseObserver); } + + /** + * + * + *
+     * 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.
+     * 
+ */ + public void validateFlow( + com.google.cloud.dialogflow.cx.v3.ValidateFlowRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getValidateFlowMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets the latest flow validation result. Flow validation is performed
+     * when ValidateFlow is called.
+     * 
+ */ + public void getFlowValidationResult( + com.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetFlowValidationResultMethod(), getCallOptions()), + request, + responseObserver); + } } /** @@ -668,6 +845,34 @@ public com.google.longrunning.Operation trainFlow( com.google.cloud.dialogflow.cx.v3.TrainFlowRequest request) { return blockingUnaryCall(getChannel(), getTrainFlowMethod(), getCallOptions(), request); } + + /** + * + * + *
+     * 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.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.FlowValidationResult validateFlow( + com.google.cloud.dialogflow.cx.v3.ValidateFlowRequest request) { + return blockingUnaryCall(getChannel(), getValidateFlowMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets the latest flow validation result. Flow validation is performed
+     * when ValidateFlow is called.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.FlowValidationResult getFlowValidationResult( + com.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest request) { + return blockingUnaryCall( + getChannel(), getGetFlowValidationResultMethod(), getCallOptions(), request); + } } /** @@ -767,6 +972,38 @@ public com.google.common.util.concurrent.ListenableFuture + * 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. + * + */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3.FlowValidationResult> + validateFlow(com.google.cloud.dialogflow.cx.v3.ValidateFlowRequest request) { + return futureUnaryCall( + getChannel().newCall(getValidateFlowMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets the latest flow validation result. Flow validation is performed
+     * when ValidateFlow is called.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3.FlowValidationResult> + getFlowValidationResult( + com.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetFlowValidationResultMethod(), getCallOptions()), request); + } } private static final int METHODID_CREATE_FLOW = 0; @@ -775,6 +1012,8 @@ public com.google.common.util.concurrent.ListenableFuture implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -827,6 +1066,18 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.cloud.dialogflow.cx.v3.TrainFlowRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_VALIDATE_FLOW: + serviceImpl.validateFlow( + (com.google.cloud.dialogflow.cx.v3.ValidateFlowRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_FLOW_VALIDATION_RESULT: + serviceImpl.getFlowValidationResult( + (com.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; default: throw new AssertionError(); } @@ -895,6 +1146,8 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getGetFlowMethod()) .addMethod(getUpdateFlowMethod()) .addMethod(getTrainFlowMethod()) + .addMethod(getValidateFlowMethod()) + .addMethod(getGetFlowValidationResultMethod()) .build(); } } diff --git a/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCasesGrpc.java b/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCasesGrpc.java new file mode 100644 index 000000000..49fa66b58 --- /dev/null +++ b/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCasesGrpc.java @@ -0,0 +1,1524 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.dialogflow.cx.v3; + +import static io.grpc.MethodDescriptor.generateFullMethodName; +import static io.grpc.stub.ClientCalls.asyncUnaryCall; +import static io.grpc.stub.ClientCalls.blockingUnaryCall; +import static io.grpc.stub.ClientCalls.futureUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; + +/** + * + * + *
+ * Service for managing [Test Cases][google.cloud.dialogflow.cx.v3.TestCase] and
+ * [Test Case Results][google.cloud.dialogflow.cx.v3.TestCaseResult].
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/dialogflow/cx/v3/test_case.proto") +public final class TestCasesGrpc { + + private TestCasesGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.dialogflow.cx.v3.TestCases"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest, + com.google.cloud.dialogflow.cx.v3.ListTestCasesResponse> + getListTestCasesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListTestCases", + requestType = com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3.ListTestCasesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest, + com.google.cloud.dialogflow.cx.v3.ListTestCasesResponse> + getListTestCasesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest, + com.google.cloud.dialogflow.cx.v3.ListTestCasesResponse> + getListTestCasesMethod; + if ((getListTestCasesMethod = TestCasesGrpc.getListTestCasesMethod) == null) { + synchronized (TestCasesGrpc.class) { + if ((getListTestCasesMethod = TestCasesGrpc.getListTestCasesMethod) == null) { + TestCasesGrpc.getListTestCasesMethod = + getListTestCasesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListTestCases")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.ListTestCasesResponse + .getDefaultInstance())) + .setSchemaDescriptor(new TestCasesMethodDescriptorSupplier("ListTestCases")) + .build(); + } + } + } + return getListTestCasesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest, com.google.protobuf.Empty> + getBatchDeleteTestCasesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "BatchDeleteTestCases", + requestType = com.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest, com.google.protobuf.Empty> + getBatchDeleteTestCasesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest, + com.google.protobuf.Empty> + getBatchDeleteTestCasesMethod; + if ((getBatchDeleteTestCasesMethod = TestCasesGrpc.getBatchDeleteTestCasesMethod) == null) { + synchronized (TestCasesGrpc.class) { + if ((getBatchDeleteTestCasesMethod = TestCasesGrpc.getBatchDeleteTestCasesMethod) == null) { + TestCasesGrpc.getBatchDeleteTestCasesMethod = + getBatchDeleteTestCasesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "BatchDeleteTestCases")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new TestCasesMethodDescriptorSupplier("BatchDeleteTestCases")) + .build(); + } + } + } + return getBatchDeleteTestCasesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.GetTestCaseRequest, + com.google.cloud.dialogflow.cx.v3.TestCase> + getGetTestCaseMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetTestCase", + requestType = com.google.cloud.dialogflow.cx.v3.GetTestCaseRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3.TestCase.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.GetTestCaseRequest, + com.google.cloud.dialogflow.cx.v3.TestCase> + getGetTestCaseMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.GetTestCaseRequest, + com.google.cloud.dialogflow.cx.v3.TestCase> + getGetTestCaseMethod; + if ((getGetTestCaseMethod = TestCasesGrpc.getGetTestCaseMethod) == null) { + synchronized (TestCasesGrpc.class) { + if ((getGetTestCaseMethod = TestCasesGrpc.getGetTestCaseMethod) == null) { + TestCasesGrpc.getGetTestCaseMethod = + getGetTestCaseMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetTestCase")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.GetTestCaseRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.TestCase.getDefaultInstance())) + .setSchemaDescriptor(new TestCasesMethodDescriptorSupplier("GetTestCase")) + .build(); + } + } + } + return getGetTestCaseMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest, + com.google.cloud.dialogflow.cx.v3.TestCase> + getCreateTestCaseMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateTestCase", + requestType = com.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3.TestCase.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest, + com.google.cloud.dialogflow.cx.v3.TestCase> + getCreateTestCaseMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest, + com.google.cloud.dialogflow.cx.v3.TestCase> + getCreateTestCaseMethod; + if ((getCreateTestCaseMethod = TestCasesGrpc.getCreateTestCaseMethod) == null) { + synchronized (TestCasesGrpc.class) { + if ((getCreateTestCaseMethod = TestCasesGrpc.getCreateTestCaseMethod) == null) { + TestCasesGrpc.getCreateTestCaseMethod = + getCreateTestCaseMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateTestCase")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.TestCase.getDefaultInstance())) + .setSchemaDescriptor(new TestCasesMethodDescriptorSupplier("CreateTestCase")) + .build(); + } + } + } + return getCreateTestCaseMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest, + com.google.cloud.dialogflow.cx.v3.TestCase> + getUpdateTestCaseMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateTestCase", + requestType = com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3.TestCase.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest, + com.google.cloud.dialogflow.cx.v3.TestCase> + getUpdateTestCaseMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest, + com.google.cloud.dialogflow.cx.v3.TestCase> + getUpdateTestCaseMethod; + if ((getUpdateTestCaseMethod = TestCasesGrpc.getUpdateTestCaseMethod) == null) { + synchronized (TestCasesGrpc.class) { + if ((getUpdateTestCaseMethod = TestCasesGrpc.getUpdateTestCaseMethod) == null) { + TestCasesGrpc.getUpdateTestCaseMethod = + getUpdateTestCaseMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateTestCase")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.TestCase.getDefaultInstance())) + .setSchemaDescriptor(new TestCasesMethodDescriptorSupplier("UpdateTestCase")) + .build(); + } + } + } + return getUpdateTestCaseMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.RunTestCaseRequest, com.google.longrunning.Operation> + getRunTestCaseMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RunTestCase", + requestType = com.google.cloud.dialogflow.cx.v3.RunTestCaseRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.RunTestCaseRequest, com.google.longrunning.Operation> + getRunTestCaseMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.RunTestCaseRequest, com.google.longrunning.Operation> + getRunTestCaseMethod; + if ((getRunTestCaseMethod = TestCasesGrpc.getRunTestCaseMethod) == null) { + synchronized (TestCasesGrpc.class) { + if ((getRunTestCaseMethod = TestCasesGrpc.getRunTestCaseMethod) == null) { + TestCasesGrpc.getRunTestCaseMethod = + getRunTestCaseMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RunTestCase")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.RunTestCaseRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new TestCasesMethodDescriptorSupplier("RunTestCase")) + .build(); + } + } + } + return getRunTestCaseMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest, + com.google.longrunning.Operation> + getBatchRunTestCasesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "BatchRunTestCases", + requestType = com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest, + com.google.longrunning.Operation> + getBatchRunTestCasesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest, + com.google.longrunning.Operation> + getBatchRunTestCasesMethod; + if ((getBatchRunTestCasesMethod = TestCasesGrpc.getBatchRunTestCasesMethod) == null) { + synchronized (TestCasesGrpc.class) { + if ((getBatchRunTestCasesMethod = TestCasesGrpc.getBatchRunTestCasesMethod) == null) { + TestCasesGrpc.getBatchRunTestCasesMethod = + getBatchRunTestCasesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BatchRunTestCases")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new TestCasesMethodDescriptorSupplier("BatchRunTestCases")) + .build(); + } + } + } + return getBatchRunTestCasesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest, + com.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse> + getCalculateCoverageMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CalculateCoverage", + requestType = com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest, + com.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse> + getCalculateCoverageMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest, + com.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse> + getCalculateCoverageMethod; + if ((getCalculateCoverageMethod = TestCasesGrpc.getCalculateCoverageMethod) == null) { + synchronized (TestCasesGrpc.class) { + if ((getCalculateCoverageMethod = TestCasesGrpc.getCalculateCoverageMethod) == null) { + TestCasesGrpc.getCalculateCoverageMethod = + getCalculateCoverageMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CalculateCoverage")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new TestCasesMethodDescriptorSupplier("CalculateCoverage")) + .build(); + } + } + } + return getCalculateCoverageMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest, + com.google.longrunning.Operation> + getImportTestCasesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ImportTestCases", + requestType = com.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest, + com.google.longrunning.Operation> + getImportTestCasesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest, + com.google.longrunning.Operation> + getImportTestCasesMethod; + if ((getImportTestCasesMethod = TestCasesGrpc.getImportTestCasesMethod) == null) { + synchronized (TestCasesGrpc.class) { + if ((getImportTestCasesMethod = TestCasesGrpc.getImportTestCasesMethod) == null) { + TestCasesGrpc.getImportTestCasesMethod = + getImportTestCasesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ImportTestCases")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new TestCasesMethodDescriptorSupplier("ImportTestCases")) + .build(); + } + } + } + return getImportTestCasesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest, + com.google.longrunning.Operation> + getExportTestCasesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ExportTestCases", + requestType = com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest, + com.google.longrunning.Operation> + getExportTestCasesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest, + com.google.longrunning.Operation> + getExportTestCasesMethod; + if ((getExportTestCasesMethod = TestCasesGrpc.getExportTestCasesMethod) == null) { + synchronized (TestCasesGrpc.class) { + if ((getExportTestCasesMethod = TestCasesGrpc.getExportTestCasesMethod) == null) { + TestCasesGrpc.getExportTestCasesMethod = + getExportTestCasesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ExportTestCases")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new TestCasesMethodDescriptorSupplier("ExportTestCases")) + .build(); + } + } + } + return getExportTestCasesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest, + com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse> + getListTestCaseResultsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListTestCaseResults", + requestType = com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest, + com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse> + getListTestCaseResultsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest, + com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse> + getListTestCaseResultsMethod; + if ((getListTestCaseResultsMethod = TestCasesGrpc.getListTestCaseResultsMethod) == null) { + synchronized (TestCasesGrpc.class) { + if ((getListTestCaseResultsMethod = TestCasesGrpc.getListTestCaseResultsMethod) == null) { + TestCasesGrpc.getListTestCaseResultsMethod = + getListTestCaseResultsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListTestCaseResults")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new TestCasesMethodDescriptorSupplier("ListTestCaseResults")) + .build(); + } + } + } + return getListTestCaseResultsMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static TestCasesStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public TestCasesStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TestCasesStub(channel, callOptions); + } + }; + return TestCasesStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static TestCasesBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public TestCasesBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TestCasesBlockingStub(channel, callOptions); + } + }; + return TestCasesBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static TestCasesFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public TestCasesFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TestCasesFutureStub(channel, callOptions); + } + }; + return TestCasesFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Service for managing [Test Cases][google.cloud.dialogflow.cx.v3.TestCase] and
+   * [Test Case Results][google.cloud.dialogflow.cx.v3.TestCaseResult].
+   * 
+ */ + public abstract static class TestCasesImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Fetches a list of test cases for a given agent.
+     * 
+ */ + public void listTestCases( + com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getListTestCasesMethod(), responseObserver); + } + + /** + * + * + *
+     * Batch deletes test cases.
+     * 
+ */ + public void batchDeleteTestCases( + com.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getBatchDeleteTestCasesMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets a test case.
+     * 
+ */ + public void getTestCase( + com.google.cloud.dialogflow.cx.v3.GetTestCaseRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getGetTestCaseMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a test case for the given agent.
+     * 
+ */ + public void createTestCase( + com.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getCreateTestCaseMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the specified test case.
+     * 
+ */ + public void updateTestCase( + com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getUpdateTestCaseMethod(), responseObserver); + } + + /** + * + * + *
+     * Kicks off a test case run.
+     * 
+ */ + public void runTestCase( + com.google.cloud.dialogflow.cx.v3.RunTestCaseRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getRunTestCaseMethod(), responseObserver); + } + + /** + * + * + *
+     * Kicks off a batch run of test cases.
+     * 
+ */ + public void batchRunTestCases( + com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getBatchRunTestCasesMethod(), responseObserver); + } + + /** + * + * + *
+     * Calculates the test coverage for an agent.
+     * 
+ */ + public void calculateCoverage( + com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getCalculateCoverageMethod(), responseObserver); + } + + /** + * + * + *
+     * Imports the test cases from a Cloud Storage bucket or a local file. It
+     * always creates new test cases and won't overwite any existing ones. The
+     * provided ID in the imported test case is neglected.
+     * 
+ */ + public void importTestCases( + com.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getImportTestCasesMethod(), responseObserver); + } + + /** + * + * + *
+     * 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.
+     * 
+ */ + public void exportTestCases( + com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getExportTestCasesMethod(), responseObserver); + } + + /** + * + * + *
+     * Fetches a list of results for a given test case.
+     * 
+ */ + public void listTestCaseResults( + com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getListTestCaseResultsMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getListTestCasesMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest, + com.google.cloud.dialogflow.cx.v3.ListTestCasesResponse>( + this, METHODID_LIST_TEST_CASES))) + .addMethod( + getBatchDeleteTestCasesMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest, + com.google.protobuf.Empty>(this, METHODID_BATCH_DELETE_TEST_CASES))) + .addMethod( + getGetTestCaseMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3.GetTestCaseRequest, + com.google.cloud.dialogflow.cx.v3.TestCase>(this, METHODID_GET_TEST_CASE))) + .addMethod( + getCreateTestCaseMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest, + com.google.cloud.dialogflow.cx.v3.TestCase>(this, METHODID_CREATE_TEST_CASE))) + .addMethod( + getUpdateTestCaseMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest, + com.google.cloud.dialogflow.cx.v3.TestCase>(this, METHODID_UPDATE_TEST_CASE))) + .addMethod( + getRunTestCaseMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3.RunTestCaseRequest, + com.google.longrunning.Operation>(this, METHODID_RUN_TEST_CASE))) + .addMethod( + getBatchRunTestCasesMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest, + com.google.longrunning.Operation>(this, METHODID_BATCH_RUN_TEST_CASES))) + .addMethod( + getCalculateCoverageMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest, + com.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse>( + this, METHODID_CALCULATE_COVERAGE))) + .addMethod( + getImportTestCasesMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest, + com.google.longrunning.Operation>(this, METHODID_IMPORT_TEST_CASES))) + .addMethod( + getExportTestCasesMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest, + com.google.longrunning.Operation>(this, METHODID_EXPORT_TEST_CASES))) + .addMethod( + getListTestCaseResultsMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest, + com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse>( + this, METHODID_LIST_TEST_CASE_RESULTS))) + .build(); + } + } + + /** + * + * + *
+   * Service for managing [Test Cases][google.cloud.dialogflow.cx.v3.TestCase] and
+   * [Test Case Results][google.cloud.dialogflow.cx.v3.TestCaseResult].
+   * 
+ */ + public static final class TestCasesStub extends io.grpc.stub.AbstractAsyncStub { + private TestCasesStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected TestCasesStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TestCasesStub(channel, callOptions); + } + + /** + * + * + *
+     * Fetches a list of test cases for a given agent.
+     * 
+ */ + public void listTestCases( + com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListTestCasesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Batch deletes test cases.
+     * 
+ */ + public void batchDeleteTestCases( + com.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getBatchDeleteTestCasesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets a test case.
+     * 
+ */ + public void getTestCase( + com.google.cloud.dialogflow.cx.v3.GetTestCaseRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetTestCaseMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a test case for the given agent.
+     * 
+ */ + public void createTestCase( + com.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getCreateTestCaseMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the specified test case.
+     * 
+ */ + public void updateTestCase( + com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getUpdateTestCaseMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Kicks off a test case run.
+     * 
+ */ + public void runTestCase( + com.google.cloud.dialogflow.cx.v3.RunTestCaseRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getRunTestCaseMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Kicks off a batch run of test cases.
+     * 
+ */ + public void batchRunTestCases( + com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getBatchRunTestCasesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Calculates the test coverage for an agent.
+     * 
+ */ + public void calculateCoverage( + com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getCalculateCoverageMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Imports the test cases from a Cloud Storage bucket or a local file. It
+     * always creates new test cases and won't overwite any existing ones. The
+     * provided ID in the imported test case is neglected.
+     * 
+ */ + public void importTestCases( + com.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getImportTestCasesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * 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.
+     * 
+ */ + public void exportTestCases( + com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getExportTestCasesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Fetches a list of results for a given test case.
+     * 
+ */ + public void listTestCaseResults( + com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListTestCaseResultsMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * Service for managing [Test Cases][google.cloud.dialogflow.cx.v3.TestCase] and
+   * [Test Case Results][google.cloud.dialogflow.cx.v3.TestCaseResult].
+   * 
+ */ + public static final class TestCasesBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private TestCasesBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected TestCasesBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TestCasesBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Fetches a list of test cases for a given agent.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.ListTestCasesResponse listTestCases( + com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest request) { + return blockingUnaryCall(getChannel(), getListTestCasesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Batch deletes test cases.
+     * 
+ */ + public com.google.protobuf.Empty batchDeleteTestCases( + com.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest request) { + return blockingUnaryCall( + getChannel(), getBatchDeleteTestCasesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a test case.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.TestCase getTestCase( + com.google.cloud.dialogflow.cx.v3.GetTestCaseRequest request) { + return blockingUnaryCall(getChannel(), getGetTestCaseMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a test case for the given agent.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.TestCase createTestCase( + com.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest request) { + return blockingUnaryCall(getChannel(), getCreateTestCaseMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the specified test case.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.TestCase updateTestCase( + com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest request) { + return blockingUnaryCall(getChannel(), getUpdateTestCaseMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Kicks off a test case run.
+     * 
+ */ + public com.google.longrunning.Operation runTestCase( + com.google.cloud.dialogflow.cx.v3.RunTestCaseRequest request) { + return blockingUnaryCall(getChannel(), getRunTestCaseMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Kicks off a batch run of test cases.
+     * 
+ */ + public com.google.longrunning.Operation batchRunTestCases( + com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest request) { + return blockingUnaryCall( + getChannel(), getBatchRunTestCasesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Calculates the test coverage for an agent.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse calculateCoverage( + com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest request) { + return blockingUnaryCall( + getChannel(), getCalculateCoverageMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Imports the test cases from a Cloud Storage bucket or a local file. It
+     * always creates new test cases and won't overwite any existing ones. The
+     * provided ID in the imported test case is neglected.
+     * 
+ */ + public com.google.longrunning.Operation importTestCases( + com.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest request) { + return blockingUnaryCall(getChannel(), getImportTestCasesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * 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.
+     * 
+ */ + public com.google.longrunning.Operation exportTestCases( + com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest request) { + return blockingUnaryCall(getChannel(), getExportTestCasesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Fetches a list of results for a given test case.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse listTestCaseResults( + com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest request) { + return blockingUnaryCall( + getChannel(), getListTestCaseResultsMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * Service for managing [Test Cases][google.cloud.dialogflow.cx.v3.TestCase] and
+   * [Test Case Results][google.cloud.dialogflow.cx.v3.TestCaseResult].
+   * 
+ */ + public static final class TestCasesFutureStub + extends io.grpc.stub.AbstractFutureStub { + private TestCasesFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected TestCasesFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TestCasesFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Fetches a list of test cases for a given agent.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3.ListTestCasesResponse> + listTestCases(com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest request) { + return futureUnaryCall( + getChannel().newCall(getListTestCasesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Batch deletes test cases.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + batchDeleteTestCases( + com.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest request) { + return futureUnaryCall( + getChannel().newCall(getBatchDeleteTestCasesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets a test case.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3.TestCase> + getTestCase(com.google.cloud.dialogflow.cx.v3.GetTestCaseRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetTestCaseMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a test case for the given agent.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3.TestCase> + createTestCase(com.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest request) { + return futureUnaryCall( + getChannel().newCall(getCreateTestCaseMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the specified test case.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3.TestCase> + updateTestCase(com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest request) { + return futureUnaryCall( + getChannel().newCall(getUpdateTestCaseMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Kicks off a test case run.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + runTestCase(com.google.cloud.dialogflow.cx.v3.RunTestCaseRequest request) { + return futureUnaryCall( + getChannel().newCall(getRunTestCaseMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Kicks off a batch run of test cases.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + batchRunTestCases(com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest request) { + return futureUnaryCall( + getChannel().newCall(getBatchRunTestCasesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Calculates the test coverage for an agent.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse> + calculateCoverage(com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest request) { + return futureUnaryCall( + getChannel().newCall(getCalculateCoverageMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Imports the test cases from a Cloud Storage bucket or a local file. It
+     * always creates new test cases and won't overwite any existing ones. The
+     * provided ID in the imported test case is neglected.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + importTestCases(com.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest request) { + return futureUnaryCall( + getChannel().newCall(getImportTestCasesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * 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.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + exportTestCases(com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest request) { + return futureUnaryCall( + getChannel().newCall(getExportTestCasesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Fetches a list of results for a given test case.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse> + listTestCaseResults(com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest request) { + return futureUnaryCall( + getChannel().newCall(getListTestCaseResultsMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_TEST_CASES = 0; + private static final int METHODID_BATCH_DELETE_TEST_CASES = 1; + private static final int METHODID_GET_TEST_CASE = 2; + private static final int METHODID_CREATE_TEST_CASE = 3; + private static final int METHODID_UPDATE_TEST_CASE = 4; + private static final int METHODID_RUN_TEST_CASE = 5; + private static final int METHODID_BATCH_RUN_TEST_CASES = 6; + private static final int METHODID_CALCULATE_COVERAGE = 7; + private static final int METHODID_IMPORT_TEST_CASES = 8; + private static final int METHODID_EXPORT_TEST_CASES = 9; + private static final int METHODID_LIST_TEST_CASE_RESULTS = 10; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final TestCasesImplBase serviceImpl; + private final int methodId; + + MethodHandlers(TestCasesImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_LIST_TEST_CASES: + serviceImpl.listTestCases( + (com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_BATCH_DELETE_TEST_CASES: + serviceImpl.batchDeleteTestCases( + (com.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_TEST_CASE: + serviceImpl.getTestCase( + (com.google.cloud.dialogflow.cx.v3.GetTestCaseRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_TEST_CASE: + serviceImpl.createTestCase( + (com.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_TEST_CASE: + serviceImpl.updateTestCase( + (com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_RUN_TEST_CASE: + serviceImpl.runTestCase( + (com.google.cloud.dialogflow.cx.v3.RunTestCaseRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_BATCH_RUN_TEST_CASES: + serviceImpl.batchRunTestCases( + (com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CALCULATE_COVERAGE: + serviceImpl.calculateCoverage( + (com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse>) + responseObserver); + break; + case METHODID_IMPORT_TEST_CASES: + serviceImpl.importTestCases( + (com.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_EXPORT_TEST_CASES: + serviceImpl.exportTestCases( + (com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_TEST_CASE_RESULTS: + serviceImpl.listTestCaseResults( + (com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse>) + responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private abstract static class TestCasesBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + TestCasesBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("TestCases"); + } + } + + private static final class TestCasesFileDescriptorSupplier + extends TestCasesBaseDescriptorSupplier { + TestCasesFileDescriptorSupplier() {} + } + + private static final class TestCasesMethodDescriptorSupplier + extends TestCasesBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + TestCasesMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (TestCasesGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new TestCasesFileDescriptorSupplier()) + .addMethod(getListTestCasesMethod()) + .addMethod(getBatchDeleteTestCasesMethod()) + .addMethod(getGetTestCaseMethod()) + .addMethod(getCreateTestCaseMethod()) + .addMethod(getUpdateTestCaseMethod()) + .addMethod(getRunTestCaseMethod()) + .addMethod(getBatchRunTestCasesMethod()) + .addMethod(getCalculateCoverageMethod()) + .addMethod(getImportTestCasesMethod()) + .addMethod(getExportTestCasesMethod()) + .addMethod(getListTestCaseResultsMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Agent.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Agent.java index 250460d89..eef617a2c 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Agent.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Agent.java @@ -51,6 +51,7 @@ private Agent() { description_ = ""; avatarUri_ = ""; startFlow_ = ""; + securitySettings_ = ""; } @java.lang.Override @@ -148,6 +149,13 @@ private Agent( startFlow_ = s; break; } + case 138: + { + java.lang.String s = input.readStringRequireUtf8(); + + securitySettings_ = s; + break; + } case 144: { enableStackdriverLogging_ = input.readBool(); @@ -622,6 +630,59 @@ public com.google.protobuf.ByteString getStartFlowBytes() { } } + public static final int SECURITY_SETTINGS_FIELD_NUMBER = 17; + private volatile java.lang.Object securitySettings_; + /** + * + * + *
+   * Name of the [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] reference for the agent.
+   * Format: `projects/<Project ID>/locations/<Location
+   * ID>/securitySettings/<Security Settings ID>`.
+   * 
+ * + * string security_settings = 17 [(.google.api.resource_reference) = { ... } + * + * @return The securitySettings. + */ + @java.lang.Override + public java.lang.String getSecuritySettings() { + java.lang.Object ref = securitySettings_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + securitySettings_ = s; + return s; + } + } + /** + * + * + *
+   * Name of the [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] reference for the agent.
+   * Format: `projects/<Project ID>/locations/<Location
+   * ID>/securitySettings/<Security Settings ID>`.
+   * 
+ * + * string security_settings = 17 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for securitySettings. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSecuritySettingsBytes() { + java.lang.Object ref = securitySettings_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + securitySettings_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int ENABLE_STACKDRIVER_LOGGING_FIELD_NUMBER = 18; private boolean enableStackdriverLogging_; /** @@ -697,6 +758,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!getStartFlowBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 16, startFlow_); } + if (!getSecuritySettingsBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 17, securitySettings_); + } if (enableStackdriverLogging_ != false) { output.writeBool(18, enableStackdriverLogging_); } @@ -737,6 +801,9 @@ public int getSerializedSize() { if (!getStartFlowBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, startFlow_); } + if (!getSecuritySettingsBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(17, securitySettings_); + } if (enableStackdriverLogging_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(18, enableStackdriverLogging_); } @@ -769,6 +836,7 @@ public boolean equals(final java.lang.Object obj) { if (!getSpeechToTextSettings().equals(other.getSpeechToTextSettings())) return false; } if (!getStartFlow().equals(other.getStartFlow())) return false; + if (!getSecuritySettings().equals(other.getSecuritySettings())) return false; if (getEnableStackdriverLogging() != other.getEnableStackdriverLogging()) return false; if (getEnableSpellCorrection() != other.getEnableSpellCorrection()) return false; if (!unknownFields.equals(other.unknownFields)) return false; @@ -800,6 +868,8 @@ public int hashCode() { } hash = (37 * hash) + START_FLOW_FIELD_NUMBER; hash = (53 * hash) + getStartFlow().hashCode(); + hash = (37 * hash) + SECURITY_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getSecuritySettings().hashCode(); hash = (37 * hash) + ENABLE_STACKDRIVER_LOGGING_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableStackdriverLogging()); hash = (37 * hash) + ENABLE_SPELL_CORRECTION_FIELD_NUMBER; @@ -975,6 +1045,8 @@ public Builder clear() { } startFlow_ = ""; + securitySettings_ = ""; + enableStackdriverLogging_ = false; enableSpellCorrection_ = false; @@ -1018,6 +1090,7 @@ public com.google.cloud.dialogflow.cx.v3.Agent buildPartial() { result.speechToTextSettings_ = speechToTextSettingsBuilder_.build(); } result.startFlow_ = startFlow_; + result.securitySettings_ = securitySettings_; result.enableStackdriverLogging_ = enableStackdriverLogging_; result.enableSpellCorrection_ = enableSpellCorrection_; onBuilt(); @@ -1100,6 +1173,10 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.Agent other) { startFlow_ = other.startFlow_; onChanged(); } + if (!other.getSecuritySettings().isEmpty()) { + securitySettings_ = other.securitySettings_; + onChanged(); + } if (other.getEnableStackdriverLogging() != false) { setEnableStackdriverLogging(other.getEnableStackdriverLogging()); } @@ -2172,6 +2249,122 @@ public Builder setStartFlowBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object securitySettings_ = ""; + /** + * + * + *
+     * Name of the [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] reference for the agent.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/securitySettings/<Security Settings ID>`.
+     * 
+ * + * string security_settings = 17 [(.google.api.resource_reference) = { ... } + * + * @return The securitySettings. + */ + public java.lang.String getSecuritySettings() { + java.lang.Object ref = securitySettings_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + securitySettings_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of the [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] reference for the agent.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/securitySettings/<Security Settings ID>`.
+     * 
+ * + * string security_settings = 17 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for securitySettings. + */ + public com.google.protobuf.ByteString getSecuritySettingsBytes() { + java.lang.Object ref = securitySettings_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + securitySettings_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of the [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] reference for the agent.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/securitySettings/<Security Settings ID>`.
+     * 
+ * + * string security_settings = 17 [(.google.api.resource_reference) = { ... } + * + * @param value The securitySettings to set. + * @return This builder for chaining. + */ + public Builder setSecuritySettings(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + securitySettings_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] reference for the agent.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/securitySettings/<Security Settings ID>`.
+     * 
+ * + * string security_settings = 17 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearSecuritySettings() { + + securitySettings_ = getDefaultInstance().getSecuritySettings(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] reference for the agent.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/securitySettings/<Security Settings ID>`.
+     * 
+ * + * string security_settings = 17 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for securitySettings to set. + * @return This builder for chaining. + */ + public Builder setSecuritySettingsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + securitySettings_ = value; + onChanged(); + return this; + } + private boolean enableStackdriverLogging_; /** * diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentOrBuilder.java index 90d41f38c..260bfc486 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentOrBuilder.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentOrBuilder.java @@ -272,6 +272,35 @@ public interface AgentOrBuilder */ com.google.protobuf.ByteString getStartFlowBytes(); + /** + * + * + *
+   * Name of the [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] reference for the agent.
+   * Format: `projects/<Project ID>/locations/<Location
+   * ID>/securitySettings/<Security Settings ID>`.
+   * 
+ * + * string security_settings = 17 [(.google.api.resource_reference) = { ... } + * + * @return The securitySettings. + */ + java.lang.String getSecuritySettings(); + /** + * + * + *
+   * Name of the [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] reference for the agent.
+   * Format: `projects/<Project ID>/locations/<Location
+   * ID>/securitySettings/<Security Settings ID>`.
+   * 
+ * + * string security_settings = 17 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for securitySettings. + */ + com.google.protobuf.ByteString getSecuritySettingsBytes(); + /** * * diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentProto.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentProto.java index 9112f9d90..9cc4fc05f 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentProto.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentProto.java @@ -71,6 +71,18 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dialogflow_cx_v3_RestoreAgentRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_cx_v3_RestoreAgentRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_ValidateAgentRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_ValidateAgentRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_GetAgentValidationResultRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_GetAgentValidationResultRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_AgentValidationResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_AgentValidationResult_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -89,7 +101,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "longrunning/operations.proto\032\033google/pro" + "tobuf/empty.proto\032 google/protobuf/field" + "_mask.proto\"8\n\024SpeechToTextSettings\022 \n\030e" - + "nable_speech_adaptation\030\001 \001(\010\"\312\003\n\005Agent\022" + + "nable_speech_adaptation\030\001 \001(\010\"\226\004\n\005Agent\022" + "\014\n\004name\030\001 \001(\t\022\031\n\014display_name\030\002 \001(\tB\003\340A\002" + "\022\"\n\025default_language_code\030\003 \001(\tB\003\340A\005\022\026\n\t" + "time_zone\030\005 \001(\tB\003\340A\002\022\023\n\013description\030\006 \001(" @@ -97,35 +109,49 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "settings\030\r \001(\01323.google.cloud.dialogflow" + ".cx.v3.SpeechToTextSettings\022:\n\nstart_flo" + "w\030\020 \001(\tB&\340A\005\372A \n\036dialogflow.googleapis.c" - + "om/Flow\022\"\n\032enable_stackdriver_logging\030\022 " - + "\001(\010\022\037\n\027enable_spell_correction\030\024 \001(\010:\\\352A" - + "Y\n\037dialogflow.googleapis.com/Agent\0226proj" - + "ects/{project}/locations/{location}/agen" - + "ts/{agent}\"s\n\021ListAgentsRequest\0227\n\006paren" - + "t\030\001 \001(\tB\'\340A\002\372A!\022\037dialogflow.googleapis.c" - + "om/Agent\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_toke" - + "n\030\003 \001(\t\"c\n\022ListAgentsResponse\0224\n\006agents\030" - + "\001 \003(\0132$.google.cloud.dialogflow.cx.v3.Ag" - + "ent\022\027\n\017next_page_token\030\002 \001(\t\"H\n\017GetAgent" - + "Request\0225\n\004name\030\001 \001(\tB\'\340A\002\372A!\n\037dialogflo" - + "w.googleapis.com/Agent\"\207\001\n\022CreateAgentRe" - + "quest\0227\n\006parent\030\001 \001(\tB\'\340A\002\372A!\022\037dialogflo" - + "w.googleapis.com/Agent\0228\n\005agent\030\002 \001(\0132$." - + "google.cloud.dialogflow.cx.v3.AgentB\003\340A\002" - + "\"\177\n\022UpdateAgentRequest\0228\n\005agent\030\001 \001(\0132$." - + "google.cloud.dialogflow.cx.v3.AgentB\003\340A\002" - + "\022/\n\013update_mask\030\002 \001(\0132\032.google.protobuf." - + "FieldMask\"K\n\022DeleteAgentRequest\0225\n\004name\030" - + "\001 \001(\tB\'\340A\002\372A!\n\037dialogflow.googleapis.com" - + "/Agent\"c\n\022ExportAgentRequest\0225\n\004name\030\001 \001" - + "(\tB\'\340A\002\372A!\n\037dialogflow.googleapis.com/Ag" - + "ent\022\026\n\tagent_uri\030\002 \001(\tB\003\340A\001\"L\n\023ExportAge" - + "ntResponse\022\023\n\tagent_uri\030\001 \001(\tH\000\022\027\n\ragent" - + "_content\030\002 \001(\014H\000B\007\n\005agent\"\203\001\n\023RestoreAge" - + "ntRequest\0225\n\004name\030\001 \001(\tB\'\340A\002\372A!\n\037dialogf" - + "low.googleapis.com/Agent\022\023\n\tagent_uri\030\002 " - + "\001(\tH\000\022\027\n\ragent_content\030\003 \001(\014H\000B\007\n\005agent2" - + "\375\n\n\006Agents\022\256\001\n\nListAgents\0220.google.cloud" + + "om/Flow\022J\n\021security_settings\030\021 \001(\tB/\372A,\n" + + "*dialogflow.googleapis.com/SecuritySetti" + + "ngs\022\"\n\032enable_stackdriver_logging\030\022 \001(\010\022" + + "\037\n\027enable_spell_correction\030\024 \001(\010:\\\352AY\n\037d" + + "ialogflow.googleapis.com/Agent\0226projects" + + "/{project}/locations/{location}/agents/{" + + "agent}\"s\n\021ListAgentsRequest\0227\n\006parent\030\001 " + + "\001(\tB\'\340A\002\372A!\022\037dialogflow.googleapis.com/A" + + "gent\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 " + + "\001(\t\"c\n\022ListAgentsResponse\0224\n\006agents\030\001 \003(" + + "\0132$.google.cloud.dialogflow.cx.v3.Agent\022" + + "\027\n\017next_page_token\030\002 \001(\t\"H\n\017GetAgentRequ" + + "est\0225\n\004name\030\001 \001(\tB\'\340A\002\372A!\n\037dialogflow.go" + + "ogleapis.com/Agent\"\207\001\n\022CreateAgentReques" + + "t\0227\n\006parent\030\001 \001(\tB\'\340A\002\372A!\022\037dialogflow.go" + + "ogleapis.com/Agent\0228\n\005agent\030\002 \001(\0132$.goog" + + "le.cloud.dialogflow.cx.v3.AgentB\003\340A\002\"\177\n\022" + + "UpdateAgentRequest\0228\n\005agent\030\001 \001(\0132$.goog" + + "le.cloud.dialogflow.cx.v3.AgentB\003\340A\002\022/\n\013" + + "update_mask\030\002 \001(\0132\032.google.protobuf.Fiel" + + "dMask\"K\n\022DeleteAgentRequest\0225\n\004name\030\001 \001(" + + "\tB\'\340A\002\372A!\n\037dialogflow.googleapis.com/Age" + + "nt\"c\n\022ExportAgentRequest\0225\n\004name\030\001 \001(\tB\'" + + "\340A\002\372A!\n\037dialogflow.googleapis.com/Agent\022" + + "\026\n\tagent_uri\030\002 \001(\tB\003\340A\001\"L\n\023ExportAgentRe" + + "sponse\022\023\n\tagent_uri\030\001 \001(\tH\000\022\027\n\ragent_con" + + "tent\030\002 \001(\014H\000B\007\n\005agent\"\203\001\n\023RestoreAgentRe" + + "quest\0225\n\004name\030\001 \001(\tB\'\340A\002\372A!\n\037dialogflow." + + "googleapis.com/Agent\022\023\n\tagent_uri\030\002 \001(\tH" + + "\000\022\027\n\ragent_content\030\003 \001(\014H\000B\007\n\005agent\"d\n\024V" + + "alidateAgentRequest\0225\n\004name\030\001 \001(\tB\'\340A\002\372A" + + "!\n\037dialogflow.googleapis.com/Agent\022\025\n\rla" + + "nguage_code\030\002 \001(\t\"\177\n\037GetAgentValidationR" + + "esultRequest\022E\n\004name\030\001 \001(\tB7\340A\002\372A1\n/dial" + + "ogflow.googleapis.com/AgentValidationRes" + + "ult\022\025\n\rlanguage_code\030\002 \001(\t\"\372\001\n\025AgentVali" + + "dationResult\022\014\n\004name\030\001 \001(\t\022T\n\027flow_valid" + + "ation_results\030\002 \003(\01323.google.cloud.dialo" + + "gflow.cx.v3.FlowValidationResult:}\352Az\n/d" + + "ialogflow.googleapis.com/AgentValidation" + + "Result\022Gprojects/{project}/locations/{lo" + + "cation}/agents/{agent}/validationResult2" + + "\231\016\n\006Agents\022\256\001\n\nListAgents\0220.google.cloud" + ".dialogflow.cx.v3.ListAgentsRequest\0321.go" + "ogle.cloud.dialogflow.cx.v3.ListAgentsRe" + "sponse\";\202\323\344\223\002,\022*/v3/{parent=projects/*/l" @@ -157,14 +183,24 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ng.Operation\"o\202\323\344\223\0027\"2/v3/{name=projects" + "/*/locations/*/agents/*}:restore:\001*\312A/\n\025" + "google.protobuf.Empty\022\026google.protobuf.S" - + "truct\032x\312A\031dialogflow.googleapis.com\322AYht" - + "tps://www.googleapis.com/auth/cloud-plat" - + "form,https://www.googleapis.com/auth/dia" - + "logflowB\232\001\n!com.google.cloud.dialogflow." - + "cx.v3B\nAgentProtoP\001Z?google.golang.org/g" - + "enproto/googleapis/cloud/dialogflow/cx/v" - + "3;cx\370\001\001\242\002\002DF\252\002\035Google.Cloud.Dialogflow.C" - + "x.V3b\006proto3" + + "truct\022\272\001\n\rValidateAgent\0223.google.cloud.d" + + "ialogflow.cx.v3.ValidateAgentRequest\0324.g" + + "oogle.cloud.dialogflow.cx.v3.AgentValida" + + "tionResult\">\202\323\344\223\0028\"3/v3/{name=projects/*" + + "/locations/*/agents/*}:validate:\001*\022\334\001\n\030G" + + "etAgentValidationResult\022>.google.cloud.d" + + "ialogflow.cx.v3.GetAgentValidationResult" + + "Request\0324.google.cloud.dialogflow.cx.v3." + + "AgentValidationResult\"J\202\323\344\223\002=\022;/v3/{name" + + "=projects/*/locations/*/agents/*/validat" + + "ionResult}\332A\004name\032x\312A\031dialogflow.googlea" + + "pis.com\322AYhttps://www.googleapis.com/aut" + + "h/cloud-platform,https://www.googleapis." + + "com/auth/dialogflowB\232\001\n!com.google.cloud" + + ".dialogflow.cx.v3B\nAgentProtoP\001Z?google." + + "golang.org/genproto/googleapis/cloud/dia" + + "logflow/cx/v3;cx\370\001\001\242\002\002DF\252\002\035Google.Cloud." + + "Dialogflow.Cx.V3b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -201,6 +237,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "AvatarUri", "SpeechToTextSettings", "StartFlow", + "SecuritySettings", "EnableStackdriverLogging", "EnableSpellCorrection", }); @@ -276,6 +313,30 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Name", "AgentUri", "AgentContent", "Agent", }); + internal_static_google_cloud_dialogflow_cx_v3_ValidateAgentRequest_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_dialogflow_cx_v3_ValidateAgentRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_ValidateAgentRequest_descriptor, + new java.lang.String[] { + "Name", "LanguageCode", + }); + internal_static_google_cloud_dialogflow_cx_v3_GetAgentValidationResultRequest_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_dialogflow_cx_v3_GetAgentValidationResultRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_GetAgentValidationResultRequest_descriptor, + new java.lang.String[] { + "Name", "LanguageCode", + }); + internal_static_google_cloud_dialogflow_cx_v3_AgentValidationResult_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_dialogflow_cx_v3_AgentValidationResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_AgentValidationResult_descriptor, + new java.lang.String[] { + "Name", "FlowValidationResults", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.ClientProto.defaultHost); diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentValidationResult.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentValidationResult.java new file mode 100644 index 000000000..4ad612c18 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentValidationResult.java @@ -0,0 +1,1210 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/agent.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The response message for [Agents.GetAgentValidationResult][google.cloud.dialogflow.cx.v3.Agents.GetAgentValidationResult].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.AgentValidationResult} + */ +public final class AgentValidationResult extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.AgentValidationResult) + AgentValidationResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use AgentValidationResult.newBuilder() to construct. + private AgentValidationResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AgentValidationResult() { + name_ = ""; + flowValidationResults_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AgentValidationResult(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AgentValidationResult( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + flowValidationResults_ = + new java.util.ArrayList< + com.google.cloud.dialogflow.cx.v3.FlowValidationResult>(); + mutable_bitField0_ |= 0x00000001; + } + flowValidationResults_.add( + input.readMessage( + com.google.cloud.dialogflow.cx.v3.FlowValidationResult.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + flowValidationResults_ = java.util.Collections.unmodifiableList(flowValidationResults_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.AgentProto + .internal_static_google_cloud_dialogflow_cx_v3_AgentValidationResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.AgentProto + .internal_static_google_cloud_dialogflow_cx_v3_AgentValidationResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.AgentValidationResult.class, + com.google.cloud.dialogflow.cx.v3.AgentValidationResult.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * The unique identifier of the agent validation result.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/validationResult`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * The unique identifier of the agent validation result.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/validationResult`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FLOW_VALIDATION_RESULTS_FIELD_NUMBER = 2; + private java.util.List + flowValidationResults_; + /** + * + * + *
+   * Contains all flow validation results.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.FlowValidationResult flow_validation_results = 2; + * + */ + @java.lang.Override + public java.util.List + getFlowValidationResultsList() { + return flowValidationResults_; + } + /** + * + * + *
+   * Contains all flow validation results.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.FlowValidationResult flow_validation_results = 2; + * + */ + @java.lang.Override + public java.util.List + getFlowValidationResultsOrBuilderList() { + return flowValidationResults_; + } + /** + * + * + *
+   * Contains all flow validation results.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.FlowValidationResult flow_validation_results = 2; + * + */ + @java.lang.Override + public int getFlowValidationResultsCount() { + return flowValidationResults_.size(); + } + /** + * + * + *
+   * Contains all flow validation results.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.FlowValidationResult flow_validation_results = 2; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.FlowValidationResult getFlowValidationResults( + int index) { + return flowValidationResults_.get(index); + } + /** + * + * + *
+   * Contains all flow validation results.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.FlowValidationResult flow_validation_results = 2; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.FlowValidationResultOrBuilder + getFlowValidationResultsOrBuilder(int index) { + return flowValidationResults_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + for (int i = 0; i < flowValidationResults_.size(); i++) { + output.writeMessage(2, flowValidationResults_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + for (int i = 0; i < flowValidationResults_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, flowValidationResults_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.AgentValidationResult)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.AgentValidationResult other = + (com.google.cloud.dialogflow.cx.v3.AgentValidationResult) obj; + + if (!getName().equals(other.getName())) return false; + if (!getFlowValidationResultsList().equals(other.getFlowValidationResultsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getFlowValidationResultsCount() > 0) { + hash = (37 * hash) + FLOW_VALIDATION_RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getFlowValidationResultsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.AgentValidationResult parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.AgentValidationResult parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.AgentValidationResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.AgentValidationResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.AgentValidationResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.AgentValidationResult parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.AgentValidationResult parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.AgentValidationResult parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.AgentValidationResult parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.AgentValidationResult parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.AgentValidationResult parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.AgentValidationResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3.AgentValidationResult prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The response message for [Agents.GetAgentValidationResult][google.cloud.dialogflow.cx.v3.Agents.GetAgentValidationResult].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.AgentValidationResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.AgentValidationResult) + com.google.cloud.dialogflow.cx.v3.AgentValidationResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.AgentProto + .internal_static_google_cloud_dialogflow_cx_v3_AgentValidationResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.AgentProto + .internal_static_google_cloud_dialogflow_cx_v3_AgentValidationResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.AgentValidationResult.class, + com.google.cloud.dialogflow.cx.v3.AgentValidationResult.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.AgentValidationResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getFlowValidationResultsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (flowValidationResultsBuilder_ == null) { + flowValidationResults_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + flowValidationResultsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.AgentProto + .internal_static_google_cloud_dialogflow_cx_v3_AgentValidationResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.AgentValidationResult getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.AgentValidationResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.AgentValidationResult build() { + com.google.cloud.dialogflow.cx.v3.AgentValidationResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.AgentValidationResult buildPartial() { + com.google.cloud.dialogflow.cx.v3.AgentValidationResult result = + new com.google.cloud.dialogflow.cx.v3.AgentValidationResult(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + if (flowValidationResultsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + flowValidationResults_ = java.util.Collections.unmodifiableList(flowValidationResults_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.flowValidationResults_ = flowValidationResults_; + } else { + result.flowValidationResults_ = flowValidationResultsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.AgentValidationResult) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.AgentValidationResult) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.AgentValidationResult other) { + if (other == com.google.cloud.dialogflow.cx.v3.AgentValidationResult.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (flowValidationResultsBuilder_ == null) { + if (!other.flowValidationResults_.isEmpty()) { + if (flowValidationResults_.isEmpty()) { + flowValidationResults_ = other.flowValidationResults_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFlowValidationResultsIsMutable(); + flowValidationResults_.addAll(other.flowValidationResults_); + } + onChanged(); + } + } else { + if (!other.flowValidationResults_.isEmpty()) { + if (flowValidationResultsBuilder_.isEmpty()) { + flowValidationResultsBuilder_.dispose(); + flowValidationResultsBuilder_ = null; + flowValidationResults_ = other.flowValidationResults_; + bitField0_ = (bitField0_ & ~0x00000001); + flowValidationResultsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getFlowValidationResultsFieldBuilder() + : null; + } else { + flowValidationResultsBuilder_.addAllMessages(other.flowValidationResults_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.AgentValidationResult parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.AgentValidationResult) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The unique identifier of the agent validation result.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/validationResult`.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The unique identifier of the agent validation result.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/validationResult`.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The unique identifier of the agent validation result.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/validationResult`.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The unique identifier of the agent validation result.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/validationResult`.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The unique identifier of the agent validation result.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/validationResult`.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.util.List + flowValidationResults_ = java.util.Collections.emptyList(); + + private void ensureFlowValidationResultsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + flowValidationResults_ = + new java.util.ArrayList( + flowValidationResults_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.FlowValidationResult, + com.google.cloud.dialogflow.cx.v3.FlowValidationResult.Builder, + com.google.cloud.dialogflow.cx.v3.FlowValidationResultOrBuilder> + flowValidationResultsBuilder_; + + /** + * + * + *
+     * Contains all flow validation results.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.FlowValidationResult flow_validation_results = 2; + * + */ + public java.util.List + getFlowValidationResultsList() { + if (flowValidationResultsBuilder_ == null) { + return java.util.Collections.unmodifiableList(flowValidationResults_); + } else { + return flowValidationResultsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Contains all flow validation results.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.FlowValidationResult flow_validation_results = 2; + * + */ + public int getFlowValidationResultsCount() { + if (flowValidationResultsBuilder_ == null) { + return flowValidationResults_.size(); + } else { + return flowValidationResultsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Contains all flow validation results.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.FlowValidationResult flow_validation_results = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3.FlowValidationResult getFlowValidationResults( + int index) { + if (flowValidationResultsBuilder_ == null) { + return flowValidationResults_.get(index); + } else { + return flowValidationResultsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Contains all flow validation results.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.FlowValidationResult flow_validation_results = 2; + * + */ + public Builder setFlowValidationResults( + int index, com.google.cloud.dialogflow.cx.v3.FlowValidationResult value) { + if (flowValidationResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFlowValidationResultsIsMutable(); + flowValidationResults_.set(index, value); + onChanged(); + } else { + flowValidationResultsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Contains all flow validation results.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.FlowValidationResult flow_validation_results = 2; + * + */ + public Builder setFlowValidationResults( + int index, com.google.cloud.dialogflow.cx.v3.FlowValidationResult.Builder builderForValue) { + if (flowValidationResultsBuilder_ == null) { + ensureFlowValidationResultsIsMutable(); + flowValidationResults_.set(index, builderForValue.build()); + onChanged(); + } else { + flowValidationResultsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Contains all flow validation results.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.FlowValidationResult flow_validation_results = 2; + * + */ + public Builder addFlowValidationResults( + com.google.cloud.dialogflow.cx.v3.FlowValidationResult value) { + if (flowValidationResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFlowValidationResultsIsMutable(); + flowValidationResults_.add(value); + onChanged(); + } else { + flowValidationResultsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Contains all flow validation results.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.FlowValidationResult flow_validation_results = 2; + * + */ + public Builder addFlowValidationResults( + int index, com.google.cloud.dialogflow.cx.v3.FlowValidationResult value) { + if (flowValidationResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFlowValidationResultsIsMutable(); + flowValidationResults_.add(index, value); + onChanged(); + } else { + flowValidationResultsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Contains all flow validation results.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.FlowValidationResult flow_validation_results = 2; + * + */ + public Builder addFlowValidationResults( + com.google.cloud.dialogflow.cx.v3.FlowValidationResult.Builder builderForValue) { + if (flowValidationResultsBuilder_ == null) { + ensureFlowValidationResultsIsMutable(); + flowValidationResults_.add(builderForValue.build()); + onChanged(); + } else { + flowValidationResultsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Contains all flow validation results.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.FlowValidationResult flow_validation_results = 2; + * + */ + public Builder addFlowValidationResults( + int index, com.google.cloud.dialogflow.cx.v3.FlowValidationResult.Builder builderForValue) { + if (flowValidationResultsBuilder_ == null) { + ensureFlowValidationResultsIsMutable(); + flowValidationResults_.add(index, builderForValue.build()); + onChanged(); + } else { + flowValidationResultsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Contains all flow validation results.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.FlowValidationResult flow_validation_results = 2; + * + */ + public Builder addAllFlowValidationResults( + java.lang.Iterable + values) { + if (flowValidationResultsBuilder_ == null) { + ensureFlowValidationResultsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, flowValidationResults_); + onChanged(); + } else { + flowValidationResultsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Contains all flow validation results.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.FlowValidationResult flow_validation_results = 2; + * + */ + public Builder clearFlowValidationResults() { + if (flowValidationResultsBuilder_ == null) { + flowValidationResults_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + flowValidationResultsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Contains all flow validation results.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.FlowValidationResult flow_validation_results = 2; + * + */ + public Builder removeFlowValidationResults(int index) { + if (flowValidationResultsBuilder_ == null) { + ensureFlowValidationResultsIsMutable(); + flowValidationResults_.remove(index); + onChanged(); + } else { + flowValidationResultsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Contains all flow validation results.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.FlowValidationResult flow_validation_results = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3.FlowValidationResult.Builder + getFlowValidationResultsBuilder(int index) { + return getFlowValidationResultsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Contains all flow validation results.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.FlowValidationResult flow_validation_results = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3.FlowValidationResultOrBuilder + getFlowValidationResultsOrBuilder(int index) { + if (flowValidationResultsBuilder_ == null) { + return flowValidationResults_.get(index); + } else { + return flowValidationResultsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Contains all flow validation results.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.FlowValidationResult flow_validation_results = 2; + * + */ + public java.util.List + getFlowValidationResultsOrBuilderList() { + if (flowValidationResultsBuilder_ != null) { + return flowValidationResultsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(flowValidationResults_); + } + } + /** + * + * + *
+     * Contains all flow validation results.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.FlowValidationResult flow_validation_results = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3.FlowValidationResult.Builder + addFlowValidationResultsBuilder() { + return getFlowValidationResultsFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3.FlowValidationResult.getDefaultInstance()); + } + /** + * + * + *
+     * Contains all flow validation results.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.FlowValidationResult flow_validation_results = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3.FlowValidationResult.Builder + addFlowValidationResultsBuilder(int index) { + return getFlowValidationResultsFieldBuilder() + .addBuilder( + index, com.google.cloud.dialogflow.cx.v3.FlowValidationResult.getDefaultInstance()); + } + /** + * + * + *
+     * Contains all flow validation results.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.FlowValidationResult flow_validation_results = 2; + * + */ + public java.util.List + getFlowValidationResultsBuilderList() { + return getFlowValidationResultsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.FlowValidationResult, + com.google.cloud.dialogflow.cx.v3.FlowValidationResult.Builder, + com.google.cloud.dialogflow.cx.v3.FlowValidationResultOrBuilder> + getFlowValidationResultsFieldBuilder() { + if (flowValidationResultsBuilder_ == null) { + flowValidationResultsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.FlowValidationResult, + com.google.cloud.dialogflow.cx.v3.FlowValidationResult.Builder, + com.google.cloud.dialogflow.cx.v3.FlowValidationResultOrBuilder>( + flowValidationResults_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + flowValidationResults_ = null; + } + return flowValidationResultsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.AgentValidationResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.AgentValidationResult) + private static final com.google.cloud.dialogflow.cx.v3.AgentValidationResult DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.AgentValidationResult(); + } + + public static com.google.cloud.dialogflow.cx.v3.AgentValidationResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AgentValidationResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AgentValidationResult(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.AgentValidationResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentValidationResultName.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentValidationResultName.java new file mode 100644 index 000000000..f87b49cda --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentValidationResultName.java @@ -0,0 +1,224 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.cx.v3; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class AgentValidationResultName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_AGENT = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/agents/{agent}/validationResult"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String agent; + + @Deprecated + protected AgentValidationResultName() { + project = null; + location = null; + agent = null; + } + + private AgentValidationResultName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + agent = Preconditions.checkNotNull(builder.getAgent()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAgent() { + return agent; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static AgentValidationResultName of(String project, String location, String agent) { + return newBuilder().setProject(project).setLocation(location).setAgent(agent).build(); + } + + public static String format(String project, String location, String agent) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAgent(agent) + .build() + .toString(); + } + + public static AgentValidationResultName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_AGENT.validatedMatch( + formattedString, + "AgentValidationResultName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("agent")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (AgentValidationResultName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_AGENT.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (agent != null) { + fieldMapBuilder.put("agent", agent); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_AGENT.instantiate( + "project", project, "location", location, "agent", agent); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + AgentValidationResultName that = ((AgentValidationResultName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.agent, that.agent); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(agent); + return h; + } + + /** Builder for projects/{project}/locations/{location}/agents/{agent}/validationResult. */ + public static class Builder { + private String project; + private String location; + private String agent; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAgent() { + return agent; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setAgent(String agent) { + this.agent = agent; + return this; + } + + private Builder(AgentValidationResultName agentValidationResultName) { + project = agentValidationResultName.project; + location = agentValidationResultName.location; + agent = agentValidationResultName.agent; + } + + public AgentValidationResultName build() { + return new AgentValidationResultName(this); + } + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentValidationResultOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentValidationResultOrBuilder.java new file mode 100644 index 000000000..08daf9c27 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentValidationResultOrBuilder.java @@ -0,0 +1,113 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/agent.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface AgentValidationResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.AgentValidationResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The unique identifier of the agent validation result.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/validationResult`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The unique identifier of the agent validation result.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/validationResult`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Contains all flow validation results.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.FlowValidationResult flow_validation_results = 2; + * + */ + java.util.List + getFlowValidationResultsList(); + /** + * + * + *
+   * Contains all flow validation results.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.FlowValidationResult flow_validation_results = 2; + * + */ + com.google.cloud.dialogflow.cx.v3.FlowValidationResult getFlowValidationResults(int index); + /** + * + * + *
+   * Contains all flow validation results.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.FlowValidationResult flow_validation_results = 2; + * + */ + int getFlowValidationResultsCount(); + /** + * + * + *
+   * Contains all flow validation results.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.FlowValidationResult flow_validation_results = 2; + * + */ + java.util.List + getFlowValidationResultsOrBuilderList(); + /** + * + * + *
+   * Contains all flow validation results.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.FlowValidationResult flow_validation_results = 2; + * + */ + com.google.cloud.dialogflow.cx.v3.FlowValidationResultOrBuilder getFlowValidationResultsOrBuilder( + int index); +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BatchDeleteTestCasesRequest.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BatchDeleteTestCasesRequest.java new file mode 100644 index 000000000..32a894f1d --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BatchDeleteTestCasesRequest.java @@ -0,0 +1,981 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/test_case.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The request message for [TestCases.BatchDeleteTestCases][google.cloud.dialogflow.cx.v3.TestCases.BatchDeleteTestCases].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest} + */ +public final class BatchDeleteTestCasesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest) + BatchDeleteTestCasesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchDeleteTestCasesRequest.newBuilder() to construct. + private BatchDeleteTestCasesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchDeleteTestCasesRequest() { + parent_ = ""; + names_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchDeleteTestCasesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BatchDeleteTestCasesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + names_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + names_.add(s); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + names_ = names_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_BatchDeleteTestCasesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_BatchDeleteTestCasesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest.class, + com.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The agent to delete test cases from.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The agent to delete test cases from.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAMES_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList names_; + /** + * + * + *
+   * Required. Format of test case names: `projects/<Project ID>/locations/
+   * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`.
+   * 
+ * + * + * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the names. + */ + public com.google.protobuf.ProtocolStringList getNamesList() { + return names_; + } + /** + * + * + *
+   * Required. Format of test case names: `projects/<Project ID>/locations/
+   * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`.
+   * 
+ * + * + * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The count of names. + */ + public int getNamesCount() { + return names_.size(); + } + /** + * + * + *
+   * Required. Format of test case names: `projects/<Project ID>/locations/
+   * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`.
+   * 
+ * + * + * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The names at the given index. + */ + public java.lang.String getNames(int index) { + return names_.get(index); + } + /** + * + * + *
+   * Required. Format of test case names: `projects/<Project ID>/locations/
+   * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`.
+   * 
+ * + * + * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the names at the given index. + */ + public com.google.protobuf.ByteString getNamesBytes(int index) { + return names_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + for (int i = 0; i < names_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, names_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + { + int dataSize = 0; + for (int i = 0; i < names_.size(); i++) { + dataSize += computeStringSizeNoTag(names_.getRaw(i)); + } + size += dataSize; + size += 1 * getNamesList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest other = + (com.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getNamesList().equals(other.getNamesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (getNamesCount() > 0) { + hash = (37 * hash) + NAMES_FIELD_NUMBER; + hash = (53 * hash) + getNamesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for [TestCases.BatchDeleteTestCases][google.cloud.dialogflow.cx.v3.TestCases.BatchDeleteTestCases].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest) + com.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_BatchDeleteTestCasesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_BatchDeleteTestCasesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest.class, + com.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + names_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_BatchDeleteTestCasesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest build() { + com.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest result = + new com.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest(this); + int from_bitField0_ = bitField0_; + result.parent_ = parent_; + if (((bitField0_ & 0x00000001) != 0)) { + names_ = names_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.names_ = names_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest other) { + if (other + == com.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.names_.isEmpty()) { + if (names_.isEmpty()) { + names_ = other.names_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureNamesIsMutable(); + names_.addAll(other.names_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The agent to delete test cases from.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The agent to delete test cases from.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The agent to delete test cases from.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The agent to delete test cases from.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The agent to delete test cases from.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList names_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureNamesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + names_ = new com.google.protobuf.LazyStringArrayList(names_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Required. Format of test case names: `projects/<Project ID>/locations/
+     * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`.
+     * 
+ * + * + * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the names. + */ + public com.google.protobuf.ProtocolStringList getNamesList() { + return names_.getUnmodifiableView(); + } + /** + * + * + *
+     * Required. Format of test case names: `projects/<Project ID>/locations/
+     * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`.
+     * 
+ * + * + * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The count of names. + */ + public int getNamesCount() { + return names_.size(); + } + /** + * + * + *
+     * Required. Format of test case names: `projects/<Project ID>/locations/
+     * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`.
+     * 
+ * + * + * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The names at the given index. + */ + public java.lang.String getNames(int index) { + return names_.get(index); + } + /** + * + * + *
+     * Required. Format of test case names: `projects/<Project ID>/locations/
+     * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`.
+     * 
+ * + * + * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the names at the given index. + */ + public com.google.protobuf.ByteString getNamesBytes(int index) { + return names_.getByteString(index); + } + /** + * + * + *
+     * Required. Format of test case names: `projects/<Project ID>/locations/
+     * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`.
+     * 
+ * + * + * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index to set the value at. + * @param value The names to set. + * @return This builder for chaining. + */ + public Builder setNames(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureNamesIsMutable(); + names_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format of test case names: `projects/<Project ID>/locations/
+     * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`.
+     * 
+ * + * + * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The names to add. + * @return This builder for chaining. + */ + public Builder addNames(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureNamesIsMutable(); + names_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format of test case names: `projects/<Project ID>/locations/
+     * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`.
+     * 
+ * + * + * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param values The names to add. + * @return This builder for chaining. + */ + public Builder addAllNames(java.lang.Iterable values) { + ensureNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, names_); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format of test case names: `projects/<Project ID>/locations/
+     * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`.
+     * 
+ * + * + * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearNames() { + names_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format of test case names: `projects/<Project ID>/locations/
+     * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`.
+     * 
+ * + * + * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes of the names to add. + * @return This builder for chaining. + */ + public Builder addNamesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureNamesIsMutable(); + names_.add(value); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest) + private static final com.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchDeleteTestCasesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BatchDeleteTestCasesRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BatchDeleteTestCasesRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BatchDeleteTestCasesRequestOrBuilder.java new file mode 100644 index 000000000..ac2e74c38 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BatchDeleteTestCasesRequestOrBuilder.java @@ -0,0 +1,119 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/test_case.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface BatchDeleteTestCasesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The agent to delete test cases from.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The agent to delete test cases from.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. Format of test case names: `projects/<Project ID>/locations/
+   * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`.
+   * 
+ * + * + * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the names. + */ + java.util.List getNamesList(); + /** + * + * + *
+   * Required. Format of test case names: `projects/<Project ID>/locations/
+   * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`.
+   * 
+ * + * + * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The count of names. + */ + int getNamesCount(); + /** + * + * + *
+   * Required. Format of test case names: `projects/<Project ID>/locations/
+   * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`.
+   * 
+ * + * + * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The names at the given index. + */ + java.lang.String getNames(int index); + /** + * + * + *
+   * Required. Format of test case names: `projects/<Project ID>/locations/
+   * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`.
+   * 
+ * + * + * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the names at the given index. + */ + com.google.protobuf.ByteString getNamesBytes(int index); +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BatchRunTestCasesMetadata.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BatchRunTestCasesMetadata.java new file mode 100644 index 000000000..347422d03 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BatchRunTestCasesMetadata.java @@ -0,0 +1,952 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/test_case.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * Metadata returned for the [TestCases.BatchRunTestCases][google.cloud.dialogflow.cx.v3.TestCases.BatchRunTestCases] long running
+ * operation.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata} + */ +public final class BatchRunTestCasesMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata) + BatchRunTestCasesMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchRunTestCasesMetadata.newBuilder() to construct. + private BatchRunTestCasesMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchRunTestCasesMetadata() { + errors_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchRunTestCasesMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BatchRunTestCasesMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + errors_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + errors_.add( + input.readMessage( + com.google.cloud.dialogflow.cx.v3.TestError.parser(), extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + errors_ = java.util.Collections.unmodifiableList(errors_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_BatchRunTestCasesMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_BatchRunTestCasesMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata.class, + com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata.Builder.class); + } + + public static final int ERRORS_FIELD_NUMBER = 1; + private java.util.List errors_; + /** + * + * + *
+   * The test errors.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestError errors = 1; + */ + @java.lang.Override + public java.util.List getErrorsList() { + return errors_; + } + /** + * + * + *
+   * The test errors.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestError errors = 1; + */ + @java.lang.Override + public java.util.List + getErrorsOrBuilderList() { + return errors_; + } + /** + * + * + *
+   * The test errors.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestError errors = 1; + */ + @java.lang.Override + public int getErrorsCount() { + return errors_.size(); + } + /** + * + * + *
+   * The test errors.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestError errors = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TestError getErrors(int index) { + return errors_.get(index); + } + /** + * + * + *
+   * The test errors.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestError errors = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TestErrorOrBuilder getErrorsOrBuilder(int index) { + return errors_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < errors_.size(); i++) { + output.writeMessage(1, errors_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < errors_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, errors_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata other = + (com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata) obj; + + if (!getErrorsList().equals(other.getErrorsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getErrorsCount() > 0) { + hash = (37 * hash) + ERRORS_FIELD_NUMBER; + hash = (53 * hash) + getErrorsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata returned for the [TestCases.BatchRunTestCases][google.cloud.dialogflow.cx.v3.TestCases.BatchRunTestCases] long running
+   * operation.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata) + com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_BatchRunTestCasesMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_BatchRunTestCasesMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata.class, + com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getErrorsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (errorsBuilder_ == null) { + errors_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + errorsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_BatchRunTestCasesMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata build() { + com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata buildPartial() { + com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata result = + new com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata(this); + int from_bitField0_ = bitField0_; + if (errorsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + errors_ = java.util.Collections.unmodifiableList(errors_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.errors_ = errors_; + } else { + result.errors_ = errorsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata other) { + if (other == com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata.getDefaultInstance()) + return this; + if (errorsBuilder_ == null) { + if (!other.errors_.isEmpty()) { + if (errors_.isEmpty()) { + errors_ = other.errors_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureErrorsIsMutable(); + errors_.addAll(other.errors_); + } + onChanged(); + } + } else { + if (!other.errors_.isEmpty()) { + if (errorsBuilder_.isEmpty()) { + errorsBuilder_.dispose(); + errorsBuilder_ = null; + errors_ = other.errors_; + bitField0_ = (bitField0_ & ~0x00000001); + errorsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getErrorsFieldBuilder() + : null; + } else { + errorsBuilder_.addAllMessages(other.errors_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List errors_ = + java.util.Collections.emptyList(); + + private void ensureErrorsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + errors_ = new java.util.ArrayList(errors_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TestError, + com.google.cloud.dialogflow.cx.v3.TestError.Builder, + com.google.cloud.dialogflow.cx.v3.TestErrorOrBuilder> + errorsBuilder_; + + /** + * + * + *
+     * The test errors.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestError errors = 1; + */ + public java.util.List getErrorsList() { + if (errorsBuilder_ == null) { + return java.util.Collections.unmodifiableList(errors_); + } else { + return errorsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The test errors.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestError errors = 1; + */ + public int getErrorsCount() { + if (errorsBuilder_ == null) { + return errors_.size(); + } else { + return errorsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The test errors.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestError errors = 1; + */ + public com.google.cloud.dialogflow.cx.v3.TestError getErrors(int index) { + if (errorsBuilder_ == null) { + return errors_.get(index); + } else { + return errorsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The test errors.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestError errors = 1; + */ + public Builder setErrors(int index, com.google.cloud.dialogflow.cx.v3.TestError value) { + if (errorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorsIsMutable(); + errors_.set(index, value); + onChanged(); + } else { + errorsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The test errors.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestError errors = 1; + */ + public Builder setErrors( + int index, com.google.cloud.dialogflow.cx.v3.TestError.Builder builderForValue) { + if (errorsBuilder_ == null) { + ensureErrorsIsMutable(); + errors_.set(index, builderForValue.build()); + onChanged(); + } else { + errorsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The test errors.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestError errors = 1; + */ + public Builder addErrors(com.google.cloud.dialogflow.cx.v3.TestError value) { + if (errorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorsIsMutable(); + errors_.add(value); + onChanged(); + } else { + errorsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The test errors.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestError errors = 1; + */ + public Builder addErrors(int index, com.google.cloud.dialogflow.cx.v3.TestError value) { + if (errorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorsIsMutable(); + errors_.add(index, value); + onChanged(); + } else { + errorsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The test errors.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestError errors = 1; + */ + public Builder addErrors(com.google.cloud.dialogflow.cx.v3.TestError.Builder builderForValue) { + if (errorsBuilder_ == null) { + ensureErrorsIsMutable(); + errors_.add(builderForValue.build()); + onChanged(); + } else { + errorsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The test errors.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestError errors = 1; + */ + public Builder addErrors( + int index, com.google.cloud.dialogflow.cx.v3.TestError.Builder builderForValue) { + if (errorsBuilder_ == null) { + ensureErrorsIsMutable(); + errors_.add(index, builderForValue.build()); + onChanged(); + } else { + errorsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The test errors.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestError errors = 1; + */ + public Builder addAllErrors( + java.lang.Iterable values) { + if (errorsBuilder_ == null) { + ensureErrorsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, errors_); + onChanged(); + } else { + errorsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The test errors.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestError errors = 1; + */ + public Builder clearErrors() { + if (errorsBuilder_ == null) { + errors_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + errorsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The test errors.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestError errors = 1; + */ + public Builder removeErrors(int index) { + if (errorsBuilder_ == null) { + ensureErrorsIsMutable(); + errors_.remove(index); + onChanged(); + } else { + errorsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The test errors.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestError errors = 1; + */ + public com.google.cloud.dialogflow.cx.v3.TestError.Builder getErrorsBuilder(int index) { + return getErrorsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The test errors.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestError errors = 1; + */ + public com.google.cloud.dialogflow.cx.v3.TestErrorOrBuilder getErrorsOrBuilder(int index) { + if (errorsBuilder_ == null) { + return errors_.get(index); + } else { + return errorsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The test errors.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestError errors = 1; + */ + public java.util.List + getErrorsOrBuilderList() { + if (errorsBuilder_ != null) { + return errorsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(errors_); + } + } + /** + * + * + *
+     * The test errors.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestError errors = 1; + */ + public com.google.cloud.dialogflow.cx.v3.TestError.Builder addErrorsBuilder() { + return getErrorsFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3.TestError.getDefaultInstance()); + } + /** + * + * + *
+     * The test errors.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestError errors = 1; + */ + public com.google.cloud.dialogflow.cx.v3.TestError.Builder addErrorsBuilder(int index) { + return getErrorsFieldBuilder() + .addBuilder(index, com.google.cloud.dialogflow.cx.v3.TestError.getDefaultInstance()); + } + /** + * + * + *
+     * The test errors.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestError errors = 1; + */ + public java.util.List + getErrorsBuilderList() { + return getErrorsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TestError, + com.google.cloud.dialogflow.cx.v3.TestError.Builder, + com.google.cloud.dialogflow.cx.v3.TestErrorOrBuilder> + getErrorsFieldBuilder() { + if (errorsBuilder_ == null) { + errorsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TestError, + com.google.cloud.dialogflow.cx.v3.TestError.Builder, + com.google.cloud.dialogflow.cx.v3.TestErrorOrBuilder>( + errors_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + errors_ = null; + } + return errorsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata) + private static final com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata(); + } + + public static com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchRunTestCasesMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BatchRunTestCasesMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BatchRunTestCasesMetadataOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BatchRunTestCasesMetadataOrBuilder.java new file mode 100644 index 000000000..499f7a94b --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BatchRunTestCasesMetadataOrBuilder.java @@ -0,0 +1,77 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/test_case.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface BatchRunTestCasesMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The test errors.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestError errors = 1; + */ + java.util.List getErrorsList(); + /** + * + * + *
+   * The test errors.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestError errors = 1; + */ + com.google.cloud.dialogflow.cx.v3.TestError getErrors(int index); + /** + * + * + *
+   * The test errors.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestError errors = 1; + */ + int getErrorsCount(); + /** + * + * + *
+   * The test errors.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestError errors = 1; + */ + java.util.List + getErrorsOrBuilderList(); + /** + * + * + *
+   * The test errors.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestError errors = 1; + */ + com.google.cloud.dialogflow.cx.v3.TestErrorOrBuilder getErrorsOrBuilder(int index); +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BatchRunTestCasesRequest.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BatchRunTestCasesRequest.java new file mode 100644 index 000000000..574b55b51 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BatchRunTestCasesRequest.java @@ -0,0 +1,1184 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/test_case.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The request message for [TestCases.BatchRunTestCases][google.cloud.dialogflow.cx.v3.TestCases.BatchRunTestCases].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest} + */ +public final class BatchRunTestCasesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest) + BatchRunTestCasesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchRunTestCasesRequest.newBuilder() to construct. + private BatchRunTestCasesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchRunTestCasesRequest() { + parent_ = ""; + environment_ = ""; + testCases_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchRunTestCasesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BatchRunTestCasesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + environment_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + testCases_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + testCases_.add(s); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + testCases_ = testCases_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_BatchRunTestCasesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_BatchRunTestCasesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest.class, + com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. Agent name. Format: `projects/<Project ID>/locations/<Location ID>/agents/
+   * <AgentID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Agent name. Format: `projects/<Project ID>/locations/<Location ID>/agents/
+   * <AgentID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENVIRONMENT_FIELD_NUMBER = 2; + private volatile java.lang.Object environment_; + /** + * + * + *
+   * Optional. If not set, draft environment is assumed. Format: `projects/<Project
+   * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment
+   * ID>`.
+   * 
+ * + * + * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The environment. + */ + @java.lang.Override + public java.lang.String getEnvironment() { + java.lang.Object ref = environment_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + environment_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. If not set, draft environment is assumed. Format: `projects/<Project
+   * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment
+   * ID>`.
+   * 
+ * + * + * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for environment. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEnvironmentBytes() { + java.lang.Object ref = environment_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + environment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TEST_CASES_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList testCases_; + /** + * + * + *
+   * Required. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/testCases/<TestCase ID>`.
+   * 
+ * + * + * repeated string test_cases = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the testCases. + */ + public com.google.protobuf.ProtocolStringList getTestCasesList() { + return testCases_; + } + /** + * + * + *
+   * Required. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/testCases/<TestCase ID>`.
+   * 
+ * + * + * repeated string test_cases = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The count of testCases. + */ + public int getTestCasesCount() { + return testCases_.size(); + } + /** + * + * + *
+   * Required. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/testCases/<TestCase ID>`.
+   * 
+ * + * + * repeated string test_cases = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The testCases at the given index. + */ + public java.lang.String getTestCases(int index) { + return testCases_.get(index); + } + /** + * + * + *
+   * Required. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/testCases/<TestCase ID>`.
+   * 
+ * + * + * repeated string test_cases = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the testCases at the given index. + */ + public com.google.protobuf.ByteString getTestCasesBytes(int index) { + return testCases_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!getEnvironmentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, environment_); + } + for (int i = 0; i < testCases_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, testCases_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!getEnvironmentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, environment_); + } + { + int dataSize = 0; + for (int i = 0; i < testCases_.size(); i++) { + dataSize += computeStringSizeNoTag(testCases_.getRaw(i)); + } + size += dataSize; + size += 1 * getTestCasesList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest other = + (com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getEnvironment().equals(other.getEnvironment())) return false; + if (!getTestCasesList().equals(other.getTestCasesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER; + hash = (53 * hash) + getEnvironment().hashCode(); + if (getTestCasesCount() > 0) { + hash = (37 * hash) + TEST_CASES_FIELD_NUMBER; + hash = (53 * hash) + getTestCasesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for [TestCases.BatchRunTestCases][google.cloud.dialogflow.cx.v3.TestCases.BatchRunTestCases].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest) + com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_BatchRunTestCasesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_BatchRunTestCasesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest.class, + com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + environment_ = ""; + + testCases_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_BatchRunTestCasesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest build() { + com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest result = + new com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest(this); + int from_bitField0_ = bitField0_; + result.parent_ = parent_; + result.environment_ = environment_; + if (((bitField0_ & 0x00000001) != 0)) { + testCases_ = testCases_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.testCases_ = testCases_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getEnvironment().isEmpty()) { + environment_ = other.environment_; + onChanged(); + } + if (!other.testCases_.isEmpty()) { + if (testCases_.isEmpty()) { + testCases_ = other.testCases_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTestCasesIsMutable(); + testCases_.addAll(other.testCases_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Agent name. Format: `projects/<Project ID>/locations/<Location ID>/agents/
+     * <AgentID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Agent name. Format: `projects/<Project ID>/locations/<Location ID>/agents/
+     * <AgentID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Agent name. Format: `projects/<Project ID>/locations/<Location ID>/agents/
+     * <AgentID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Agent name. Format: `projects/<Project ID>/locations/<Location ID>/agents/
+     * <AgentID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Agent name. Format: `projects/<Project ID>/locations/<Location ID>/agents/
+     * <AgentID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object environment_ = ""; + /** + * + * + *
+     * Optional. If not set, draft environment is assumed. Format: `projects/<Project
+     * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment
+     * ID>`.
+     * 
+ * + * + * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The environment. + */ + public java.lang.String getEnvironment() { + java.lang.Object ref = environment_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + environment_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. If not set, draft environment is assumed. Format: `projects/<Project
+     * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment
+     * ID>`.
+     * 
+ * + * + * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for environment. + */ + public com.google.protobuf.ByteString getEnvironmentBytes() { + java.lang.Object ref = environment_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + environment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. If not set, draft environment is assumed. Format: `projects/<Project
+     * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment
+     * ID>`.
+     * 
+ * + * + * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The environment to set. + * @return This builder for chaining. + */ + public Builder setEnvironment(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + environment_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If not set, draft environment is assumed. Format: `projects/<Project
+     * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment
+     * ID>`.
+     * 
+ * + * + * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearEnvironment() { + + environment_ = getDefaultInstance().getEnvironment(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If not set, draft environment is assumed. Format: `projects/<Project
+     * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment
+     * ID>`.
+     * 
+ * + * + * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for environment to set. + * @return This builder for chaining. + */ + public Builder setEnvironmentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + environment_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList testCases_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureTestCasesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + testCases_ = new com.google.protobuf.LazyStringArrayList(testCases_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Required. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/testCases/<TestCase ID>`.
+     * 
+ * + * + * repeated string test_cases = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the testCases. + */ + public com.google.protobuf.ProtocolStringList getTestCasesList() { + return testCases_.getUnmodifiableView(); + } + /** + * + * + *
+     * Required. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/testCases/<TestCase ID>`.
+     * 
+ * + * + * repeated string test_cases = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The count of testCases. + */ + public int getTestCasesCount() { + return testCases_.size(); + } + /** + * + * + *
+     * Required. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/testCases/<TestCase ID>`.
+     * 
+ * + * + * repeated string test_cases = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The testCases at the given index. + */ + public java.lang.String getTestCases(int index) { + return testCases_.get(index); + } + /** + * + * + *
+     * Required. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/testCases/<TestCase ID>`.
+     * 
+ * + * + * repeated string test_cases = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the testCases at the given index. + */ + public com.google.protobuf.ByteString getTestCasesBytes(int index) { + return testCases_.getByteString(index); + } + /** + * + * + *
+     * Required. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/testCases/<TestCase ID>`.
+     * 
+ * + * + * repeated string test_cases = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index to set the value at. + * @param value The testCases to set. + * @return This builder for chaining. + */ + public Builder setTestCases(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTestCasesIsMutable(); + testCases_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/testCases/<TestCase ID>`.
+     * 
+ * + * + * repeated string test_cases = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The testCases to add. + * @return This builder for chaining. + */ + public Builder addTestCases(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTestCasesIsMutable(); + testCases_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/testCases/<TestCase ID>`.
+     * 
+ * + * + * repeated string test_cases = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param values The testCases to add. + * @return This builder for chaining. + */ + public Builder addAllTestCases(java.lang.Iterable values) { + ensureTestCasesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, testCases_); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/testCases/<TestCase ID>`.
+     * 
+ * + * + * repeated string test_cases = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearTestCases() { + testCases_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/testCases/<TestCase ID>`.
+     * 
+ * + * + * repeated string test_cases = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes of the testCases to add. + * @return This builder for chaining. + */ + public Builder addTestCasesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureTestCasesIsMutable(); + testCases_.add(value); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest) + private static final com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchRunTestCasesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BatchRunTestCasesRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BatchRunTestCasesRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BatchRunTestCasesRequestOrBuilder.java new file mode 100644 index 000000000..d0defb82d --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BatchRunTestCasesRequestOrBuilder.java @@ -0,0 +1,152 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/test_case.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface BatchRunTestCasesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Agent name. Format: `projects/<Project ID>/locations/<Location ID>/agents/
+   * <AgentID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Agent name. Format: `projects/<Project ID>/locations/<Location ID>/agents/
+   * <AgentID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. If not set, draft environment is assumed. Format: `projects/<Project
+   * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment
+   * ID>`.
+   * 
+ * + * + * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The environment. + */ + java.lang.String getEnvironment(); + /** + * + * + *
+   * Optional. If not set, draft environment is assumed. Format: `projects/<Project
+   * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment
+   * ID>`.
+   * 
+ * + * + * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for environment. + */ + com.google.protobuf.ByteString getEnvironmentBytes(); + + /** + * + * + *
+   * Required. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/testCases/<TestCase ID>`.
+   * 
+ * + * + * repeated string test_cases = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the testCases. + */ + java.util.List getTestCasesList(); + /** + * + * + *
+   * Required. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/testCases/<TestCase ID>`.
+   * 
+ * + * + * repeated string test_cases = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The count of testCases. + */ + int getTestCasesCount(); + /** + * + * + *
+   * Required. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/testCases/<TestCase ID>`.
+   * 
+ * + * + * repeated string test_cases = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The testCases at the given index. + */ + java.lang.String getTestCases(int index); + /** + * + * + *
+   * Required. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/testCases/<TestCase ID>`.
+   * 
+ * + * + * repeated string test_cases = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the testCases at the given index. + */ + com.google.protobuf.ByteString getTestCasesBytes(int index); +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BatchRunTestCasesResponse.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BatchRunTestCasesResponse.java new file mode 100644 index 000000000..c5bdbfe27 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BatchRunTestCasesResponse.java @@ -0,0 +1,1001 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/test_case.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The response message for [TestCases.BatchRunTestCases][google.cloud.dialogflow.cx.v3.TestCases.BatchRunTestCases].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse} + */ +public final class BatchRunTestCasesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse) + BatchRunTestCasesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchRunTestCasesResponse.newBuilder() to construct. + private BatchRunTestCasesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchRunTestCasesResponse() { + results_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchRunTestCasesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BatchRunTestCasesResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + results_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + results_.add( + input.readMessage( + com.google.cloud.dialogflow.cx.v3.TestCaseResult.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + results_ = java.util.Collections.unmodifiableList(results_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_BatchRunTestCasesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_BatchRunTestCasesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse.class, + com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse.Builder.class); + } + + public static final int RESULTS_FIELD_NUMBER = 1; + private java.util.List results_; + /** + * + * + *
+   * The test case results. The detailed
+   * [conversation turns][google.cloud.dialogflow.cx.v3.TestCaseResult.conversation_turns] are empty in this
+   * response.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseResult results = 1; + */ + @java.lang.Override + public java.util.List getResultsList() { + return results_; + } + /** + * + * + *
+   * The test case results. The detailed
+   * [conversation turns][google.cloud.dialogflow.cx.v3.TestCaseResult.conversation_turns] are empty in this
+   * response.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseResult results = 1; + */ + @java.lang.Override + public java.util.List + getResultsOrBuilderList() { + return results_; + } + /** + * + * + *
+   * The test case results. The detailed
+   * [conversation turns][google.cloud.dialogflow.cx.v3.TestCaseResult.conversation_turns] are empty in this
+   * response.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseResult results = 1; + */ + @java.lang.Override + public int getResultsCount() { + return results_.size(); + } + /** + * + * + *
+   * The test case results. The detailed
+   * [conversation turns][google.cloud.dialogflow.cx.v3.TestCaseResult.conversation_turns] are empty in this
+   * response.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseResult results = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TestCaseResult getResults(int index) { + return results_.get(index); + } + /** + * + * + *
+   * The test case results. The detailed
+   * [conversation turns][google.cloud.dialogflow.cx.v3.TestCaseResult.conversation_turns] are empty in this
+   * response.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseResult results = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TestCaseResultOrBuilder getResultsOrBuilder(int index) { + return results_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < results_.size(); i++) { + output.writeMessage(1, results_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < results_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, results_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse other = + (com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse) obj; + + if (!getResultsList().equals(other.getResultsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getResultsCount() > 0) { + hash = (37 * hash) + RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getResultsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The response message for [TestCases.BatchRunTestCases][google.cloud.dialogflow.cx.v3.TestCases.BatchRunTestCases].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse) + com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_BatchRunTestCasesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_BatchRunTestCasesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse.class, + com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getResultsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (resultsBuilder_ == null) { + results_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + resultsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_BatchRunTestCasesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse build() { + com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse buildPartial() { + com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse result = + new com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse(this); + int from_bitField0_ = bitField0_; + if (resultsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + results_ = java.util.Collections.unmodifiableList(results_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.results_ = results_; + } else { + result.results_ = resultsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse other) { + if (other == com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse.getDefaultInstance()) + return this; + if (resultsBuilder_ == null) { + if (!other.results_.isEmpty()) { + if (results_.isEmpty()) { + results_ = other.results_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureResultsIsMutable(); + results_.addAll(other.results_); + } + onChanged(); + } + } else { + if (!other.results_.isEmpty()) { + if (resultsBuilder_.isEmpty()) { + resultsBuilder_.dispose(); + resultsBuilder_ = null; + results_ = other.results_; + bitField0_ = (bitField0_ & ~0x00000001); + resultsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getResultsFieldBuilder() + : null; + } else { + resultsBuilder_.addAllMessages(other.results_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List results_ = + java.util.Collections.emptyList(); + + private void ensureResultsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + results_ = + new java.util.ArrayList(results_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TestCaseResult, + com.google.cloud.dialogflow.cx.v3.TestCaseResult.Builder, + com.google.cloud.dialogflow.cx.v3.TestCaseResultOrBuilder> + resultsBuilder_; + + /** + * + * + *
+     * The test case results. The detailed
+     * [conversation turns][google.cloud.dialogflow.cx.v3.TestCaseResult.conversation_turns] are empty in this
+     * response.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseResult results = 1; + */ + public java.util.List getResultsList() { + if (resultsBuilder_ == null) { + return java.util.Collections.unmodifiableList(results_); + } else { + return resultsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The test case results. The detailed
+     * [conversation turns][google.cloud.dialogflow.cx.v3.TestCaseResult.conversation_turns] are empty in this
+     * response.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseResult results = 1; + */ + public int getResultsCount() { + if (resultsBuilder_ == null) { + return results_.size(); + } else { + return resultsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The test case results. The detailed
+     * [conversation turns][google.cloud.dialogflow.cx.v3.TestCaseResult.conversation_turns] are empty in this
+     * response.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseResult results = 1; + */ + public com.google.cloud.dialogflow.cx.v3.TestCaseResult getResults(int index) { + if (resultsBuilder_ == null) { + return results_.get(index); + } else { + return resultsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The test case results. The detailed
+     * [conversation turns][google.cloud.dialogflow.cx.v3.TestCaseResult.conversation_turns] are empty in this
+     * response.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseResult results = 1; + */ + public Builder setResults(int index, com.google.cloud.dialogflow.cx.v3.TestCaseResult value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.set(index, value); + onChanged(); + } else { + resultsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The test case results. The detailed
+     * [conversation turns][google.cloud.dialogflow.cx.v3.TestCaseResult.conversation_turns] are empty in this
+     * response.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseResult results = 1; + */ + public Builder setResults( + int index, com.google.cloud.dialogflow.cx.v3.TestCaseResult.Builder builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.set(index, builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The test case results. The detailed
+     * [conversation turns][google.cloud.dialogflow.cx.v3.TestCaseResult.conversation_turns] are empty in this
+     * response.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseResult results = 1; + */ + public Builder addResults(com.google.cloud.dialogflow.cx.v3.TestCaseResult value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.add(value); + onChanged(); + } else { + resultsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The test case results. The detailed
+     * [conversation turns][google.cloud.dialogflow.cx.v3.TestCaseResult.conversation_turns] are empty in this
+     * response.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseResult results = 1; + */ + public Builder addResults(int index, com.google.cloud.dialogflow.cx.v3.TestCaseResult value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.add(index, value); + onChanged(); + } else { + resultsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The test case results. The detailed
+     * [conversation turns][google.cloud.dialogflow.cx.v3.TestCaseResult.conversation_turns] are empty in this
+     * response.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseResult results = 1; + */ + public Builder addResults( + com.google.cloud.dialogflow.cx.v3.TestCaseResult.Builder builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The test case results. The detailed
+     * [conversation turns][google.cloud.dialogflow.cx.v3.TestCaseResult.conversation_turns] are empty in this
+     * response.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseResult results = 1; + */ + public Builder addResults( + int index, com.google.cloud.dialogflow.cx.v3.TestCaseResult.Builder builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(index, builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The test case results. The detailed
+     * [conversation turns][google.cloud.dialogflow.cx.v3.TestCaseResult.conversation_turns] are empty in this
+     * response.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseResult results = 1; + */ + public Builder addAllResults( + java.lang.Iterable values) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, results_); + onChanged(); + } else { + resultsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The test case results. The detailed
+     * [conversation turns][google.cloud.dialogflow.cx.v3.TestCaseResult.conversation_turns] are empty in this
+     * response.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseResult results = 1; + */ + public Builder clearResults() { + if (resultsBuilder_ == null) { + results_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + resultsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The test case results. The detailed
+     * [conversation turns][google.cloud.dialogflow.cx.v3.TestCaseResult.conversation_turns] are empty in this
+     * response.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseResult results = 1; + */ + public Builder removeResults(int index) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.remove(index); + onChanged(); + } else { + resultsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The test case results. The detailed
+     * [conversation turns][google.cloud.dialogflow.cx.v3.TestCaseResult.conversation_turns] are empty in this
+     * response.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseResult results = 1; + */ + public com.google.cloud.dialogflow.cx.v3.TestCaseResult.Builder getResultsBuilder(int index) { + return getResultsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The test case results. The detailed
+     * [conversation turns][google.cloud.dialogflow.cx.v3.TestCaseResult.conversation_turns] are empty in this
+     * response.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseResult results = 1; + */ + public com.google.cloud.dialogflow.cx.v3.TestCaseResultOrBuilder getResultsOrBuilder( + int index) { + if (resultsBuilder_ == null) { + return results_.get(index); + } else { + return resultsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The test case results. The detailed
+     * [conversation turns][google.cloud.dialogflow.cx.v3.TestCaseResult.conversation_turns] are empty in this
+     * response.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseResult results = 1; + */ + public java.util.List + getResultsOrBuilderList() { + if (resultsBuilder_ != null) { + return resultsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(results_); + } + } + /** + * + * + *
+     * The test case results. The detailed
+     * [conversation turns][google.cloud.dialogflow.cx.v3.TestCaseResult.conversation_turns] are empty in this
+     * response.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseResult results = 1; + */ + public com.google.cloud.dialogflow.cx.v3.TestCaseResult.Builder addResultsBuilder() { + return getResultsFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3.TestCaseResult.getDefaultInstance()); + } + /** + * + * + *
+     * The test case results. The detailed
+     * [conversation turns][google.cloud.dialogflow.cx.v3.TestCaseResult.conversation_turns] are empty in this
+     * response.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseResult results = 1; + */ + public com.google.cloud.dialogflow.cx.v3.TestCaseResult.Builder addResultsBuilder(int index) { + return getResultsFieldBuilder() + .addBuilder(index, com.google.cloud.dialogflow.cx.v3.TestCaseResult.getDefaultInstance()); + } + /** + * + * + *
+     * The test case results. The detailed
+     * [conversation turns][google.cloud.dialogflow.cx.v3.TestCaseResult.conversation_turns] are empty in this
+     * response.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseResult results = 1; + */ + public java.util.List + getResultsBuilderList() { + return getResultsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TestCaseResult, + com.google.cloud.dialogflow.cx.v3.TestCaseResult.Builder, + com.google.cloud.dialogflow.cx.v3.TestCaseResultOrBuilder> + getResultsFieldBuilder() { + if (resultsBuilder_ == null) { + resultsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TestCaseResult, + com.google.cloud.dialogflow.cx.v3.TestCaseResult.Builder, + com.google.cloud.dialogflow.cx.v3.TestCaseResultOrBuilder>( + results_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + results_ = null; + } + return resultsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse) + private static final com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse(); + } + + public static com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchRunTestCasesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BatchRunTestCasesResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BatchRunTestCasesResponseOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BatchRunTestCasesResponseOrBuilder.java new file mode 100644 index 000000000..a7d732aef --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BatchRunTestCasesResponseOrBuilder.java @@ -0,0 +1,87 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/test_case.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface BatchRunTestCasesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The test case results. The detailed
+   * [conversation turns][google.cloud.dialogflow.cx.v3.TestCaseResult.conversation_turns] are empty in this
+   * response.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseResult results = 1; + */ + java.util.List getResultsList(); + /** + * + * + *
+   * The test case results. The detailed
+   * [conversation turns][google.cloud.dialogflow.cx.v3.TestCaseResult.conversation_turns] are empty in this
+   * response.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseResult results = 1; + */ + com.google.cloud.dialogflow.cx.v3.TestCaseResult getResults(int index); + /** + * + * + *
+   * The test case results. The detailed
+   * [conversation turns][google.cloud.dialogflow.cx.v3.TestCaseResult.conversation_turns] are empty in this
+   * response.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseResult results = 1; + */ + int getResultsCount(); + /** + * + * + *
+   * The test case results. The detailed
+   * [conversation turns][google.cloud.dialogflow.cx.v3.TestCaseResult.conversation_turns] are empty in this
+   * response.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseResult results = 1; + */ + java.util.List + getResultsOrBuilderList(); + /** + * + * + *
+   * The test case results. The detailed
+   * [conversation turns][google.cloud.dialogflow.cx.v3.TestCaseResult.conversation_turns] are empty in this
+   * response.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseResult results = 1; + */ + com.google.cloud.dialogflow.cx.v3.TestCaseResultOrBuilder getResultsOrBuilder(int index); +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CalculateCoverageRequest.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CalculateCoverageRequest.java new file mode 100644 index 000000000..5055dd3b1 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CalculateCoverageRequest.java @@ -0,0 +1,992 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/test_case.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The request message for [TestCases.CalculateCoverage][google.cloud.dialogflow.cx.v3.TestCases.CalculateCoverage].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.CalculateCoverageRequest} + */ +public final class CalculateCoverageRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.CalculateCoverageRequest) + CalculateCoverageRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CalculateCoverageRequest.newBuilder() to construct. + private CalculateCoverageRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CalculateCoverageRequest() { + agent_ = ""; + type_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CalculateCoverageRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CalculateCoverageRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 16: + { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + agent_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_CalculateCoverageRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_CalculateCoverageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest.class, + com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest.Builder.class); + } + + /** + * + * + *
+   * The type of coverage score requested.
+   * 
+ * + * Protobuf enum {@code google.cloud.dialogflow.cx.v3.CalculateCoverageRequest.CoverageType} + */ + public enum CoverageType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Should never be used.
+     * 
+ * + * COVERAGE_TYPE_UNSPECIFIED = 0; + */ + COVERAGE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Intent coverage.
+     * 
+ * + * INTENT = 1; + */ + INTENT(1), + /** + * + * + *
+     * Page transition coverage
+     * 
+ * + * PAGE_TRANSITION = 2; + */ + PAGE_TRANSITION(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Should never be used.
+     * 
+ * + * COVERAGE_TYPE_UNSPECIFIED = 0; + */ + public static final int COVERAGE_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Intent coverage.
+     * 
+ * + * INTENT = 1; + */ + public static final int INTENT_VALUE = 1; + /** + * + * + *
+     * Page transition coverage
+     * 
+ * + * PAGE_TRANSITION = 2; + */ + public static final int PAGE_TRANSITION_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static CoverageType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static CoverageType forNumber(int value) { + switch (value) { + case 0: + return COVERAGE_TYPE_UNSPECIFIED; + case 1: + return INTENT; + case 2: + return PAGE_TRANSITION; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public CoverageType findValueByNumber(int number) { + return CoverageType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final CoverageType[] VALUES = values(); + + public static CoverageType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private CoverageType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3.CalculateCoverageRequest.CoverageType) + } + + public static final int AGENT_FIELD_NUMBER = 3; + private volatile java.lang.Object agent_; + /** + * + * + *
+   * Required. The agent to calculate coverage for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string agent = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The agent. + */ + @java.lang.Override + public java.lang.String getAgent() { + java.lang.Object ref = agent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + agent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The agent to calculate coverage for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string agent = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for agent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAgentBytes() { + java.lang.Object ref = agent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + agent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 2; + private int type_; + /** + * + * + *
+   * Required. The type of coverage requested.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.CalculateCoverageRequest.CoverageType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+   * Required. The type of coverage requested.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.CalculateCoverageRequest.CoverageType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest.CoverageType getType() { + @SuppressWarnings("deprecation") + com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest.CoverageType result = + com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest.CoverageType.valueOf(type_); + return result == null + ? com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest.CoverageType.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (type_ + != com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest.CoverageType + .COVERAGE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, type_); + } + if (!getAgentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, agent_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (type_ + != com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest.CoverageType + .COVERAGE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, type_); + } + if (!getAgentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, agent_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest other = + (com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest) obj; + + if (!getAgent().equals(other.getAgent())) return false; + if (type_ != other.type_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + AGENT_FIELD_NUMBER; + hash = (53 * hash) + getAgent().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for [TestCases.CalculateCoverage][google.cloud.dialogflow.cx.v3.TestCases.CalculateCoverage].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.CalculateCoverageRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.CalculateCoverageRequest) + com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_CalculateCoverageRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_CalculateCoverageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest.class, + com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + agent_ = ""; + + type_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_CalculateCoverageRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest build() { + com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest result = + new com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest(this); + result.agent_ = agent_; + result.type_ = type_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest.getDefaultInstance()) + return this; + if (!other.getAgent().isEmpty()) { + agent_ = other.agent_; + onChanged(); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object agent_ = ""; + /** + * + * + *
+     * Required. The agent to calculate coverage for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string agent = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The agent. + */ + public java.lang.String getAgent() { + java.lang.Object ref = agent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + agent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The agent to calculate coverage for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string agent = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for agent. + */ + public com.google.protobuf.ByteString getAgentBytes() { + java.lang.Object ref = agent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + agent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The agent to calculate coverage for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string agent = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The agent to set. + * @return This builder for chaining. + */ + public Builder setAgent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + agent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The agent to calculate coverage for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string agent = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearAgent() { + + agent_ = getDefaultInstance().getAgent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The agent to calculate coverage for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string agent = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for agent to set. + * @return This builder for chaining. + */ + public Builder setAgentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + agent_ = value; + onChanged(); + return this; + } + + private int type_ = 0; + /** + * + * + *
+     * Required. The type of coverage requested.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.CalculateCoverageRequest.CoverageType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+     * Required. The type of coverage requested.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.CalculateCoverageRequest.CoverageType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + + type_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The type of coverage requested.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.CalculateCoverageRequest.CoverageType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest.CoverageType getType() { + @SuppressWarnings("deprecation") + com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest.CoverageType result = + com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest.CoverageType.valueOf(type_); + return result == null + ? com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest.CoverageType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Required. The type of coverage requested.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.CalculateCoverageRequest.CoverageType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType( + com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest.CoverageType value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The type of coverage requested.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.CalculateCoverageRequest.CoverageType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.CalculateCoverageRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.CalculateCoverageRequest) + private static final com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CalculateCoverageRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CalculateCoverageRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CalculateCoverageRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CalculateCoverageRequestOrBuilder.java new file mode 100644 index 000000000..21799a0d4 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CalculateCoverageRequestOrBuilder.java @@ -0,0 +1,85 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/test_case.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface CalculateCoverageRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.CalculateCoverageRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The agent to calculate coverage for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string agent = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The agent. + */ + java.lang.String getAgent(); + /** + * + * + *
+   * Required. The agent to calculate coverage for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string agent = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for agent. + */ + com.google.protobuf.ByteString getAgentBytes(); + + /** + * + * + *
+   * Required. The type of coverage requested.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.CalculateCoverageRequest.CoverageType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
+   * Required. The type of coverage requested.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.CalculateCoverageRequest.CoverageType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The type. + */ + com.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest.CoverageType getType(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CalculateCoverageResponse.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CalculateCoverageResponse.java new file mode 100644 index 000000000..ce6329d0a --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CalculateCoverageResponse.java @@ -0,0 +1,1342 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/test_case.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The response message for [TestCases.CalculateCoverage][google.cloud.dialogflow.cx.v3.TestCases.CalculateCoverage].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.CalculateCoverageResponse} + */ +public final class CalculateCoverageResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.CalculateCoverageResponse) + CalculateCoverageResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use CalculateCoverageResponse.newBuilder() to construct. + private CalculateCoverageResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CalculateCoverageResponse() { + agent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CalculateCoverageResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CalculateCoverageResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + com.google.cloud.dialogflow.cx.v3.IntentCoverage.Builder subBuilder = null; + if (coverageTypeCase_ == 2) { + subBuilder = + ((com.google.cloud.dialogflow.cx.v3.IntentCoverage) coverageType_).toBuilder(); + } + coverageType_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.IntentCoverage.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.dialogflow.cx.v3.IntentCoverage) coverageType_); + coverageType_ = subBuilder.buildPartial(); + } + coverageTypeCase_ = 2; + break; + } + case 34: + { + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Builder subBuilder = null; + if (coverageTypeCase_ == 4) { + subBuilder = + ((com.google.cloud.dialogflow.cx.v3.TransitionCoverage) coverageType_) + .toBuilder(); + } + coverageType_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.dialogflow.cx.v3.TransitionCoverage) coverageType_); + coverageType_ = subBuilder.buildPartial(); + } + coverageTypeCase_ = 4; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + agent_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_CalculateCoverageResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_CalculateCoverageResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse.class, + com.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse.Builder.class); + } + + private int coverageTypeCase_ = 0; + private java.lang.Object coverageType_; + + public enum CoverageTypeCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + INTENT_COVERAGE(2), + TRANSITION_COVERAGE(4), + COVERAGETYPE_NOT_SET(0); + private final int value; + + private CoverageTypeCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static CoverageTypeCase valueOf(int value) { + return forNumber(value); + } + + public static CoverageTypeCase forNumber(int value) { + switch (value) { + case 2: + return INTENT_COVERAGE; + case 4: + return TRANSITION_COVERAGE; + case 0: + return COVERAGETYPE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public CoverageTypeCase getCoverageTypeCase() { + return CoverageTypeCase.forNumber(coverageTypeCase_); + } + + public static final int AGENT_FIELD_NUMBER = 5; + private volatile java.lang.Object agent_; + /** + * + * + *
+   * The agent to calculate coverage for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * string agent = 5 [(.google.api.resource_reference) = { ... } + * + * @return The agent. + */ + @java.lang.Override + public java.lang.String getAgent() { + java.lang.Object ref = agent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + agent_ = s; + return s; + } + } + /** + * + * + *
+   * The agent to calculate coverage for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * string agent = 5 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for agent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAgentBytes() { + java.lang.Object ref = agent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + agent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INTENT_COVERAGE_FIELD_NUMBER = 2; + /** + * + * + *
+   * Intent coverage.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.IntentCoverage intent_coverage = 2; + * + * @return Whether the intentCoverage field is set. + */ + @java.lang.Override + public boolean hasIntentCoverage() { + return coverageTypeCase_ == 2; + } + /** + * + * + *
+   * Intent coverage.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.IntentCoverage intent_coverage = 2; + * + * @return The intentCoverage. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.IntentCoverage getIntentCoverage() { + if (coverageTypeCase_ == 2) { + return (com.google.cloud.dialogflow.cx.v3.IntentCoverage) coverageType_; + } + return com.google.cloud.dialogflow.cx.v3.IntentCoverage.getDefaultInstance(); + } + /** + * + * + *
+   * Intent coverage.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.IntentCoverage intent_coverage = 2; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.IntentCoverageOrBuilder getIntentCoverageOrBuilder() { + if (coverageTypeCase_ == 2) { + return (com.google.cloud.dialogflow.cx.v3.IntentCoverage) coverageType_; + } + return com.google.cloud.dialogflow.cx.v3.IntentCoverage.getDefaultInstance(); + } + + public static final int TRANSITION_COVERAGE_FIELD_NUMBER = 4; + /** + * + * + *
+   * Transition coverage.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionCoverage transition_coverage = 4; + * + * @return Whether the transitionCoverage field is set. + */ + @java.lang.Override + public boolean hasTransitionCoverage() { + return coverageTypeCase_ == 4; + } + /** + * + * + *
+   * Transition coverage.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionCoverage transition_coverage = 4; + * + * @return The transitionCoverage. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TransitionCoverage getTransitionCoverage() { + if (coverageTypeCase_ == 4) { + return (com.google.cloud.dialogflow.cx.v3.TransitionCoverage) coverageType_; + } + return com.google.cloud.dialogflow.cx.v3.TransitionCoverage.getDefaultInstance(); + } + /** + * + * + *
+   * Transition coverage.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionCoverage transition_coverage = 4; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TransitionCoverageOrBuilder + getTransitionCoverageOrBuilder() { + if (coverageTypeCase_ == 4) { + return (com.google.cloud.dialogflow.cx.v3.TransitionCoverage) coverageType_; + } + return com.google.cloud.dialogflow.cx.v3.TransitionCoverage.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (coverageTypeCase_ == 2) { + output.writeMessage(2, (com.google.cloud.dialogflow.cx.v3.IntentCoverage) coverageType_); + } + if (coverageTypeCase_ == 4) { + output.writeMessage(4, (com.google.cloud.dialogflow.cx.v3.TransitionCoverage) coverageType_); + } + if (!getAgentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, agent_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (coverageTypeCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.dialogflow.cx.v3.IntentCoverage) coverageType_); + } + if (coverageTypeCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.cloud.dialogflow.cx.v3.TransitionCoverage) coverageType_); + } + if (!getAgentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, agent_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse other = + (com.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse) obj; + + if (!getAgent().equals(other.getAgent())) return false; + if (!getCoverageTypeCase().equals(other.getCoverageTypeCase())) return false; + switch (coverageTypeCase_) { + case 2: + if (!getIntentCoverage().equals(other.getIntentCoverage())) return false; + break; + case 4: + if (!getTransitionCoverage().equals(other.getTransitionCoverage())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + AGENT_FIELD_NUMBER; + hash = (53 * hash) + getAgent().hashCode(); + switch (coverageTypeCase_) { + case 2: + hash = (37 * hash) + INTENT_COVERAGE_FIELD_NUMBER; + hash = (53 * hash) + getIntentCoverage().hashCode(); + break; + case 4: + hash = (37 * hash) + TRANSITION_COVERAGE_FIELD_NUMBER; + hash = (53 * hash) + getTransitionCoverage().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The response message for [TestCases.CalculateCoverage][google.cloud.dialogflow.cx.v3.TestCases.CalculateCoverage].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.CalculateCoverageResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.CalculateCoverageResponse) + com.google.cloud.dialogflow.cx.v3.CalculateCoverageResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_CalculateCoverageResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_CalculateCoverageResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse.class, + com.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + agent_ = ""; + + coverageTypeCase_ = 0; + coverageType_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_CalculateCoverageResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse build() { + com.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse buildPartial() { + com.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse result = + new com.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse(this); + result.agent_ = agent_; + if (coverageTypeCase_ == 2) { + if (intentCoverageBuilder_ == null) { + result.coverageType_ = coverageType_; + } else { + result.coverageType_ = intentCoverageBuilder_.build(); + } + } + if (coverageTypeCase_ == 4) { + if (transitionCoverageBuilder_ == null) { + result.coverageType_ = coverageType_; + } else { + result.coverageType_ = transitionCoverageBuilder_.build(); + } + } + result.coverageTypeCase_ = coverageTypeCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse other) { + if (other == com.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse.getDefaultInstance()) + return this; + if (!other.getAgent().isEmpty()) { + agent_ = other.agent_; + onChanged(); + } + switch (other.getCoverageTypeCase()) { + case INTENT_COVERAGE: + { + mergeIntentCoverage(other.getIntentCoverage()); + break; + } + case TRANSITION_COVERAGE: + { + mergeTransitionCoverage(other.getTransitionCoverage()); + break; + } + case COVERAGETYPE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int coverageTypeCase_ = 0; + private java.lang.Object coverageType_; + + public CoverageTypeCase getCoverageTypeCase() { + return CoverageTypeCase.forNumber(coverageTypeCase_); + } + + public Builder clearCoverageType() { + coverageTypeCase_ = 0; + coverageType_ = null; + onChanged(); + return this; + } + + private java.lang.Object agent_ = ""; + /** + * + * + *
+     * The agent to calculate coverage for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * string agent = 5 [(.google.api.resource_reference) = { ... } + * + * @return The agent. + */ + public java.lang.String getAgent() { + java.lang.Object ref = agent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + agent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The agent to calculate coverage for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * string agent = 5 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for agent. + */ + public com.google.protobuf.ByteString getAgentBytes() { + java.lang.Object ref = agent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + agent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The agent to calculate coverage for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * string agent = 5 [(.google.api.resource_reference) = { ... } + * + * @param value The agent to set. + * @return This builder for chaining. + */ + public Builder setAgent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + agent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The agent to calculate coverage for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * string agent = 5 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearAgent() { + + agent_ = getDefaultInstance().getAgent(); + onChanged(); + return this; + } + /** + * + * + *
+     * The agent to calculate coverage for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * string agent = 5 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for agent to set. + * @return This builder for chaining. + */ + public Builder setAgentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + agent_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.IntentCoverage, + com.google.cloud.dialogflow.cx.v3.IntentCoverage.Builder, + com.google.cloud.dialogflow.cx.v3.IntentCoverageOrBuilder> + intentCoverageBuilder_; + /** + * + * + *
+     * Intent coverage.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.IntentCoverage intent_coverage = 2; + * + * @return Whether the intentCoverage field is set. + */ + @java.lang.Override + public boolean hasIntentCoverage() { + return coverageTypeCase_ == 2; + } + /** + * + * + *
+     * Intent coverage.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.IntentCoverage intent_coverage = 2; + * + * @return The intentCoverage. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.IntentCoverage getIntentCoverage() { + if (intentCoverageBuilder_ == null) { + if (coverageTypeCase_ == 2) { + return (com.google.cloud.dialogflow.cx.v3.IntentCoverage) coverageType_; + } + return com.google.cloud.dialogflow.cx.v3.IntentCoverage.getDefaultInstance(); + } else { + if (coverageTypeCase_ == 2) { + return intentCoverageBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3.IntentCoverage.getDefaultInstance(); + } + } + /** + * + * + *
+     * Intent coverage.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.IntentCoverage intent_coverage = 2; + */ + public Builder setIntentCoverage(com.google.cloud.dialogflow.cx.v3.IntentCoverage value) { + if (intentCoverageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + coverageType_ = value; + onChanged(); + } else { + intentCoverageBuilder_.setMessage(value); + } + coverageTypeCase_ = 2; + return this; + } + /** + * + * + *
+     * Intent coverage.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.IntentCoverage intent_coverage = 2; + */ + public Builder setIntentCoverage( + com.google.cloud.dialogflow.cx.v3.IntentCoverage.Builder builderForValue) { + if (intentCoverageBuilder_ == null) { + coverageType_ = builderForValue.build(); + onChanged(); + } else { + intentCoverageBuilder_.setMessage(builderForValue.build()); + } + coverageTypeCase_ = 2; + return this; + } + /** + * + * + *
+     * Intent coverage.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.IntentCoverage intent_coverage = 2; + */ + public Builder mergeIntentCoverage(com.google.cloud.dialogflow.cx.v3.IntentCoverage value) { + if (intentCoverageBuilder_ == null) { + if (coverageTypeCase_ == 2 + && coverageType_ + != com.google.cloud.dialogflow.cx.v3.IntentCoverage.getDefaultInstance()) { + coverageType_ = + com.google.cloud.dialogflow.cx.v3.IntentCoverage.newBuilder( + (com.google.cloud.dialogflow.cx.v3.IntentCoverage) coverageType_) + .mergeFrom(value) + .buildPartial(); + } else { + coverageType_ = value; + } + onChanged(); + } else { + if (coverageTypeCase_ == 2) { + intentCoverageBuilder_.mergeFrom(value); + } + intentCoverageBuilder_.setMessage(value); + } + coverageTypeCase_ = 2; + return this; + } + /** + * + * + *
+     * Intent coverage.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.IntentCoverage intent_coverage = 2; + */ + public Builder clearIntentCoverage() { + if (intentCoverageBuilder_ == null) { + if (coverageTypeCase_ == 2) { + coverageTypeCase_ = 0; + coverageType_ = null; + onChanged(); + } + } else { + if (coverageTypeCase_ == 2) { + coverageTypeCase_ = 0; + coverageType_ = null; + } + intentCoverageBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Intent coverage.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.IntentCoverage intent_coverage = 2; + */ + public com.google.cloud.dialogflow.cx.v3.IntentCoverage.Builder getIntentCoverageBuilder() { + return getIntentCoverageFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Intent coverage.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.IntentCoverage intent_coverage = 2; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.IntentCoverageOrBuilder getIntentCoverageOrBuilder() { + if ((coverageTypeCase_ == 2) && (intentCoverageBuilder_ != null)) { + return intentCoverageBuilder_.getMessageOrBuilder(); + } else { + if (coverageTypeCase_ == 2) { + return (com.google.cloud.dialogflow.cx.v3.IntentCoverage) coverageType_; + } + return com.google.cloud.dialogflow.cx.v3.IntentCoverage.getDefaultInstance(); + } + } + /** + * + * + *
+     * Intent coverage.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.IntentCoverage intent_coverage = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.IntentCoverage, + com.google.cloud.dialogflow.cx.v3.IntentCoverage.Builder, + com.google.cloud.dialogflow.cx.v3.IntentCoverageOrBuilder> + getIntentCoverageFieldBuilder() { + if (intentCoverageBuilder_ == null) { + if (!(coverageTypeCase_ == 2)) { + coverageType_ = com.google.cloud.dialogflow.cx.v3.IntentCoverage.getDefaultInstance(); + } + intentCoverageBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.IntentCoverage, + com.google.cloud.dialogflow.cx.v3.IntentCoverage.Builder, + com.google.cloud.dialogflow.cx.v3.IntentCoverageOrBuilder>( + (com.google.cloud.dialogflow.cx.v3.IntentCoverage) coverageType_, + getParentForChildren(), + isClean()); + coverageType_ = null; + } + coverageTypeCase_ = 2; + onChanged(); + ; + return intentCoverageBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TransitionCoverage, + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Builder, + com.google.cloud.dialogflow.cx.v3.TransitionCoverageOrBuilder> + transitionCoverageBuilder_; + /** + * + * + *
+     * Transition coverage.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionCoverage transition_coverage = 4; + * + * @return Whether the transitionCoverage field is set. + */ + @java.lang.Override + public boolean hasTransitionCoverage() { + return coverageTypeCase_ == 4; + } + /** + * + * + *
+     * Transition coverage.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionCoverage transition_coverage = 4; + * + * @return The transitionCoverage. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TransitionCoverage getTransitionCoverage() { + if (transitionCoverageBuilder_ == null) { + if (coverageTypeCase_ == 4) { + return (com.google.cloud.dialogflow.cx.v3.TransitionCoverage) coverageType_; + } + return com.google.cloud.dialogflow.cx.v3.TransitionCoverage.getDefaultInstance(); + } else { + if (coverageTypeCase_ == 4) { + return transitionCoverageBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3.TransitionCoverage.getDefaultInstance(); + } + } + /** + * + * + *
+     * Transition coverage.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionCoverage transition_coverage = 4; + */ + public Builder setTransitionCoverage( + com.google.cloud.dialogflow.cx.v3.TransitionCoverage value) { + if (transitionCoverageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + coverageType_ = value; + onChanged(); + } else { + transitionCoverageBuilder_.setMessage(value); + } + coverageTypeCase_ = 4; + return this; + } + /** + * + * + *
+     * Transition coverage.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionCoverage transition_coverage = 4; + */ + public Builder setTransitionCoverage( + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Builder builderForValue) { + if (transitionCoverageBuilder_ == null) { + coverageType_ = builderForValue.build(); + onChanged(); + } else { + transitionCoverageBuilder_.setMessage(builderForValue.build()); + } + coverageTypeCase_ = 4; + return this; + } + /** + * + * + *
+     * Transition coverage.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionCoverage transition_coverage = 4; + */ + public Builder mergeTransitionCoverage( + com.google.cloud.dialogflow.cx.v3.TransitionCoverage value) { + if (transitionCoverageBuilder_ == null) { + if (coverageTypeCase_ == 4 + && coverageType_ + != com.google.cloud.dialogflow.cx.v3.TransitionCoverage.getDefaultInstance()) { + coverageType_ = + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.newBuilder( + (com.google.cloud.dialogflow.cx.v3.TransitionCoverage) coverageType_) + .mergeFrom(value) + .buildPartial(); + } else { + coverageType_ = value; + } + onChanged(); + } else { + if (coverageTypeCase_ == 4) { + transitionCoverageBuilder_.mergeFrom(value); + } + transitionCoverageBuilder_.setMessage(value); + } + coverageTypeCase_ = 4; + return this; + } + /** + * + * + *
+     * Transition coverage.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionCoverage transition_coverage = 4; + */ + public Builder clearTransitionCoverage() { + if (transitionCoverageBuilder_ == null) { + if (coverageTypeCase_ == 4) { + coverageTypeCase_ = 0; + coverageType_ = null; + onChanged(); + } + } else { + if (coverageTypeCase_ == 4) { + coverageTypeCase_ = 0; + coverageType_ = null; + } + transitionCoverageBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Transition coverage.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionCoverage transition_coverage = 4; + */ + public com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Builder + getTransitionCoverageBuilder() { + return getTransitionCoverageFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Transition coverage.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionCoverage transition_coverage = 4; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TransitionCoverageOrBuilder + getTransitionCoverageOrBuilder() { + if ((coverageTypeCase_ == 4) && (transitionCoverageBuilder_ != null)) { + return transitionCoverageBuilder_.getMessageOrBuilder(); + } else { + if (coverageTypeCase_ == 4) { + return (com.google.cloud.dialogflow.cx.v3.TransitionCoverage) coverageType_; + } + return com.google.cloud.dialogflow.cx.v3.TransitionCoverage.getDefaultInstance(); + } + } + /** + * + * + *
+     * Transition coverage.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionCoverage transition_coverage = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TransitionCoverage, + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Builder, + com.google.cloud.dialogflow.cx.v3.TransitionCoverageOrBuilder> + getTransitionCoverageFieldBuilder() { + if (transitionCoverageBuilder_ == null) { + if (!(coverageTypeCase_ == 4)) { + coverageType_ = com.google.cloud.dialogflow.cx.v3.TransitionCoverage.getDefaultInstance(); + } + transitionCoverageBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TransitionCoverage, + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Builder, + com.google.cloud.dialogflow.cx.v3.TransitionCoverageOrBuilder>( + (com.google.cloud.dialogflow.cx.v3.TransitionCoverage) coverageType_, + getParentForChildren(), + isClean()); + coverageType_ = null; + } + coverageTypeCase_ = 4; + onChanged(); + ; + return transitionCoverageBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.CalculateCoverageResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.CalculateCoverageResponse) + private static final com.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse(); + } + + public static com.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CalculateCoverageResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CalculateCoverageResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CalculateCoverageResponseOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CalculateCoverageResponseOrBuilder.java new file mode 100644 index 000000000..e9ebc8d7f --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CalculateCoverageResponseOrBuilder.java @@ -0,0 +1,125 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/test_case.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface CalculateCoverageResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.CalculateCoverageResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The agent to calculate coverage for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * string agent = 5 [(.google.api.resource_reference) = { ... } + * + * @return The agent. + */ + java.lang.String getAgent(); + /** + * + * + *
+   * The agent to calculate coverage for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * string agent = 5 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for agent. + */ + com.google.protobuf.ByteString getAgentBytes(); + + /** + * + * + *
+   * Intent coverage.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.IntentCoverage intent_coverage = 2; + * + * @return Whether the intentCoverage field is set. + */ + boolean hasIntentCoverage(); + /** + * + * + *
+   * Intent coverage.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.IntentCoverage intent_coverage = 2; + * + * @return The intentCoverage. + */ + com.google.cloud.dialogflow.cx.v3.IntentCoverage getIntentCoverage(); + /** + * + * + *
+   * Intent coverage.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.IntentCoverage intent_coverage = 2; + */ + com.google.cloud.dialogflow.cx.v3.IntentCoverageOrBuilder getIntentCoverageOrBuilder(); + + /** + * + * + *
+   * Transition coverage.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionCoverage transition_coverage = 4; + * + * @return Whether the transitionCoverage field is set. + */ + boolean hasTransitionCoverage(); + /** + * + * + *
+   * Transition coverage.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionCoverage transition_coverage = 4; + * + * @return The transitionCoverage. + */ + com.google.cloud.dialogflow.cx.v3.TransitionCoverage getTransitionCoverage(); + /** + * + * + *
+   * Transition coverage.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionCoverage transition_coverage = 4; + */ + com.google.cloud.dialogflow.cx.v3.TransitionCoverageOrBuilder getTransitionCoverageOrBuilder(); + + public com.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse.CoverageTypeCase + getCoverageTypeCase(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ConversationTurn.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ConversationTurn.java new file mode 100644 index 000000000..44706496f --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ConversationTurn.java @@ -0,0 +1,5653 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/test_case.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * One interaction between a human and virtual agent. The human provides some
+ * input and the virtual agent provides a response.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ConversationTurn} + */ +public final class ConversationTurn extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ConversationTurn) + ConversationTurnOrBuilder { + private static final long serialVersionUID = 0L; + // Use ConversationTurn.newBuilder() to construct. + private ConversationTurn(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ConversationTurn() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ConversationTurn(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ConversationTurn( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput.Builder subBuilder = + null; + if (userInput_ != null) { + subBuilder = userInput_.toBuilder(); + } + userInput_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(userInput_); + userInput_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput.Builder + subBuilder = null; + if (virtualAgentOutput_ != null) { + subBuilder = virtualAgentOutput_.toBuilder(); + } + virtualAgentOutput_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(virtualAgentOutput_); + virtualAgentOutput_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ConversationTurn_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ConversationTurn_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ConversationTurn.class, + com.google.cloud.dialogflow.cx.v3.ConversationTurn.Builder.class); + } + + public interface UserInputOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * 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.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.QueryInput input = 5; + * + * @return Whether the input field is set. + */ + boolean hasInput(); + /** + * + * + *
+     * 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.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.QueryInput input = 5; + * + * @return The input. + */ + com.google.cloud.dialogflow.cx.v3.QueryInput getInput(); + /** + * + * + *
+     * 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.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.QueryInput input = 5; + */ + com.google.cloud.dialogflow.cx.v3.QueryInputOrBuilder getInputOrBuilder(); + + /** + * + * + *
+     * Parameters that need to be injected into the conversation during intent
+     * detection.
+     * 
+ * + * .google.protobuf.Struct injected_parameters = 2; + * + * @return Whether the injectedParameters field is set. + */ + boolean hasInjectedParameters(); + /** + * + * + *
+     * Parameters that need to be injected into the conversation during intent
+     * detection.
+     * 
+ * + * .google.protobuf.Struct injected_parameters = 2; + * + * @return The injectedParameters. + */ + com.google.protobuf.Struct getInjectedParameters(); + /** + * + * + *
+     * Parameters that need to be injected into the conversation during intent
+     * detection.
+     * 
+ * + * .google.protobuf.Struct injected_parameters = 2; + */ + com.google.protobuf.StructOrBuilder getInjectedParametersOrBuilder(); + + /** + * + * + *
+     * If webhooks should be allowed to trigger in response to the user
+     * utterance. Often if parameters are injected, webhooks should not be
+     * enabled.
+     * 
+ * + * bool is_webhook_enabled = 3; + * + * @return The isWebhookEnabled. + */ + boolean getIsWebhookEnabled(); + } + /** + * + * + *
+   * The input from the human user.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput} + */ + public static final class UserInput extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput) + UserInputOrBuilder { + private static final long serialVersionUID = 0L; + // Use UserInput.newBuilder() to construct. + private UserInput(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UserInput() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UserInput(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UserInput( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + com.google.protobuf.Struct.Builder subBuilder = null; + if (injectedParameters_ != null) { + subBuilder = injectedParameters_.toBuilder(); + } + injectedParameters_ = + input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(injectedParameters_); + injectedParameters_ = subBuilder.buildPartial(); + } + + break; + } + case 24: + { + isWebhookEnabled_ = input.readBool(); + break; + } + case 42: + { + com.google.cloud.dialogflow.cx.v3.QueryInput.Builder subBuilder = null; + if (input_ != null) { + subBuilder = input_.toBuilder(); + } + input_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.QueryInput.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(input_); + input_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ConversationTurn_UserInput_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ConversationTurn_UserInput_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput.class, + com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput.Builder.class); + } + + public static final int INPUT_FIELD_NUMBER = 5; + private com.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.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.QueryInput input = 5; + * + * @return Whether the input field is set. + */ + @java.lang.Override + public boolean hasInput() { + return input_ != null; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.QueryInput input = 5; + * + * @return The input. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.QueryInput getInput() { + return input_ == null + ? com.google.cloud.dialogflow.cx.v3.QueryInput.getDefaultInstance() + : 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.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.QueryInput input = 5; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.QueryInputOrBuilder getInputOrBuilder() { + return getInput(); + } + + public static final int INJECTED_PARAMETERS_FIELD_NUMBER = 2; + private com.google.protobuf.Struct injectedParameters_; + /** + * + * + *
+     * Parameters that need to be injected into the conversation during intent
+     * detection.
+     * 
+ * + * .google.protobuf.Struct injected_parameters = 2; + * + * @return Whether the injectedParameters field is set. + */ + @java.lang.Override + public boolean hasInjectedParameters() { + return injectedParameters_ != null; + } + /** + * + * + *
+     * Parameters that need to be injected into the conversation during intent
+     * detection.
+     * 
+ * + * .google.protobuf.Struct injected_parameters = 2; + * + * @return The injectedParameters. + */ + @java.lang.Override + public com.google.protobuf.Struct getInjectedParameters() { + return injectedParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : injectedParameters_; + } + /** + * + * + *
+     * Parameters that need to be injected into the conversation during intent
+     * detection.
+     * 
+ * + * .google.protobuf.Struct injected_parameters = 2; + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getInjectedParametersOrBuilder() { + return getInjectedParameters(); + } + + public static final int IS_WEBHOOK_ENABLED_FIELD_NUMBER = 3; + private boolean isWebhookEnabled_; + /** + * + * + *
+     * If webhooks should be allowed to trigger in response to the user
+     * utterance. Often if parameters are injected, webhooks should not be
+     * enabled.
+     * 
+ * + * bool is_webhook_enabled = 3; + * + * @return The isWebhookEnabled. + */ + @java.lang.Override + public boolean getIsWebhookEnabled() { + return isWebhookEnabled_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (injectedParameters_ != null) { + output.writeMessage(2, getInjectedParameters()); + } + if (isWebhookEnabled_ != false) { + output.writeBool(3, isWebhookEnabled_); + } + if (input_ != null) { + output.writeMessage(5, getInput()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (injectedParameters_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, getInjectedParameters()); + } + if (isWebhookEnabled_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, isWebhookEnabled_); + } + if (input_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getInput()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput other = + (com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput) obj; + + if (hasInput() != other.hasInput()) return false; + if (hasInput()) { + if (!getInput().equals(other.getInput())) return false; + } + if (hasInjectedParameters() != other.hasInjectedParameters()) return false; + if (hasInjectedParameters()) { + if (!getInjectedParameters().equals(other.getInjectedParameters())) return false; + } + if (getIsWebhookEnabled() != other.getIsWebhookEnabled()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInput()) { + hash = (37 * hash) + INPUT_FIELD_NUMBER; + hash = (53 * hash) + getInput().hashCode(); + } + if (hasInjectedParameters()) { + hash = (37 * hash) + INJECTED_PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + getInjectedParameters().hashCode(); + } + hash = (37 * hash) + IS_WEBHOOK_ENABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsWebhookEnabled()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * The input from the human user.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput) + com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInputOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ConversationTurn_UserInput_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ConversationTurn_UserInput_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput.class, + com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (inputBuilder_ == null) { + input_ = null; + } else { + input_ = null; + inputBuilder_ = null; + } + if (injectedParametersBuilder_ == null) { + injectedParameters_ = null; + } else { + injectedParameters_ = null; + injectedParametersBuilder_ = null; + } + isWebhookEnabled_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ConversationTurn_UserInput_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput build() { + com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput buildPartial() { + com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput result = + new com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput(this); + if (inputBuilder_ == null) { + result.input_ = input_; + } else { + result.input_ = inputBuilder_.build(); + } + if (injectedParametersBuilder_ == null) { + result.injectedParameters_ = injectedParameters_; + } else { + result.injectedParameters_ = injectedParametersBuilder_.build(); + } + result.isWebhookEnabled_ = isWebhookEnabled_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput other) { + if (other + == com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput.getDefaultInstance()) + return this; + if (other.hasInput()) { + mergeInput(other.getInput()); + } + if (other.hasInjectedParameters()) { + mergeInjectedParameters(other.getInjectedParameters()); + } + if (other.getIsWebhookEnabled() != false) { + setIsWebhookEnabled(other.getIsWebhookEnabled()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.dialogflow.cx.v3.QueryInput input_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.QueryInput, + com.google.cloud.dialogflow.cx.v3.QueryInput.Builder, + com.google.cloud.dialogflow.cx.v3.QueryInputOrBuilder> + inputBuilder_; + /** + * + * + *
+       * 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.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.QueryInput input = 5; + * + * @return Whether the input field is set. + */ + public boolean hasInput() { + return inputBuilder_ != null || input_ != null; + } + /** + * + * + *
+       * 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.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.QueryInput input = 5; + * + * @return The input. + */ + public com.google.cloud.dialogflow.cx.v3.QueryInput getInput() { + if (inputBuilder_ == null) { + return input_ == null + ? com.google.cloud.dialogflow.cx.v3.QueryInput.getDefaultInstance() + : input_; + } else { + return inputBuilder_.getMessage(); + } + } + /** + * + * + *
+       * 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.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.QueryInput input = 5; + */ + public Builder setInput(com.google.cloud.dialogflow.cx.v3.QueryInput value) { + if (inputBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + input_ = value; + onChanged(); + } else { + inputBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * 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.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.QueryInput input = 5; + */ + public Builder setInput( + com.google.cloud.dialogflow.cx.v3.QueryInput.Builder builderForValue) { + if (inputBuilder_ == null) { + input_ = builderForValue.build(); + onChanged(); + } else { + inputBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * 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.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.QueryInput input = 5; + */ + public Builder mergeInput(com.google.cloud.dialogflow.cx.v3.QueryInput value) { + if (inputBuilder_ == null) { + if (input_ != null) { + input_ = + com.google.cloud.dialogflow.cx.v3.QueryInput.newBuilder(input_) + .mergeFrom(value) + .buildPartial(); + } else { + input_ = value; + } + onChanged(); + } else { + inputBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * 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.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.QueryInput input = 5; + */ + public Builder clearInput() { + if (inputBuilder_ == null) { + input_ = null; + onChanged(); + } else { + input_ = null; + inputBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * 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.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.QueryInput input = 5; + */ + public com.google.cloud.dialogflow.cx.v3.QueryInput.Builder getInputBuilder() { + + onChanged(); + return getInputFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * 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.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.QueryInput input = 5; + */ + public com.google.cloud.dialogflow.cx.v3.QueryInputOrBuilder getInputOrBuilder() { + if (inputBuilder_ != null) { + return inputBuilder_.getMessageOrBuilder(); + } else { + return input_ == null + ? com.google.cloud.dialogflow.cx.v3.QueryInput.getDefaultInstance() + : 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.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.QueryInput input = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.QueryInput, + com.google.cloud.dialogflow.cx.v3.QueryInput.Builder, + com.google.cloud.dialogflow.cx.v3.QueryInputOrBuilder> + getInputFieldBuilder() { + if (inputBuilder_ == null) { + inputBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.QueryInput, + com.google.cloud.dialogflow.cx.v3.QueryInput.Builder, + com.google.cloud.dialogflow.cx.v3.QueryInputOrBuilder>( + getInput(), getParentForChildren(), isClean()); + input_ = null; + } + return inputBuilder_; + } + + private com.google.protobuf.Struct injectedParameters_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + injectedParametersBuilder_; + /** + * + * + *
+       * Parameters that need to be injected into the conversation during intent
+       * detection.
+       * 
+ * + * .google.protobuf.Struct injected_parameters = 2; + * + * @return Whether the injectedParameters field is set. + */ + public boolean hasInjectedParameters() { + return injectedParametersBuilder_ != null || injectedParameters_ != null; + } + /** + * + * + *
+       * Parameters that need to be injected into the conversation during intent
+       * detection.
+       * 
+ * + * .google.protobuf.Struct injected_parameters = 2; + * + * @return The injectedParameters. + */ + public com.google.protobuf.Struct getInjectedParameters() { + if (injectedParametersBuilder_ == null) { + return injectedParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : injectedParameters_; + } else { + return injectedParametersBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Parameters that need to be injected into the conversation during intent
+       * detection.
+       * 
+ * + * .google.protobuf.Struct injected_parameters = 2; + */ + public Builder setInjectedParameters(com.google.protobuf.Struct value) { + if (injectedParametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + injectedParameters_ = value; + onChanged(); + } else { + injectedParametersBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Parameters that need to be injected into the conversation during intent
+       * detection.
+       * 
+ * + * .google.protobuf.Struct injected_parameters = 2; + */ + public Builder setInjectedParameters(com.google.protobuf.Struct.Builder builderForValue) { + if (injectedParametersBuilder_ == null) { + injectedParameters_ = builderForValue.build(); + onChanged(); + } else { + injectedParametersBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Parameters that need to be injected into the conversation during intent
+       * detection.
+       * 
+ * + * .google.protobuf.Struct injected_parameters = 2; + */ + public Builder mergeInjectedParameters(com.google.protobuf.Struct value) { + if (injectedParametersBuilder_ == null) { + if (injectedParameters_ != null) { + injectedParameters_ = + com.google.protobuf.Struct.newBuilder(injectedParameters_) + .mergeFrom(value) + .buildPartial(); + } else { + injectedParameters_ = value; + } + onChanged(); + } else { + injectedParametersBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Parameters that need to be injected into the conversation during intent
+       * detection.
+       * 
+ * + * .google.protobuf.Struct injected_parameters = 2; + */ + public Builder clearInjectedParameters() { + if (injectedParametersBuilder_ == null) { + injectedParameters_ = null; + onChanged(); + } else { + injectedParameters_ = null; + injectedParametersBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Parameters that need to be injected into the conversation during intent
+       * detection.
+       * 
+ * + * .google.protobuf.Struct injected_parameters = 2; + */ + public com.google.protobuf.Struct.Builder getInjectedParametersBuilder() { + + onChanged(); + return getInjectedParametersFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Parameters that need to be injected into the conversation during intent
+       * detection.
+       * 
+ * + * .google.protobuf.Struct injected_parameters = 2; + */ + public com.google.protobuf.StructOrBuilder getInjectedParametersOrBuilder() { + if (injectedParametersBuilder_ != null) { + return injectedParametersBuilder_.getMessageOrBuilder(); + } else { + return injectedParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : injectedParameters_; + } + } + /** + * + * + *
+       * Parameters that need to be injected into the conversation during intent
+       * detection.
+       * 
+ * + * .google.protobuf.Struct injected_parameters = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + getInjectedParametersFieldBuilder() { + if (injectedParametersBuilder_ == null) { + injectedParametersBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder>( + getInjectedParameters(), getParentForChildren(), isClean()); + injectedParameters_ = null; + } + return injectedParametersBuilder_; + } + + private boolean isWebhookEnabled_; + /** + * + * + *
+       * If webhooks should be allowed to trigger in response to the user
+       * utterance. Often if parameters are injected, webhooks should not be
+       * enabled.
+       * 
+ * + * bool is_webhook_enabled = 3; + * + * @return The isWebhookEnabled. + */ + @java.lang.Override + public boolean getIsWebhookEnabled() { + return isWebhookEnabled_; + } + /** + * + * + *
+       * If webhooks should be allowed to trigger in response to the user
+       * utterance. Often if parameters are injected, webhooks should not be
+       * enabled.
+       * 
+ * + * bool is_webhook_enabled = 3; + * + * @param value The isWebhookEnabled to set. + * @return This builder for chaining. + */ + public Builder setIsWebhookEnabled(boolean value) { + + isWebhookEnabled_ = value; + onChanged(); + 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.
+       * 
+ * + * bool is_webhook_enabled = 3; + * + * @return This builder for chaining. + */ + public Builder clearIsWebhookEnabled() { + + isWebhookEnabled_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput) + private static final com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput(); + } + + public static com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UserInput parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UserInput(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface VirtualAgentOutputOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The session parameters available to the bot at this point.
+     * 
+ * + * .google.protobuf.Struct session_parameters = 4; + * + * @return Whether the sessionParameters field is set. + */ + boolean hasSessionParameters(); + /** + * + * + *
+     * The session parameters available to the bot at this point.
+     * 
+ * + * .google.protobuf.Struct session_parameters = 4; + * + * @return The sessionParameters. + */ + com.google.protobuf.Struct getSessionParameters(); + /** + * + * + *
+     * The session parameters available to the bot at this point.
+     * 
+ * + * .google.protobuf.Struct session_parameters = 4; + */ + com.google.protobuf.StructOrBuilder getSessionParametersOrBuilder(); + + /** + * + * + *
+     * 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.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getDifferencesList(); + /** + * + * + *
+     * 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.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.dialogflow.cx.v3.TestRunDifference getDifferences(int index); + /** + * + * + *
+     * 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.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getDifferencesCount(); + /** + * + * + *
+     * 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.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getDifferencesOrBuilderList(); + /** + * + * + *
+     * 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.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.dialogflow.cx.v3.TestRunDifferenceOrBuilder getDifferencesOrBuilder(int index); + + /** + * + * + *
+     * Required. Input only. The diagnostic
+     * [info][Session.DetectIntentResponse.QueryResult.diagnostic_info]
+     * output for the turn.
+     * 
+ * + * + * .google.protobuf.Struct diagnostic_info = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return Whether the diagnosticInfo field is set. + */ + boolean hasDiagnosticInfo(); + /** + * + * + *
+     * Required. Input only. The diagnostic
+     * [info][Session.DetectIntentResponse.QueryResult.diagnostic_info]
+     * output for the turn.
+     * 
+ * + * + * .google.protobuf.Struct diagnostic_info = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The diagnosticInfo. + */ + com.google.protobuf.Struct getDiagnosticInfo(); + /** + * + * + *
+     * Required. Input only. The diagnostic
+     * [info][Session.DetectIntentResponse.QueryResult.diagnostic_info]
+     * output for the turn.
+     * 
+ * + * + * .google.protobuf.Struct diagnostic_info = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * + */ + com.google.protobuf.StructOrBuilder getDiagnosticInfoOrBuilder(); + + /** + * + * + *
+     * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that triggered the response. Only some fields such as
+     * name and displayname will be set.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Intent triggered_intent = 7; + * + * @return Whether the triggeredIntent field is set. + */ + boolean hasTriggeredIntent(); + /** + * + * + *
+     * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that triggered the response. Only some fields such as
+     * name and displayname will be set.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Intent triggered_intent = 7; + * + * @return The triggeredIntent. + */ + com.google.cloud.dialogflow.cx.v3.Intent getTriggeredIntent(); + /** + * + * + *
+     * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that triggered the response. Only some fields such as
+     * name and displayname will be set.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Intent triggered_intent = 7; + */ + com.google.cloud.dialogflow.cx.v3.IntentOrBuilder getTriggeredIntentOrBuilder(); + + /** + * + * + *
+     * The [Page][google.cloud.dialogflow.cx.v3.Page] on which the utterance was spoken. Only some fields such as
+     * name and displayname will be set.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Page current_page = 8; + * + * @return Whether the currentPage field is set. + */ + boolean hasCurrentPage(); + /** + * + * + *
+     * The [Page][google.cloud.dialogflow.cx.v3.Page] on which the utterance was spoken. Only some fields such as
+     * name and displayname will be set.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Page current_page = 8; + * + * @return The currentPage. + */ + com.google.cloud.dialogflow.cx.v3.Page getCurrentPage(); + /** + * + * + *
+     * The [Page][google.cloud.dialogflow.cx.v3.Page] on which the utterance was spoken. Only some fields such as
+     * name and displayname will be set.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Page current_page = 8; + */ + com.google.cloud.dialogflow.cx.v3.PageOrBuilder getCurrentPageOrBuilder(); + + /** + * + * + *
+     * The [text][google.cloud.dialogflow.cx.v3.ResponseMessage.Text] responses from the agent for the turn.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.Text text_responses = 9; + */ + java.util.List getTextResponsesList(); + /** + * + * + *
+     * The [text][google.cloud.dialogflow.cx.v3.ResponseMessage.Text] responses from the agent for the turn.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.Text text_responses = 9; + */ + com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text getTextResponses(int index); + /** + * + * + *
+     * The [text][google.cloud.dialogflow.cx.v3.ResponseMessage.Text] responses from the agent for the turn.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.Text text_responses = 9; + */ + int getTextResponsesCount(); + /** + * + * + *
+     * The [text][google.cloud.dialogflow.cx.v3.ResponseMessage.Text] responses from the agent for the turn.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.Text text_responses = 9; + */ + java.util.List + getTextResponsesOrBuilderList(); + /** + * + * + *
+     * The [text][google.cloud.dialogflow.cx.v3.ResponseMessage.Text] responses from the agent for the turn.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.Text text_responses = 9; + */ + com.google.cloud.dialogflow.cx.v3.ResponseMessage.TextOrBuilder getTextResponsesOrBuilder( + int index); + + /** + * + * + *
+     * Response error from the agent in the test result. If set, other output
+     * is empty.
+     * 
+ * + * .google.rpc.Status status = 10; + * + * @return Whether the status field is set. + */ + boolean hasStatus(); + /** + * + * + *
+     * Response error from the agent in the test result. If set, other output
+     * is empty.
+     * 
+ * + * .google.rpc.Status status = 10; + * + * @return The status. + */ + com.google.rpc.Status getStatus(); + /** + * + * + *
+     * Response error from the agent in the test result. If set, other output
+     * is empty.
+     * 
+ * + * .google.rpc.Status status = 10; + */ + com.google.rpc.StatusOrBuilder getStatusOrBuilder(); + } + /** + * + * + *
+   * The output from the virtual agent.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput} + */ + public static final class VirtualAgentOutput extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput) + VirtualAgentOutputOrBuilder { + private static final long serialVersionUID = 0L; + // Use VirtualAgentOutput.newBuilder() to construct. + private VirtualAgentOutput(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VirtualAgentOutput() { + differences_ = java.util.Collections.emptyList(); + textResponses_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VirtualAgentOutput(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private VirtualAgentOutput( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 34: + { + com.google.protobuf.Struct.Builder subBuilder = null; + if (sessionParameters_ != null) { + subBuilder = sessionParameters_.toBuilder(); + } + sessionParameters_ = + input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(sessionParameters_); + sessionParameters_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + differences_ = + new java.util.ArrayList< + com.google.cloud.dialogflow.cx.v3.TestRunDifference>(); + mutable_bitField0_ |= 0x00000001; + } + differences_.add( + input.readMessage( + com.google.cloud.dialogflow.cx.v3.TestRunDifference.parser(), + extensionRegistry)); + break; + } + case 50: + { + com.google.protobuf.Struct.Builder subBuilder = null; + if (diagnosticInfo_ != null) { + subBuilder = diagnosticInfo_.toBuilder(); + } + diagnosticInfo_ = + input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(diagnosticInfo_); + diagnosticInfo_ = subBuilder.buildPartial(); + } + + break; + } + case 58: + { + com.google.cloud.dialogflow.cx.v3.Intent.Builder subBuilder = null; + if (triggeredIntent_ != null) { + subBuilder = triggeredIntent_.toBuilder(); + } + triggeredIntent_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.Intent.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(triggeredIntent_); + triggeredIntent_ = subBuilder.buildPartial(); + } + + break; + } + case 66: + { + com.google.cloud.dialogflow.cx.v3.Page.Builder subBuilder = null; + if (currentPage_ != null) { + subBuilder = currentPage_.toBuilder(); + } + currentPage_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.Page.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(currentPage_); + currentPage_ = subBuilder.buildPartial(); + } + + break; + } + case 74: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + textResponses_ = + new java.util.ArrayList< + com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text>(); + mutable_bitField0_ |= 0x00000002; + } + textResponses_.add( + input.readMessage( + com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text.parser(), + extensionRegistry)); + break; + } + case 82: + { + com.google.rpc.Status.Builder subBuilder = null; + if (status_ != null) { + subBuilder = status_.toBuilder(); + } + status_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(status_); + status_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + differences_ = java.util.Collections.unmodifiableList(differences_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + textResponses_ = java.util.Collections.unmodifiableList(textResponses_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ConversationTurn_VirtualAgentOutput_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ConversationTurn_VirtualAgentOutput_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput.class, + com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput.Builder.class); + } + + public static final int SESSION_PARAMETERS_FIELD_NUMBER = 4; + private com.google.protobuf.Struct sessionParameters_; + /** + * + * + *
+     * The session parameters available to the bot at this point.
+     * 
+ * + * .google.protobuf.Struct session_parameters = 4; + * + * @return Whether the sessionParameters field is set. + */ + @java.lang.Override + public boolean hasSessionParameters() { + return sessionParameters_ != null; + } + /** + * + * + *
+     * The session parameters available to the bot at this point.
+     * 
+ * + * .google.protobuf.Struct session_parameters = 4; + * + * @return The sessionParameters. + */ + @java.lang.Override + public com.google.protobuf.Struct getSessionParameters() { + return sessionParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : sessionParameters_; + } + /** + * + * + *
+     * The session parameters available to the bot at this point.
+     * 
+ * + * .google.protobuf.Struct session_parameters = 4; + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getSessionParametersOrBuilder() { + return getSessionParameters(); + } + + public static final int DIFFERENCES_FIELD_NUMBER = 5; + private java.util.List 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.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getDifferencesList() { + return 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.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getDifferencesOrBuilderList() { + return 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.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getDifferencesCount() { + return differences_.size(); + } + /** + * + * + *
+     * 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.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TestRunDifference getDifferences(int index) { + return differences_.get(index); + } + /** + * + * + *
+     * 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.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TestRunDifferenceOrBuilder getDifferencesOrBuilder( + int index) { + return differences_.get(index); + } + + public static final int DIAGNOSTIC_INFO_FIELD_NUMBER = 6; + private com.google.protobuf.Struct diagnosticInfo_; + /** + * + * + *
+     * Required. Input only. The diagnostic
+     * [info][Session.DetectIntentResponse.QueryResult.diagnostic_info]
+     * output for the turn.
+     * 
+ * + * + * .google.protobuf.Struct diagnostic_info = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return Whether the diagnosticInfo field is set. + */ + @java.lang.Override + public boolean hasDiagnosticInfo() { + return diagnosticInfo_ != null; + } + /** + * + * + *
+     * Required. Input only. The diagnostic
+     * [info][Session.DetectIntentResponse.QueryResult.diagnostic_info]
+     * output for the turn.
+     * 
+ * + * + * .google.protobuf.Struct diagnostic_info = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The diagnosticInfo. + */ + @java.lang.Override + public com.google.protobuf.Struct getDiagnosticInfo() { + return diagnosticInfo_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : diagnosticInfo_; + } + /** + * + * + *
+     * Required. Input only. The diagnostic
+     * [info][Session.DetectIntentResponse.QueryResult.diagnostic_info]
+     * output for the turn.
+     * 
+ * + * + * .google.protobuf.Struct diagnostic_info = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getDiagnosticInfoOrBuilder() { + return getDiagnosticInfo(); + } + + public static final int TRIGGERED_INTENT_FIELD_NUMBER = 7; + private com.google.cloud.dialogflow.cx.v3.Intent triggeredIntent_; + /** + * + * + *
+     * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that triggered the response. Only some fields such as
+     * name and displayname will be set.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Intent triggered_intent = 7; + * + * @return Whether the triggeredIntent field is set. + */ + @java.lang.Override + public boolean hasTriggeredIntent() { + return triggeredIntent_ != null; + } + /** + * + * + *
+     * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that triggered the response. Only some fields such as
+     * name and displayname will be set.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Intent triggered_intent = 7; + * + * @return The triggeredIntent. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Intent getTriggeredIntent() { + return triggeredIntent_ == null + ? com.google.cloud.dialogflow.cx.v3.Intent.getDefaultInstance() + : triggeredIntent_; + } + /** + * + * + *
+     * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that triggered the response. Only some fields such as
+     * name and displayname will be set.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Intent triggered_intent = 7; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.IntentOrBuilder getTriggeredIntentOrBuilder() { + return getTriggeredIntent(); + } + + public static final int CURRENT_PAGE_FIELD_NUMBER = 8; + private com.google.cloud.dialogflow.cx.v3.Page currentPage_; + /** + * + * + *
+     * The [Page][google.cloud.dialogflow.cx.v3.Page] on which the utterance was spoken. Only some fields such as
+     * name and displayname will be set.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Page current_page = 8; + * + * @return Whether the currentPage field is set. + */ + @java.lang.Override + public boolean hasCurrentPage() { + return currentPage_ != null; + } + /** + * + * + *
+     * The [Page][google.cloud.dialogflow.cx.v3.Page] on which the utterance was spoken. Only some fields such as
+     * name and displayname will be set.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Page current_page = 8; + * + * @return The currentPage. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Page getCurrentPage() { + return currentPage_ == null + ? com.google.cloud.dialogflow.cx.v3.Page.getDefaultInstance() + : currentPage_; + } + /** + * + * + *
+     * The [Page][google.cloud.dialogflow.cx.v3.Page] on which the utterance was spoken. Only some fields such as
+     * name and displayname will be set.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Page current_page = 8; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.PageOrBuilder getCurrentPageOrBuilder() { + return getCurrentPage(); + } + + public static final int TEXT_RESPONSES_FIELD_NUMBER = 9; + private java.util.List textResponses_; + /** + * + * + *
+     * The [text][google.cloud.dialogflow.cx.v3.ResponseMessage.Text] responses from the agent for the turn.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.Text text_responses = 9; + */ + @java.lang.Override + public java.util.List + getTextResponsesList() { + return textResponses_; + } + /** + * + * + *
+     * The [text][google.cloud.dialogflow.cx.v3.ResponseMessage.Text] responses from the agent for the turn.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.Text text_responses = 9; + */ + @java.lang.Override + public java.util.List + getTextResponsesOrBuilderList() { + return textResponses_; + } + /** + * + * + *
+     * The [text][google.cloud.dialogflow.cx.v3.ResponseMessage.Text] responses from the agent for the turn.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.Text text_responses = 9; + */ + @java.lang.Override + public int getTextResponsesCount() { + return textResponses_.size(); + } + /** + * + * + *
+     * The [text][google.cloud.dialogflow.cx.v3.ResponseMessage.Text] responses from the agent for the turn.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.Text text_responses = 9; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text getTextResponses(int index) { + return textResponses_.get(index); + } + /** + * + * + *
+     * The [text][google.cloud.dialogflow.cx.v3.ResponseMessage.Text] responses from the agent for the turn.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.Text text_responses = 9; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.TextOrBuilder + getTextResponsesOrBuilder(int index) { + return textResponses_.get(index); + } + + public static final int STATUS_FIELD_NUMBER = 10; + private com.google.rpc.Status status_; + /** + * + * + *
+     * Response error from the agent in the test result. If set, other output
+     * is empty.
+     * 
+ * + * .google.rpc.Status status = 10; + * + * @return Whether the status field is set. + */ + @java.lang.Override + public boolean hasStatus() { + return status_ != null; + } + /** + * + * + *
+     * Response error from the agent in the test result. If set, other output
+     * is empty.
+     * 
+ * + * .google.rpc.Status status = 10; + * + * @return The status. + */ + @java.lang.Override + public com.google.rpc.Status getStatus() { + return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; + } + /** + * + * + *
+     * Response error from the agent in the test result. If set, other output
+     * is empty.
+     * 
+ * + * .google.rpc.Status status = 10; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { + return getStatus(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (sessionParameters_ != null) { + output.writeMessage(4, getSessionParameters()); + } + for (int i = 0; i < differences_.size(); i++) { + output.writeMessage(5, differences_.get(i)); + } + if (diagnosticInfo_ != null) { + output.writeMessage(6, getDiagnosticInfo()); + } + if (triggeredIntent_ != null) { + output.writeMessage(7, getTriggeredIntent()); + } + if (currentPage_ != null) { + output.writeMessage(8, getCurrentPage()); + } + for (int i = 0; i < textResponses_.size(); i++) { + output.writeMessage(9, textResponses_.get(i)); + } + if (status_ != null) { + output.writeMessage(10, getStatus()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (sessionParameters_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getSessionParameters()); + } + for (int i = 0; i < differences_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, differences_.get(i)); + } + if (diagnosticInfo_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getDiagnosticInfo()); + } + if (triggeredIntent_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getTriggeredIntent()); + } + if (currentPage_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getCurrentPage()); + } + for (int i = 0; i < textResponses_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, textResponses_.get(i)); + } + if (status_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getStatus()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput other = + (com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput) obj; + + if (hasSessionParameters() != other.hasSessionParameters()) return false; + if (hasSessionParameters()) { + if (!getSessionParameters().equals(other.getSessionParameters())) return false; + } + if (!getDifferencesList().equals(other.getDifferencesList())) return false; + if (hasDiagnosticInfo() != other.hasDiagnosticInfo()) return false; + if (hasDiagnosticInfo()) { + if (!getDiagnosticInfo().equals(other.getDiagnosticInfo())) return false; + } + if (hasTriggeredIntent() != other.hasTriggeredIntent()) return false; + if (hasTriggeredIntent()) { + if (!getTriggeredIntent().equals(other.getTriggeredIntent())) return false; + } + if (hasCurrentPage() != other.hasCurrentPage()) return false; + if (hasCurrentPage()) { + if (!getCurrentPage().equals(other.getCurrentPage())) return false; + } + if (!getTextResponsesList().equals(other.getTextResponsesList())) return false; + if (hasStatus() != other.hasStatus()) return false; + if (hasStatus()) { + if (!getStatus().equals(other.getStatus())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasSessionParameters()) { + hash = (37 * hash) + SESSION_PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + getSessionParameters().hashCode(); + } + if (getDifferencesCount() > 0) { + hash = (37 * hash) + DIFFERENCES_FIELD_NUMBER; + hash = (53 * hash) + getDifferencesList().hashCode(); + } + if (hasDiagnosticInfo()) { + hash = (37 * hash) + DIAGNOSTIC_INFO_FIELD_NUMBER; + hash = (53 * hash) + getDiagnosticInfo().hashCode(); + } + if (hasTriggeredIntent()) { + hash = (37 * hash) + TRIGGERED_INTENT_FIELD_NUMBER; + hash = (53 * hash) + getTriggeredIntent().hashCode(); + } + if (hasCurrentPage()) { + hash = (37 * hash) + CURRENT_PAGE_FIELD_NUMBER; + hash = (53 * hash) + getCurrentPage().hashCode(); + } + if (getTextResponsesCount() > 0) { + hash = (37 * hash) + TEXT_RESPONSES_FIELD_NUMBER; + hash = (53 * hash) + getTextResponsesList().hashCode(); + } + if (hasStatus()) { + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + getStatus().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * The output from the virtual agent.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput) + com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutputOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ConversationTurn_VirtualAgentOutput_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ConversationTurn_VirtualAgentOutput_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput.class, + com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput.Builder + .class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDifferencesFieldBuilder(); + getTextResponsesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (sessionParametersBuilder_ == null) { + sessionParameters_ = null; + } else { + sessionParameters_ = null; + sessionParametersBuilder_ = null; + } + if (differencesBuilder_ == null) { + differences_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + differencesBuilder_.clear(); + } + if (diagnosticInfoBuilder_ == null) { + diagnosticInfo_ = null; + } else { + diagnosticInfo_ = null; + diagnosticInfoBuilder_ = null; + } + if (triggeredIntentBuilder_ == null) { + triggeredIntent_ = null; + } else { + triggeredIntent_ = null; + triggeredIntentBuilder_ = null; + } + if (currentPageBuilder_ == null) { + currentPage_ = null; + } else { + currentPage_ = null; + currentPageBuilder_ = null; + } + if (textResponsesBuilder_ == null) { + textResponses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + textResponsesBuilder_.clear(); + } + if (statusBuilder_ == null) { + status_ = null; + } else { + status_ = null; + statusBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ConversationTurn_VirtualAgentOutput_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput build() { + com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput buildPartial() { + com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput result = + new com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput(this); + int from_bitField0_ = bitField0_; + if (sessionParametersBuilder_ == null) { + result.sessionParameters_ = sessionParameters_; + } else { + result.sessionParameters_ = sessionParametersBuilder_.build(); + } + if (differencesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + differences_ = java.util.Collections.unmodifiableList(differences_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.differences_ = differences_; + } else { + result.differences_ = differencesBuilder_.build(); + } + if (diagnosticInfoBuilder_ == null) { + result.diagnosticInfo_ = diagnosticInfo_; + } else { + result.diagnosticInfo_ = diagnosticInfoBuilder_.build(); + } + if (triggeredIntentBuilder_ == null) { + result.triggeredIntent_ = triggeredIntent_; + } else { + result.triggeredIntent_ = triggeredIntentBuilder_.build(); + } + if (currentPageBuilder_ == null) { + result.currentPage_ = currentPage_; + } else { + result.currentPage_ = currentPageBuilder_.build(); + } + if (textResponsesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + textResponses_ = java.util.Collections.unmodifiableList(textResponses_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.textResponses_ = textResponses_; + } else { + result.textResponses_ = textResponsesBuilder_.build(); + } + if (statusBuilder_ == null) { + result.status_ = status_; + } else { + result.status_ = statusBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput other) { + if (other + == com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput + .getDefaultInstance()) return this; + if (other.hasSessionParameters()) { + mergeSessionParameters(other.getSessionParameters()); + } + if (differencesBuilder_ == null) { + if (!other.differences_.isEmpty()) { + if (differences_.isEmpty()) { + differences_ = other.differences_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDifferencesIsMutable(); + differences_.addAll(other.differences_); + } + onChanged(); + } + } else { + if (!other.differences_.isEmpty()) { + if (differencesBuilder_.isEmpty()) { + differencesBuilder_.dispose(); + differencesBuilder_ = null; + differences_ = other.differences_; + bitField0_ = (bitField0_ & ~0x00000001); + differencesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDifferencesFieldBuilder() + : null; + } else { + differencesBuilder_.addAllMessages(other.differences_); + } + } + } + if (other.hasDiagnosticInfo()) { + mergeDiagnosticInfo(other.getDiagnosticInfo()); + } + if (other.hasTriggeredIntent()) { + mergeTriggeredIntent(other.getTriggeredIntent()); + } + if (other.hasCurrentPage()) { + mergeCurrentPage(other.getCurrentPage()); + } + if (textResponsesBuilder_ == null) { + if (!other.textResponses_.isEmpty()) { + if (textResponses_.isEmpty()) { + textResponses_ = other.textResponses_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureTextResponsesIsMutable(); + textResponses_.addAll(other.textResponses_); + } + onChanged(); + } + } else { + if (!other.textResponses_.isEmpty()) { + if (textResponsesBuilder_.isEmpty()) { + textResponsesBuilder_.dispose(); + textResponsesBuilder_ = null; + textResponses_ = other.textResponses_; + bitField0_ = (bitField0_ & ~0x00000002); + textResponsesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTextResponsesFieldBuilder() + : null; + } else { + textResponsesBuilder_.addAllMessages(other.textResponses_); + } + } + } + if (other.hasStatus()) { + mergeStatus(other.getStatus()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.protobuf.Struct sessionParameters_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + sessionParametersBuilder_; + /** + * + * + *
+       * The session parameters available to the bot at this point.
+       * 
+ * + * .google.protobuf.Struct session_parameters = 4; + * + * @return Whether the sessionParameters field is set. + */ + public boolean hasSessionParameters() { + return sessionParametersBuilder_ != null || sessionParameters_ != null; + } + /** + * + * + *
+       * The session parameters available to the bot at this point.
+       * 
+ * + * .google.protobuf.Struct session_parameters = 4; + * + * @return The sessionParameters. + */ + public com.google.protobuf.Struct getSessionParameters() { + if (sessionParametersBuilder_ == null) { + return sessionParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : sessionParameters_; + } else { + return sessionParametersBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The session parameters available to the bot at this point.
+       * 
+ * + * .google.protobuf.Struct session_parameters = 4; + */ + public Builder setSessionParameters(com.google.protobuf.Struct value) { + if (sessionParametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sessionParameters_ = value; + onChanged(); + } else { + sessionParametersBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * The session parameters available to the bot at this point.
+       * 
+ * + * .google.protobuf.Struct session_parameters = 4; + */ + public Builder setSessionParameters(com.google.protobuf.Struct.Builder builderForValue) { + if (sessionParametersBuilder_ == null) { + sessionParameters_ = builderForValue.build(); + onChanged(); + } else { + sessionParametersBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * The session parameters available to the bot at this point.
+       * 
+ * + * .google.protobuf.Struct session_parameters = 4; + */ + public Builder mergeSessionParameters(com.google.protobuf.Struct value) { + if (sessionParametersBuilder_ == null) { + if (sessionParameters_ != null) { + sessionParameters_ = + com.google.protobuf.Struct.newBuilder(sessionParameters_) + .mergeFrom(value) + .buildPartial(); + } else { + sessionParameters_ = value; + } + onChanged(); + } else { + sessionParametersBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * The session parameters available to the bot at this point.
+       * 
+ * + * .google.protobuf.Struct session_parameters = 4; + */ + public Builder clearSessionParameters() { + if (sessionParametersBuilder_ == null) { + sessionParameters_ = null; + onChanged(); + } else { + sessionParameters_ = null; + sessionParametersBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * The session parameters available to the bot at this point.
+       * 
+ * + * .google.protobuf.Struct session_parameters = 4; + */ + public com.google.protobuf.Struct.Builder getSessionParametersBuilder() { + + onChanged(); + return getSessionParametersFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The session parameters available to the bot at this point.
+       * 
+ * + * .google.protobuf.Struct session_parameters = 4; + */ + public com.google.protobuf.StructOrBuilder getSessionParametersOrBuilder() { + if (sessionParametersBuilder_ != null) { + return sessionParametersBuilder_.getMessageOrBuilder(); + } else { + return sessionParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : sessionParameters_; + } + } + /** + * + * + *
+       * The session parameters available to the bot at this point.
+       * 
+ * + * .google.protobuf.Struct session_parameters = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + getSessionParametersFieldBuilder() { + if (sessionParametersBuilder_ == null) { + sessionParametersBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder>( + getSessionParameters(), getParentForChildren(), isClean()); + sessionParameters_ = null; + } + return sessionParametersBuilder_; + } + + private java.util.List differences_ = + java.util.Collections.emptyList(); + + private void ensureDifferencesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + differences_ = + new java.util.ArrayList( + differences_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TestRunDifference, + com.google.cloud.dialogflow.cx.v3.TestRunDifference.Builder, + com.google.cloud.dialogflow.cx.v3.TestRunDifferenceOrBuilder> + differencesBuilder_; + + /** + * + * + *
+       * 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.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getDifferencesList() { + if (differencesBuilder_ == null) { + return java.util.Collections.unmodifiableList(differences_); + } else { + return differencesBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * 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.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getDifferencesCount() { + if (differencesBuilder_ == null) { + return differences_.size(); + } else { + return differencesBuilder_.getCount(); + } + } + /** + * + * + *
+       * 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.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.dialogflow.cx.v3.TestRunDifference getDifferences(int index) { + if (differencesBuilder_ == null) { + return differences_.get(index); + } else { + return differencesBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * 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.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDifferences( + int index, com.google.cloud.dialogflow.cx.v3.TestRunDifference value) { + if (differencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDifferencesIsMutable(); + differences_.set(index, value); + onChanged(); + } else { + differencesBuilder_.setMessage(index, value); + } + 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.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDifferences( + int index, com.google.cloud.dialogflow.cx.v3.TestRunDifference.Builder builderForValue) { + if (differencesBuilder_ == null) { + ensureDifferencesIsMutable(); + differences_.set(index, builderForValue.build()); + onChanged(); + } else { + differencesBuilder_.setMessage(index, builderForValue.build()); + } + 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.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addDifferences(com.google.cloud.dialogflow.cx.v3.TestRunDifference value) { + if (differencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDifferencesIsMutable(); + differences_.add(value); + onChanged(); + } else { + differencesBuilder_.addMessage(value); + } + 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.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addDifferences( + int index, com.google.cloud.dialogflow.cx.v3.TestRunDifference value) { + if (differencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDifferencesIsMutable(); + differences_.add(index, value); + onChanged(); + } else { + differencesBuilder_.addMessage(index, value); + } + 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.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addDifferences( + com.google.cloud.dialogflow.cx.v3.TestRunDifference.Builder builderForValue) { + if (differencesBuilder_ == null) { + ensureDifferencesIsMutable(); + differences_.add(builderForValue.build()); + onChanged(); + } else { + differencesBuilder_.addMessage(builderForValue.build()); + } + 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.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addDifferences( + int index, com.google.cloud.dialogflow.cx.v3.TestRunDifference.Builder builderForValue) { + if (differencesBuilder_ == null) { + ensureDifferencesIsMutable(); + differences_.add(index, builderForValue.build()); + onChanged(); + } else { + differencesBuilder_.addMessage(index, builderForValue.build()); + } + 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.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllDifferences( + java.lang.Iterable + values) { + if (differencesBuilder_ == null) { + ensureDifferencesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, differences_); + onChanged(); + } else { + differencesBuilder_.addAllMessages(values); + } + 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.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearDifferences() { + if (differencesBuilder_ == null) { + differences_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + differencesBuilder_.clear(); + } + 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.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeDifferences(int index) { + if (differencesBuilder_ == null) { + ensureDifferencesIsMutable(); + differences_.remove(index); + onChanged(); + } else { + differencesBuilder_.remove(index); + } + 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.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.dialogflow.cx.v3.TestRunDifference.Builder getDifferencesBuilder( + int index) { + return getDifferencesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * 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.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.dialogflow.cx.v3.TestRunDifferenceOrBuilder getDifferencesOrBuilder( + int index) { + if (differencesBuilder_ == null) { + return differences_.get(index); + } else { + return differencesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * 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.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getDifferencesOrBuilderList() { + if (differencesBuilder_ != null) { + return differencesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(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.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.dialogflow.cx.v3.TestRunDifference.Builder addDifferencesBuilder() { + return getDifferencesFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3.TestRunDifference.getDefaultInstance()); + } + /** + * + * + *
+       * 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.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.dialogflow.cx.v3.TestRunDifference.Builder addDifferencesBuilder( + int index) { + return getDifferencesFieldBuilder() + .addBuilder( + index, com.google.cloud.dialogflow.cx.v3.TestRunDifference.getDefaultInstance()); + } + /** + * + * + *
+       * 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.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getDifferencesBuilderList() { + return getDifferencesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TestRunDifference, + com.google.cloud.dialogflow.cx.v3.TestRunDifference.Builder, + com.google.cloud.dialogflow.cx.v3.TestRunDifferenceOrBuilder> + getDifferencesFieldBuilder() { + if (differencesBuilder_ == null) { + differencesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TestRunDifference, + com.google.cloud.dialogflow.cx.v3.TestRunDifference.Builder, + com.google.cloud.dialogflow.cx.v3.TestRunDifferenceOrBuilder>( + differences_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + differences_ = null; + } + return differencesBuilder_; + } + + private com.google.protobuf.Struct diagnosticInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + diagnosticInfoBuilder_; + /** + * + * + *
+       * Required. Input only. The diagnostic
+       * [info][Session.DetectIntentResponse.QueryResult.diagnostic_info]
+       * output for the turn.
+       * 
+ * + * + * .google.protobuf.Struct diagnostic_info = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return Whether the diagnosticInfo field is set. + */ + public boolean hasDiagnosticInfo() { + return diagnosticInfoBuilder_ != null || diagnosticInfo_ != null; + } + /** + * + * + *
+       * Required. Input only. The diagnostic
+       * [info][Session.DetectIntentResponse.QueryResult.diagnostic_info]
+       * output for the turn.
+       * 
+ * + * + * .google.protobuf.Struct diagnostic_info = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The diagnosticInfo. + */ + public com.google.protobuf.Struct getDiagnosticInfo() { + if (diagnosticInfoBuilder_ == null) { + return diagnosticInfo_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : diagnosticInfo_; + } else { + return diagnosticInfoBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Required. Input only. The diagnostic
+       * [info][Session.DetectIntentResponse.QueryResult.diagnostic_info]
+       * output for the turn.
+       * 
+ * + * + * .google.protobuf.Struct diagnostic_info = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder setDiagnosticInfo(com.google.protobuf.Struct value) { + if (diagnosticInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + diagnosticInfo_ = value; + onChanged(); + } else { + diagnosticInfoBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Required. Input only. The diagnostic
+       * [info][Session.DetectIntentResponse.QueryResult.diagnostic_info]
+       * output for the turn.
+       * 
+ * + * + * .google.protobuf.Struct diagnostic_info = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder setDiagnosticInfo(com.google.protobuf.Struct.Builder builderForValue) { + if (diagnosticInfoBuilder_ == null) { + diagnosticInfo_ = builderForValue.build(); + onChanged(); + } else { + diagnosticInfoBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Required. Input only. The diagnostic
+       * [info][Session.DetectIntentResponse.QueryResult.diagnostic_info]
+       * output for the turn.
+       * 
+ * + * + * .google.protobuf.Struct diagnostic_info = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder mergeDiagnosticInfo(com.google.protobuf.Struct value) { + if (diagnosticInfoBuilder_ == null) { + if (diagnosticInfo_ != null) { + diagnosticInfo_ = + com.google.protobuf.Struct.newBuilder(diagnosticInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + diagnosticInfo_ = value; + } + onChanged(); + } else { + diagnosticInfoBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Required. Input only. The diagnostic
+       * [info][Session.DetectIntentResponse.QueryResult.diagnostic_info]
+       * output for the turn.
+       * 
+ * + * + * .google.protobuf.Struct diagnostic_info = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder clearDiagnosticInfo() { + if (diagnosticInfoBuilder_ == null) { + diagnosticInfo_ = null; + onChanged(); + } else { + diagnosticInfo_ = null; + diagnosticInfoBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Required. Input only. The diagnostic
+       * [info][Session.DetectIntentResponse.QueryResult.diagnostic_info]
+       * output for the turn.
+       * 
+ * + * + * .google.protobuf.Struct diagnostic_info = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public com.google.protobuf.Struct.Builder getDiagnosticInfoBuilder() { + + onChanged(); + return getDiagnosticInfoFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Required. Input only. The diagnostic
+       * [info][Session.DetectIntentResponse.QueryResult.diagnostic_info]
+       * output for the turn.
+       * 
+ * + * + * .google.protobuf.Struct diagnostic_info = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public com.google.protobuf.StructOrBuilder getDiagnosticInfoOrBuilder() { + if (diagnosticInfoBuilder_ != null) { + return diagnosticInfoBuilder_.getMessageOrBuilder(); + } else { + return diagnosticInfo_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : diagnosticInfo_; + } + } + /** + * + * + *
+       * Required. Input only. The diagnostic
+       * [info][Session.DetectIntentResponse.QueryResult.diagnostic_info]
+       * output for the turn.
+       * 
+ * + * + * .google.protobuf.Struct diagnostic_info = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + getDiagnosticInfoFieldBuilder() { + if (diagnosticInfoBuilder_ == null) { + diagnosticInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder>( + getDiagnosticInfo(), getParentForChildren(), isClean()); + diagnosticInfo_ = null; + } + return diagnosticInfoBuilder_; + } + + private com.google.cloud.dialogflow.cx.v3.Intent triggeredIntent_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Intent, + com.google.cloud.dialogflow.cx.v3.Intent.Builder, + com.google.cloud.dialogflow.cx.v3.IntentOrBuilder> + triggeredIntentBuilder_; + /** + * + * + *
+       * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that triggered the response. Only some fields such as
+       * name and displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Intent triggered_intent = 7; + * + * @return Whether the triggeredIntent field is set. + */ + public boolean hasTriggeredIntent() { + return triggeredIntentBuilder_ != null || triggeredIntent_ != null; + } + /** + * + * + *
+       * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that triggered the response. Only some fields such as
+       * name and displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Intent triggered_intent = 7; + * + * @return The triggeredIntent. + */ + public com.google.cloud.dialogflow.cx.v3.Intent getTriggeredIntent() { + if (triggeredIntentBuilder_ == null) { + return triggeredIntent_ == null + ? com.google.cloud.dialogflow.cx.v3.Intent.getDefaultInstance() + : triggeredIntent_; + } else { + return triggeredIntentBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that triggered the response. Only some fields such as
+       * name and displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Intent triggered_intent = 7; + */ + public Builder setTriggeredIntent(com.google.cloud.dialogflow.cx.v3.Intent value) { + if (triggeredIntentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + triggeredIntent_ = value; + onChanged(); + } else { + triggeredIntentBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that triggered the response. Only some fields such as
+       * name and displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Intent triggered_intent = 7; + */ + public Builder setTriggeredIntent( + com.google.cloud.dialogflow.cx.v3.Intent.Builder builderForValue) { + if (triggeredIntentBuilder_ == null) { + triggeredIntent_ = builderForValue.build(); + onChanged(); + } else { + triggeredIntentBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that triggered the response. Only some fields such as
+       * name and displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Intent triggered_intent = 7; + */ + public Builder mergeTriggeredIntent(com.google.cloud.dialogflow.cx.v3.Intent value) { + if (triggeredIntentBuilder_ == null) { + if (triggeredIntent_ != null) { + triggeredIntent_ = + com.google.cloud.dialogflow.cx.v3.Intent.newBuilder(triggeredIntent_) + .mergeFrom(value) + .buildPartial(); + } else { + triggeredIntent_ = value; + } + onChanged(); + } else { + triggeredIntentBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that triggered the response. Only some fields such as
+       * name and displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Intent triggered_intent = 7; + */ + public Builder clearTriggeredIntent() { + if (triggeredIntentBuilder_ == null) { + triggeredIntent_ = null; + onChanged(); + } else { + triggeredIntent_ = null; + triggeredIntentBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that triggered the response. Only some fields such as
+       * name and displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Intent triggered_intent = 7; + */ + public com.google.cloud.dialogflow.cx.v3.Intent.Builder getTriggeredIntentBuilder() { + + onChanged(); + return getTriggeredIntentFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that triggered the response. Only some fields such as
+       * name and displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Intent triggered_intent = 7; + */ + public com.google.cloud.dialogflow.cx.v3.IntentOrBuilder getTriggeredIntentOrBuilder() { + if (triggeredIntentBuilder_ != null) { + return triggeredIntentBuilder_.getMessageOrBuilder(); + } else { + return triggeredIntent_ == null + ? com.google.cloud.dialogflow.cx.v3.Intent.getDefaultInstance() + : triggeredIntent_; + } + } + /** + * + * + *
+       * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that triggered the response. Only some fields such as
+       * name and displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Intent triggered_intent = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Intent, + com.google.cloud.dialogflow.cx.v3.Intent.Builder, + com.google.cloud.dialogflow.cx.v3.IntentOrBuilder> + getTriggeredIntentFieldBuilder() { + if (triggeredIntentBuilder_ == null) { + triggeredIntentBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Intent, + com.google.cloud.dialogflow.cx.v3.Intent.Builder, + com.google.cloud.dialogflow.cx.v3.IntentOrBuilder>( + getTriggeredIntent(), getParentForChildren(), isClean()); + triggeredIntent_ = null; + } + return triggeredIntentBuilder_; + } + + private com.google.cloud.dialogflow.cx.v3.Page currentPage_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Page, + com.google.cloud.dialogflow.cx.v3.Page.Builder, + com.google.cloud.dialogflow.cx.v3.PageOrBuilder> + currentPageBuilder_; + /** + * + * + *
+       * The [Page][google.cloud.dialogflow.cx.v3.Page] on which the utterance was spoken. Only some fields such as
+       * name and displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Page current_page = 8; + * + * @return Whether the currentPage field is set. + */ + public boolean hasCurrentPage() { + return currentPageBuilder_ != null || currentPage_ != null; + } + /** + * + * + *
+       * The [Page][google.cloud.dialogflow.cx.v3.Page] on which the utterance was spoken. Only some fields such as
+       * name and displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Page current_page = 8; + * + * @return The currentPage. + */ + public com.google.cloud.dialogflow.cx.v3.Page getCurrentPage() { + if (currentPageBuilder_ == null) { + return currentPage_ == null + ? com.google.cloud.dialogflow.cx.v3.Page.getDefaultInstance() + : currentPage_; + } else { + return currentPageBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The [Page][google.cloud.dialogflow.cx.v3.Page] on which the utterance was spoken. Only some fields such as
+       * name and displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Page current_page = 8; + */ + public Builder setCurrentPage(com.google.cloud.dialogflow.cx.v3.Page value) { + if (currentPageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + currentPage_ = value; + onChanged(); + } else { + currentPageBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * The [Page][google.cloud.dialogflow.cx.v3.Page] on which the utterance was spoken. Only some fields such as
+       * name and displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Page current_page = 8; + */ + public Builder setCurrentPage( + com.google.cloud.dialogflow.cx.v3.Page.Builder builderForValue) { + if (currentPageBuilder_ == null) { + currentPage_ = builderForValue.build(); + onChanged(); + } else { + currentPageBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * The [Page][google.cloud.dialogflow.cx.v3.Page] on which the utterance was spoken. Only some fields such as
+       * name and displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Page current_page = 8; + */ + public Builder mergeCurrentPage(com.google.cloud.dialogflow.cx.v3.Page value) { + if (currentPageBuilder_ == null) { + if (currentPage_ != null) { + currentPage_ = + com.google.cloud.dialogflow.cx.v3.Page.newBuilder(currentPage_) + .mergeFrom(value) + .buildPartial(); + } else { + currentPage_ = value; + } + onChanged(); + } else { + currentPageBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * The [Page][google.cloud.dialogflow.cx.v3.Page] on which the utterance was spoken. Only some fields such as
+       * name and displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Page current_page = 8; + */ + public Builder clearCurrentPage() { + if (currentPageBuilder_ == null) { + currentPage_ = null; + onChanged(); + } else { + currentPage_ = null; + currentPageBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * The [Page][google.cloud.dialogflow.cx.v3.Page] on which the utterance was spoken. Only some fields such as
+       * name and displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Page current_page = 8; + */ + public com.google.cloud.dialogflow.cx.v3.Page.Builder getCurrentPageBuilder() { + + onChanged(); + return getCurrentPageFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The [Page][google.cloud.dialogflow.cx.v3.Page] on which the utterance was spoken. Only some fields such as
+       * name and displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Page current_page = 8; + */ + public com.google.cloud.dialogflow.cx.v3.PageOrBuilder getCurrentPageOrBuilder() { + if (currentPageBuilder_ != null) { + return currentPageBuilder_.getMessageOrBuilder(); + } else { + return currentPage_ == null + ? com.google.cloud.dialogflow.cx.v3.Page.getDefaultInstance() + : currentPage_; + } + } + /** + * + * + *
+       * The [Page][google.cloud.dialogflow.cx.v3.Page] on which the utterance was spoken. Only some fields such as
+       * name and displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Page current_page = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Page, + com.google.cloud.dialogflow.cx.v3.Page.Builder, + com.google.cloud.dialogflow.cx.v3.PageOrBuilder> + getCurrentPageFieldBuilder() { + if (currentPageBuilder_ == null) { + currentPageBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Page, + com.google.cloud.dialogflow.cx.v3.Page.Builder, + com.google.cloud.dialogflow.cx.v3.PageOrBuilder>( + getCurrentPage(), getParentForChildren(), isClean()); + currentPage_ = null; + } + return currentPageBuilder_; + } + + private java.util.List + textResponses_ = java.util.Collections.emptyList(); + + private void ensureTextResponsesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + textResponses_ = + new java.util.ArrayList( + textResponses_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text, + com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text.Builder, + com.google.cloud.dialogflow.cx.v3.ResponseMessage.TextOrBuilder> + textResponsesBuilder_; + + /** + * + * + *
+       * The [text][google.cloud.dialogflow.cx.v3.ResponseMessage.Text] responses from the agent for the turn.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.Text text_responses = 9; + * + */ + public java.util.List + getTextResponsesList() { + if (textResponsesBuilder_ == null) { + return java.util.Collections.unmodifiableList(textResponses_); + } else { + return textResponsesBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * The [text][google.cloud.dialogflow.cx.v3.ResponseMessage.Text] responses from the agent for the turn.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.Text text_responses = 9; + * + */ + public int getTextResponsesCount() { + if (textResponsesBuilder_ == null) { + return textResponses_.size(); + } else { + return textResponsesBuilder_.getCount(); + } + } + /** + * + * + *
+       * The [text][google.cloud.dialogflow.cx.v3.ResponseMessage.Text] responses from the agent for the turn.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.Text text_responses = 9; + * + */ + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text getTextResponses(int index) { + if (textResponsesBuilder_ == null) { + return textResponses_.get(index); + } else { + return textResponsesBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * The [text][google.cloud.dialogflow.cx.v3.ResponseMessage.Text] responses from the agent for the turn.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.Text text_responses = 9; + * + */ + public Builder setTextResponses( + int index, com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text value) { + if (textResponsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTextResponsesIsMutable(); + textResponses_.set(index, value); + onChanged(); + } else { + textResponsesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * The [text][google.cloud.dialogflow.cx.v3.ResponseMessage.Text] responses from the agent for the turn.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.Text text_responses = 9; + * + */ + public Builder setTextResponses( + int index, + com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text.Builder builderForValue) { + if (textResponsesBuilder_ == null) { + ensureTextResponsesIsMutable(); + textResponses_.set(index, builderForValue.build()); + onChanged(); + } else { + textResponsesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The [text][google.cloud.dialogflow.cx.v3.ResponseMessage.Text] responses from the agent for the turn.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.Text text_responses = 9; + * + */ + public Builder addTextResponses( + com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text value) { + if (textResponsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTextResponsesIsMutable(); + textResponses_.add(value); + onChanged(); + } else { + textResponsesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * The [text][google.cloud.dialogflow.cx.v3.ResponseMessage.Text] responses from the agent for the turn.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.Text text_responses = 9; + * + */ + public Builder addTextResponses( + int index, com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text value) { + if (textResponsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTextResponsesIsMutable(); + textResponses_.add(index, value); + onChanged(); + } else { + textResponsesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * The [text][google.cloud.dialogflow.cx.v3.ResponseMessage.Text] responses from the agent for the turn.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.Text text_responses = 9; + * + */ + public Builder addTextResponses( + com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text.Builder builderForValue) { + if (textResponsesBuilder_ == null) { + ensureTextResponsesIsMutable(); + textResponses_.add(builderForValue.build()); + onChanged(); + } else { + textResponsesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The [text][google.cloud.dialogflow.cx.v3.ResponseMessage.Text] responses from the agent for the turn.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.Text text_responses = 9; + * + */ + public Builder addTextResponses( + int index, + com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text.Builder builderForValue) { + if (textResponsesBuilder_ == null) { + ensureTextResponsesIsMutable(); + textResponses_.add(index, builderForValue.build()); + onChanged(); + } else { + textResponsesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The [text][google.cloud.dialogflow.cx.v3.ResponseMessage.Text] responses from the agent for the turn.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.Text text_responses = 9; + * + */ + public Builder addAllTextResponses( + java.lang.Iterable + values) { + if (textResponsesBuilder_ == null) { + ensureTextResponsesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, textResponses_); + onChanged(); + } else { + textResponsesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * The [text][google.cloud.dialogflow.cx.v3.ResponseMessage.Text] responses from the agent for the turn.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.Text text_responses = 9; + * + */ + public Builder clearTextResponses() { + if (textResponsesBuilder_ == null) { + textResponses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + textResponsesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * The [text][google.cloud.dialogflow.cx.v3.ResponseMessage.Text] responses from the agent for the turn.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.Text text_responses = 9; + * + */ + public Builder removeTextResponses(int index) { + if (textResponsesBuilder_ == null) { + ensureTextResponsesIsMutable(); + textResponses_.remove(index); + onChanged(); + } else { + textResponsesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * The [text][google.cloud.dialogflow.cx.v3.ResponseMessage.Text] responses from the agent for the turn.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.Text text_responses = 9; + * + */ + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text.Builder getTextResponsesBuilder( + int index) { + return getTextResponsesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * The [text][google.cloud.dialogflow.cx.v3.ResponseMessage.Text] responses from the agent for the turn.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.Text text_responses = 9; + * + */ + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.TextOrBuilder + getTextResponsesOrBuilder(int index) { + if (textResponsesBuilder_ == null) { + return textResponses_.get(index); + } else { + return textResponsesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * The [text][google.cloud.dialogflow.cx.v3.ResponseMessage.Text] responses from the agent for the turn.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.Text text_responses = 9; + * + */ + public java.util.List< + ? extends com.google.cloud.dialogflow.cx.v3.ResponseMessage.TextOrBuilder> + getTextResponsesOrBuilderList() { + if (textResponsesBuilder_ != null) { + return textResponsesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(textResponses_); + } + } + /** + * + * + *
+       * The [text][google.cloud.dialogflow.cx.v3.ResponseMessage.Text] responses from the agent for the turn.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.Text text_responses = 9; + * + */ + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text.Builder + addTextResponsesBuilder() { + return getTextResponsesFieldBuilder() + .addBuilder( + com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text.getDefaultInstance()); + } + /** + * + * + *
+       * The [text][google.cloud.dialogflow.cx.v3.ResponseMessage.Text] responses from the agent for the turn.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.Text text_responses = 9; + * + */ + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text.Builder addTextResponsesBuilder( + int index) { + return getTextResponsesFieldBuilder() + .addBuilder( + index, com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text.getDefaultInstance()); + } + /** + * + * + *
+       * The [text][google.cloud.dialogflow.cx.v3.ResponseMessage.Text] responses from the agent for the turn.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.Text text_responses = 9; + * + */ + public java.util.List + getTextResponsesBuilderList() { + return getTextResponsesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text, + com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text.Builder, + com.google.cloud.dialogflow.cx.v3.ResponseMessage.TextOrBuilder> + getTextResponsesFieldBuilder() { + if (textResponsesBuilder_ == null) { + textResponsesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text, + com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text.Builder, + com.google.cloud.dialogflow.cx.v3.ResponseMessage.TextOrBuilder>( + textResponses_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + textResponses_ = null; + } + return textResponsesBuilder_; + } + + private com.google.rpc.Status status_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + statusBuilder_; + /** + * + * + *
+       * Response error from the agent in the test result. If set, other output
+       * is empty.
+       * 
+ * + * .google.rpc.Status status = 10; + * + * @return Whether the status field is set. + */ + public boolean hasStatus() { + return statusBuilder_ != null || status_ != null; + } + /** + * + * + *
+       * Response error from the agent in the test result. If set, other output
+       * is empty.
+       * 
+ * + * .google.rpc.Status status = 10; + * + * @return The status. + */ + public com.google.rpc.Status getStatus() { + if (statusBuilder_ == null) { + return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; + } else { + return statusBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Response error from the agent in the test result. If set, other output
+       * is empty.
+       * 
+ * + * .google.rpc.Status status = 10; + */ + public Builder setStatus(com.google.rpc.Status value) { + if (statusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + status_ = value; + onChanged(); + } else { + statusBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Response error from the agent in the test result. If set, other output
+       * is empty.
+       * 
+ * + * .google.rpc.Status status = 10; + */ + public Builder setStatus(com.google.rpc.Status.Builder builderForValue) { + if (statusBuilder_ == null) { + status_ = builderForValue.build(); + onChanged(); + } else { + statusBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Response error from the agent in the test result. If set, other output
+       * is empty.
+       * 
+ * + * .google.rpc.Status status = 10; + */ + public Builder mergeStatus(com.google.rpc.Status value) { + if (statusBuilder_ == null) { + if (status_ != null) { + status_ = com.google.rpc.Status.newBuilder(status_).mergeFrom(value).buildPartial(); + } else { + status_ = value; + } + onChanged(); + } else { + statusBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Response error from the agent in the test result. If set, other output
+       * is empty.
+       * 
+ * + * .google.rpc.Status status = 10; + */ + public Builder clearStatus() { + if (statusBuilder_ == null) { + status_ = null; + onChanged(); + } else { + status_ = null; + statusBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Response error from the agent in the test result. If set, other output
+       * is empty.
+       * 
+ * + * .google.rpc.Status status = 10; + */ + public com.google.rpc.Status.Builder getStatusBuilder() { + + onChanged(); + return getStatusFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Response error from the agent in the test result. If set, other output
+       * is empty.
+       * 
+ * + * .google.rpc.Status status = 10; + */ + public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { + if (statusBuilder_ != null) { + return statusBuilder_.getMessageOrBuilder(); + } else { + return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; + } + } + /** + * + * + *
+       * Response error from the agent in the test result. If set, other output
+       * is empty.
+       * 
+ * + * .google.rpc.Status status = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getStatusFieldBuilder() { + if (statusBuilder_ == null) { + statusBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>(getStatus(), getParentForChildren(), isClean()); + status_ = null; + } + return statusBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput) + private static final com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput(); + } + + public static com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VirtualAgentOutput parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new VirtualAgentOutput(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int USER_INPUT_FIELD_NUMBER = 1; + private com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput userInput_; + /** + * + * + *
+   * The user input.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput user_input = 1; + * + * @return Whether the userInput field is set. + */ + @java.lang.Override + public boolean hasUserInput() { + return userInput_ != null; + } + /** + * + * + *
+   * The user input.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput user_input = 1; + * + * @return The userInput. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput getUserInput() { + return userInput_ == null + ? com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput.getDefaultInstance() + : userInput_; + } + /** + * + * + *
+   * The user input.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput user_input = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInputOrBuilder + getUserInputOrBuilder() { + return getUserInput(); + } + + public static final int VIRTUAL_AGENT_OUTPUT_FIELD_NUMBER = 2; + private com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput virtualAgentOutput_; + /** + * + * + *
+   * The virtual agent output.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput virtual_agent_output = 2; + * + * + * @return Whether the virtualAgentOutput field is set. + */ + @java.lang.Override + public boolean hasVirtualAgentOutput() { + return virtualAgentOutput_ != null; + } + /** + * + * + *
+   * The virtual agent output.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput virtual_agent_output = 2; + * + * + * @return The virtualAgentOutput. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput + getVirtualAgentOutput() { + return virtualAgentOutput_ == null + ? com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput.getDefaultInstance() + : virtualAgentOutput_; + } + /** + * + * + *
+   * The virtual agent output.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput virtual_agent_output = 2; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutputOrBuilder + getVirtualAgentOutputOrBuilder() { + return getVirtualAgentOutput(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (userInput_ != null) { + output.writeMessage(1, getUserInput()); + } + if (virtualAgentOutput_ != null) { + output.writeMessage(2, getVirtualAgentOutput()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (userInput_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUserInput()); + } + if (virtualAgentOutput_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getVirtualAgentOutput()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.ConversationTurn)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.ConversationTurn other = + (com.google.cloud.dialogflow.cx.v3.ConversationTurn) obj; + + if (hasUserInput() != other.hasUserInput()) return false; + if (hasUserInput()) { + if (!getUserInput().equals(other.getUserInput())) return false; + } + if (hasVirtualAgentOutput() != other.hasVirtualAgentOutput()) return false; + if (hasVirtualAgentOutput()) { + if (!getVirtualAgentOutput().equals(other.getVirtualAgentOutput())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUserInput()) { + hash = (37 * hash) + USER_INPUT_FIELD_NUMBER; + hash = (53 * hash) + getUserInput().hashCode(); + } + if (hasVirtualAgentOutput()) { + hash = (37 * hash) + VIRTUAL_AGENT_OUTPUT_FIELD_NUMBER; + hash = (53 * hash) + getVirtualAgentOutput().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.ConversationTurn parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ConversationTurn parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ConversationTurn parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ConversationTurn parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ConversationTurn parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ConversationTurn parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ConversationTurn parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ConversationTurn parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ConversationTurn parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ConversationTurn parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ConversationTurn parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ConversationTurn parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.dialogflow.cx.v3.ConversationTurn prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * One interaction between a human and virtual agent. The human provides some
+   * input and the virtual agent provides a response.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ConversationTurn} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ConversationTurn) + com.google.cloud.dialogflow.cx.v3.ConversationTurnOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ConversationTurn_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ConversationTurn_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ConversationTurn.class, + com.google.cloud.dialogflow.cx.v3.ConversationTurn.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.ConversationTurn.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (userInputBuilder_ == null) { + userInput_ = null; + } else { + userInput_ = null; + userInputBuilder_ = null; + } + if (virtualAgentOutputBuilder_ == null) { + virtualAgentOutput_ = null; + } else { + virtualAgentOutput_ = null; + virtualAgentOutputBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ConversationTurn_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ConversationTurn getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.ConversationTurn.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ConversationTurn build() { + com.google.cloud.dialogflow.cx.v3.ConversationTurn result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ConversationTurn buildPartial() { + com.google.cloud.dialogflow.cx.v3.ConversationTurn result = + new com.google.cloud.dialogflow.cx.v3.ConversationTurn(this); + if (userInputBuilder_ == null) { + result.userInput_ = userInput_; + } else { + result.userInput_ = userInputBuilder_.build(); + } + if (virtualAgentOutputBuilder_ == null) { + result.virtualAgentOutput_ = virtualAgentOutput_; + } else { + result.virtualAgentOutput_ = virtualAgentOutputBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.ConversationTurn) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.ConversationTurn) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ConversationTurn other) { + if (other == com.google.cloud.dialogflow.cx.v3.ConversationTurn.getDefaultInstance()) + return this; + if (other.hasUserInput()) { + mergeUserInput(other.getUserInput()); + } + if (other.hasVirtualAgentOutput()) { + mergeVirtualAgentOutput(other.getVirtualAgentOutput()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.ConversationTurn parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.ConversationTurn) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput userInput_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput, + com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput.Builder, + com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInputOrBuilder> + userInputBuilder_; + /** + * + * + *
+     * The user input.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput user_input = 1; + * + * @return Whether the userInput field is set. + */ + public boolean hasUserInput() { + return userInputBuilder_ != null || userInput_ != null; + } + /** + * + * + *
+     * The user input.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput user_input = 1; + * + * @return The userInput. + */ + public com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput getUserInput() { + if (userInputBuilder_ == null) { + return userInput_ == null + ? com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput.getDefaultInstance() + : userInput_; + } else { + return userInputBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The user input.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput user_input = 1; + */ + public Builder setUserInput( + com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput value) { + if (userInputBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + userInput_ = value; + onChanged(); + } else { + userInputBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The user input.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput user_input = 1; + */ + public Builder setUserInput( + com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput.Builder builderForValue) { + if (userInputBuilder_ == null) { + userInput_ = builderForValue.build(); + onChanged(); + } else { + userInputBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The user input.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput user_input = 1; + */ + public Builder mergeUserInput( + com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput value) { + if (userInputBuilder_ == null) { + if (userInput_ != null) { + userInput_ = + com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput.newBuilder(userInput_) + .mergeFrom(value) + .buildPartial(); + } else { + userInput_ = value; + } + onChanged(); + } else { + userInputBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The user input.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput user_input = 1; + */ + public Builder clearUserInput() { + if (userInputBuilder_ == null) { + userInput_ = null; + onChanged(); + } else { + userInput_ = null; + userInputBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The user input.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput user_input = 1; + */ + public com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput.Builder + getUserInputBuilder() { + + onChanged(); + return getUserInputFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The user input.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput user_input = 1; + */ + public com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInputOrBuilder + getUserInputOrBuilder() { + if (userInputBuilder_ != null) { + return userInputBuilder_.getMessageOrBuilder(); + } else { + return userInput_ == null + ? com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput.getDefaultInstance() + : userInput_; + } + } + /** + * + * + *
+     * The user input.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput user_input = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput, + com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput.Builder, + com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInputOrBuilder> + getUserInputFieldBuilder() { + if (userInputBuilder_ == null) { + userInputBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput, + com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput.Builder, + com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInputOrBuilder>( + getUserInput(), getParentForChildren(), isClean()); + userInput_ = null; + } + return userInputBuilder_; + } + + private com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput + virtualAgentOutput_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput, + com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput.Builder, + com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutputOrBuilder> + virtualAgentOutputBuilder_; + /** + * + * + *
+     * The virtual agent output.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput virtual_agent_output = 2; + * + * + * @return Whether the virtualAgentOutput field is set. + */ + public boolean hasVirtualAgentOutput() { + return virtualAgentOutputBuilder_ != null || virtualAgentOutput_ != null; + } + /** + * + * + *
+     * The virtual agent output.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput virtual_agent_output = 2; + * + * + * @return The virtualAgentOutput. + */ + public com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput + getVirtualAgentOutput() { + if (virtualAgentOutputBuilder_ == null) { + return virtualAgentOutput_ == null + ? com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput + .getDefaultInstance() + : virtualAgentOutput_; + } else { + return virtualAgentOutputBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The virtual agent output.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput virtual_agent_output = 2; + * + */ + public Builder setVirtualAgentOutput( + com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput value) { + if (virtualAgentOutputBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + virtualAgentOutput_ = value; + onChanged(); + } else { + virtualAgentOutputBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The virtual agent output.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput virtual_agent_output = 2; + * + */ + public Builder setVirtualAgentOutput( + com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput.Builder + builderForValue) { + if (virtualAgentOutputBuilder_ == null) { + virtualAgentOutput_ = builderForValue.build(); + onChanged(); + } else { + virtualAgentOutputBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The virtual agent output.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput virtual_agent_output = 2; + * + */ + public Builder mergeVirtualAgentOutput( + com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput value) { + if (virtualAgentOutputBuilder_ == null) { + if (virtualAgentOutput_ != null) { + virtualAgentOutput_ = + com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput.newBuilder( + virtualAgentOutput_) + .mergeFrom(value) + .buildPartial(); + } else { + virtualAgentOutput_ = value; + } + onChanged(); + } else { + virtualAgentOutputBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The virtual agent output.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput virtual_agent_output = 2; + * + */ + public Builder clearVirtualAgentOutput() { + if (virtualAgentOutputBuilder_ == null) { + virtualAgentOutput_ = null; + onChanged(); + } else { + virtualAgentOutput_ = null; + virtualAgentOutputBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The virtual agent output.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput virtual_agent_output = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput.Builder + getVirtualAgentOutputBuilder() { + + onChanged(); + return getVirtualAgentOutputFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The virtual agent output.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput virtual_agent_output = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutputOrBuilder + getVirtualAgentOutputOrBuilder() { + if (virtualAgentOutputBuilder_ != null) { + return virtualAgentOutputBuilder_.getMessageOrBuilder(); + } else { + return virtualAgentOutput_ == null + ? com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput + .getDefaultInstance() + : virtualAgentOutput_; + } + } + /** + * + * + *
+     * The virtual agent output.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput virtual_agent_output = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput, + com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput.Builder, + com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutputOrBuilder> + getVirtualAgentOutputFieldBuilder() { + if (virtualAgentOutputBuilder_ == null) { + virtualAgentOutputBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput, + com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput.Builder, + com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutputOrBuilder>( + getVirtualAgentOutput(), getParentForChildren(), isClean()); + virtualAgentOutput_ = null; + } + return virtualAgentOutputBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.ConversationTurn) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ConversationTurn) + private static final com.google.cloud.dialogflow.cx.v3.ConversationTurn DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ConversationTurn(); + } + + public static com.google.cloud.dialogflow.cx.v3.ConversationTurn getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ConversationTurn parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ConversationTurn(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ConversationTurn getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ConversationTurnOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ConversationTurnOrBuilder.java new file mode 100644 index 000000000..710d64ccc --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ConversationTurnOrBuilder.java @@ -0,0 +1,102 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/test_case.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface ConversationTurnOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ConversationTurn) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The user input.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput user_input = 1; + * + * @return Whether the userInput field is set. + */ + boolean hasUserInput(); + /** + * + * + *
+   * The user input.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput user_input = 1; + * + * @return The userInput. + */ + com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput getUserInput(); + /** + * + * + *
+   * The user input.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput user_input = 1; + */ + com.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInputOrBuilder getUserInputOrBuilder(); + + /** + * + * + *
+   * The virtual agent output.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput virtual_agent_output = 2; + * + * + * @return Whether the virtualAgentOutput field is set. + */ + boolean hasVirtualAgentOutput(); + /** + * + * + *
+   * The virtual agent output.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput virtual_agent_output = 2; + * + * + * @return The virtualAgentOutput. + */ + com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput getVirtualAgentOutput(); + /** + * + * + *
+   * The virtual agent output.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput virtual_agent_output = 2; + * + */ + com.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutputOrBuilder + getVirtualAgentOutputOrBuilder(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateExperimentRequest.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateTestCaseRequest.java similarity index 58% rename from proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateExperimentRequest.java rename to proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateTestCaseRequest.java index 5a4f5cc03..d6be672d9 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateExperimentRequest.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateTestCaseRequest.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dialogflow/cx/v3/experiment.proto +// source: google/cloud/dialogflow/cx/v3/test_case.proto package com.google.cloud.dialogflow.cx.v3; @@ -22,29 +22,29 @@ * * *
- * The request message for [Experiments.CreateExperiment][google.cloud.dialogflow.cx.v3.Experiments.CreateExperiment].
+ * The request message for [TestCases.CreateTestCase][google.cloud.dialogflow.cx.v3.TestCases.CreateTestCase].
  * 
* - * Protobuf type {@code google.cloud.dialogflow.cx.v3.CreateExperimentRequest} + * Protobuf type {@code google.cloud.dialogflow.cx.v3.CreateTestCaseRequest} */ -public final class CreateExperimentRequest extends com.google.protobuf.GeneratedMessageV3 +public final class CreateTestCaseRequest extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.CreateExperimentRequest) - CreateExperimentRequestOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.CreateTestCaseRequest) + CreateTestCaseRequestOrBuilder { private static final long serialVersionUID = 0L; - // Use CreateExperimentRequest.newBuilder() to construct. - private CreateExperimentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use CreateTestCaseRequest.newBuilder() to construct. + private CreateTestCaseRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private CreateExperimentRequest() { + private CreateTestCaseRequest() { parent_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreateExperimentRequest(); + return new CreateTestCaseRequest(); } @java.lang.Override @@ -52,7 +52,7 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreateExperimentRequest( + private CreateTestCaseRequest( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -79,16 +79,16 @@ private CreateExperimentRequest( } case 18: { - com.google.cloud.dialogflow.cx.v3.Experiment.Builder subBuilder = null; - if (experiment_ != null) { - subBuilder = experiment_.toBuilder(); + com.google.cloud.dialogflow.cx.v3.TestCase.Builder subBuilder = null; + if (testCase_ != null) { + subBuilder = testCase_.toBuilder(); } - experiment_ = + testCase_ = input.readMessage( - com.google.cloud.dialogflow.cx.v3.Experiment.parser(), extensionRegistry); + com.google.cloud.dialogflow.cx.v3.TestCase.parser(), extensionRegistry); if (subBuilder != null) { - subBuilder.mergeFrom(experiment_); - experiment_ = subBuilder.buildPartial(); + subBuilder.mergeFrom(testCase_); + testCase_ = subBuilder.buildPartial(); } break; @@ -113,18 +113,18 @@ private CreateExperimentRequest( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_CreateExperimentRequest_descriptor; + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_CreateTestCaseRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_CreateExperimentRequest_fieldAccessorTable + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_CreateTestCaseRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest.class, - com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest.Builder.class); + com.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest.class, + com.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest.Builder.class); } public static final int PARENT_FIELD_NUMBER = 1; @@ -133,9 +133,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to create an [Environment][google.cloud.dialogflow.cx.v3.Environment] for.
-   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/environments/<Environment ID>`.
+   * Required. The agent to create the test case for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
    * 
* * @@ -160,9 +159,8 @@ public java.lang.String getParent() { * * *
-   * Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to create an [Environment][google.cloud.dialogflow.cx.v3.Environment] for.
-   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/environments/<Environment ID>`.
+   * Required. The agent to create the test case for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
    * 
* * @@ -184,58 +182,58 @@ public com.google.protobuf.ByteString getParentBytes() { } } - public static final int EXPERIMENT_FIELD_NUMBER = 2; - private com.google.cloud.dialogflow.cx.v3.Experiment experiment_; + public static final int TEST_CASE_FIELD_NUMBER = 2; + private com.google.cloud.dialogflow.cx.v3.TestCase testCase_; /** * * *
-   * Required. The experiment to create.
+   * Required. The test case to create.
    * 
* * - * .google.cloud.dialogflow.cx.v3.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; * * - * @return Whether the experiment field is set. + * @return Whether the testCase field is set. */ @java.lang.Override - public boolean hasExperiment() { - return experiment_ != null; + public boolean hasTestCase() { + return testCase_ != null; } /** * * *
-   * Required. The experiment to create.
+   * Required. The test case to create.
    * 
* * - * .google.cloud.dialogflow.cx.v3.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; * * - * @return The experiment. + * @return The testCase. */ @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.Experiment getExperiment() { - return experiment_ == null - ? com.google.cloud.dialogflow.cx.v3.Experiment.getDefaultInstance() - : experiment_; + public com.google.cloud.dialogflow.cx.v3.TestCase getTestCase() { + return testCase_ == null + ? com.google.cloud.dialogflow.cx.v3.TestCase.getDefaultInstance() + : testCase_; } /** * * *
-   * Required. The experiment to create.
+   * Required. The test case to create.
    * 
* * - * .google.cloud.dialogflow.cx.v3.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; * */ @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.ExperimentOrBuilder getExperimentOrBuilder() { - return getExperiment(); + public com.google.cloud.dialogflow.cx.v3.TestCaseOrBuilder getTestCaseOrBuilder() { + return getTestCase(); } private byte memoizedIsInitialized = -1; @@ -255,8 +253,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!getParentBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); } - if (experiment_ != null) { - output.writeMessage(2, getExperiment()); + if (testCase_ != null) { + output.writeMessage(2, getTestCase()); } unknownFields.writeTo(output); } @@ -270,8 +268,8 @@ public int getSerializedSize() { if (!getParentBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); } - if (experiment_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getExperiment()); + if (testCase_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTestCase()); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -283,16 +281,16 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest)) { + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest)) { return super.equals(obj); } - com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest other = - (com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest) obj; + com.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest other = + (com.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest) obj; if (!getParent().equals(other.getParent())) return false; - if (hasExperiment() != other.hasExperiment()) return false; - if (hasExperiment()) { - if (!getExperiment().equals(other.getExperiment())) return false; + if (hasTestCase() != other.hasTestCase()) return false; + if (hasTestCase()) { + if (!getTestCase().equals(other.getTestCase())) return false; } if (!unknownFields.equals(other.unknownFields)) return false; return true; @@ -307,80 +305,80 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + PARENT_FIELD_NUMBER; hash = (53 * hash) + getParent().hashCode(); - if (hasExperiment()) { - hash = (37 * hash) + EXPERIMENT_FIELD_NUMBER; - hash = (53 * hash) + getExperiment().hashCode(); + if (hasTestCase()) { + hash = (37 * hash) + TEST_CASE_FIELD_NUMBER; + hash = (53 * hash) + getTestCase().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest parseFrom(byte[] data) + public static com.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest parseDelimitedFrom( + public static com.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest parseDelimitedFrom( + public static com.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -398,7 +396,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest prototype) { + com.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -416,31 +414,31 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The request message for [Experiments.CreateExperiment][google.cloud.dialogflow.cx.v3.Experiments.CreateExperiment].
+   * The request message for [TestCases.CreateTestCase][google.cloud.dialogflow.cx.v3.TestCases.CreateTestCase].
    * 
* - * Protobuf type {@code google.cloud.dialogflow.cx.v3.CreateExperimentRequest} + * Protobuf type {@code google.cloud.dialogflow.cx.v3.CreateTestCaseRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.CreateExperimentRequest) - com.google.cloud.dialogflow.cx.v3.CreateExperimentRequestOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.CreateTestCaseRequest) + com.google.cloud.dialogflow.cx.v3.CreateTestCaseRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_CreateExperimentRequest_descriptor; + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_CreateTestCaseRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_CreateExperimentRequest_fieldAccessorTable + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_CreateTestCaseRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest.class, - com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest.Builder.class); + com.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest.class, + com.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest.Builder.class); } - // Construct using com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest.newBuilder() + // Construct using com.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -459,29 +457,29 @@ public Builder clear() { super.clear(); parent_ = ""; - if (experimentBuilder_ == null) { - experiment_ = null; + if (testCaseBuilder_ == null) { + testCase_ = null; } else { - experiment_ = null; - experimentBuilder_ = null; + testCase_ = null; + testCaseBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_CreateExperimentRequest_descriptor; + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_CreateTestCaseRequest_descriptor; } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest getDefaultInstanceForType() { - return com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest.getDefaultInstance(); + public com.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest.getDefaultInstance(); } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest build() { - com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest result = buildPartial(); + public com.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest build() { + com.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -489,14 +487,14 @@ public com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest build() { } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest buildPartial() { - com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest result = - new com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest(this); + public com.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest result = + new com.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest(this); result.parent_ = parent_; - if (experimentBuilder_ == null) { - result.experiment_ = experiment_; + if (testCaseBuilder_ == null) { + result.testCase_ = testCase_; } else { - result.experiment_ = experimentBuilder_.build(); + result.testCase_ = testCaseBuilder_.build(); } onBuilt(); return result; @@ -537,23 +535,23 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest) { - return mergeFrom((com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest) other); + if (other instanceof com.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest other) { - if (other == com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest.getDefaultInstance()) + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest.getDefaultInstance()) return this; if (!other.getParent().isEmpty()) { parent_ = other.parent_; onChanged(); } - if (other.hasExperiment()) { - mergeExperiment(other.getExperiment()); + if (other.hasTestCase()) { + mergeTestCase(other.getTestCase()); } this.mergeUnknownFields(other.unknownFields); onChanged(); @@ -570,12 +568,12 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest parsedMessage = null; + com.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = - (com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest) e.getUnfinishedMessage(); + (com.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -590,9 +588,8 @@ public Builder mergeFrom( * * *
-     * Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to create an [Environment][google.cloud.dialogflow.cx.v3.Environment] for.
-     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>`.
+     * Required. The agent to create the test case for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
      * 
* * @@ -616,9 +613,8 @@ public java.lang.String getParent() { * * *
-     * Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to create an [Environment][google.cloud.dialogflow.cx.v3.Environment] for.
-     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>`.
+     * Required. The agent to create the test case for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
      * 
* * @@ -642,9 +638,8 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
-     * Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to create an [Environment][google.cloud.dialogflow.cx.v3.Environment] for.
-     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>`.
+     * Required. The agent to create the test case for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
      * 
* * @@ -667,9 +662,8 @@ public Builder setParent(java.lang.String value) { * * *
-     * Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to create an [Environment][google.cloud.dialogflow.cx.v3.Environment] for.
-     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>`.
+     * Required. The agent to create the test case for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
      * 
* * @@ -688,9 +682,8 @@ public Builder clearParent() { * * *
-     * Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to create an [Environment][google.cloud.dialogflow.cx.v3.Environment] for.
-     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>`.
+     * Required. The agent to create the test case for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
      * 
* * @@ -711,70 +704,70 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { return this; } - private com.google.cloud.dialogflow.cx.v3.Experiment experiment_; + private com.google.cloud.dialogflow.cx.v3.TestCase testCase_; private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3.Experiment, - com.google.cloud.dialogflow.cx.v3.Experiment.Builder, - com.google.cloud.dialogflow.cx.v3.ExperimentOrBuilder> - experimentBuilder_; + com.google.cloud.dialogflow.cx.v3.TestCase, + com.google.cloud.dialogflow.cx.v3.TestCase.Builder, + com.google.cloud.dialogflow.cx.v3.TestCaseOrBuilder> + testCaseBuilder_; /** * * *
-     * Required. The experiment to create.
+     * Required. The test case to create.
      * 
* * - * .google.cloud.dialogflow.cx.v3.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; * * - * @return Whether the experiment field is set. + * @return Whether the testCase field is set. */ - public boolean hasExperiment() { - return experimentBuilder_ != null || experiment_ != null; + public boolean hasTestCase() { + return testCaseBuilder_ != null || testCase_ != null; } /** * * *
-     * Required. The experiment to create.
+     * Required. The test case to create.
      * 
* * - * .google.cloud.dialogflow.cx.v3.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; * * - * @return The experiment. + * @return The testCase. */ - public com.google.cloud.dialogflow.cx.v3.Experiment getExperiment() { - if (experimentBuilder_ == null) { - return experiment_ == null - ? com.google.cloud.dialogflow.cx.v3.Experiment.getDefaultInstance() - : experiment_; + public com.google.cloud.dialogflow.cx.v3.TestCase getTestCase() { + if (testCaseBuilder_ == null) { + return testCase_ == null + ? com.google.cloud.dialogflow.cx.v3.TestCase.getDefaultInstance() + : testCase_; } else { - return experimentBuilder_.getMessage(); + return testCaseBuilder_.getMessage(); } } /** * * *
-     * Required. The experiment to create.
+     * Required. The test case to create.
      * 
* * - * .google.cloud.dialogflow.cx.v3.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; * */ - public Builder setExperiment(com.google.cloud.dialogflow.cx.v3.Experiment value) { - if (experimentBuilder_ == null) { + public Builder setTestCase(com.google.cloud.dialogflow.cx.v3.TestCase value) { + if (testCaseBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - experiment_ = value; + testCase_ = value; onChanged(); } else { - experimentBuilder_.setMessage(value); + testCaseBuilder_.setMessage(value); } return this; @@ -783,20 +776,19 @@ public Builder setExperiment(com.google.cloud.dialogflow.cx.v3.Experiment value) * * *
-     * Required. The experiment to create.
+     * Required. The test case to create.
      * 
* * - * .google.cloud.dialogflow.cx.v3.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; * */ - public Builder setExperiment( - com.google.cloud.dialogflow.cx.v3.Experiment.Builder builderForValue) { - if (experimentBuilder_ == null) { - experiment_ = builderForValue.build(); + public Builder setTestCase(com.google.cloud.dialogflow.cx.v3.TestCase.Builder builderForValue) { + if (testCaseBuilder_ == null) { + testCase_ = builderForValue.build(); onChanged(); } else { - experimentBuilder_.setMessage(builderForValue.build()); + testCaseBuilder_.setMessage(builderForValue.build()); } return this; @@ -805,26 +797,26 @@ public Builder setExperiment( * * *
-     * Required. The experiment to create.
+     * Required. The test case to create.
      * 
* * - * .google.cloud.dialogflow.cx.v3.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; * */ - public Builder mergeExperiment(com.google.cloud.dialogflow.cx.v3.Experiment value) { - if (experimentBuilder_ == null) { - if (experiment_ != null) { - experiment_ = - com.google.cloud.dialogflow.cx.v3.Experiment.newBuilder(experiment_) + public Builder mergeTestCase(com.google.cloud.dialogflow.cx.v3.TestCase value) { + if (testCaseBuilder_ == null) { + if (testCase_ != null) { + testCase_ = + com.google.cloud.dialogflow.cx.v3.TestCase.newBuilder(testCase_) .mergeFrom(value) .buildPartial(); } else { - experiment_ = value; + testCase_ = value; } onChanged(); } else { - experimentBuilder_.mergeFrom(value); + testCaseBuilder_.mergeFrom(value); } return this; @@ -833,20 +825,20 @@ public Builder mergeExperiment(com.google.cloud.dialogflow.cx.v3.Experiment valu * * *
-     * Required. The experiment to create.
+     * Required. The test case to create.
      * 
* * - * .google.cloud.dialogflow.cx.v3.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; * */ - public Builder clearExperiment() { - if (experimentBuilder_ == null) { - experiment_ = null; + public Builder clearTestCase() { + if (testCaseBuilder_ == null) { + testCase_ = null; onChanged(); } else { - experiment_ = null; - experimentBuilder_ = null; + testCase_ = null; + testCaseBuilder_ = null; } return this; @@ -855,64 +847,64 @@ public Builder clearExperiment() { * * *
-     * Required. The experiment to create.
+     * Required. The test case to create.
      * 
* * - * .google.cloud.dialogflow.cx.v3.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; * */ - public com.google.cloud.dialogflow.cx.v3.Experiment.Builder getExperimentBuilder() { + public com.google.cloud.dialogflow.cx.v3.TestCase.Builder getTestCaseBuilder() { onChanged(); - return getExperimentFieldBuilder().getBuilder(); + return getTestCaseFieldBuilder().getBuilder(); } /** * * *
-     * Required. The experiment to create.
+     * Required. The test case to create.
      * 
* * - * .google.cloud.dialogflow.cx.v3.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; * */ - public com.google.cloud.dialogflow.cx.v3.ExperimentOrBuilder getExperimentOrBuilder() { - if (experimentBuilder_ != null) { - return experimentBuilder_.getMessageOrBuilder(); + public com.google.cloud.dialogflow.cx.v3.TestCaseOrBuilder getTestCaseOrBuilder() { + if (testCaseBuilder_ != null) { + return testCaseBuilder_.getMessageOrBuilder(); } else { - return experiment_ == null - ? com.google.cloud.dialogflow.cx.v3.Experiment.getDefaultInstance() - : experiment_; + return testCase_ == null + ? com.google.cloud.dialogflow.cx.v3.TestCase.getDefaultInstance() + : testCase_; } } /** * * *
-     * Required. The experiment to create.
+     * Required. The test case to create.
      * 
* * - * .google.cloud.dialogflow.cx.v3.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; * */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3.Experiment, - com.google.cloud.dialogflow.cx.v3.Experiment.Builder, - com.google.cloud.dialogflow.cx.v3.ExperimentOrBuilder> - getExperimentFieldBuilder() { - if (experimentBuilder_ == null) { - experimentBuilder_ = + com.google.cloud.dialogflow.cx.v3.TestCase, + com.google.cloud.dialogflow.cx.v3.TestCase.Builder, + com.google.cloud.dialogflow.cx.v3.TestCaseOrBuilder> + getTestCaseFieldBuilder() { + if (testCaseBuilder_ == null) { + testCaseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3.Experiment, - com.google.cloud.dialogflow.cx.v3.Experiment.Builder, - com.google.cloud.dialogflow.cx.v3.ExperimentOrBuilder>( - getExperiment(), getParentForChildren(), isClean()); - experiment_ = null; + com.google.cloud.dialogflow.cx.v3.TestCase, + com.google.cloud.dialogflow.cx.v3.TestCase.Builder, + com.google.cloud.dialogflow.cx.v3.TestCaseOrBuilder>( + getTestCase(), getParentForChildren(), isClean()); + testCase_ = null; } - return experimentBuilder_; + return testCaseBuilder_; } @java.lang.Override @@ -926,42 +918,42 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.CreateExperimentRequest) + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.CreateTestCaseRequest) } - // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.CreateExperimentRequest) - private static final com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.CreateTestCaseRequest) + private static final com.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest(); + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest(); } - public static com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest getDefaultInstance() { + public static com.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public CreateExperimentRequest parsePartialFrom( + public CreateTestCaseRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateExperimentRequest(input, extensionRegistry); + return new CreateTestCaseRequest(input, extensionRegistry); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest getDefaultInstanceForType() { + public com.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateExperimentRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateTestCaseRequestOrBuilder.java similarity index 57% rename from proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateExperimentRequestOrBuilder.java rename to proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateTestCaseRequestOrBuilder.java index 4c293ace0..e61aa07ef 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateExperimentRequestOrBuilder.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateTestCaseRequestOrBuilder.java @@ -14,22 +14,21 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dialogflow/cx/v3/experiment.proto +// source: google/cloud/dialogflow/cx/v3/test_case.proto package com.google.cloud.dialogflow.cx.v3; -public interface CreateExperimentRequestOrBuilder +public interface CreateTestCaseRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.CreateExperimentRequest) + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.CreateTestCaseRequest) com.google.protobuf.MessageOrBuilder { /** * * *
-   * Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to create an [Environment][google.cloud.dialogflow.cx.v3.Environment] for.
-   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/environments/<Environment ID>`.
+   * Required. The agent to create the test case for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
    * 
* * @@ -43,9 +42,8 @@ public interface CreateExperimentRequestOrBuilder * * *
-   * Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to create an [Environment][google.cloud.dialogflow.cx.v3.Environment] for.
-   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/environments/<Environment ID>`.
+   * Required. The agent to create the test case for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
    * 
* * @@ -60,40 +58,40 @@ public interface CreateExperimentRequestOrBuilder * * *
-   * Required. The experiment to create.
+   * Required. The test case to create.
    * 
* * - * .google.cloud.dialogflow.cx.v3.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; * * - * @return Whether the experiment field is set. + * @return Whether the testCase field is set. */ - boolean hasExperiment(); + boolean hasTestCase(); /** * * *
-   * Required. The experiment to create.
+   * Required. The test case to create.
    * 
* * - * .google.cloud.dialogflow.cx.v3.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; * * - * @return The experiment. + * @return The testCase. */ - com.google.cloud.dialogflow.cx.v3.Experiment getExperiment(); + com.google.cloud.dialogflow.cx.v3.TestCase getTestCase(); /** * * *
-   * Required. The experiment to create.
+   * Required. The test case to create.
    * 
* * - * .google.cloud.dialogflow.cx.v3.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; * */ - com.google.cloud.dialogflow.cx.v3.ExperimentOrBuilder getExperimentOrBuilder(); + com.google.cloud.dialogflow.cx.v3.TestCaseOrBuilder getTestCaseOrBuilder(); } diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityType.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityType.java index a07429210..a476fa40d 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityType.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityType.java @@ -641,7 +641,6 @@ public interface EntityOrBuilder * *
    * An **entity entry** for an associated entity type.
-   * Next Id = 8
    * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3.EntityType.Entity} @@ -1067,7 +1066,6 @@ protected Builder newBuilderForType( * *
      * An **entity entry** for an associated entity type.
-     * Next Id = 8
      * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3.EntityType.Entity} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Experiment.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Experiment.java deleted file mode 100644 index 9f2d6f7cc..000000000 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Experiment.java +++ /dev/null @@ -1,10084 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dialogflow/cx/v3/experiment.proto - -package com.google.cloud.dialogflow.cx.v3; - -/** - * - * - *
- * Represents an experiment in an environment.
- * Next ID: 13
- * 
- * - * Protobuf type {@code google.cloud.dialogflow.cx.v3.Experiment} - */ -public final class Experiment extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.Experiment) - ExperimentOrBuilder { - private static final long serialVersionUID = 0L; - // Use Experiment.newBuilder() to construct. - private Experiment(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Experiment() { - name_ = ""; - displayName_ = ""; - description_ = ""; - state_ = 0; - variantsHistory_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Experiment(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private Experiment( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - displayName_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 32: - { - int rawValue = input.readEnum(); - - state_ = rawValue; - break; - } - case 42: - { - com.google.cloud.dialogflow.cx.v3.Experiment.Definition.Builder subBuilder = null; - if (definition_ != null) { - subBuilder = definition_.toBuilder(); - } - definition_ = - input.readMessage( - com.google.cloud.dialogflow.cx.v3.Experiment.Definition.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(definition_); - definition_ = subBuilder.buildPartial(); - } - - break; - } - case 50: - { - com.google.cloud.dialogflow.cx.v3.Experiment.Result.Builder subBuilder = null; - if (result_ != null) { - subBuilder = result_.toBuilder(); - } - result_ = - input.readMessage( - com.google.cloud.dialogflow.cx.v3.Experiment.Result.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(result_); - result_ = subBuilder.buildPartial(); - } - - break; - } - case 58: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (createTime_ != null) { - subBuilder = createTime_.toBuilder(); - } - createTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(createTime_); - createTime_ = subBuilder.buildPartial(); - } - - break; - } - case 66: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (startTime_ != null) { - subBuilder = startTime_.toBuilder(); - } - startTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(startTime_); - startTime_ = subBuilder.buildPartial(); - } - - break; - } - case 74: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (endTime_ != null) { - subBuilder = endTime_.toBuilder(); - } - endTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(endTime_); - endTime_ = subBuilder.buildPartial(); - } - - break; - } - case 82: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (lastUpdateTime_ != null) { - subBuilder = lastUpdateTime_.toBuilder(); - } - lastUpdateTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(lastUpdateTime_); - lastUpdateTime_ = subBuilder.buildPartial(); - } - - break; - } - case 90: - { - com.google.protobuf.Duration.Builder subBuilder = null; - if (experimentLength_ != null) { - subBuilder = experimentLength_.toBuilder(); - } - experimentLength_ = - input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(experimentLength_); - experimentLength_ = subBuilder.buildPartial(); - } - - break; - } - case 98: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - variantsHistory_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - variantsHistory_.add( - input.readMessage( - com.google.cloud.dialogflow.cx.v3.VariantsHistory.parser(), - extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - variantsHistory_ = java.util.Collections.unmodifiableList(variantsHistory_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_Experiment_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_Experiment_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3.Experiment.class, - com.google.cloud.dialogflow.cx.v3.Experiment.Builder.class); - } - - /** - * - * - *
-   * The state of the experiment.
-   * 
- * - * Protobuf enum {@code google.cloud.dialogflow.cx.v3.Experiment.State} - */ - public enum State implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * State unspecified.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - STATE_UNSPECIFIED(0), - /** - * - * - *
-     * The experiment is created but not started yet.
-     * 
- * - * DRAFT = 1; - */ - DRAFT(1), - /** - * - * - *
-     * The experiment is running.
-     * 
- * - * RUNNING = 2; - */ - RUNNING(2), - /** - * - * - *
-     * The experiment is done.
-     * 
- * - * DONE = 3; - */ - DONE(3), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * State unspecified.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - public static final int STATE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * The experiment is created but not started yet.
-     * 
- * - * DRAFT = 1; - */ - public static final int DRAFT_VALUE = 1; - /** - * - * - *
-     * The experiment is running.
-     * 
- * - * RUNNING = 2; - */ - public static final int RUNNING_VALUE = 2; - /** - * - * - *
-     * The experiment is done.
-     * 
- * - * DONE = 3; - */ - public static final int DONE_VALUE = 3; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static State valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static State forNumber(int value) { - switch (value) { - case 0: - return STATE_UNSPECIFIED; - case 1: - return DRAFT; - case 2: - return RUNNING; - case 3: - return DONE; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public State findValueByNumber(int number) { - return State.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3.Experiment.getDescriptor().getEnumTypes().get(0); - } - - private static final State[] VALUES = values(); - - public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private State(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3.Experiment.State) - } - - public interface DefinitionOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.Experiment.Definition) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * 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).
-     * 
- * - * string condition = 1; - * - * @return The condition. - */ - java.lang.String getCondition(); - /** - * - * - *
-     * 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).
-     * 
- * - * string condition = 1; - * - * @return The bytes for condition. - */ - com.google.protobuf.ByteString getConditionBytes(); - - /** - * - * - *
-     * The flow versions as the variants of this experiment.
-     * 
- * - * .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 2; - * - * @return Whether the versionVariants field is set. - */ - boolean hasVersionVariants(); - /** - * - * - *
-     * The flow versions as the variants of this experiment.
-     * 
- * - * .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 2; - * - * @return The versionVariants. - */ - com.google.cloud.dialogflow.cx.v3.VersionVariants getVersionVariants(); - /** - * - * - *
-     * The flow versions as the variants of this experiment.
-     * 
- * - * .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 2; - */ - com.google.cloud.dialogflow.cx.v3.VersionVariantsOrBuilder getVersionVariantsOrBuilder(); - - public com.google.cloud.dialogflow.cx.v3.Experiment.Definition.VariantsCase getVariantsCase(); - } - /** - * - * - *
-   * Definition of the experiment.
-   * Next ID: 3
-   * 
- * - * Protobuf type {@code google.cloud.dialogflow.cx.v3.Experiment.Definition} - */ - public static final class Definition extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.Experiment.Definition) - DefinitionOrBuilder { - private static final long serialVersionUID = 0L; - // Use Definition.newBuilder() to construct. - private Definition(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Definition() { - condition_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Definition(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private Definition( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - condition_ = s; - break; - } - case 18: - { - com.google.cloud.dialogflow.cx.v3.VersionVariants.Builder subBuilder = null; - if (variantsCase_ == 2) { - subBuilder = - ((com.google.cloud.dialogflow.cx.v3.VersionVariants) variants_).toBuilder(); - } - variants_ = - input.readMessage( - com.google.cloud.dialogflow.cx.v3.VersionVariants.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.dialogflow.cx.v3.VersionVariants) variants_); - variants_ = subBuilder.buildPartial(); - } - variantsCase_ = 2; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_Experiment_Definition_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_Experiment_Definition_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3.Experiment.Definition.class, - com.google.cloud.dialogflow.cx.v3.Experiment.Definition.Builder.class); - } - - private int variantsCase_ = 0; - private java.lang.Object variants_; - - public enum VariantsCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - VERSION_VARIANTS(2), - VARIANTS_NOT_SET(0); - private final int value; - - private VariantsCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static VariantsCase valueOf(int value) { - return forNumber(value); - } - - public static VariantsCase forNumber(int value) { - switch (value) { - case 2: - return VERSION_VARIANTS; - case 0: - return VARIANTS_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public VariantsCase getVariantsCase() { - return VariantsCase.forNumber(variantsCase_); - } - - public static final int CONDITION_FIELD_NUMBER = 1; - private volatile java.lang.Object 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).
-     * 
- * - * string condition = 1; - * - * @return The condition. - */ - @java.lang.Override - public java.lang.String getCondition() { - java.lang.Object ref = condition_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - condition_ = s; - return s; - } - } - /** - * - * - *
-     * 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).
-     * 
- * - * string condition = 1; - * - * @return The bytes for condition. - */ - @java.lang.Override - public com.google.protobuf.ByteString getConditionBytes() { - java.lang.Object ref = condition_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - condition_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int VERSION_VARIANTS_FIELD_NUMBER = 2; - /** - * - * - *
-     * The flow versions as the variants of this experiment.
-     * 
- * - * .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 2; - * - * @return Whether the versionVariants field is set. - */ - @java.lang.Override - public boolean hasVersionVariants() { - return variantsCase_ == 2; - } - /** - * - * - *
-     * The flow versions as the variants of this experiment.
-     * 
- * - * .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 2; - * - * @return The versionVariants. - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.VersionVariants getVersionVariants() { - if (variantsCase_ == 2) { - return (com.google.cloud.dialogflow.cx.v3.VersionVariants) variants_; - } - return com.google.cloud.dialogflow.cx.v3.VersionVariants.getDefaultInstance(); - } - /** - * - * - *
-     * The flow versions as the variants of this experiment.
-     * 
- * - * .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 2; - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.VersionVariantsOrBuilder - getVersionVariantsOrBuilder() { - if (variantsCase_ == 2) { - return (com.google.cloud.dialogflow.cx.v3.VersionVariants) variants_; - } - return com.google.cloud.dialogflow.cx.v3.VersionVariants.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getConditionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, condition_); - } - if (variantsCase_ == 2) { - output.writeMessage(2, (com.google.cloud.dialogflow.cx.v3.VersionVariants) variants_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getConditionBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, condition_); - } - if (variantsCase_ == 2) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 2, (com.google.cloud.dialogflow.cx.v3.VersionVariants) variants_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.Experiment.Definition)) { - return super.equals(obj); - } - com.google.cloud.dialogflow.cx.v3.Experiment.Definition other = - (com.google.cloud.dialogflow.cx.v3.Experiment.Definition) obj; - - if (!getCondition().equals(other.getCondition())) return false; - if (!getVariantsCase().equals(other.getVariantsCase())) return false; - switch (variantsCase_) { - case 2: - if (!getVersionVariants().equals(other.getVersionVariants())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + CONDITION_FIELD_NUMBER; - hash = (53 * hash) + getCondition().hashCode(); - switch (variantsCase_) { - case 2: - hash = (37 * hash) + VERSION_VARIANTS_FIELD_NUMBER; - hash = (53 * hash) + getVersionVariants().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Definition parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Definition parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Definition parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Definition parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Definition parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Definition parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Definition parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Definition parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Definition parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Definition parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Definition parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Definition parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.dialogflow.cx.v3.Experiment.Definition prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-     * Definition of the experiment.
-     * Next ID: 3
-     * 
- * - * Protobuf type {@code google.cloud.dialogflow.cx.v3.Experiment.Definition} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.Experiment.Definition) - com.google.cloud.dialogflow.cx.v3.Experiment.DefinitionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_Experiment_Definition_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_Experiment_Definition_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3.Experiment.Definition.class, - com.google.cloud.dialogflow.cx.v3.Experiment.Definition.Builder.class); - } - - // Construct using com.google.cloud.dialogflow.cx.v3.Experiment.Definition.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - condition_ = ""; - - variantsCase_ = 0; - variants_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_Experiment_Definition_descriptor; - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.Experiment.Definition getDefaultInstanceForType() { - return com.google.cloud.dialogflow.cx.v3.Experiment.Definition.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.Experiment.Definition build() { - com.google.cloud.dialogflow.cx.v3.Experiment.Definition result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.Experiment.Definition buildPartial() { - com.google.cloud.dialogflow.cx.v3.Experiment.Definition result = - new com.google.cloud.dialogflow.cx.v3.Experiment.Definition(this); - result.condition_ = condition_; - if (variantsCase_ == 2) { - if (versionVariantsBuilder_ == null) { - result.variants_ = variants_; - } else { - result.variants_ = versionVariantsBuilder_.build(); - } - } - result.variantsCase_ = variantsCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.dialogflow.cx.v3.Experiment.Definition) { - return mergeFrom((com.google.cloud.dialogflow.cx.v3.Experiment.Definition) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.Experiment.Definition other) { - if (other == com.google.cloud.dialogflow.cx.v3.Experiment.Definition.getDefaultInstance()) - return this; - if (!other.getCondition().isEmpty()) { - condition_ = other.condition_; - onChanged(); - } - switch (other.getVariantsCase()) { - case VERSION_VARIANTS: - { - mergeVersionVariants(other.getVersionVariants()); - break; - } - case VARIANTS_NOT_SET: - { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.dialogflow.cx.v3.Experiment.Definition parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dialogflow.cx.v3.Experiment.Definition) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int variantsCase_ = 0; - private java.lang.Object variants_; - - public VariantsCase getVariantsCase() { - return VariantsCase.forNumber(variantsCase_); - } - - public Builder clearVariants() { - variantsCase_ = 0; - variants_ = null; - onChanged(); - return this; - } - - private java.lang.Object 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).
-       * 
- * - * string condition = 1; - * - * @return The condition. - */ - public java.lang.String getCondition() { - java.lang.Object ref = condition_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - condition_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-       * 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).
-       * 
- * - * string condition = 1; - * - * @return The bytes for condition. - */ - public com.google.protobuf.ByteString getConditionBytes() { - java.lang.Object ref = condition_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - condition_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-       * 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).
-       * 
- * - * string condition = 1; - * - * @param value The condition to set. - * @return This builder for chaining. - */ - public Builder setCondition(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - condition_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * 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).
-       * 
- * - * string condition = 1; - * - * @return This builder for chaining. - */ - public Builder clearCondition() { - - condition_ = getDefaultInstance().getCondition(); - onChanged(); - return this; - } - /** - * - * - *
-       * 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).
-       * 
- * - * string condition = 1; - * - * @param value The bytes for condition to set. - * @return This builder for chaining. - */ - public Builder setConditionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - condition_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3.VersionVariants, - com.google.cloud.dialogflow.cx.v3.VersionVariants.Builder, - com.google.cloud.dialogflow.cx.v3.VersionVariantsOrBuilder> - versionVariantsBuilder_; - /** - * - * - *
-       * The flow versions as the variants of this experiment.
-       * 
- * - * .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 2; - * - * @return Whether the versionVariants field is set. - */ - @java.lang.Override - public boolean hasVersionVariants() { - return variantsCase_ == 2; - } - /** - * - * - *
-       * The flow versions as the variants of this experiment.
-       * 
- * - * .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 2; - * - * @return The versionVariants. - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.VersionVariants getVersionVariants() { - if (versionVariantsBuilder_ == null) { - if (variantsCase_ == 2) { - return (com.google.cloud.dialogflow.cx.v3.VersionVariants) variants_; - } - return com.google.cloud.dialogflow.cx.v3.VersionVariants.getDefaultInstance(); - } else { - if (variantsCase_ == 2) { - return versionVariantsBuilder_.getMessage(); - } - return com.google.cloud.dialogflow.cx.v3.VersionVariants.getDefaultInstance(); - } - } - /** - * - * - *
-       * The flow versions as the variants of this experiment.
-       * 
- * - * .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 2; - */ - public Builder setVersionVariants(com.google.cloud.dialogflow.cx.v3.VersionVariants value) { - if (versionVariantsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - variants_ = value; - onChanged(); - } else { - versionVariantsBuilder_.setMessage(value); - } - variantsCase_ = 2; - return this; - } - /** - * - * - *
-       * The flow versions as the variants of this experiment.
-       * 
- * - * .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 2; - */ - public Builder setVersionVariants( - com.google.cloud.dialogflow.cx.v3.VersionVariants.Builder builderForValue) { - if (versionVariantsBuilder_ == null) { - variants_ = builderForValue.build(); - onChanged(); - } else { - versionVariantsBuilder_.setMessage(builderForValue.build()); - } - variantsCase_ = 2; - return this; - } - /** - * - * - *
-       * The flow versions as the variants of this experiment.
-       * 
- * - * .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 2; - */ - public Builder mergeVersionVariants(com.google.cloud.dialogflow.cx.v3.VersionVariants value) { - if (versionVariantsBuilder_ == null) { - if (variantsCase_ == 2 - && variants_ - != com.google.cloud.dialogflow.cx.v3.VersionVariants.getDefaultInstance()) { - variants_ = - com.google.cloud.dialogflow.cx.v3.VersionVariants.newBuilder( - (com.google.cloud.dialogflow.cx.v3.VersionVariants) variants_) - .mergeFrom(value) - .buildPartial(); - } else { - variants_ = value; - } - onChanged(); - } else { - if (variantsCase_ == 2) { - versionVariantsBuilder_.mergeFrom(value); - } - versionVariantsBuilder_.setMessage(value); - } - variantsCase_ = 2; - return this; - } - /** - * - * - *
-       * The flow versions as the variants of this experiment.
-       * 
- * - * .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 2; - */ - public Builder clearVersionVariants() { - if (versionVariantsBuilder_ == null) { - if (variantsCase_ == 2) { - variantsCase_ = 0; - variants_ = null; - onChanged(); - } - } else { - if (variantsCase_ == 2) { - variantsCase_ = 0; - variants_ = null; - } - versionVariantsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-       * The flow versions as the variants of this experiment.
-       * 
- * - * .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 2; - */ - public com.google.cloud.dialogflow.cx.v3.VersionVariants.Builder getVersionVariantsBuilder() { - return getVersionVariantsFieldBuilder().getBuilder(); - } - /** - * - * - *
-       * The flow versions as the variants of this experiment.
-       * 
- * - * .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 2; - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.VersionVariantsOrBuilder - getVersionVariantsOrBuilder() { - if ((variantsCase_ == 2) && (versionVariantsBuilder_ != null)) { - return versionVariantsBuilder_.getMessageOrBuilder(); - } else { - if (variantsCase_ == 2) { - return (com.google.cloud.dialogflow.cx.v3.VersionVariants) variants_; - } - return com.google.cloud.dialogflow.cx.v3.VersionVariants.getDefaultInstance(); - } - } - /** - * - * - *
-       * The flow versions as the variants of this experiment.
-       * 
- * - * .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3.VersionVariants, - com.google.cloud.dialogflow.cx.v3.VersionVariants.Builder, - com.google.cloud.dialogflow.cx.v3.VersionVariantsOrBuilder> - getVersionVariantsFieldBuilder() { - if (versionVariantsBuilder_ == null) { - if (!(variantsCase_ == 2)) { - variants_ = com.google.cloud.dialogflow.cx.v3.VersionVariants.getDefaultInstance(); - } - versionVariantsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3.VersionVariants, - com.google.cloud.dialogflow.cx.v3.VersionVariants.Builder, - com.google.cloud.dialogflow.cx.v3.VersionVariantsOrBuilder>( - (com.google.cloud.dialogflow.cx.v3.VersionVariants) variants_, - getParentForChildren(), - isClean()); - variants_ = null; - } - variantsCase_ = 2; - onChanged(); - ; - return versionVariantsBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.Experiment.Definition) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.Experiment.Definition) - private static final com.google.cloud.dialogflow.cx.v3.Experiment.Definition DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.Experiment.Definition(); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Definition getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Definition parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Definition(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.Experiment.Definition getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface ResultOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.Experiment.Result) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Version variants and metrics.
-     * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; - * - */ - java.util.List - getVersionMetricsList(); - /** - * - * - *
-     * Version variants and metrics.
-     * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; - * - */ - com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics getVersionMetrics(int index); - /** - * - * - *
-     * Version variants and metrics.
-     * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; - * - */ - int getVersionMetricsCount(); - /** - * - * - *
-     * Version variants and metrics.
-     * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; - * - */ - java.util.List< - ? extends com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetricsOrBuilder> - getVersionMetricsOrBuilderList(); - /** - * - * - *
-     * Version variants and metrics.
-     * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; - * - */ - com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetricsOrBuilder - getVersionMetricsOrBuilder(int index); - - /** - * - * - *
-     * The last time the experiment's stats data was updated. Will have default
-     * value if stats have never been computed for this experiment.
-     * 
- * - * .google.protobuf.Timestamp last_update_time = 2; - * - * @return Whether the lastUpdateTime field is set. - */ - boolean hasLastUpdateTime(); - /** - * - * - *
-     * The last time the experiment's stats data was updated. Will have default
-     * value if stats have never been computed for this experiment.
-     * 
- * - * .google.protobuf.Timestamp last_update_time = 2; - * - * @return The lastUpdateTime. - */ - com.google.protobuf.Timestamp getLastUpdateTime(); - /** - * - * - *
-     * The last time the experiment's stats data was updated. Will have default
-     * value if stats have never been computed for this experiment.
-     * 
- * - * .google.protobuf.Timestamp last_update_time = 2; - */ - com.google.protobuf.TimestampOrBuilder getLastUpdateTimeOrBuilder(); - } - /** - * - * - *
-   * The inference result which includes an objective metric to optimize and the
-   * confidence interval.
-   * 
- * - * Protobuf type {@code google.cloud.dialogflow.cx.v3.Experiment.Result} - */ - public static final class Result extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.Experiment.Result) - ResultOrBuilder { - private static final long serialVersionUID = 0L; - // Use Result.newBuilder() to construct. - private Result(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Result() { - versionMetrics_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Result(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private Result( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - versionMetrics_ = - new java.util.ArrayList< - com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics>(); - mutable_bitField0_ |= 0x00000001; - } - versionMetrics_.add( - input.readMessage( - com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.parser(), - extensionRegistry)); - break; - } - case 18: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (lastUpdateTime_ != null) { - subBuilder = lastUpdateTime_.toBuilder(); - } - lastUpdateTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(lastUpdateTime_); - lastUpdateTime_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - versionMetrics_ = java.util.Collections.unmodifiableList(versionMetrics_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3.Experiment.Result.class, - com.google.cloud.dialogflow.cx.v3.Experiment.Result.Builder.class); - } - - /** - * - * - *
-     * Types of metric for Dialogflow experiment.
-     * 
- * - * Protobuf enum {@code google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType} - */ - public enum MetricType implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-       * Metric unspecified.
-       * 
- * - * METRIC_UNSPECIFIED = 0; - */ - METRIC_UNSPECIFIED(0), - /** - * - * - *
-       * Percentage of contained sessions without user calling back in 24 hours.
-       * 
- * - * CONTAINED_SESSION_NO_CALLBACK_RATE = 1; - */ - CONTAINED_SESSION_NO_CALLBACK_RATE(1), - /** - * - * - *
-       * Percentage of sessions that were handed to a human agent.
-       * 
- * - * LIVE_AGENT_HANDOFF_RATE = 2; - */ - LIVE_AGENT_HANDOFF_RATE(2), - /** - * - * - *
-       * Percentage of sessions with the same user calling back.
-       * 
- * - * CALLBACK_SESSION_RATE = 3; - */ - CALLBACK_SESSION_RATE(3), - /** - * - * - *
-       * Percentage of sessions where user hung up.
-       * 
- * - * ABANDONED_SESSION_RATE = 4; - */ - ABANDONED_SESSION_RATE(4), - /** - * - * - *
-       * Percentage of sessions reached Dialogflow 'END_PAGE' or
-       * 'END_SESSION'.
-       * 
- * - * SESSION_END_RATE = 5; - */ - SESSION_END_RATE(5), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-       * Metric unspecified.
-       * 
- * - * METRIC_UNSPECIFIED = 0; - */ - public static final int METRIC_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-       * Percentage of contained sessions without user calling back in 24 hours.
-       * 
- * - * CONTAINED_SESSION_NO_CALLBACK_RATE = 1; - */ - public static final int CONTAINED_SESSION_NO_CALLBACK_RATE_VALUE = 1; - /** - * - * - *
-       * Percentage of sessions that were handed to a human agent.
-       * 
- * - * LIVE_AGENT_HANDOFF_RATE = 2; - */ - public static final int LIVE_AGENT_HANDOFF_RATE_VALUE = 2; - /** - * - * - *
-       * Percentage of sessions with the same user calling back.
-       * 
- * - * CALLBACK_SESSION_RATE = 3; - */ - public static final int CALLBACK_SESSION_RATE_VALUE = 3; - /** - * - * - *
-       * Percentage of sessions where user hung up.
-       * 
- * - * ABANDONED_SESSION_RATE = 4; - */ - public static final int ABANDONED_SESSION_RATE_VALUE = 4; - /** - * - * - *
-       * Percentage of sessions reached Dialogflow 'END_PAGE' or
-       * 'END_SESSION'.
-       * 
- * - * SESSION_END_RATE = 5; - */ - public static final int SESSION_END_RATE_VALUE = 5; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static MetricType valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static MetricType forNumber(int value) { - switch (value) { - case 0: - return METRIC_UNSPECIFIED; - case 1: - return CONTAINED_SESSION_NO_CALLBACK_RATE; - case 2: - return LIVE_AGENT_HANDOFF_RATE; - case 3: - return CALLBACK_SESSION_RATE; - case 4: - return ABANDONED_SESSION_RATE; - case 5: - return SESSION_END_RATE; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public MetricType findValueByNumber(int number) { - return MetricType.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3.Experiment.Result.getDescriptor() - .getEnumTypes() - .get(0); - } - - private static final MetricType[] VALUES = values(); - - public static MetricType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private MetricType(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType) - } - - public interface ConfidenceIntervalOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-       * The confidence level used to construct the interval, i.e. there is X%
-       * chance that the true value is within this interval.
-       * 
- * - * double confidence_level = 1; - * - * @return The confidenceLevel. - */ - double getConfidenceLevel(); - - /** - * - * - *
-       * The percent change between an experiment metric's value and the value
-       * for its control.
-       * 
- * - * double ratio = 2; - * - * @return The ratio. - */ - double getRatio(); - - /** - * - * - *
-       * Lower bound of the interval.
-       * 
- * - * double lower_bound = 3; - * - * @return The lowerBound. - */ - double getLowerBound(); - - /** - * - * - *
-       * Upper bound of the interval.
-       * 
- * - * double upper_bound = 4; - * - * @return The upperBound. - */ - double getUpperBound(); - } - /** - * - * - *
-     * A confidence interval is a range of possible values for the experiment
-     * objective you are trying to measure.
-     * 
- * - * Protobuf type {@code google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval} - */ - public static final class ConfidenceInterval extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval) - ConfidenceIntervalOrBuilder { - private static final long serialVersionUID = 0L; - // Use ConfidenceInterval.newBuilder() to construct. - private ConfidenceInterval(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ConfidenceInterval() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ConfidenceInterval(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ConfidenceInterval( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 9: - { - confidenceLevel_ = input.readDouble(); - break; - } - case 17: - { - ratio_ = input.readDouble(); - break; - } - case 25: - { - lowerBound_ = input.readDouble(); - break; - } - case 33: - { - upperBound_ = input.readDouble(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_ConfidenceInterval_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_ConfidenceInterval_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval.class, - com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval.Builder - .class); - } - - public static final int CONFIDENCE_LEVEL_FIELD_NUMBER = 1; - private double confidenceLevel_; - /** - * - * - *
-       * The confidence level used to construct the interval, i.e. there is X%
-       * chance that the true value is within this interval.
-       * 
- * - * double confidence_level = 1; - * - * @return The confidenceLevel. - */ - @java.lang.Override - public double getConfidenceLevel() { - return confidenceLevel_; - } - - public static final int RATIO_FIELD_NUMBER = 2; - private double ratio_; - /** - * - * - *
-       * The percent change between an experiment metric's value and the value
-       * for its control.
-       * 
- * - * double ratio = 2; - * - * @return The ratio. - */ - @java.lang.Override - public double getRatio() { - return ratio_; - } - - public static final int LOWER_BOUND_FIELD_NUMBER = 3; - private double lowerBound_; - /** - * - * - *
-       * Lower bound of the interval.
-       * 
- * - * double lower_bound = 3; - * - * @return The lowerBound. - */ - @java.lang.Override - public double getLowerBound() { - return lowerBound_; - } - - public static final int UPPER_BOUND_FIELD_NUMBER = 4; - private double upperBound_; - /** - * - * - *
-       * Upper bound of the interval.
-       * 
- * - * double upper_bound = 4; - * - * @return The upperBound. - */ - @java.lang.Override - public double getUpperBound() { - return upperBound_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (confidenceLevel_ != 0D) { - output.writeDouble(1, confidenceLevel_); - } - if (ratio_ != 0D) { - output.writeDouble(2, ratio_); - } - if (lowerBound_ != 0D) { - output.writeDouble(3, lowerBound_); - } - if (upperBound_ != 0D) { - output.writeDouble(4, upperBound_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (confidenceLevel_ != 0D) { - size += com.google.protobuf.CodedOutputStream.computeDoubleSize(1, confidenceLevel_); - } - if (ratio_ != 0D) { - size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, ratio_); - } - if (lowerBound_ != 0D) { - size += com.google.protobuf.CodedOutputStream.computeDoubleSize(3, lowerBound_); - } - if (upperBound_ != 0D) { - size += com.google.protobuf.CodedOutputStream.computeDoubleSize(4, upperBound_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval)) { - return super.equals(obj); - } - com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval other = - (com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval) obj; - - if (java.lang.Double.doubleToLongBits(getConfidenceLevel()) - != java.lang.Double.doubleToLongBits(other.getConfidenceLevel())) return false; - if (java.lang.Double.doubleToLongBits(getRatio()) - != java.lang.Double.doubleToLongBits(other.getRatio())) return false; - if (java.lang.Double.doubleToLongBits(getLowerBound()) - != java.lang.Double.doubleToLongBits(other.getLowerBound())) return false; - if (java.lang.Double.doubleToLongBits(getUpperBound()) - != java.lang.Double.doubleToLongBits(other.getUpperBound())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + CONFIDENCE_LEVEL_FIELD_NUMBER; - hash = - (53 * hash) - + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getConfidenceLevel())); - hash = (37 * hash) + RATIO_FIELD_NUMBER; - hash = - (53 * hash) - + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getRatio())); - hash = (37 * hash) + LOWER_BOUND_FIELD_NUMBER; - hash = - (53 * hash) - + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getLowerBound())); - hash = (37 * hash) + UPPER_BOUND_FIELD_NUMBER; - hash = - (53 * hash) - + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getUpperBound())); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval - parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval - parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-       * A confidence interval is a range of possible values for the experiment
-       * objective you are trying to measure.
-       * 
- * - * Protobuf type {@code google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval) - com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceIntervalOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_ConfidenceInterval_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_ConfidenceInterval_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval.class, - com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval.Builder - .class); - } - - // Construct using - // com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - confidenceLevel_ = 0D; - - ratio_ = 0D; - - lowerBound_ = 0D; - - upperBound_ = 0D; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_ConfidenceInterval_descriptor; - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval - getDefaultInstanceForType() { - return com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval build() { - com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval - buildPartial() { - com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval result = - new com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval(this); - result.confidenceLevel_ = confidenceLevel_; - result.ratio_ = ratio_; - result.lowerBound_ = lowerBound_; - result.upperBound_ = upperBound_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval) { - return mergeFrom( - (com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval other) { - if (other - == com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval - .getDefaultInstance()) return this; - if (other.getConfidenceLevel() != 0D) { - setConfidenceLevel(other.getConfidenceLevel()); - } - if (other.getRatio() != 0D) { - setRatio(other.getRatio()); - } - if (other.getLowerBound() != 0D) { - setLowerBound(other.getLowerBound()); - } - if (other.getUpperBound() != 0D) { - setUpperBound(other.getUpperBound()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval parsedMessage = - null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private double confidenceLevel_; - /** - * - * - *
-         * The confidence level used to construct the interval, i.e. there is X%
-         * chance that the true value is within this interval.
-         * 
- * - * double confidence_level = 1; - * - * @return The confidenceLevel. - */ - @java.lang.Override - public double getConfidenceLevel() { - return confidenceLevel_; - } - /** - * - * - *
-         * The confidence level used to construct the interval, i.e. there is X%
-         * chance that the true value is within this interval.
-         * 
- * - * double confidence_level = 1; - * - * @param value The confidenceLevel to set. - * @return This builder for chaining. - */ - public Builder setConfidenceLevel(double value) { - - confidenceLevel_ = value; - onChanged(); - return this; - } - /** - * - * - *
-         * The confidence level used to construct the interval, i.e. there is X%
-         * chance that the true value is within this interval.
-         * 
- * - * double confidence_level = 1; - * - * @return This builder for chaining. - */ - public Builder clearConfidenceLevel() { - - confidenceLevel_ = 0D; - onChanged(); - return this; - } - - private double ratio_; - /** - * - * - *
-         * The percent change between an experiment metric's value and the value
-         * for its control.
-         * 
- * - * double ratio = 2; - * - * @return The ratio. - */ - @java.lang.Override - public double getRatio() { - return ratio_; - } - /** - * - * - *
-         * The percent change between an experiment metric's value and the value
-         * for its control.
-         * 
- * - * double ratio = 2; - * - * @param value The ratio to set. - * @return This builder for chaining. - */ - public Builder setRatio(double value) { - - ratio_ = value; - onChanged(); - return this; - } - /** - * - * - *
-         * The percent change between an experiment metric's value and the value
-         * for its control.
-         * 
- * - * double ratio = 2; - * - * @return This builder for chaining. - */ - public Builder clearRatio() { - - ratio_ = 0D; - onChanged(); - return this; - } - - private double lowerBound_; - /** - * - * - *
-         * Lower bound of the interval.
-         * 
- * - * double lower_bound = 3; - * - * @return The lowerBound. - */ - @java.lang.Override - public double getLowerBound() { - return lowerBound_; - } - /** - * - * - *
-         * Lower bound of the interval.
-         * 
- * - * double lower_bound = 3; - * - * @param value The lowerBound to set. - * @return This builder for chaining. - */ - public Builder setLowerBound(double value) { - - lowerBound_ = value; - onChanged(); - return this; - } - /** - * - * - *
-         * Lower bound of the interval.
-         * 
- * - * double lower_bound = 3; - * - * @return This builder for chaining. - */ - public Builder clearLowerBound() { - - lowerBound_ = 0D; - onChanged(); - return this; - } - - private double upperBound_; - /** - * - * - *
-         * Upper bound of the interval.
-         * 
- * - * double upper_bound = 4; - * - * @return The upperBound. - */ - @java.lang.Override - public double getUpperBound() { - return upperBound_; - } - /** - * - * - *
-         * Upper bound of the interval.
-         * 
- * - * double upper_bound = 4; - * - * @param value The upperBound to set. - * @return This builder for chaining. - */ - public Builder setUpperBound(double value) { - - upperBound_ = value; - onChanged(); - return this; - } - /** - * - * - *
-         * Upper bound of the interval.
-         * 
- * - * double upper_bound = 4; - * - * @return This builder for chaining. - */ - public Builder clearUpperBound() { - - upperBound_ = 0D; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval) - private static final com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval(); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ConfidenceInterval parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ConfidenceInterval(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface MetricOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.Experiment.Result.Metric) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-       * The type of the metric.
-       * 
- * - * .google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType type = 1; - * - * @return The enum numeric value on the wire for type. - */ - int getTypeValue(); - /** - * - * - *
-       * The type of the metric.
-       * 
- * - * .google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType type = 1; - * - * @return The type. - */ - com.google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType getType(); - - /** - * - * - *
-       * Ratio value of a metric.
-       * 
- * - * double ratio = 2; - * - * @return The ratio. - */ - double getRatio(); - - /** - * - * - *
-       * The probability that the treatment is better than all other treatments
-       * in the experiment
-       * 
- * - * - * .google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval confidence_interval = 3; - * - * - * @return Whether the confidenceInterval field is set. - */ - boolean hasConfidenceInterval(); - /** - * - * - *
-       * The probability that the treatment is better than all other treatments
-       * in the experiment
-       * 
- * - * - * .google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval confidence_interval = 3; - * - * - * @return The confidenceInterval. - */ - com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval - getConfidenceInterval(); - /** - * - * - *
-       * The probability that the treatment is better than all other treatments
-       * in the experiment
-       * 
- * - * - * .google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval confidence_interval = 3; - * - */ - com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceIntervalOrBuilder - getConfidenceIntervalOrBuilder(); - - public com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.ValueCase getValueCase(); - } - /** - * - * - *
-     * Metric and corresponding confidence intervals.
-     * 
- * - * Protobuf type {@code google.cloud.dialogflow.cx.v3.Experiment.Result.Metric} - */ - public static final class Metric extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.Experiment.Result.Metric) - MetricOrBuilder { - private static final long serialVersionUID = 0L; - // Use Metric.newBuilder() to construct. - private Metric(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Metric() { - type_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Metric(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private Metric( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - int rawValue = input.readEnum(); - - type_ = rawValue; - break; - } - case 17: - { - valueCase_ = 2; - value_ = input.readDouble(); - break; - } - case 26: - { - com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval.Builder - subBuilder = null; - if (confidenceInterval_ != null) { - subBuilder = confidenceInterval_.toBuilder(); - } - confidenceInterval_ = - input.readMessage( - com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(confidenceInterval_); - confidenceInterval_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_Metric_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_Metric_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.class, - com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.Builder.class); - } - - private int valueCase_ = 0; - private java.lang.Object value_; - - public enum ValueCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - RATIO(2), - VALUE_NOT_SET(0); - private final int value; - - private ValueCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ValueCase valueOf(int value) { - return forNumber(value); - } - - public static ValueCase forNumber(int value) { - switch (value) { - case 2: - return RATIO; - case 0: - return VALUE_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public ValueCase getValueCase() { - return ValueCase.forNumber(valueCase_); - } - - public static final int TYPE_FIELD_NUMBER = 1; - private int type_; - /** - * - * - *
-       * The type of the metric.
-       * 
- * - * .google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType type = 1; - * - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override - public int getTypeValue() { - return type_; - } - /** - * - * - *
-       * The type of the metric.
-       * 
- * - * .google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType type = 1; - * - * @return The type. - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType getType() { - @SuppressWarnings("deprecation") - com.google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType result = - com.google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType.valueOf(type_); - return result == null - ? com.google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType.UNRECOGNIZED - : result; - } - - public static final int RATIO_FIELD_NUMBER = 2; - /** - * - * - *
-       * Ratio value of a metric.
-       * 
- * - * double ratio = 2; - * - * @return The ratio. - */ - @java.lang.Override - public double getRatio() { - if (valueCase_ == 2) { - return (java.lang.Double) value_; - } - return 0D; - } - - public static final int CONFIDENCE_INTERVAL_FIELD_NUMBER = 3; - private com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval - confidenceInterval_; - /** - * - * - *
-       * The probability that the treatment is better than all other treatments
-       * in the experiment
-       * 
- * - * - * .google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval confidence_interval = 3; - * - * - * @return Whether the confidenceInterval field is set. - */ - @java.lang.Override - public boolean hasConfidenceInterval() { - return confidenceInterval_ != null; - } - /** - * - * - *
-       * The probability that the treatment is better than all other treatments
-       * in the experiment
-       * 
- * - * - * .google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval confidence_interval = 3; - * - * - * @return The confidenceInterval. - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval - getConfidenceInterval() { - return confidenceInterval_ == null - ? com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval - .getDefaultInstance() - : confidenceInterval_; - } - /** - * - * - *
-       * The probability that the treatment is better than all other treatments
-       * in the experiment
-       * 
- * - * - * .google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval confidence_interval = 3; - * - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceIntervalOrBuilder - getConfidenceIntervalOrBuilder() { - return getConfidenceInterval(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (type_ - != com.google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType.METRIC_UNSPECIFIED - .getNumber()) { - output.writeEnum(1, type_); - } - if (valueCase_ == 2) { - output.writeDouble(2, (double) ((java.lang.Double) value_)); - } - if (confidenceInterval_ != null) { - output.writeMessage(3, getConfidenceInterval()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (type_ - != com.google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType.METRIC_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, type_); - } - if (valueCase_ == 2) { - size += - com.google.protobuf.CodedOutputStream.computeDoubleSize( - 2, (double) ((java.lang.Double) value_)); - } - if (confidenceInterval_ != null) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(3, getConfidenceInterval()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric)) { - return super.equals(obj); - } - com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric other = - (com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric) obj; - - if (type_ != other.type_) return false; - if (hasConfidenceInterval() != other.hasConfidenceInterval()) return false; - if (hasConfidenceInterval()) { - if (!getConfidenceInterval().equals(other.getConfidenceInterval())) return false; - } - if (!getValueCase().equals(other.getValueCase())) return false; - switch (valueCase_) { - case 2: - if (java.lang.Double.doubleToLongBits(getRatio()) - != java.lang.Double.doubleToLongBits(other.getRatio())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + type_; - if (hasConfidenceInterval()) { - hash = (37 * hash) + CONFIDENCE_INTERVAL_FIELD_NUMBER; - hash = (53 * hash) + getConfidenceInterval().hashCode(); - } - switch (valueCase_) { - case 2: - hash = (37 * hash) + RATIO_FIELD_NUMBER; - hash = - (53 * hash) - + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getRatio())); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-       * Metric and corresponding confidence intervals.
-       * 
- * - * Protobuf type {@code google.cloud.dialogflow.cx.v3.Experiment.Result.Metric} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.Experiment.Result.Metric) - com.google.cloud.dialogflow.cx.v3.Experiment.Result.MetricOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_Metric_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_Metric_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.class, - com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.Builder.class); - } - - // Construct using com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - type_ = 0; - - if (confidenceIntervalBuilder_ == null) { - confidenceInterval_ = null; - } else { - confidenceInterval_ = null; - confidenceIntervalBuilder_ = null; - } - valueCase_ = 0; - value_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_Metric_descriptor; - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric - getDefaultInstanceForType() { - return com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric build() { - com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric buildPartial() { - com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric result = - new com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric(this); - result.type_ = type_; - if (valueCase_ == 2) { - result.value_ = value_; - } - if (confidenceIntervalBuilder_ == null) { - result.confidenceInterval_ = confidenceInterval_; - } else { - result.confidenceInterval_ = confidenceIntervalBuilder_.build(); - } - result.valueCase_ = valueCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric) { - return mergeFrom((com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric other) { - if (other - == com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.getDefaultInstance()) - return this; - if (other.type_ != 0) { - setTypeValue(other.getTypeValue()); - } - if (other.hasConfidenceInterval()) { - mergeConfidenceInterval(other.getConfidenceInterval()); - } - switch (other.getValueCase()) { - case RATIO: - { - setRatio(other.getRatio()); - break; - } - case VALUE_NOT_SET: - { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int valueCase_ = 0; - private java.lang.Object value_; - - public ValueCase getValueCase() { - return ValueCase.forNumber(valueCase_); - } - - public Builder clearValue() { - valueCase_ = 0; - value_ = null; - onChanged(); - return this; - } - - private int type_ = 0; - /** - * - * - *
-         * The type of the metric.
-         * 
- * - * .google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType type = 1; - * - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override - public int getTypeValue() { - return type_; - } - /** - * - * - *
-         * The type of the metric.
-         * 
- * - * .google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType type = 1; - * - * @param value The enum numeric value on the wire for type to set. - * @return This builder for chaining. - */ - public Builder setTypeValue(int value) { - - type_ = value; - onChanged(); - return this; - } - /** - * - * - *
-         * The type of the metric.
-         * 
- * - * .google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType type = 1; - * - * @return The type. - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType getType() { - @SuppressWarnings("deprecation") - com.google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType result = - com.google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType.valueOf(type_); - return result == null - ? com.google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType.UNRECOGNIZED - : result; - } - /** - * - * - *
-         * The type of the metric.
-         * 
- * - * .google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType type = 1; - * - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setType( - com.google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType value) { - if (value == null) { - throw new NullPointerException(); - } - - type_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-         * The type of the metric.
-         * 
- * - * .google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType type = 1; - * - * @return This builder for chaining. - */ - public Builder clearType() { - - type_ = 0; - onChanged(); - return this; - } - - /** - * - * - *
-         * Ratio value of a metric.
-         * 
- * - * double ratio = 2; - * - * @return The ratio. - */ - public double getRatio() { - if (valueCase_ == 2) { - return (java.lang.Double) value_; - } - return 0D; - } - /** - * - * - *
-         * Ratio value of a metric.
-         * 
- * - * double ratio = 2; - * - * @param value The ratio to set. - * @return This builder for chaining. - */ - public Builder setRatio(double value) { - valueCase_ = 2; - value_ = value; - onChanged(); - return this; - } - /** - * - * - *
-         * Ratio value of a metric.
-         * 
- * - * double ratio = 2; - * - * @return This builder for chaining. - */ - public Builder clearRatio() { - if (valueCase_ == 2) { - valueCase_ = 0; - value_ = null; - onChanged(); - } - return this; - } - - private com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval - confidenceInterval_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval, - com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval.Builder, - com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceIntervalOrBuilder> - confidenceIntervalBuilder_; - /** - * - * - *
-         * The probability that the treatment is better than all other treatments
-         * in the experiment
-         * 
- * - * - * .google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval confidence_interval = 3; - * - * - * @return Whether the confidenceInterval field is set. - */ - public boolean hasConfidenceInterval() { - return confidenceIntervalBuilder_ != null || confidenceInterval_ != null; - } - /** - * - * - *
-         * The probability that the treatment is better than all other treatments
-         * in the experiment
-         * 
- * - * - * .google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval confidence_interval = 3; - * - * - * @return The confidenceInterval. - */ - public com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval - getConfidenceInterval() { - if (confidenceIntervalBuilder_ == null) { - return confidenceInterval_ == null - ? com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval - .getDefaultInstance() - : confidenceInterval_; - } else { - return confidenceIntervalBuilder_.getMessage(); - } - } - /** - * - * - *
-         * The probability that the treatment is better than all other treatments
-         * in the experiment
-         * 
- * - * - * .google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval confidence_interval = 3; - * - */ - public Builder setConfidenceInterval( - com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval value) { - if (confidenceIntervalBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - confidenceInterval_ = value; - onChanged(); - } else { - confidenceIntervalBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-         * The probability that the treatment is better than all other treatments
-         * in the experiment
-         * 
- * - * - * .google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval confidence_interval = 3; - * - */ - public Builder setConfidenceInterval( - com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval.Builder - builderForValue) { - if (confidenceIntervalBuilder_ == null) { - confidenceInterval_ = builderForValue.build(); - onChanged(); - } else { - confidenceIntervalBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-         * The probability that the treatment is better than all other treatments
-         * in the experiment
-         * 
- * - * - * .google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval confidence_interval = 3; - * - */ - public Builder mergeConfidenceInterval( - com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval value) { - if (confidenceIntervalBuilder_ == null) { - if (confidenceInterval_ != null) { - confidenceInterval_ = - com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval.newBuilder( - confidenceInterval_) - .mergeFrom(value) - .buildPartial(); - } else { - confidenceInterval_ = value; - } - onChanged(); - } else { - confidenceIntervalBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-         * The probability that the treatment is better than all other treatments
-         * in the experiment
-         * 
- * - * - * .google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval confidence_interval = 3; - * - */ - public Builder clearConfidenceInterval() { - if (confidenceIntervalBuilder_ == null) { - confidenceInterval_ = null; - onChanged(); - } else { - confidenceInterval_ = null; - confidenceIntervalBuilder_ = null; - } - - return this; - } - /** - * - * - *
-         * The probability that the treatment is better than all other treatments
-         * in the experiment
-         * 
- * - * - * .google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval confidence_interval = 3; - * - */ - public com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval.Builder - getConfidenceIntervalBuilder() { - - onChanged(); - return getConfidenceIntervalFieldBuilder().getBuilder(); - } - /** - * - * - *
-         * The probability that the treatment is better than all other treatments
-         * in the experiment
-         * 
- * - * - * .google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval confidence_interval = 3; - * - */ - public com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceIntervalOrBuilder - getConfidenceIntervalOrBuilder() { - if (confidenceIntervalBuilder_ != null) { - return confidenceIntervalBuilder_.getMessageOrBuilder(); - } else { - return confidenceInterval_ == null - ? com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval - .getDefaultInstance() - : confidenceInterval_; - } - } - /** - * - * - *
-         * The probability that the treatment is better than all other treatments
-         * in the experiment
-         * 
- * - * - * .google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval confidence_interval = 3; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval, - com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval.Builder, - com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceIntervalOrBuilder> - getConfidenceIntervalFieldBuilder() { - if (confidenceIntervalBuilder_ == null) { - confidenceIntervalBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval, - com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval.Builder, - com.google.cloud.dialogflow.cx.v3.Experiment.Result - .ConfidenceIntervalOrBuilder>( - getConfidenceInterval(), getParentForChildren(), isClean()); - confidenceInterval_ = null; - } - return confidenceIntervalBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.Experiment.Result.Metric) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.Experiment.Result.Metric) - private static final com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric(); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Metric parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Metric(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface VersionMetricsOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-       * The name of the flow [Version][google.cloud.dialogflow.cx.v3.Version].
-       * Format: `projects/<Project Number>/locations/<Location
-       * ID>/agents/<Agent ID>/flows/<Flow ID>/versions/<Version ID>`.
-       * 
- * - * string version = 1 [(.google.api.resource_reference) = { ... } - * - * @return The version. - */ - java.lang.String getVersion(); - /** - * - * - *
-       * The name of the flow [Version][google.cloud.dialogflow.cx.v3.Version].
-       * Format: `projects/<Project Number>/locations/<Location
-       * ID>/agents/<Agent ID>/flows/<Flow ID>/versions/<Version ID>`.
-       * 
- * - * string version = 1 [(.google.api.resource_reference) = { ... } - * - * @return The bytes for version. - */ - com.google.protobuf.ByteString getVersionBytes(); - - /** - * - * - *
-       * The metrics and corresponding confidence intervals in the inference
-       * result.
-       * 
- * - * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; - */ - java.util.List getMetricsList(); - /** - * - * - *
-       * The metrics and corresponding confidence intervals in the inference
-       * result.
-       * 
- * - * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; - */ - com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric getMetrics(int index); - /** - * - * - *
-       * The metrics and corresponding confidence intervals in the inference
-       * result.
-       * 
- * - * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; - */ - int getMetricsCount(); - /** - * - * - *
-       * The metrics and corresponding confidence intervals in the inference
-       * result.
-       * 
- * - * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; - */ - java.util.List - getMetricsOrBuilderList(); - /** - * - * - *
-       * The metrics and corresponding confidence intervals in the inference
-       * result.
-       * 
- * - * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; - */ - com.google.cloud.dialogflow.cx.v3.Experiment.Result.MetricOrBuilder getMetricsOrBuilder( - int index); - - /** - * - * - *
-       * Number of sessions that were allocated to this version.
-       * 
- * - * int32 session_count = 3; - * - * @return The sessionCount. - */ - int getSessionCount(); - } - /** - * - * - *
-     * Version variant and associated metrics.
-     * 
- * - * Protobuf type {@code google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics} - */ - public static final class VersionMetrics extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics) - VersionMetricsOrBuilder { - private static final long serialVersionUID = 0L; - // Use VersionMetrics.newBuilder() to construct. - private VersionMetrics(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private VersionMetrics() { - version_ = ""; - metrics_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new VersionMetrics(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private VersionMetrics( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - version_ = s; - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - metrics_ = - new java.util.ArrayList< - com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric>(); - mutable_bitField0_ |= 0x00000001; - } - metrics_.add( - input.readMessage( - com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.parser(), - extensionRegistry)); - break; - } - case 24: - { - sessionCount_ = input.readInt32(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - metrics_ = java.util.Collections.unmodifiableList(metrics_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_VersionMetrics_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_VersionMetrics_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.class, - com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.Builder.class); - } - - public static final int VERSION_FIELD_NUMBER = 1; - private volatile java.lang.Object version_; - /** - * - * - *
-       * The name of the flow [Version][google.cloud.dialogflow.cx.v3.Version].
-       * Format: `projects/<Project Number>/locations/<Location
-       * ID>/agents/<Agent ID>/flows/<Flow ID>/versions/<Version ID>`.
-       * 
- * - * string version = 1 [(.google.api.resource_reference) = { ... } - * - * @return The version. - */ - @java.lang.Override - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - version_ = s; - return s; - } - } - /** - * - * - *
-       * The name of the flow [Version][google.cloud.dialogflow.cx.v3.Version].
-       * Format: `projects/<Project Number>/locations/<Location
-       * ID>/agents/<Agent ID>/flows/<Flow ID>/versions/<Version ID>`.
-       * 
- * - * string version = 1 [(.google.api.resource_reference) = { ... } - * - * @return The bytes for version. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int METRICS_FIELD_NUMBER = 2; - private java.util.List metrics_; - /** - * - * - *
-       * The metrics and corresponding confidence intervals in the inference
-       * result.
-       * 
- * - * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; - */ - @java.lang.Override - public java.util.List - getMetricsList() { - return metrics_; - } - /** - * - * - *
-       * The metrics and corresponding confidence intervals in the inference
-       * result.
-       * 
- * - * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; - */ - @java.lang.Override - public java.util.List< - ? extends com.google.cloud.dialogflow.cx.v3.Experiment.Result.MetricOrBuilder> - getMetricsOrBuilderList() { - return metrics_; - } - /** - * - * - *
-       * The metrics and corresponding confidence intervals in the inference
-       * result.
-       * 
- * - * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; - */ - @java.lang.Override - public int getMetricsCount() { - return metrics_.size(); - } - /** - * - * - *
-       * The metrics and corresponding confidence intervals in the inference
-       * result.
-       * 
- * - * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric getMetrics(int index) { - return metrics_.get(index); - } - /** - * - * - *
-       * The metrics and corresponding confidence intervals in the inference
-       * result.
-       * 
- * - * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.Experiment.Result.MetricOrBuilder - getMetricsOrBuilder(int index) { - return metrics_.get(index); - } - - public static final int SESSION_COUNT_FIELD_NUMBER = 3; - private int sessionCount_; - /** - * - * - *
-       * Number of sessions that were allocated to this version.
-       * 
- * - * int32 session_count = 3; - * - * @return The sessionCount. - */ - @java.lang.Override - public int getSessionCount() { - return sessionCount_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getVersionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, version_); - } - for (int i = 0; i < metrics_.size(); i++) { - output.writeMessage(2, metrics_.get(i)); - } - if (sessionCount_ != 0) { - output.writeInt32(3, sessionCount_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getVersionBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, version_); - } - for (int i = 0; i < metrics_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, metrics_.get(i)); - } - if (sessionCount_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, sessionCount_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics)) { - return super.equals(obj); - } - com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics other = - (com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics) obj; - - if (!getVersion().equals(other.getVersion())) return false; - if (!getMetricsList().equals(other.getMetricsList())) return false; - if (getSessionCount() != other.getSessionCount()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + VERSION_FIELD_NUMBER; - hash = (53 * hash) + getVersion().hashCode(); - if (getMetricsCount() > 0) { - hash = (37 * hash) + METRICS_FIELD_NUMBER; - hash = (53 * hash) + getMetricsList().hashCode(); - } - hash = (37 * hash) + SESSION_COUNT_FIELD_NUMBER; - hash = (53 * hash) + getSessionCount(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics - parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-       * Version variant and associated metrics.
-       * 
- * - * Protobuf type {@code google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics) - com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetricsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_VersionMetrics_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_VersionMetrics_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.class, - com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.Builder.class); - } - - // Construct using - // com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getMetricsFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - version_ = ""; - - if (metricsBuilder_ == null) { - metrics_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - metricsBuilder_.clear(); - } - sessionCount_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_VersionMetrics_descriptor; - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics - getDefaultInstanceForType() { - return com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics build() { - com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics buildPartial() { - com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics result = - new com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics(this); - int from_bitField0_ = bitField0_; - result.version_ = version_; - if (metricsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - metrics_ = java.util.Collections.unmodifiableList(metrics_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.metrics_ = metrics_; - } else { - result.metrics_ = metricsBuilder_.build(); - } - result.sessionCount_ = sessionCount_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics) { - return mergeFrom( - (com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics other) { - if (other - == com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics - .getDefaultInstance()) return this; - if (!other.getVersion().isEmpty()) { - version_ = other.version_; - onChanged(); - } - if (metricsBuilder_ == null) { - if (!other.metrics_.isEmpty()) { - if (metrics_.isEmpty()) { - metrics_ = other.metrics_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureMetricsIsMutable(); - metrics_.addAll(other.metrics_); - } - onChanged(); - } - } else { - if (!other.metrics_.isEmpty()) { - if (metricsBuilder_.isEmpty()) { - metricsBuilder_.dispose(); - metricsBuilder_ = null; - metrics_ = other.metrics_; - bitField0_ = (bitField0_ & ~0x00000001); - metricsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getMetricsFieldBuilder() - : null; - } else { - metricsBuilder_.addAllMessages(other.metrics_); - } - } - } - if (other.getSessionCount() != 0) { - setSessionCount(other.getSessionCount()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.lang.Object version_ = ""; - /** - * - * - *
-         * The name of the flow [Version][google.cloud.dialogflow.cx.v3.Version].
-         * Format: `projects/<Project Number>/locations/<Location
-         * ID>/agents/<Agent ID>/flows/<Flow ID>/versions/<Version ID>`.
-         * 
- * - * string version = 1 [(.google.api.resource_reference) = { ... } - * - * @return The version. - */ - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - version_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-         * The name of the flow [Version][google.cloud.dialogflow.cx.v3.Version].
-         * Format: `projects/<Project Number>/locations/<Location
-         * ID>/agents/<Agent ID>/flows/<Flow ID>/versions/<Version ID>`.
-         * 
- * - * string version = 1 [(.google.api.resource_reference) = { ... } - * - * @return The bytes for version. - */ - public com.google.protobuf.ByteString getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-         * The name of the flow [Version][google.cloud.dialogflow.cx.v3.Version].
-         * Format: `projects/<Project Number>/locations/<Location
-         * ID>/agents/<Agent ID>/flows/<Flow ID>/versions/<Version ID>`.
-         * 
- * - * string version = 1 [(.google.api.resource_reference) = { ... } - * - * @param value The version to set. - * @return This builder for chaining. - */ - public Builder setVersion(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - version_ = value; - onChanged(); - return this; - } - /** - * - * - *
-         * The name of the flow [Version][google.cloud.dialogflow.cx.v3.Version].
-         * Format: `projects/<Project Number>/locations/<Location
-         * ID>/agents/<Agent ID>/flows/<Flow ID>/versions/<Version ID>`.
-         * 
- * - * string version = 1 [(.google.api.resource_reference) = { ... } - * - * @return This builder for chaining. - */ - public Builder clearVersion() { - - version_ = getDefaultInstance().getVersion(); - onChanged(); - return this; - } - /** - * - * - *
-         * The name of the flow [Version][google.cloud.dialogflow.cx.v3.Version].
-         * Format: `projects/<Project Number>/locations/<Location
-         * ID>/agents/<Agent ID>/flows/<Flow ID>/versions/<Version ID>`.
-         * 
- * - * string version = 1 [(.google.api.resource_reference) = { ... } - * - * @param value The bytes for version to set. - * @return This builder for chaining. - */ - public Builder setVersionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - version_ = value; - onChanged(); - return this; - } - - private java.util.List - metrics_ = java.util.Collections.emptyList(); - - private void ensureMetricsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - metrics_ = - new java.util.ArrayList( - metrics_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric, - com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.Builder, - com.google.cloud.dialogflow.cx.v3.Experiment.Result.MetricOrBuilder> - metricsBuilder_; - - /** - * - * - *
-         * The metrics and corresponding confidence intervals in the inference
-         * result.
-         * 
- * - * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; - * - */ - public java.util.List - getMetricsList() { - if (metricsBuilder_ == null) { - return java.util.Collections.unmodifiableList(metrics_); - } else { - return metricsBuilder_.getMessageList(); - } - } - /** - * - * - *
-         * The metrics and corresponding confidence intervals in the inference
-         * result.
-         * 
- * - * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; - * - */ - public int getMetricsCount() { - if (metricsBuilder_ == null) { - return metrics_.size(); - } else { - return metricsBuilder_.getCount(); - } - } - /** - * - * - *
-         * The metrics and corresponding confidence intervals in the inference
-         * result.
-         * 
- * - * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; - * - */ - public com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric getMetrics(int index) { - if (metricsBuilder_ == null) { - return metrics_.get(index); - } else { - return metricsBuilder_.getMessage(index); - } - } - /** - * - * - *
-         * The metrics and corresponding confidence intervals in the inference
-         * result.
-         * 
- * - * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; - * - */ - public Builder setMetrics( - int index, com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric value) { - if (metricsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMetricsIsMutable(); - metrics_.set(index, value); - onChanged(); - } else { - metricsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-         * The metrics and corresponding confidence intervals in the inference
-         * result.
-         * 
- * - * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; - * - */ - public Builder setMetrics( - int index, - com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.Builder builderForValue) { - if (metricsBuilder_ == null) { - ensureMetricsIsMutable(); - metrics_.set(index, builderForValue.build()); - onChanged(); - } else { - metricsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-         * The metrics and corresponding confidence intervals in the inference
-         * result.
-         * 
- * - * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; - * - */ - public Builder addMetrics( - com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric value) { - if (metricsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMetricsIsMutable(); - metrics_.add(value); - onChanged(); - } else { - metricsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-         * The metrics and corresponding confidence intervals in the inference
-         * result.
-         * 
- * - * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; - * - */ - public Builder addMetrics( - int index, com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric value) { - if (metricsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMetricsIsMutable(); - metrics_.add(index, value); - onChanged(); - } else { - metricsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-         * The metrics and corresponding confidence intervals in the inference
-         * result.
-         * 
- * - * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; - * - */ - public Builder addMetrics( - com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.Builder builderForValue) { - if (metricsBuilder_ == null) { - ensureMetricsIsMutable(); - metrics_.add(builderForValue.build()); - onChanged(); - } else { - metricsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-         * The metrics and corresponding confidence intervals in the inference
-         * result.
-         * 
- * - * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; - * - */ - public Builder addMetrics( - int index, - com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.Builder builderForValue) { - if (metricsBuilder_ == null) { - ensureMetricsIsMutable(); - metrics_.add(index, builderForValue.build()); - onChanged(); - } else { - metricsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-         * The metrics and corresponding confidence intervals in the inference
-         * result.
-         * 
- * - * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; - * - */ - public Builder addAllMetrics( - java.lang.Iterable - values) { - if (metricsBuilder_ == null) { - ensureMetricsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, metrics_); - onChanged(); - } else { - metricsBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-         * The metrics and corresponding confidence intervals in the inference
-         * result.
-         * 
- * - * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; - * - */ - public Builder clearMetrics() { - if (metricsBuilder_ == null) { - metrics_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - metricsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-         * The metrics and corresponding confidence intervals in the inference
-         * result.
-         * 
- * - * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; - * - */ - public Builder removeMetrics(int index) { - if (metricsBuilder_ == null) { - ensureMetricsIsMutable(); - metrics_.remove(index); - onChanged(); - } else { - metricsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-         * The metrics and corresponding confidence intervals in the inference
-         * result.
-         * 
- * - * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; - * - */ - public com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.Builder getMetricsBuilder( - int index) { - return getMetricsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-         * The metrics and corresponding confidence intervals in the inference
-         * result.
-         * 
- * - * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; - * - */ - public com.google.cloud.dialogflow.cx.v3.Experiment.Result.MetricOrBuilder - getMetricsOrBuilder(int index) { - if (metricsBuilder_ == null) { - return metrics_.get(index); - } else { - return metricsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-         * The metrics and corresponding confidence intervals in the inference
-         * result.
-         * 
- * - * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; - * - */ - public java.util.List< - ? extends com.google.cloud.dialogflow.cx.v3.Experiment.Result.MetricOrBuilder> - getMetricsOrBuilderList() { - if (metricsBuilder_ != null) { - return metricsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(metrics_); - } - } - /** - * - * - *
-         * The metrics and corresponding confidence intervals in the inference
-         * result.
-         * 
- * - * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; - * - */ - public com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.Builder - addMetricsBuilder() { - return getMetricsFieldBuilder() - .addBuilder( - com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.getDefaultInstance()); - } - /** - * - * - *
-         * The metrics and corresponding confidence intervals in the inference
-         * result.
-         * 
- * - * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; - * - */ - public com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.Builder addMetricsBuilder( - int index) { - return getMetricsFieldBuilder() - .addBuilder( - index, - com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.getDefaultInstance()); - } - /** - * - * - *
-         * The metrics and corresponding confidence intervals in the inference
-         * result.
-         * 
- * - * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; - * - */ - public java.util.List - getMetricsBuilderList() { - return getMetricsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric, - com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.Builder, - com.google.cloud.dialogflow.cx.v3.Experiment.Result.MetricOrBuilder> - getMetricsFieldBuilder() { - if (metricsBuilder_ == null) { - metricsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric, - com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.Builder, - com.google.cloud.dialogflow.cx.v3.Experiment.Result.MetricOrBuilder>( - metrics_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - metrics_ = null; - } - return metricsBuilder_; - } - - private int sessionCount_; - /** - * - * - *
-         * Number of sessions that were allocated to this version.
-         * 
- * - * int32 session_count = 3; - * - * @return The sessionCount. - */ - @java.lang.Override - public int getSessionCount() { - return sessionCount_; - } - /** - * - * - *
-         * Number of sessions that were allocated to this version.
-         * 
- * - * int32 session_count = 3; - * - * @param value The sessionCount to set. - * @return This builder for chaining. - */ - public Builder setSessionCount(int value) { - - sessionCount_ = value; - onChanged(); - return this; - } - /** - * - * - *
-         * Number of sessions that were allocated to this version.
-         * 
- * - * int32 session_count = 3; - * - * @return This builder for chaining. - */ - public Builder clearSessionCount() { - - sessionCount_ = 0; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics) - private static final com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics(); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public VersionMetrics parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new VersionMetrics(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public static final int VERSION_METRICS_FIELD_NUMBER = 1; - private java.util.List - versionMetrics_; - /** - * - * - *
-     * Version variants and metrics.
-     * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; - * - */ - @java.lang.Override - public java.util.List - getVersionMetricsList() { - return versionMetrics_; - } - /** - * - * - *
-     * Version variants and metrics.
-     * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; - * - */ - @java.lang.Override - public java.util.List< - ? extends com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetricsOrBuilder> - getVersionMetricsOrBuilderList() { - return versionMetrics_; - } - /** - * - * - *
-     * Version variants and metrics.
-     * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; - * - */ - @java.lang.Override - public int getVersionMetricsCount() { - return versionMetrics_.size(); - } - /** - * - * - *
-     * Version variants and metrics.
-     * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; - * - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics getVersionMetrics( - int index) { - return versionMetrics_.get(index); - } - /** - * - * - *
-     * Version variants and metrics.
-     * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; - * - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetricsOrBuilder - getVersionMetricsOrBuilder(int index) { - return versionMetrics_.get(index); - } - - public static final int LAST_UPDATE_TIME_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp lastUpdateTime_; - /** - * - * - *
-     * The last time the experiment's stats data was updated. Will have default
-     * value if stats have never been computed for this experiment.
-     * 
- * - * .google.protobuf.Timestamp last_update_time = 2; - * - * @return Whether the lastUpdateTime field is set. - */ - @java.lang.Override - public boolean hasLastUpdateTime() { - return lastUpdateTime_ != null; - } - /** - * - * - *
-     * The last time the experiment's stats data was updated. Will have default
-     * value if stats have never been computed for this experiment.
-     * 
- * - * .google.protobuf.Timestamp last_update_time = 2; - * - * @return The lastUpdateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getLastUpdateTime() { - return lastUpdateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : lastUpdateTime_; - } - /** - * - * - *
-     * The last time the experiment's stats data was updated. Will have default
-     * value if stats have never been computed for this experiment.
-     * 
- * - * .google.protobuf.Timestamp last_update_time = 2; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getLastUpdateTimeOrBuilder() { - return getLastUpdateTime(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < versionMetrics_.size(); i++) { - output.writeMessage(1, versionMetrics_.get(i)); - } - if (lastUpdateTime_ != null) { - output.writeMessage(2, getLastUpdateTime()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < versionMetrics_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, versionMetrics_.get(i)); - } - if (lastUpdateTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getLastUpdateTime()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.Experiment.Result)) { - return super.equals(obj); - } - com.google.cloud.dialogflow.cx.v3.Experiment.Result other = - (com.google.cloud.dialogflow.cx.v3.Experiment.Result) obj; - - if (!getVersionMetricsList().equals(other.getVersionMetricsList())) return false; - if (hasLastUpdateTime() != other.hasLastUpdateTime()) return false; - if (hasLastUpdateTime()) { - if (!getLastUpdateTime().equals(other.getLastUpdateTime())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getVersionMetricsCount() > 0) { - hash = (37 * hash) + VERSION_METRICS_FIELD_NUMBER; - hash = (53 * hash) + getVersionMetricsList().hashCode(); - } - if (hasLastUpdateTime()) { - hash = (37 * hash) + LAST_UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getLastUpdateTime().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Result parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Result parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Result parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Result parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Result parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Result parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Result parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Result parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Result parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Result parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Result parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Result parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.dialogflow.cx.v3.Experiment.Result prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-     * The inference result which includes an objective metric to optimize and the
-     * confidence interval.
-     * 
- * - * Protobuf type {@code google.cloud.dialogflow.cx.v3.Experiment.Result} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.Experiment.Result) - com.google.cloud.dialogflow.cx.v3.Experiment.ResultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3.Experiment.Result.class, - com.google.cloud.dialogflow.cx.v3.Experiment.Result.Builder.class); - } - - // Construct using com.google.cloud.dialogflow.cx.v3.Experiment.Result.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getVersionMetricsFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (versionMetricsBuilder_ == null) { - versionMetrics_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - versionMetricsBuilder_.clear(); - } - if (lastUpdateTimeBuilder_ == null) { - lastUpdateTime_ = null; - } else { - lastUpdateTime_ = null; - lastUpdateTimeBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_descriptor; - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.Experiment.Result getDefaultInstanceForType() { - return com.google.cloud.dialogflow.cx.v3.Experiment.Result.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.Experiment.Result build() { - com.google.cloud.dialogflow.cx.v3.Experiment.Result result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.Experiment.Result buildPartial() { - com.google.cloud.dialogflow.cx.v3.Experiment.Result result = - new com.google.cloud.dialogflow.cx.v3.Experiment.Result(this); - int from_bitField0_ = bitField0_; - if (versionMetricsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - versionMetrics_ = java.util.Collections.unmodifiableList(versionMetrics_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.versionMetrics_ = versionMetrics_; - } else { - result.versionMetrics_ = versionMetricsBuilder_.build(); - } - if (lastUpdateTimeBuilder_ == null) { - result.lastUpdateTime_ = lastUpdateTime_; - } else { - result.lastUpdateTime_ = lastUpdateTimeBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.dialogflow.cx.v3.Experiment.Result) { - return mergeFrom((com.google.cloud.dialogflow.cx.v3.Experiment.Result) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.Experiment.Result other) { - if (other == com.google.cloud.dialogflow.cx.v3.Experiment.Result.getDefaultInstance()) - return this; - if (versionMetricsBuilder_ == null) { - if (!other.versionMetrics_.isEmpty()) { - if (versionMetrics_.isEmpty()) { - versionMetrics_ = other.versionMetrics_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureVersionMetricsIsMutable(); - versionMetrics_.addAll(other.versionMetrics_); - } - onChanged(); - } - } else { - if (!other.versionMetrics_.isEmpty()) { - if (versionMetricsBuilder_.isEmpty()) { - versionMetricsBuilder_.dispose(); - versionMetricsBuilder_ = null; - versionMetrics_ = other.versionMetrics_; - bitField0_ = (bitField0_ & ~0x00000001); - versionMetricsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getVersionMetricsFieldBuilder() - : null; - } else { - versionMetricsBuilder_.addAllMessages(other.versionMetrics_); - } - } - } - if (other.hasLastUpdateTime()) { - mergeLastUpdateTime(other.getLastUpdateTime()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.dialogflow.cx.v3.Experiment.Result parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dialogflow.cx.v3.Experiment.Result) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.util.List - versionMetrics_ = java.util.Collections.emptyList(); - - private void ensureVersionMetricsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - versionMetrics_ = - new java.util.ArrayList< - com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics>( - versionMetrics_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics, - com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.Builder, - com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetricsOrBuilder> - versionMetricsBuilder_; - - /** - * - * - *
-       * Version variants and metrics.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; - * - */ - public java.util.List - getVersionMetricsList() { - if (versionMetricsBuilder_ == null) { - return java.util.Collections.unmodifiableList(versionMetrics_); - } else { - return versionMetricsBuilder_.getMessageList(); - } - } - /** - * - * - *
-       * Version variants and metrics.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; - * - */ - public int getVersionMetricsCount() { - if (versionMetricsBuilder_ == null) { - return versionMetrics_.size(); - } else { - return versionMetricsBuilder_.getCount(); - } - } - /** - * - * - *
-       * Version variants and metrics.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; - * - */ - public com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics getVersionMetrics( - int index) { - if (versionMetricsBuilder_ == null) { - return versionMetrics_.get(index); - } else { - return versionMetricsBuilder_.getMessage(index); - } - } - /** - * - * - *
-       * Version variants and metrics.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; - * - */ - public Builder setVersionMetrics( - int index, com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics value) { - if (versionMetricsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVersionMetricsIsMutable(); - versionMetrics_.set(index, value); - onChanged(); - } else { - versionMetricsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-       * Version variants and metrics.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; - * - */ - public Builder setVersionMetrics( - int index, - com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.Builder - builderForValue) { - if (versionMetricsBuilder_ == null) { - ensureVersionMetricsIsMutable(); - versionMetrics_.set(index, builderForValue.build()); - onChanged(); - } else { - versionMetricsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-       * Version variants and metrics.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; - * - */ - public Builder addVersionMetrics( - com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics value) { - if (versionMetricsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVersionMetricsIsMutable(); - versionMetrics_.add(value); - onChanged(); - } else { - versionMetricsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-       * Version variants and metrics.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; - * - */ - public Builder addVersionMetrics( - int index, com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics value) { - if (versionMetricsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVersionMetricsIsMutable(); - versionMetrics_.add(index, value); - onChanged(); - } else { - versionMetricsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-       * Version variants and metrics.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; - * - */ - public Builder addVersionMetrics( - com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.Builder - builderForValue) { - if (versionMetricsBuilder_ == null) { - ensureVersionMetricsIsMutable(); - versionMetrics_.add(builderForValue.build()); - onChanged(); - } else { - versionMetricsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-       * Version variants and metrics.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; - * - */ - public Builder addVersionMetrics( - int index, - com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.Builder - builderForValue) { - if (versionMetricsBuilder_ == null) { - ensureVersionMetricsIsMutable(); - versionMetrics_.add(index, builderForValue.build()); - onChanged(); - } else { - versionMetricsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-       * Version variants and metrics.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; - * - */ - public Builder addAllVersionMetrics( - java.lang.Iterable< - ? extends com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics> - values) { - if (versionMetricsBuilder_ == null) { - ensureVersionMetricsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, versionMetrics_); - onChanged(); - } else { - versionMetricsBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-       * Version variants and metrics.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; - * - */ - public Builder clearVersionMetrics() { - if (versionMetricsBuilder_ == null) { - versionMetrics_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - versionMetricsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-       * Version variants and metrics.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; - * - */ - public Builder removeVersionMetrics(int index) { - if (versionMetricsBuilder_ == null) { - ensureVersionMetricsIsMutable(); - versionMetrics_.remove(index); - onChanged(); - } else { - versionMetricsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-       * Version variants and metrics.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; - * - */ - public com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.Builder - getVersionMetricsBuilder(int index) { - return getVersionMetricsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-       * Version variants and metrics.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; - * - */ - public com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetricsOrBuilder - getVersionMetricsOrBuilder(int index) { - if (versionMetricsBuilder_ == null) { - return versionMetrics_.get(index); - } else { - return versionMetricsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-       * Version variants and metrics.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; - * - */ - public java.util.List< - ? extends com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetricsOrBuilder> - getVersionMetricsOrBuilderList() { - if (versionMetricsBuilder_ != null) { - return versionMetricsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(versionMetrics_); - } - } - /** - * - * - *
-       * Version variants and metrics.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; - * - */ - public com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.Builder - addVersionMetricsBuilder() { - return getVersionMetricsFieldBuilder() - .addBuilder( - com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics - .getDefaultInstance()); - } - /** - * - * - *
-       * Version variants and metrics.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; - * - */ - public com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.Builder - addVersionMetricsBuilder(int index) { - return getVersionMetricsFieldBuilder() - .addBuilder( - index, - com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics - .getDefaultInstance()); - } - /** - * - * - *
-       * Version variants and metrics.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; - * - */ - public java.util.List< - com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.Builder> - getVersionMetricsBuilderList() { - return getVersionMetricsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics, - com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.Builder, - com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetricsOrBuilder> - getVersionMetricsFieldBuilder() { - if (versionMetricsBuilder_ == null) { - versionMetricsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics, - com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.Builder, - com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetricsOrBuilder>( - versionMetrics_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - versionMetrics_ = null; - } - return versionMetricsBuilder_; - } - - private com.google.protobuf.Timestamp lastUpdateTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - lastUpdateTimeBuilder_; - /** - * - * - *
-       * The last time the experiment's stats data was updated. Will have default
-       * value if stats have never been computed for this experiment.
-       * 
- * - * .google.protobuf.Timestamp last_update_time = 2; - * - * @return Whether the lastUpdateTime field is set. - */ - public boolean hasLastUpdateTime() { - return lastUpdateTimeBuilder_ != null || lastUpdateTime_ != null; - } - /** - * - * - *
-       * The last time the experiment's stats data was updated. Will have default
-       * value if stats have never been computed for this experiment.
-       * 
- * - * .google.protobuf.Timestamp last_update_time = 2; - * - * @return The lastUpdateTime. - */ - public com.google.protobuf.Timestamp getLastUpdateTime() { - if (lastUpdateTimeBuilder_ == null) { - return lastUpdateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : lastUpdateTime_; - } else { - return lastUpdateTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-       * The last time the experiment's stats data was updated. Will have default
-       * value if stats have never been computed for this experiment.
-       * 
- * - * .google.protobuf.Timestamp last_update_time = 2; - */ - public Builder setLastUpdateTime(com.google.protobuf.Timestamp value) { - if (lastUpdateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - lastUpdateTime_ = value; - onChanged(); - } else { - lastUpdateTimeBuilder_.setMessage(value); - } - - 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.
-       * 
- * - * .google.protobuf.Timestamp last_update_time = 2; - */ - public Builder setLastUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (lastUpdateTimeBuilder_ == null) { - lastUpdateTime_ = builderForValue.build(); - onChanged(); - } else { - lastUpdateTimeBuilder_.setMessage(builderForValue.build()); - } - - 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.
-       * 
- * - * .google.protobuf.Timestamp last_update_time = 2; - */ - public Builder mergeLastUpdateTime(com.google.protobuf.Timestamp value) { - if (lastUpdateTimeBuilder_ == null) { - if (lastUpdateTime_ != null) { - lastUpdateTime_ = - com.google.protobuf.Timestamp.newBuilder(lastUpdateTime_) - .mergeFrom(value) - .buildPartial(); - } else { - lastUpdateTime_ = value; - } - onChanged(); - } else { - lastUpdateTimeBuilder_.mergeFrom(value); - } - - 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.
-       * 
- * - * .google.protobuf.Timestamp last_update_time = 2; - */ - public Builder clearLastUpdateTime() { - if (lastUpdateTimeBuilder_ == null) { - lastUpdateTime_ = null; - onChanged(); - } else { - lastUpdateTime_ = null; - lastUpdateTimeBuilder_ = null; - } - - 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.
-       * 
- * - * .google.protobuf.Timestamp last_update_time = 2; - */ - public com.google.protobuf.Timestamp.Builder getLastUpdateTimeBuilder() { - - onChanged(); - return getLastUpdateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-       * The last time the experiment's stats data was updated. Will have default
-       * value if stats have never been computed for this experiment.
-       * 
- * - * .google.protobuf.Timestamp last_update_time = 2; - */ - public com.google.protobuf.TimestampOrBuilder getLastUpdateTimeOrBuilder() { - if (lastUpdateTimeBuilder_ != null) { - return lastUpdateTimeBuilder_.getMessageOrBuilder(); - } else { - return lastUpdateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : lastUpdateTime_; - } - } - /** - * - * - *
-       * The last time the experiment's stats data was updated. Will have default
-       * value if stats have never been computed for this experiment.
-       * 
- * - * .google.protobuf.Timestamp last_update_time = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getLastUpdateTimeFieldBuilder() { - if (lastUpdateTimeBuilder_ == null) { - lastUpdateTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getLastUpdateTime(), getParentForChildren(), isClean()); - lastUpdateTime_ = null; - } - return lastUpdateTimeBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.Experiment.Result) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.Experiment.Result) - private static final com.google.cloud.dialogflow.cx.v3.Experiment.Result DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.Experiment.Result(); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment.Result getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Result parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Result(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.Experiment.Result getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * The name of the experiment.
-   * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/environments/<Environment ID>/experiments/<Experiment ID>..
-   * 
- * - * string name = 1; - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * The name of the experiment.
-   * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/environments/<Environment ID>/experiments/<Experiment ID>..
-   * 
- * - * string name = 1; - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DISPLAY_NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object displayName_; - /** - * - * - *
-   * Required. The human-readable name of the experiment (unique in an environment). Limit
-   * of 64 characters.
-   * 
- * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The displayName. - */ - @java.lang.Override - public java.lang.String getDisplayName() { - java.lang.Object ref = displayName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - displayName_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The human-readable name of the experiment (unique in an environment). Limit
-   * of 64 characters.
-   * 
- * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for displayName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDisplayNameBytes() { - java.lang.Object ref = displayName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - displayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESCRIPTION_FIELD_NUMBER = 3; - private volatile java.lang.Object description_; - /** - * - * - *
-   * The human-readable description of the experiment.
-   * 
- * - * string description = 3; - * - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - * - * - *
-   * The human-readable description of the experiment.
-   * 
- * - * string description = 3; - * - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int STATE_FIELD_NUMBER = 4; - private int state_; - /** - * - * - *
-   * The current state of the experiment.
-   * Transition triggered by Expriments.StartExperiment: PENDING->RUNNING.
-   * Transition triggered by Expriments.CancelExperiment: PENDING->CANCELLED or
-   * RUNNING->CANCELLED.
-   * 
- * - * .google.cloud.dialogflow.cx.v3.Experiment.State state = 4; - * - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override - public int getStateValue() { - return state_; - } - /** - * - * - *
-   * The current state of the experiment.
-   * Transition triggered by Expriments.StartExperiment: PENDING->RUNNING.
-   * Transition triggered by Expriments.CancelExperiment: PENDING->CANCELLED or
-   * RUNNING->CANCELLED.
-   * 
- * - * .google.cloud.dialogflow.cx.v3.Experiment.State state = 4; - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.Experiment.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.dialogflow.cx.v3.Experiment.State result = - com.google.cloud.dialogflow.cx.v3.Experiment.State.valueOf(state_); - return result == null - ? com.google.cloud.dialogflow.cx.v3.Experiment.State.UNRECOGNIZED - : result; - } - - public static final int DEFINITION_FIELD_NUMBER = 5; - private com.google.cloud.dialogflow.cx.v3.Experiment.Definition definition_; - /** - * - * - *
-   * The definition of the experiment.
-   * 
- * - * .google.cloud.dialogflow.cx.v3.Experiment.Definition definition = 5; - * - * @return Whether the definition field is set. - */ - @java.lang.Override - public boolean hasDefinition() { - return definition_ != null; - } - /** - * - * - *
-   * The definition of the experiment.
-   * 
- * - * .google.cloud.dialogflow.cx.v3.Experiment.Definition definition = 5; - * - * @return The definition. - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.Experiment.Definition getDefinition() { - return definition_ == null - ? com.google.cloud.dialogflow.cx.v3.Experiment.Definition.getDefaultInstance() - : definition_; - } - /** - * - * - *
-   * The definition of the experiment.
-   * 
- * - * .google.cloud.dialogflow.cx.v3.Experiment.Definition definition = 5; - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.Experiment.DefinitionOrBuilder getDefinitionOrBuilder() { - return getDefinition(); - } - - public static final int RESULT_FIELD_NUMBER = 6; - private com.google.cloud.dialogflow.cx.v3.Experiment.Result result_; - /** - * - * - *
-   * Inference result of the experiment.
-   * 
- * - * .google.cloud.dialogflow.cx.v3.Experiment.Result result = 6; - * - * @return Whether the result field is set. - */ - @java.lang.Override - public boolean hasResult() { - return result_ != null; - } - /** - * - * - *
-   * Inference result of the experiment.
-   * 
- * - * .google.cloud.dialogflow.cx.v3.Experiment.Result result = 6; - * - * @return The result. - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.Experiment.Result getResult() { - return result_ == null - ? com.google.cloud.dialogflow.cx.v3.Experiment.Result.getDefaultInstance() - : result_; - } - /** - * - * - *
-   * Inference result of the experiment.
-   * 
- * - * .google.cloud.dialogflow.cx.v3.Experiment.Result result = 6; - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.Experiment.ResultOrBuilder getResultOrBuilder() { - return getResult(); - } - - public static final int CREATE_TIME_FIELD_NUMBER = 7; - private com.google.protobuf.Timestamp createTime_; - /** - * - * - *
-   * Creation time of this experiment.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7; - * - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - * - * - *
-   * Creation time of this experiment.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7; - * - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - * - * - *
-   * Creation time of this experiment.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return getCreateTime(); - } - - public static final int START_TIME_FIELD_NUMBER = 8; - private com.google.protobuf.Timestamp startTime_; - /** - * - * - *
-   * Start time of this experiment.
-   * 
- * - * .google.protobuf.Timestamp start_time = 8; - * - * @return Whether the startTime field is set. - */ - @java.lang.Override - public boolean hasStartTime() { - return startTime_ != null; - } - /** - * - * - *
-   * Start time of this experiment.
-   * 
- * - * .google.protobuf.Timestamp start_time = 8; - * - * @return The startTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getStartTime() { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } - /** - * - * - *
-   * Start time of this experiment.
-   * 
- * - * .google.protobuf.Timestamp start_time = 8; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { - return getStartTime(); - } - - public static final int END_TIME_FIELD_NUMBER = 9; - private com.google.protobuf.Timestamp endTime_; - /** - * - * - *
-   * End time of this experiment.
-   * 
- * - * .google.protobuf.Timestamp end_time = 9; - * - * @return Whether the endTime field is set. - */ - @java.lang.Override - public boolean hasEndTime() { - return endTime_ != null; - } - /** - * - * - *
-   * End time of this experiment.
-   * 
- * - * .google.protobuf.Timestamp end_time = 9; - * - * @return The endTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getEndTime() { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - /** - * - * - *
-   * End time of this experiment.
-   * 
- * - * .google.protobuf.Timestamp end_time = 9; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - return getEndTime(); - } - - public static final int LAST_UPDATE_TIME_FIELD_NUMBER = 10; - private com.google.protobuf.Timestamp lastUpdateTime_; - /** - * - * - *
-   * Last update time of this experiment.
-   * 
- * - * .google.protobuf.Timestamp last_update_time = 10; - * - * @return Whether the lastUpdateTime field is set. - */ - @java.lang.Override - public boolean hasLastUpdateTime() { - return lastUpdateTime_ != null; - } - /** - * - * - *
-   * Last update time of this experiment.
-   * 
- * - * .google.protobuf.Timestamp last_update_time = 10; - * - * @return The lastUpdateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getLastUpdateTime() { - return lastUpdateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : lastUpdateTime_; - } - /** - * - * - *
-   * Last update time of this experiment.
-   * 
- * - * .google.protobuf.Timestamp last_update_time = 10; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getLastUpdateTimeOrBuilder() { - return getLastUpdateTime(); - } - - public static final int EXPERIMENT_LENGTH_FIELD_NUMBER = 11; - private com.google.protobuf.Duration experimentLength_; - /** - * - * - *
-   * Maximum number of days to run the experiment.
-   * 
- * - * .google.protobuf.Duration experiment_length = 11; - * - * @return Whether the experimentLength field is set. - */ - @java.lang.Override - public boolean hasExperimentLength() { - return experimentLength_ != null; - } - /** - * - * - *
-   * Maximum number of days to run the experiment.
-   * 
- * - * .google.protobuf.Duration experiment_length = 11; - * - * @return The experimentLength. - */ - @java.lang.Override - public com.google.protobuf.Duration getExperimentLength() { - return experimentLength_ == null - ? com.google.protobuf.Duration.getDefaultInstance() - : experimentLength_; - } - /** - * - * - *
-   * Maximum number of days to run the experiment.
-   * 
- * - * .google.protobuf.Duration experiment_length = 11; - */ - @java.lang.Override - public com.google.protobuf.DurationOrBuilder getExperimentLengthOrBuilder() { - return getExperimentLength(); - } - - public static final int VARIANTS_HISTORY_FIELD_NUMBER = 12; - private java.util.List variantsHistory_; - /** - * - * - *
-   * The history of updates to the experiment variants.
-   * 
- * - * repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; - */ - @java.lang.Override - public java.util.List - getVariantsHistoryList() { - return variantsHistory_; - } - /** - * - * - *
-   * The history of updates to the experiment variants.
-   * 
- * - * repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; - */ - @java.lang.Override - public java.util.List - getVariantsHistoryOrBuilderList() { - return variantsHistory_; - } - /** - * - * - *
-   * The history of updates to the experiment variants.
-   * 
- * - * repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; - */ - @java.lang.Override - public int getVariantsHistoryCount() { - return variantsHistory_.size(); - } - /** - * - * - *
-   * The history of updates to the experiment variants.
-   * 
- * - * repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.VariantsHistory getVariantsHistory(int index) { - return variantsHistory_.get(index); - } - /** - * - * - *
-   * The history of updates to the experiment variants.
-   * 
- * - * repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.VariantsHistoryOrBuilder getVariantsHistoryOrBuilder( - int index) { - return variantsHistory_.get(index); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!getDisplayNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); - } - if (!getDescriptionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); - } - if (state_ - != com.google.cloud.dialogflow.cx.v3.Experiment.State.STATE_UNSPECIFIED.getNumber()) { - output.writeEnum(4, state_); - } - if (definition_ != null) { - output.writeMessage(5, getDefinition()); - } - if (result_ != null) { - output.writeMessage(6, getResult()); - } - if (createTime_ != null) { - output.writeMessage(7, getCreateTime()); - } - if (startTime_ != null) { - output.writeMessage(8, getStartTime()); - } - if (endTime_ != null) { - output.writeMessage(9, getEndTime()); - } - if (lastUpdateTime_ != null) { - output.writeMessage(10, getLastUpdateTime()); - } - if (experimentLength_ != null) { - output.writeMessage(11, getExperimentLength()); - } - for (int i = 0; i < variantsHistory_.size(); i++) { - output.writeMessage(12, variantsHistory_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!getDisplayNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); - } - if (!getDescriptionBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); - } - if (state_ - != com.google.cloud.dialogflow.cx.v3.Experiment.State.STATE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, state_); - } - if (definition_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getDefinition()); - } - if (result_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getResult()); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getCreateTime()); - } - if (startTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getStartTime()); - } - if (endTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getEndTime()); - } - if (lastUpdateTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getLastUpdateTime()); - } - if (experimentLength_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getExperimentLength()); - } - for (int i = 0; i < variantsHistory_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, variantsHistory_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.Experiment)) { - return super.equals(obj); - } - com.google.cloud.dialogflow.cx.v3.Experiment other = - (com.google.cloud.dialogflow.cx.v3.Experiment) obj; - - if (!getName().equals(other.getName())) return false; - if (!getDisplayName().equals(other.getDisplayName())) return false; - if (!getDescription().equals(other.getDescription())) return false; - if (state_ != other.state_) return false; - if (hasDefinition() != other.hasDefinition()) return false; - if (hasDefinition()) { - if (!getDefinition().equals(other.getDefinition())) return false; - } - if (hasResult() != other.hasResult()) return false; - if (hasResult()) { - if (!getResult().equals(other.getResult())) return false; - } - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime().equals(other.getCreateTime())) return false; - } - if (hasStartTime() != other.hasStartTime()) return false; - if (hasStartTime()) { - if (!getStartTime().equals(other.getStartTime())) return false; - } - if (hasEndTime() != other.hasEndTime()) return false; - if (hasEndTime()) { - if (!getEndTime().equals(other.getEndTime())) return false; - } - if (hasLastUpdateTime() != other.hasLastUpdateTime()) return false; - if (hasLastUpdateTime()) { - if (!getLastUpdateTime().equals(other.getLastUpdateTime())) return false; - } - if (hasExperimentLength() != other.hasExperimentLength()) return false; - if (hasExperimentLength()) { - if (!getExperimentLength().equals(other.getExperimentLength())) return false; - } - if (!getVariantsHistoryList().equals(other.getVariantsHistoryList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; - hash = (53 * hash) + getDisplayName().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - hash = (37 * hash) + STATE_FIELD_NUMBER; - hash = (53 * hash) + state_; - if (hasDefinition()) { - hash = (37 * hash) + DEFINITION_FIELD_NUMBER; - hash = (53 * hash) + getDefinition().hashCode(); - } - if (hasResult()) { - hash = (37 * hash) + RESULT_FIELD_NUMBER; - hash = (53 * hash) + getResult().hashCode(); - } - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - if (hasStartTime()) { - hash = (37 * hash) + START_TIME_FIELD_NUMBER; - hash = (53 * hash) + getStartTime().hashCode(); - } - if (hasEndTime()) { - hash = (37 * hash) + END_TIME_FIELD_NUMBER; - hash = (53 * hash) + getEndTime().hashCode(); - } - if (hasLastUpdateTime()) { - hash = (37 * hash) + LAST_UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getLastUpdateTime().hashCode(); - } - if (hasExperimentLength()) { - hash = (37 * hash) + EXPERIMENT_LENGTH_FIELD_NUMBER; - hash = (53 * hash) + getExperimentLength().hashCode(); - } - if (getVariantsHistoryCount() > 0) { - hash = (37 * hash) + VARIANTS_HISTORY_FIELD_NUMBER; - hash = (53 * hash) + getVariantsHistoryList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.dialogflow.cx.v3.Experiment prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Represents an experiment in an environment.
-   * Next ID: 13
-   * 
- * - * Protobuf type {@code google.cloud.dialogflow.cx.v3.Experiment} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.Experiment) - com.google.cloud.dialogflow.cx.v3.ExperimentOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_Experiment_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_Experiment_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3.Experiment.class, - com.google.cloud.dialogflow.cx.v3.Experiment.Builder.class); - } - - // Construct using com.google.cloud.dialogflow.cx.v3.Experiment.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getVariantsHistoryFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - displayName_ = ""; - - description_ = ""; - - state_ = 0; - - if (definitionBuilder_ == null) { - definition_ = null; - } else { - definition_ = null; - definitionBuilder_ = null; - } - if (resultBuilder_ == null) { - result_ = null; - } else { - result_ = null; - resultBuilder_ = null; - } - if (createTimeBuilder_ == null) { - createTime_ = null; - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - if (startTimeBuilder_ == null) { - startTime_ = null; - } else { - startTime_ = null; - startTimeBuilder_ = null; - } - if (endTimeBuilder_ == null) { - endTime_ = null; - } else { - endTime_ = null; - endTimeBuilder_ = null; - } - if (lastUpdateTimeBuilder_ == null) { - lastUpdateTime_ = null; - } else { - lastUpdateTime_ = null; - lastUpdateTimeBuilder_ = null; - } - if (experimentLengthBuilder_ == null) { - experimentLength_ = null; - } else { - experimentLength_ = null; - experimentLengthBuilder_ = null; - } - if (variantsHistoryBuilder_ == null) { - variantsHistory_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - variantsHistoryBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_Experiment_descriptor; - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.Experiment getDefaultInstanceForType() { - return com.google.cloud.dialogflow.cx.v3.Experiment.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.Experiment build() { - com.google.cloud.dialogflow.cx.v3.Experiment result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.Experiment buildPartial() { - com.google.cloud.dialogflow.cx.v3.Experiment result = - new com.google.cloud.dialogflow.cx.v3.Experiment(this); - int from_bitField0_ = bitField0_; - result.name_ = name_; - result.displayName_ = displayName_; - result.description_ = description_; - result.state_ = state_; - if (definitionBuilder_ == null) { - result.definition_ = definition_; - } else { - result.definition_ = definitionBuilder_.build(); - } - if (resultBuilder_ == null) { - result.result_ = result_; - } else { - result.result_ = resultBuilder_.build(); - } - if (createTimeBuilder_ == null) { - result.createTime_ = createTime_; - } else { - result.createTime_ = createTimeBuilder_.build(); - } - if (startTimeBuilder_ == null) { - result.startTime_ = startTime_; - } else { - result.startTime_ = startTimeBuilder_.build(); - } - if (endTimeBuilder_ == null) { - result.endTime_ = endTime_; - } else { - result.endTime_ = endTimeBuilder_.build(); - } - if (lastUpdateTimeBuilder_ == null) { - result.lastUpdateTime_ = lastUpdateTime_; - } else { - result.lastUpdateTime_ = lastUpdateTimeBuilder_.build(); - } - if (experimentLengthBuilder_ == null) { - result.experimentLength_ = experimentLength_; - } else { - result.experimentLength_ = experimentLengthBuilder_.build(); - } - if (variantsHistoryBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - variantsHistory_ = java.util.Collections.unmodifiableList(variantsHistory_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.variantsHistory_ = variantsHistory_; - } else { - result.variantsHistory_ = variantsHistoryBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.dialogflow.cx.v3.Experiment) { - return mergeFrom((com.google.cloud.dialogflow.cx.v3.Experiment) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.Experiment other) { - if (other == com.google.cloud.dialogflow.cx.v3.Experiment.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getDisplayName().isEmpty()) { - displayName_ = other.displayName_; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - if (other.state_ != 0) { - setStateValue(other.getStateValue()); - } - if (other.hasDefinition()) { - mergeDefinition(other.getDefinition()); - } - if (other.hasResult()) { - mergeResult(other.getResult()); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasStartTime()) { - mergeStartTime(other.getStartTime()); - } - if (other.hasEndTime()) { - mergeEndTime(other.getEndTime()); - } - if (other.hasLastUpdateTime()) { - mergeLastUpdateTime(other.getLastUpdateTime()); - } - if (other.hasExperimentLength()) { - mergeExperimentLength(other.getExperimentLength()); - } - if (variantsHistoryBuilder_ == null) { - if (!other.variantsHistory_.isEmpty()) { - if (variantsHistory_.isEmpty()) { - variantsHistory_ = other.variantsHistory_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureVariantsHistoryIsMutable(); - variantsHistory_.addAll(other.variantsHistory_); - } - onChanged(); - } - } else { - if (!other.variantsHistory_.isEmpty()) { - if (variantsHistoryBuilder_.isEmpty()) { - variantsHistoryBuilder_.dispose(); - variantsHistoryBuilder_ = null; - variantsHistory_ = other.variantsHistory_; - bitField0_ = (bitField0_ & ~0x00000001); - variantsHistoryBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getVariantsHistoryFieldBuilder() - : null; - } else { - variantsHistoryBuilder_.addAllMessages(other.variantsHistory_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.dialogflow.cx.v3.Experiment parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dialogflow.cx.v3.Experiment) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * The name of the experiment.
-     * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>/experiments/<Experiment ID>..
-     * 
- * - * string name = 1; - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The name of the experiment.
-     * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>/experiments/<Experiment ID>..
-     * 
- * - * string name = 1; - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The name of the experiment.
-     * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>/experiments/<Experiment ID>..
-     * 
- * - * string name = 1; - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The name of the experiment.
-     * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>/experiments/<Experiment ID>..
-     * 
- * - * string name = 1; - * - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * - * - *
-     * The name of the experiment.
-     * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>/experiments/<Experiment ID>..
-     * 
- * - * string name = 1; - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object displayName_ = ""; - /** - * - * - *
-     * Required. The human-readable name of the experiment (unique in an environment). Limit
-     * of 64 characters.
-     * 
- * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The displayName. - */ - public java.lang.String getDisplayName() { - java.lang.Object ref = displayName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - displayName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The human-readable name of the experiment (unique in an environment). Limit
-     * of 64 characters.
-     * 
- * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for displayName. - */ - public com.google.protobuf.ByteString getDisplayNameBytes() { - java.lang.Object ref = displayName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - displayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The human-readable name of the experiment (unique in an environment). Limit
-     * of 64 characters.
-     * 
- * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The displayName to set. - * @return This builder for chaining. - */ - public Builder setDisplayName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - displayName_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The human-readable name of the experiment (unique in an environment). Limit
-     * of 64 characters.
-     * 
- * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearDisplayName() { - - displayName_ = getDefaultInstance().getDisplayName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The human-readable name of the experiment (unique in an environment). Limit
-     * of 64 characters.
-     * 
- * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for displayName to set. - * @return This builder for chaining. - */ - public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - displayName_ = value; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - * - * - *
-     * The human-readable description of the experiment.
-     * 
- * - * string description = 3; - * - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The human-readable description of the experiment.
-     * 
- * - * string description = 3; - * - * @return The bytes for description. - */ - public com.google.protobuf.ByteString getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The human-readable description of the experiment.
-     * 
- * - * string description = 3; - * - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The human-readable description of the experiment.
-     * 
- * - * string description = 3; - * - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - * - * - *
-     * The human-readable description of the experiment.
-     * 
- * - * string description = 3; - * - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - description_ = value; - onChanged(); - return this; - } - - private int state_ = 0; - /** - * - * - *
-     * The current state of the experiment.
-     * Transition triggered by Expriments.StartExperiment: PENDING->RUNNING.
-     * Transition triggered by Expriments.CancelExperiment: PENDING->CANCELLED or
-     * RUNNING->CANCELLED.
-     * 
- * - * .google.cloud.dialogflow.cx.v3.Experiment.State state = 4; - * - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override - public int getStateValue() { - return state_; - } - /** - * - * - *
-     * The current state of the experiment.
-     * Transition triggered by Expriments.StartExperiment: PENDING->RUNNING.
-     * Transition triggered by Expriments.CancelExperiment: PENDING->CANCELLED or
-     * RUNNING->CANCELLED.
-     * 
- * - * .google.cloud.dialogflow.cx.v3.Experiment.State state = 4; - * - * @param value The enum numeric value on the wire for state to set. - * @return This builder for chaining. - */ - public Builder setStateValue(int value) { - - state_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The current state of the experiment.
-     * Transition triggered by Expriments.StartExperiment: PENDING->RUNNING.
-     * Transition triggered by Expriments.CancelExperiment: PENDING->CANCELLED or
-     * RUNNING->CANCELLED.
-     * 
- * - * .google.cloud.dialogflow.cx.v3.Experiment.State state = 4; - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.Experiment.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.dialogflow.cx.v3.Experiment.State result = - com.google.cloud.dialogflow.cx.v3.Experiment.State.valueOf(state_); - return result == null - ? com.google.cloud.dialogflow.cx.v3.Experiment.State.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * The current state of the experiment.
-     * Transition triggered by Expriments.StartExperiment: PENDING->RUNNING.
-     * Transition triggered by Expriments.CancelExperiment: PENDING->CANCELLED or
-     * RUNNING->CANCELLED.
-     * 
- * - * .google.cloud.dialogflow.cx.v3.Experiment.State state = 4; - * - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState(com.google.cloud.dialogflow.cx.v3.Experiment.State value) { - if (value == null) { - throw new NullPointerException(); - } - - state_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * The current state of the experiment.
-     * Transition triggered by Expriments.StartExperiment: PENDING->RUNNING.
-     * Transition triggered by Expriments.CancelExperiment: PENDING->CANCELLED or
-     * RUNNING->CANCELLED.
-     * 
- * - * .google.cloud.dialogflow.cx.v3.Experiment.State state = 4; - * - * @return This builder for chaining. - */ - public Builder clearState() { - - state_ = 0; - onChanged(); - return this; - } - - private com.google.cloud.dialogflow.cx.v3.Experiment.Definition definition_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3.Experiment.Definition, - com.google.cloud.dialogflow.cx.v3.Experiment.Definition.Builder, - com.google.cloud.dialogflow.cx.v3.Experiment.DefinitionOrBuilder> - definitionBuilder_; - /** - * - * - *
-     * The definition of the experiment.
-     * 
- * - * .google.cloud.dialogflow.cx.v3.Experiment.Definition definition = 5; - * - * @return Whether the definition field is set. - */ - public boolean hasDefinition() { - return definitionBuilder_ != null || definition_ != null; - } - /** - * - * - *
-     * The definition of the experiment.
-     * 
- * - * .google.cloud.dialogflow.cx.v3.Experiment.Definition definition = 5; - * - * @return The definition. - */ - public com.google.cloud.dialogflow.cx.v3.Experiment.Definition getDefinition() { - if (definitionBuilder_ == null) { - return definition_ == null - ? com.google.cloud.dialogflow.cx.v3.Experiment.Definition.getDefaultInstance() - : definition_; - } else { - return definitionBuilder_.getMessage(); - } - } - /** - * - * - *
-     * The definition of the experiment.
-     * 
- * - * .google.cloud.dialogflow.cx.v3.Experiment.Definition definition = 5; - */ - public Builder setDefinition(com.google.cloud.dialogflow.cx.v3.Experiment.Definition value) { - if (definitionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - definition_ = value; - onChanged(); - } else { - definitionBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * The definition of the experiment.
-     * 
- * - * .google.cloud.dialogflow.cx.v3.Experiment.Definition definition = 5; - */ - public Builder setDefinition( - com.google.cloud.dialogflow.cx.v3.Experiment.Definition.Builder builderForValue) { - if (definitionBuilder_ == null) { - definition_ = builderForValue.build(); - onChanged(); - } else { - definitionBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * The definition of the experiment.
-     * 
- * - * .google.cloud.dialogflow.cx.v3.Experiment.Definition definition = 5; - */ - public Builder mergeDefinition(com.google.cloud.dialogflow.cx.v3.Experiment.Definition value) { - if (definitionBuilder_ == null) { - if (definition_ != null) { - definition_ = - com.google.cloud.dialogflow.cx.v3.Experiment.Definition.newBuilder(definition_) - .mergeFrom(value) - .buildPartial(); - } else { - definition_ = value; - } - onChanged(); - } else { - definitionBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * The definition of the experiment.
-     * 
- * - * .google.cloud.dialogflow.cx.v3.Experiment.Definition definition = 5; - */ - public Builder clearDefinition() { - if (definitionBuilder_ == null) { - definition_ = null; - onChanged(); - } else { - definition_ = null; - definitionBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * The definition of the experiment.
-     * 
- * - * .google.cloud.dialogflow.cx.v3.Experiment.Definition definition = 5; - */ - public com.google.cloud.dialogflow.cx.v3.Experiment.Definition.Builder getDefinitionBuilder() { - - onChanged(); - return getDefinitionFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The definition of the experiment.
-     * 
- * - * .google.cloud.dialogflow.cx.v3.Experiment.Definition definition = 5; - */ - public com.google.cloud.dialogflow.cx.v3.Experiment.DefinitionOrBuilder - getDefinitionOrBuilder() { - if (definitionBuilder_ != null) { - return definitionBuilder_.getMessageOrBuilder(); - } else { - return definition_ == null - ? com.google.cloud.dialogflow.cx.v3.Experiment.Definition.getDefaultInstance() - : definition_; - } - } - /** - * - * - *
-     * The definition of the experiment.
-     * 
- * - * .google.cloud.dialogflow.cx.v3.Experiment.Definition definition = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3.Experiment.Definition, - com.google.cloud.dialogflow.cx.v3.Experiment.Definition.Builder, - com.google.cloud.dialogflow.cx.v3.Experiment.DefinitionOrBuilder> - getDefinitionFieldBuilder() { - if (definitionBuilder_ == null) { - definitionBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3.Experiment.Definition, - com.google.cloud.dialogflow.cx.v3.Experiment.Definition.Builder, - com.google.cloud.dialogflow.cx.v3.Experiment.DefinitionOrBuilder>( - getDefinition(), getParentForChildren(), isClean()); - definition_ = null; - } - return definitionBuilder_; - } - - private com.google.cloud.dialogflow.cx.v3.Experiment.Result result_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3.Experiment.Result, - com.google.cloud.dialogflow.cx.v3.Experiment.Result.Builder, - com.google.cloud.dialogflow.cx.v3.Experiment.ResultOrBuilder> - resultBuilder_; - /** - * - * - *
-     * Inference result of the experiment.
-     * 
- * - * .google.cloud.dialogflow.cx.v3.Experiment.Result result = 6; - * - * @return Whether the result field is set. - */ - public boolean hasResult() { - return resultBuilder_ != null || result_ != null; - } - /** - * - * - *
-     * Inference result of the experiment.
-     * 
- * - * .google.cloud.dialogflow.cx.v3.Experiment.Result result = 6; - * - * @return The result. - */ - public com.google.cloud.dialogflow.cx.v3.Experiment.Result getResult() { - if (resultBuilder_ == null) { - return result_ == null - ? com.google.cloud.dialogflow.cx.v3.Experiment.Result.getDefaultInstance() - : result_; - } else { - return resultBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Inference result of the experiment.
-     * 
- * - * .google.cloud.dialogflow.cx.v3.Experiment.Result result = 6; - */ - public Builder setResult(com.google.cloud.dialogflow.cx.v3.Experiment.Result value) { - if (resultBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - result_ = value; - onChanged(); - } else { - resultBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Inference result of the experiment.
-     * 
- * - * .google.cloud.dialogflow.cx.v3.Experiment.Result result = 6; - */ - public Builder setResult( - com.google.cloud.dialogflow.cx.v3.Experiment.Result.Builder builderForValue) { - if (resultBuilder_ == null) { - result_ = builderForValue.build(); - onChanged(); - } else { - resultBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Inference result of the experiment.
-     * 
- * - * .google.cloud.dialogflow.cx.v3.Experiment.Result result = 6; - */ - public Builder mergeResult(com.google.cloud.dialogflow.cx.v3.Experiment.Result value) { - if (resultBuilder_ == null) { - if (result_ != null) { - result_ = - com.google.cloud.dialogflow.cx.v3.Experiment.Result.newBuilder(result_) - .mergeFrom(value) - .buildPartial(); - } else { - result_ = value; - } - onChanged(); - } else { - resultBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Inference result of the experiment.
-     * 
- * - * .google.cloud.dialogflow.cx.v3.Experiment.Result result = 6; - */ - public Builder clearResult() { - if (resultBuilder_ == null) { - result_ = null; - onChanged(); - } else { - result_ = null; - resultBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Inference result of the experiment.
-     * 
- * - * .google.cloud.dialogflow.cx.v3.Experiment.Result result = 6; - */ - public com.google.cloud.dialogflow.cx.v3.Experiment.Result.Builder getResultBuilder() { - - onChanged(); - return getResultFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Inference result of the experiment.
-     * 
- * - * .google.cloud.dialogflow.cx.v3.Experiment.Result result = 6; - */ - public com.google.cloud.dialogflow.cx.v3.Experiment.ResultOrBuilder getResultOrBuilder() { - if (resultBuilder_ != null) { - return resultBuilder_.getMessageOrBuilder(); - } else { - return result_ == null - ? com.google.cloud.dialogflow.cx.v3.Experiment.Result.getDefaultInstance() - : result_; - } - } - /** - * - * - *
-     * Inference result of the experiment.
-     * 
- * - * .google.cloud.dialogflow.cx.v3.Experiment.Result result = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3.Experiment.Result, - com.google.cloud.dialogflow.cx.v3.Experiment.Result.Builder, - com.google.cloud.dialogflow.cx.v3.Experiment.ResultOrBuilder> - getResultFieldBuilder() { - if (resultBuilder_ == null) { - resultBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3.Experiment.Result, - com.google.cloud.dialogflow.cx.v3.Experiment.Result.Builder, - com.google.cloud.dialogflow.cx.v3.Experiment.ResultOrBuilder>( - getResult(), getParentForChildren(), isClean()); - result_ = null; - } - return resultBuilder_; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - createTimeBuilder_; - /** - * - * - *
-     * Creation time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7; - * - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return createTimeBuilder_ != null || createTime_ != null; - } - /** - * - * - *
-     * Creation time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7; - * - * @return The createTime. - */ - public com.google.protobuf.Timestamp getCreateTime() { - if (createTimeBuilder_ == null) { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } else { - return createTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Creation time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7; - */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - onChanged(); - } else { - createTimeBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Creation time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7; - */ - public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - onChanged(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Creation time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7; - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (createTime_ != null) { - createTime_ = - com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); - } else { - createTime_ = value; - } - onChanged(); - } else { - createTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Creation time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7; - */ - public Builder clearCreateTime() { - if (createTimeBuilder_ == null) { - createTime_ = null; - onChanged(); - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Creation time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7; - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Creation time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7; - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } - } - /** - * - * - *
-     * Creation time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), getParentForChildren(), isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - - private com.google.protobuf.Timestamp startTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - startTimeBuilder_; - /** - * - * - *
-     * Start time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp start_time = 8; - * - * @return Whether the startTime field is set. - */ - public boolean hasStartTime() { - return startTimeBuilder_ != null || startTime_ != null; - } - /** - * - * - *
-     * Start time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp start_time = 8; - * - * @return The startTime. - */ - public com.google.protobuf.Timestamp getStartTime() { - if (startTimeBuilder_ == null) { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } else { - return startTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Start time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp start_time = 8; - */ - public Builder setStartTime(com.google.protobuf.Timestamp value) { - if (startTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - startTime_ = value; - onChanged(); - } else { - startTimeBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Start time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp start_time = 8; - */ - public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (startTimeBuilder_ == null) { - startTime_ = builderForValue.build(); - onChanged(); - } else { - startTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Start time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp start_time = 8; - */ - public Builder mergeStartTime(com.google.protobuf.Timestamp value) { - if (startTimeBuilder_ == null) { - if (startTime_ != null) { - startTime_ = - com.google.protobuf.Timestamp.newBuilder(startTime_).mergeFrom(value).buildPartial(); - } else { - startTime_ = value; - } - onChanged(); - } else { - startTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Start time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp start_time = 8; - */ - public Builder clearStartTime() { - if (startTimeBuilder_ == null) { - startTime_ = null; - onChanged(); - } else { - startTime_ = null; - startTimeBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Start time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp start_time = 8; - */ - public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { - - onChanged(); - return getStartTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Start time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp start_time = 8; - */ - public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { - if (startTimeBuilder_ != null) { - return startTimeBuilder_.getMessageOrBuilder(); - } else { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } - } - /** - * - * - *
-     * Start time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp start_time = 8; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getStartTimeFieldBuilder() { - if (startTimeBuilder_ == null) { - startTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getStartTime(), getParentForChildren(), isClean()); - startTime_ = null; - } - return startTimeBuilder_; - } - - private com.google.protobuf.Timestamp endTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - endTimeBuilder_; - /** - * - * - *
-     * End time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp end_time = 9; - * - * @return Whether the endTime field is set. - */ - public boolean hasEndTime() { - return endTimeBuilder_ != null || endTime_ != null; - } - /** - * - * - *
-     * End time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp end_time = 9; - * - * @return The endTime. - */ - public com.google.protobuf.Timestamp getEndTime() { - if (endTimeBuilder_ == null) { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } else { - return endTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * End time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp end_time = 9; - */ - public Builder setEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endTime_ = value; - onChanged(); - } else { - endTimeBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * End time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp end_time = 9; - */ - public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (endTimeBuilder_ == null) { - endTime_ = builderForValue.build(); - onChanged(); - } else { - endTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * End time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp end_time = 9; - */ - public Builder mergeEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (endTime_ != null) { - endTime_ = - com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial(); - } else { - endTime_ = value; - } - onChanged(); - } else { - endTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * End time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp end_time = 9; - */ - public Builder clearEndTime() { - if (endTimeBuilder_ == null) { - endTime_ = null; - onChanged(); - } else { - endTime_ = null; - endTimeBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * End time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp end_time = 9; - */ - public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { - - onChanged(); - return getEndTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * End time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp end_time = 9; - */ - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - if (endTimeBuilder_ != null) { - return endTimeBuilder_.getMessageOrBuilder(); - } else { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - } - /** - * - * - *
-     * End time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp end_time = 9; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getEndTimeFieldBuilder() { - if (endTimeBuilder_ == null) { - endTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getEndTime(), getParentForChildren(), isClean()); - endTime_ = null; - } - return endTimeBuilder_; - } - - private com.google.protobuf.Timestamp lastUpdateTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - lastUpdateTimeBuilder_; - /** - * - * - *
-     * Last update time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp last_update_time = 10; - * - * @return Whether the lastUpdateTime field is set. - */ - public boolean hasLastUpdateTime() { - return lastUpdateTimeBuilder_ != null || lastUpdateTime_ != null; - } - /** - * - * - *
-     * Last update time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp last_update_time = 10; - * - * @return The lastUpdateTime. - */ - public com.google.protobuf.Timestamp getLastUpdateTime() { - if (lastUpdateTimeBuilder_ == null) { - return lastUpdateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : lastUpdateTime_; - } else { - return lastUpdateTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Last update time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp last_update_time = 10; - */ - public Builder setLastUpdateTime(com.google.protobuf.Timestamp value) { - if (lastUpdateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - lastUpdateTime_ = value; - onChanged(); - } else { - lastUpdateTimeBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Last update time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp last_update_time = 10; - */ - public Builder setLastUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (lastUpdateTimeBuilder_ == null) { - lastUpdateTime_ = builderForValue.build(); - onChanged(); - } else { - lastUpdateTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Last update time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp last_update_time = 10; - */ - public Builder mergeLastUpdateTime(com.google.protobuf.Timestamp value) { - if (lastUpdateTimeBuilder_ == null) { - if (lastUpdateTime_ != null) { - lastUpdateTime_ = - com.google.protobuf.Timestamp.newBuilder(lastUpdateTime_) - .mergeFrom(value) - .buildPartial(); - } else { - lastUpdateTime_ = value; - } - onChanged(); - } else { - lastUpdateTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Last update time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp last_update_time = 10; - */ - public Builder clearLastUpdateTime() { - if (lastUpdateTimeBuilder_ == null) { - lastUpdateTime_ = null; - onChanged(); - } else { - lastUpdateTime_ = null; - lastUpdateTimeBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Last update time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp last_update_time = 10; - */ - public com.google.protobuf.Timestamp.Builder getLastUpdateTimeBuilder() { - - onChanged(); - return getLastUpdateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Last update time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp last_update_time = 10; - */ - public com.google.protobuf.TimestampOrBuilder getLastUpdateTimeOrBuilder() { - if (lastUpdateTimeBuilder_ != null) { - return lastUpdateTimeBuilder_.getMessageOrBuilder(); - } else { - return lastUpdateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : lastUpdateTime_; - } - } - /** - * - * - *
-     * Last update time of this experiment.
-     * 
- * - * .google.protobuf.Timestamp last_update_time = 10; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getLastUpdateTimeFieldBuilder() { - if (lastUpdateTimeBuilder_ == null) { - lastUpdateTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getLastUpdateTime(), getParentForChildren(), isClean()); - lastUpdateTime_ = null; - } - return lastUpdateTimeBuilder_; - } - - private com.google.protobuf.Duration experimentLength_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Duration, - com.google.protobuf.Duration.Builder, - com.google.protobuf.DurationOrBuilder> - experimentLengthBuilder_; - /** - * - * - *
-     * Maximum number of days to run the experiment.
-     * 
- * - * .google.protobuf.Duration experiment_length = 11; - * - * @return Whether the experimentLength field is set. - */ - public boolean hasExperimentLength() { - return experimentLengthBuilder_ != null || experimentLength_ != null; - } - /** - * - * - *
-     * Maximum number of days to run the experiment.
-     * 
- * - * .google.protobuf.Duration experiment_length = 11; - * - * @return The experimentLength. - */ - public com.google.protobuf.Duration getExperimentLength() { - if (experimentLengthBuilder_ == null) { - return experimentLength_ == null - ? com.google.protobuf.Duration.getDefaultInstance() - : experimentLength_; - } else { - return experimentLengthBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Maximum number of days to run the experiment.
-     * 
- * - * .google.protobuf.Duration experiment_length = 11; - */ - public Builder setExperimentLength(com.google.protobuf.Duration value) { - if (experimentLengthBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - experimentLength_ = value; - onChanged(); - } else { - experimentLengthBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Maximum number of days to run the experiment.
-     * 
- * - * .google.protobuf.Duration experiment_length = 11; - */ - public Builder setExperimentLength(com.google.protobuf.Duration.Builder builderForValue) { - if (experimentLengthBuilder_ == null) { - experimentLength_ = builderForValue.build(); - onChanged(); - } else { - experimentLengthBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Maximum number of days to run the experiment.
-     * 
- * - * .google.protobuf.Duration experiment_length = 11; - */ - public Builder mergeExperimentLength(com.google.protobuf.Duration value) { - if (experimentLengthBuilder_ == null) { - if (experimentLength_ != null) { - experimentLength_ = - com.google.protobuf.Duration.newBuilder(experimentLength_) - .mergeFrom(value) - .buildPartial(); - } else { - experimentLength_ = value; - } - onChanged(); - } else { - experimentLengthBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Maximum number of days to run the experiment.
-     * 
- * - * .google.protobuf.Duration experiment_length = 11; - */ - public Builder clearExperimentLength() { - if (experimentLengthBuilder_ == null) { - experimentLength_ = null; - onChanged(); - } else { - experimentLength_ = null; - experimentLengthBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Maximum number of days to run the experiment.
-     * 
- * - * .google.protobuf.Duration experiment_length = 11; - */ - public com.google.protobuf.Duration.Builder getExperimentLengthBuilder() { - - onChanged(); - return getExperimentLengthFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Maximum number of days to run the experiment.
-     * 
- * - * .google.protobuf.Duration experiment_length = 11; - */ - public com.google.protobuf.DurationOrBuilder getExperimentLengthOrBuilder() { - if (experimentLengthBuilder_ != null) { - return experimentLengthBuilder_.getMessageOrBuilder(); - } else { - return experimentLength_ == null - ? com.google.protobuf.Duration.getDefaultInstance() - : experimentLength_; - } - } - /** - * - * - *
-     * Maximum number of days to run the experiment.
-     * 
- * - * .google.protobuf.Duration experiment_length = 11; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Duration, - com.google.protobuf.Duration.Builder, - com.google.protobuf.DurationOrBuilder> - getExperimentLengthFieldBuilder() { - if (experimentLengthBuilder_ == null) { - experimentLengthBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Duration, - com.google.protobuf.Duration.Builder, - com.google.protobuf.DurationOrBuilder>( - getExperimentLength(), getParentForChildren(), isClean()); - experimentLength_ = null; - } - return experimentLengthBuilder_; - } - - private java.util.List variantsHistory_ = - java.util.Collections.emptyList(); - - private void ensureVariantsHistoryIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - variantsHistory_ = - new java.util.ArrayList( - variantsHistory_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3.VariantsHistory, - com.google.cloud.dialogflow.cx.v3.VariantsHistory.Builder, - com.google.cloud.dialogflow.cx.v3.VariantsHistoryOrBuilder> - variantsHistoryBuilder_; - - /** - * - * - *
-     * The history of updates to the experiment variants.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; - */ - public java.util.List - getVariantsHistoryList() { - if (variantsHistoryBuilder_ == null) { - return java.util.Collections.unmodifiableList(variantsHistory_); - } else { - return variantsHistoryBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * The history of updates to the experiment variants.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; - */ - public int getVariantsHistoryCount() { - if (variantsHistoryBuilder_ == null) { - return variantsHistory_.size(); - } else { - return variantsHistoryBuilder_.getCount(); - } - } - /** - * - * - *
-     * The history of updates to the experiment variants.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; - */ - public com.google.cloud.dialogflow.cx.v3.VariantsHistory getVariantsHistory(int index) { - if (variantsHistoryBuilder_ == null) { - return variantsHistory_.get(index); - } else { - return variantsHistoryBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * The history of updates to the experiment variants.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; - */ - public Builder setVariantsHistory( - int index, com.google.cloud.dialogflow.cx.v3.VariantsHistory value) { - if (variantsHistoryBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVariantsHistoryIsMutable(); - variantsHistory_.set(index, value); - onChanged(); - } else { - variantsHistoryBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The history of updates to the experiment variants.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; - */ - public Builder setVariantsHistory( - int index, com.google.cloud.dialogflow.cx.v3.VariantsHistory.Builder builderForValue) { - if (variantsHistoryBuilder_ == null) { - ensureVariantsHistoryIsMutable(); - variantsHistory_.set(index, builderForValue.build()); - onChanged(); - } else { - variantsHistoryBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The history of updates to the experiment variants.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; - */ - public Builder addVariantsHistory(com.google.cloud.dialogflow.cx.v3.VariantsHistory value) { - if (variantsHistoryBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVariantsHistoryIsMutable(); - variantsHistory_.add(value); - onChanged(); - } else { - variantsHistoryBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * The history of updates to the experiment variants.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; - */ - public Builder addVariantsHistory( - int index, com.google.cloud.dialogflow.cx.v3.VariantsHistory value) { - if (variantsHistoryBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVariantsHistoryIsMutable(); - variantsHistory_.add(index, value); - onChanged(); - } else { - variantsHistoryBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The history of updates to the experiment variants.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; - */ - public Builder addVariantsHistory( - com.google.cloud.dialogflow.cx.v3.VariantsHistory.Builder builderForValue) { - if (variantsHistoryBuilder_ == null) { - ensureVariantsHistoryIsMutable(); - variantsHistory_.add(builderForValue.build()); - onChanged(); - } else { - variantsHistoryBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The history of updates to the experiment variants.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; - */ - public Builder addVariantsHistory( - int index, com.google.cloud.dialogflow.cx.v3.VariantsHistory.Builder builderForValue) { - if (variantsHistoryBuilder_ == null) { - ensureVariantsHistoryIsMutable(); - variantsHistory_.add(index, builderForValue.build()); - onChanged(); - } else { - variantsHistoryBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The history of updates to the experiment variants.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; - */ - public Builder addAllVariantsHistory( - java.lang.Iterable values) { - if (variantsHistoryBuilder_ == null) { - ensureVariantsHistoryIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, variantsHistory_); - onChanged(); - } else { - variantsHistoryBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * The history of updates to the experiment variants.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; - */ - public Builder clearVariantsHistory() { - if (variantsHistoryBuilder_ == null) { - variantsHistory_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - variantsHistoryBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * The history of updates to the experiment variants.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; - */ - public Builder removeVariantsHistory(int index) { - if (variantsHistoryBuilder_ == null) { - ensureVariantsHistoryIsMutable(); - variantsHistory_.remove(index); - onChanged(); - } else { - variantsHistoryBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * The history of updates to the experiment variants.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; - */ - public com.google.cloud.dialogflow.cx.v3.VariantsHistory.Builder getVariantsHistoryBuilder( - int index) { - return getVariantsHistoryFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * The history of updates to the experiment variants.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; - */ - public com.google.cloud.dialogflow.cx.v3.VariantsHistoryOrBuilder getVariantsHistoryOrBuilder( - int index) { - if (variantsHistoryBuilder_ == null) { - return variantsHistory_.get(index); - } else { - return variantsHistoryBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * The history of updates to the experiment variants.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; - */ - public java.util.List - getVariantsHistoryOrBuilderList() { - if (variantsHistoryBuilder_ != null) { - return variantsHistoryBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(variantsHistory_); - } - } - /** - * - * - *
-     * The history of updates to the experiment variants.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; - */ - public com.google.cloud.dialogflow.cx.v3.VariantsHistory.Builder addVariantsHistoryBuilder() { - return getVariantsHistoryFieldBuilder() - .addBuilder(com.google.cloud.dialogflow.cx.v3.VariantsHistory.getDefaultInstance()); - } - /** - * - * - *
-     * The history of updates to the experiment variants.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; - */ - public com.google.cloud.dialogflow.cx.v3.VariantsHistory.Builder addVariantsHistoryBuilder( - int index) { - return getVariantsHistoryFieldBuilder() - .addBuilder( - index, com.google.cloud.dialogflow.cx.v3.VariantsHistory.getDefaultInstance()); - } - /** - * - * - *
-     * The history of updates to the experiment variants.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; - */ - public java.util.List - getVariantsHistoryBuilderList() { - return getVariantsHistoryFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3.VariantsHistory, - com.google.cloud.dialogflow.cx.v3.VariantsHistory.Builder, - com.google.cloud.dialogflow.cx.v3.VariantsHistoryOrBuilder> - getVariantsHistoryFieldBuilder() { - if (variantsHistoryBuilder_ == null) { - variantsHistoryBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3.VariantsHistory, - com.google.cloud.dialogflow.cx.v3.VariantsHistory.Builder, - com.google.cloud.dialogflow.cx.v3.VariantsHistoryOrBuilder>( - variantsHistory_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - variantsHistory_ = null; - } - return variantsHistoryBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.Experiment) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.Experiment) - private static final com.google.cloud.dialogflow.cx.v3.Experiment DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.Experiment(); - } - - public static com.google.cloud.dialogflow.cx.v3.Experiment getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Experiment parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Experiment(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.Experiment getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentOrBuilder.java deleted file mode 100644 index 82bf5eeae..000000000 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentOrBuilder.java +++ /dev/null @@ -1,434 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dialogflow/cx/v3/experiment.proto - -package com.google.cloud.dialogflow.cx.v3; - -public interface ExperimentOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.Experiment) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The name of the experiment.
-   * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/environments/<Environment ID>/experiments/<Experiment ID>..
-   * 
- * - * string name = 1; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * The name of the experiment.
-   * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/environments/<Environment ID>/experiments/<Experiment ID>..
-   * 
- * - * string name = 1; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Required. The human-readable name of the experiment (unique in an environment). Limit
-   * of 64 characters.
-   * 
- * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The displayName. - */ - java.lang.String getDisplayName(); - /** - * - * - *
-   * Required. The human-readable name of the experiment (unique in an environment). Limit
-   * of 64 characters.
-   * 
- * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for displayName. - */ - com.google.protobuf.ByteString getDisplayNameBytes(); - - /** - * - * - *
-   * The human-readable description of the experiment.
-   * 
- * - * string description = 3; - * - * @return The description. - */ - java.lang.String getDescription(); - /** - * - * - *
-   * The human-readable description of the experiment.
-   * 
- * - * string description = 3; - * - * @return The bytes for description. - */ - com.google.protobuf.ByteString getDescriptionBytes(); - - /** - * - * - *
-   * The current state of the experiment.
-   * Transition triggered by Expriments.StartExperiment: PENDING->RUNNING.
-   * Transition triggered by Expriments.CancelExperiment: PENDING->CANCELLED or
-   * RUNNING->CANCELLED.
-   * 
- * - * .google.cloud.dialogflow.cx.v3.Experiment.State state = 4; - * - * @return The enum numeric value on the wire for state. - */ - int getStateValue(); - /** - * - * - *
-   * The current state of the experiment.
-   * Transition triggered by Expriments.StartExperiment: PENDING->RUNNING.
-   * Transition triggered by Expriments.CancelExperiment: PENDING->CANCELLED or
-   * RUNNING->CANCELLED.
-   * 
- * - * .google.cloud.dialogflow.cx.v3.Experiment.State state = 4; - * - * @return The state. - */ - com.google.cloud.dialogflow.cx.v3.Experiment.State getState(); - - /** - * - * - *
-   * The definition of the experiment.
-   * 
- * - * .google.cloud.dialogflow.cx.v3.Experiment.Definition definition = 5; - * - * @return Whether the definition field is set. - */ - boolean hasDefinition(); - /** - * - * - *
-   * The definition of the experiment.
-   * 
- * - * .google.cloud.dialogflow.cx.v3.Experiment.Definition definition = 5; - * - * @return The definition. - */ - com.google.cloud.dialogflow.cx.v3.Experiment.Definition getDefinition(); - /** - * - * - *
-   * The definition of the experiment.
-   * 
- * - * .google.cloud.dialogflow.cx.v3.Experiment.Definition definition = 5; - */ - com.google.cloud.dialogflow.cx.v3.Experiment.DefinitionOrBuilder getDefinitionOrBuilder(); - - /** - * - * - *
-   * Inference result of the experiment.
-   * 
- * - * .google.cloud.dialogflow.cx.v3.Experiment.Result result = 6; - * - * @return Whether the result field is set. - */ - boolean hasResult(); - /** - * - * - *
-   * Inference result of the experiment.
-   * 
- * - * .google.cloud.dialogflow.cx.v3.Experiment.Result result = 6; - * - * @return The result. - */ - com.google.cloud.dialogflow.cx.v3.Experiment.Result getResult(); - /** - * - * - *
-   * Inference result of the experiment.
-   * 
- * - * .google.cloud.dialogflow.cx.v3.Experiment.Result result = 6; - */ - com.google.cloud.dialogflow.cx.v3.Experiment.ResultOrBuilder getResultOrBuilder(); - - /** - * - * - *
-   * Creation time of this experiment.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7; - * - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - * - * - *
-   * Creation time of this experiment.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7; - * - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - * - * - *
-   * Creation time of this experiment.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7; - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - * - * - *
-   * Start time of this experiment.
-   * 
- * - * .google.protobuf.Timestamp start_time = 8; - * - * @return Whether the startTime field is set. - */ - boolean hasStartTime(); - /** - * - * - *
-   * Start time of this experiment.
-   * 
- * - * .google.protobuf.Timestamp start_time = 8; - * - * @return The startTime. - */ - com.google.protobuf.Timestamp getStartTime(); - /** - * - * - *
-   * Start time of this experiment.
-   * 
- * - * .google.protobuf.Timestamp start_time = 8; - */ - com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); - - /** - * - * - *
-   * End time of this experiment.
-   * 
- * - * .google.protobuf.Timestamp end_time = 9; - * - * @return Whether the endTime field is set. - */ - boolean hasEndTime(); - /** - * - * - *
-   * End time of this experiment.
-   * 
- * - * .google.protobuf.Timestamp end_time = 9; - * - * @return The endTime. - */ - com.google.protobuf.Timestamp getEndTime(); - /** - * - * - *
-   * End time of this experiment.
-   * 
- * - * .google.protobuf.Timestamp end_time = 9; - */ - com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); - - /** - * - * - *
-   * Last update time of this experiment.
-   * 
- * - * .google.protobuf.Timestamp last_update_time = 10; - * - * @return Whether the lastUpdateTime field is set. - */ - boolean hasLastUpdateTime(); - /** - * - * - *
-   * Last update time of this experiment.
-   * 
- * - * .google.protobuf.Timestamp last_update_time = 10; - * - * @return The lastUpdateTime. - */ - com.google.protobuf.Timestamp getLastUpdateTime(); - /** - * - * - *
-   * Last update time of this experiment.
-   * 
- * - * .google.protobuf.Timestamp last_update_time = 10; - */ - com.google.protobuf.TimestampOrBuilder getLastUpdateTimeOrBuilder(); - - /** - * - * - *
-   * Maximum number of days to run the experiment.
-   * 
- * - * .google.protobuf.Duration experiment_length = 11; - * - * @return Whether the experimentLength field is set. - */ - boolean hasExperimentLength(); - /** - * - * - *
-   * Maximum number of days to run the experiment.
-   * 
- * - * .google.protobuf.Duration experiment_length = 11; - * - * @return The experimentLength. - */ - com.google.protobuf.Duration getExperimentLength(); - /** - * - * - *
-   * Maximum number of days to run the experiment.
-   * 
- * - * .google.protobuf.Duration experiment_length = 11; - */ - com.google.protobuf.DurationOrBuilder getExperimentLengthOrBuilder(); - - /** - * - * - *
-   * The history of updates to the experiment variants.
-   * 
- * - * repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; - */ - java.util.List getVariantsHistoryList(); - /** - * - * - *
-   * The history of updates to the experiment variants.
-   * 
- * - * repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; - */ - com.google.cloud.dialogflow.cx.v3.VariantsHistory getVariantsHistory(int index); - /** - * - * - *
-   * The history of updates to the experiment variants.
-   * 
- * - * repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; - */ - int getVariantsHistoryCount(); - /** - * - * - *
-   * The history of updates to the experiment variants.
-   * 
- * - * repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; - */ - java.util.List - getVariantsHistoryOrBuilderList(); - /** - * - * - *
-   * The history of updates to the experiment variants.
-   * 
- * - * repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; - */ - com.google.cloud.dialogflow.cx.v3.VariantsHistoryOrBuilder getVariantsHistoryOrBuilder(int index); -} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentProto.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentProto.java deleted file mode 100644 index d94e541a6..000000000 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentProto.java +++ /dev/null @@ -1,427 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dialogflow/cx/v3/experiment.proto - -package com.google.cloud.dialogflow.cx.v3; - -public final class ExperimentProto { - private ExperimentProto() {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); - } - - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dialogflow_cx_v3_Experiment_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dialogflow_cx_v3_Experiment_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dialogflow_cx_v3_Experiment_Definition_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dialogflow_cx_v3_Experiment_Definition_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_ConfidenceInterval_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_ConfidenceInterval_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_Metric_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_Metric_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_VersionMetrics_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_VersionMetrics_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dialogflow_cx_v3_VersionVariants_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dialogflow_cx_v3_VersionVariants_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dialogflow_cx_v3_VersionVariants_Variant_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dialogflow_cx_v3_VersionVariants_Variant_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dialogflow_cx_v3_VariantsHistory_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dialogflow_cx_v3_VariantsHistory_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dialogflow_cx_v3_ListExperimentsRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dialogflow_cx_v3_ListExperimentsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dialogflow_cx_v3_ListExperimentsResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dialogflow_cx_v3_ListExperimentsResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dialogflow_cx_v3_GetExperimentRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dialogflow_cx_v3_GetExperimentRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dialogflow_cx_v3_CreateExperimentRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dialogflow_cx_v3_CreateExperimentRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dialogflow_cx_v3_UpdateExperimentRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dialogflow_cx_v3_UpdateExperimentRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dialogflow_cx_v3_DeleteExperimentRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dialogflow_cx_v3_DeleteExperimentRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dialogflow_cx_v3_StartExperimentRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dialogflow_cx_v3_StartExperimentRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dialogflow_cx_v3_StopExperimentRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dialogflow_cx_v3_StopExperimentRequest_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - - static { - java.lang.String[] descriptorData = { - "\n.google/cloud/dialogflow/cx/v3/experime" - + "nt.proto\022\035google.cloud.dialogflow.cx.v3\032" - + "\034google/api/annotations.proto\032\027google/ap" - + "i/client.proto\032\037google/api/field_behavio" - + "r.proto\032\031google/api/resource.proto\032\036goog" - + "le/protobuf/duration.proto\032\033google/proto" - + "buf/empty.proto\032 google/protobuf/field_m" - + "ask.proto\032\037google/protobuf/timestamp.pro" - + "to\"\353\r\n\nExperiment\022\014\n\004name\030\001 \001(\t\022\031\n\014displ" - + "ay_name\030\002 \001(\tB\003\340A\002\022\023\n\013description\030\003 \001(\t\022" - + ">\n\005state\030\004 \001(\0162/.google.cloud.dialogflow" - + ".cx.v3.Experiment.State\022H\n\ndefinition\030\005 " - + "\001(\01324.google.cloud.dialogflow.cx.v3.Expe" - + "riment.Definition\022@\n\006result\030\006 \001(\01320.goog" - + "le.cloud.dialogflow.cx.v3.Experiment.Res" - + "ult\022/\n\013create_time\030\007 \001(\0132\032.google.protob" - + "uf.Timestamp\022.\n\nstart_time\030\010 \001(\0132\032.googl" - + "e.protobuf.Timestamp\022,\n\010end_time\030\t \001(\0132\032" - + ".google.protobuf.Timestamp\0224\n\020last_updat" - + "e_time\030\n \001(\0132\032.google.protobuf.Timestamp" - + "\0224\n\021experiment_length\030\013 \001(\0132\031.google.pro" - + "tobuf.Duration\022H\n\020variants_history\030\014 \003(\013" - + "2..google.cloud.dialogflow.cx.v3.Variant" - + "sHistory\032w\n\nDefinition\022\021\n\tcondition\030\001 \001(" - + "\t\022J\n\020version_variants\030\002 \001(\0132..google.clo" - + "ud.dialogflow.cx.v3.VersionVariantsH\000B\n\n" - + "\010variants\032\271\006\n\006Result\022X\n\017version_metrics\030" - + "\001 \003(\0132?.google.cloud.dialogflow.cx.v3.Ex" - + "periment.Result.VersionMetrics\0224\n\020last_u" - + "pdate_time\030\002 \001(\0132\032.google.protobuf.Times" - + "tamp\032g\n\022ConfidenceInterval\022\030\n\020confidence" - + "_level\030\001 \001(\001\022\r\n\005ratio\030\002 \001(\001\022\023\n\013lower_bou" - + "nd\030\003 \001(\001\022\023\n\013upper_bound\030\004 \001(\001\032\317\001\n\006Metric" - + "\022I\n\004type\030\001 \001(\0162;.google.cloud.dialogflow" - + ".cx.v3.Experiment.Result.MetricType\022\017\n\005r" - + "atio\030\002 \001(\001H\000\022`\n\023confidence_interval\030\003 \001(" - + "\0132C.google.cloud.dialogflow.cx.v3.Experi" - + "ment.Result.ConfidenceIntervalB\007\n\005value\032" - + "\252\001\n\016VersionMetrics\0227\n\007version\030\001 \001(\tB&\372A#" - + "\n!dialogflow.googleapis.com/Version\022H\n\007m" - + "etrics\030\002 \003(\01327.google.cloud.dialogflow.c" - + "x.v3.Experiment.Result.Metric\022\025\n\rsession" - + "_count\030\003 \001(\005\"\266\001\n\nMetricType\022\026\n\022METRIC_UN" - + "SPECIFIED\020\000\022&\n\"CONTAINED_SESSION_NO_CALL" - + "BACK_RATE\020\001\022\033\n\027LIVE_AGENT_HANDOFF_RATE\020\002" - + "\022\031\n\025CALLBACK_SESSION_RATE\020\003\022\032\n\026ABANDONED" - + "_SESSION_RATE\020\004\022\024\n\020SESSION_END_RATE\020\005\"@\n" - + "\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\t\n\005DRAFT\020\001" - + "\022\013\n\007RUNNING\020\002\022\010\n\004DONE\020\003:\226\001\352A\222\001\n$dialogfl" - + "ow.googleapis.com/Experiment\022jprojects/{" - + "project}/locations/{location}/agents/{ag" - + "ent}/environments/{environment}/experime" - + "nts/{experiment}\"\255\001\n\017VersionVariants\022H\n\010" - + "variants\030\001 \003(\01326.google.cloud.dialogflow" - + ".cx.v3.VersionVariants.Variant\032P\n\007Varian" - + "t\022\017\n\007version\030\001 \001(\t\022\032\n\022traffic_allocation" - + "\030\002 \001(\002\022\030\n\020is_control_group\030\003 \001(\010\"\232\001\n\017Var" - + "iantsHistory\022J\n\020version_variants\030\001 \001(\0132." - + ".google.cloud.dialogflow.cx.v3.VersionVa" - + "riantsH\000\022/\n\013update_time\030\002 \001(\0132\032.google.p" - + "rotobuf.TimestampB\n\n\010variants\"}\n\026ListExp" - + "erimentsRequest\022<\n\006parent\030\001 \001(\tB,\340A\002\372A&\022" - + "$dialogflow.googleapis.com/Experiment\022\021\n" - + "\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"r\n\027" - + "ListExperimentsResponse\022>\n\013experiments\030\001" - + " \003(\0132).google.cloud.dialogflow.cx.v3.Exp" - + "eriment\022\027\n\017next_page_token\030\002 \001(\t\"R\n\024GetE" - + "xperimentRequest\022:\n\004name\030\001 \001(\tB,\340A\002\372A&\n$" - + "dialogflow.googleapis.com/Experiment\"\233\001\n" - + "\027CreateExperimentRequest\022<\n\006parent\030\001 \001(\t" - + "B,\340A\002\372A&\022$dialogflow.googleapis.com/Expe" - + "riment\022B\n\nexperiment\030\002 \001(\0132).google.clou" - + "d.dialogflow.cx.v3.ExperimentB\003\340A\002\"\223\001\n\027U" - + "pdateExperimentRequest\022B\n\nexperiment\030\001 \001" - + "(\0132).google.cloud.dialogflow.cx.v3.Exper" - + "imentB\003\340A\002\0224\n\013update_mask\030\002 \001(\0132\032.google" - + ".protobuf.FieldMaskB\003\340A\002\"U\n\027DeleteExperi" - + "mentRequest\022:\n\004name\030\001 \001(\tB,\340A\002\372A&\n$dialo" - + "gflow.googleapis.com/Experiment\"T\n\026Start" - + "ExperimentRequest\022:\n\004name\030\001 \001(\tB,\340A\002\372A&\n" - + "$dialogflow.googleapis.com/Experiment\"S\n" - + "\025StopExperimentRequest\022:\n\004name\030\001 \001(\tB,\340A" - + "\002\372A&\n$dialogflow.googleapis.com/Experime" - + "nt2\370\014\n\013Experiments\022\332\001\n\017ListExperiments\0225" - + ".google.cloud.dialogflow.cx.v3.ListExper" - + "imentsRequest\0326.google.cloud.dialogflow." - + "cx.v3.ListExperimentsResponse\"X\202\323\344\223\002I\022G/" - + "v3/{parent=projects/*/locations/*/agents" - + "/*/environments/*}/experiments\332A\006parent\022" - + "\307\001\n\rGetExperiment\0223.google.cloud.dialogf" - + "low.cx.v3.GetExperimentRequest\032).google." - + "cloud.dialogflow.cx.v3.Experiment\"V\202\323\344\223\002" - + "I\022G/v3/{name=projects/*/locations/*/agen" - + "ts/*/environments/*/experiments/*}\332A\004nam" - + "e\022\346\001\n\020CreateExperiment\0226.google.cloud.di" - + "alogflow.cx.v3.CreateExperimentRequest\032)" - + ".google.cloud.dialogflow.cx.v3.Experimen" - + "t\"o\202\323\344\223\002U\"G/v3/{parent=projects/*/locati" - + "ons/*/agents/*/environments/*}/experimen" - + "ts:\nexperiment\332A\021parent,experiment\022\366\001\n\020U" - + "pdateExperiment\0226.google.cloud.dialogflo" - + "w.cx.v3.UpdateExperimentRequest\032).google" - + ".cloud.dialogflow.cx.v3.Experiment\"\177\202\323\344\223" - + "\002`2R/v3/{experiment.name=projects/*/loca" - + "tions/*/agents/*/environments/*/experime" - + "nts/*}:\nexperiment\332A\026experiment,update_m" - + "ask\022\272\001\n\020DeleteExperiment\0226.google.cloud." - + "dialogflow.cx.v3.DeleteExperimentRequest" - + "\032\026.google.protobuf.Empty\"V\202\323\344\223\002I*G/v3/{n" - + "ame=projects/*/locations/*/agents/*/envi" - + "ronments/*/experiments/*}\332A\004name\022\324\001\n\017Sta" - + "rtExperiment\0225.google.cloud.dialogflow.c" - + "x.v3.StartExperimentRequest\032).google.clo" - + "ud.dialogflow.cx.v3.Experiment\"_\202\323\344\223\002R\"M" - + "/v3/{name=projects/*/locations/*/agents/" - + "*/environments/*/experiments/*}:start:\001*" - + "\332A\004name\022\321\001\n\016StopExperiment\0224.google.clou" - + "d.dialogflow.cx.v3.StopExperimentRequest" - + "\032).google.cloud.dialogflow.cx.v3.Experim" - + "ent\"^\202\323\344\223\002Q\"L/v3/{name=projects/*/locati" - + "ons/*/agents/*/environments/*/experiment" - + "s/*}:stop:\001*\332A\004name\032x\312A\031dialogflow.googl" - + "eapis.com\322AYhttps://www.googleapis.com/a" - + "uth/cloud-platform,https://www.googleapi" - + "s.com/auth/dialogflowB\237\001\n!com.google.clo" - + "ud.dialogflow.cx.v3B\017ExperimentProtoP\001Z?" - + "google.golang.org/genproto/googleapis/cl" - + "oud/dialogflow/cx/v3;cx\370\001\001\242\002\002DF\252\002\035Google" - + ".Cloud.Dialogflow.Cx.V3b\006proto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), - com.google.api.ClientProto.getDescriptor(), - com.google.api.FieldBehaviorProto.getDescriptor(), - com.google.api.ResourceProto.getDescriptor(), - com.google.protobuf.DurationProto.getDescriptor(), - com.google.protobuf.EmptyProto.getDescriptor(), - com.google.protobuf.FieldMaskProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - }); - internal_static_google_cloud_dialogflow_cx_v3_Experiment_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_dialogflow_cx_v3_Experiment_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dialogflow_cx_v3_Experiment_descriptor, - new java.lang.String[] { - "Name", - "DisplayName", - "Description", - "State", - "Definition", - "Result", - "CreateTime", - "StartTime", - "EndTime", - "LastUpdateTime", - "ExperimentLength", - "VariantsHistory", - }); - internal_static_google_cloud_dialogflow_cx_v3_Experiment_Definition_descriptor = - internal_static_google_cloud_dialogflow_cx_v3_Experiment_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_dialogflow_cx_v3_Experiment_Definition_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dialogflow_cx_v3_Experiment_Definition_descriptor, - new java.lang.String[] { - "Condition", "VersionVariants", "Variants", - }); - internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_descriptor = - internal_static_google_cloud_dialogflow_cx_v3_Experiment_descriptor.getNestedTypes().get(1); - internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_descriptor, - new java.lang.String[] { - "VersionMetrics", "LastUpdateTime", - }); - internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_ConfidenceInterval_descriptor = - internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_descriptor - .getNestedTypes() - .get(0); - internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_ConfidenceInterval_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_ConfidenceInterval_descriptor, - new java.lang.String[] { - "ConfidenceLevel", "Ratio", "LowerBound", "UpperBound", - }); - internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_Metric_descriptor = - internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_descriptor - .getNestedTypes() - .get(1); - internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_Metric_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_Metric_descriptor, - new java.lang.String[] { - "Type", "Ratio", "ConfidenceInterval", "Value", - }); - internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_VersionMetrics_descriptor = - internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_descriptor - .getNestedTypes() - .get(2); - internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_VersionMetrics_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_VersionMetrics_descriptor, - new java.lang.String[] { - "Version", "Metrics", "SessionCount", - }); - internal_static_google_cloud_dialogflow_cx_v3_VersionVariants_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_dialogflow_cx_v3_VersionVariants_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dialogflow_cx_v3_VersionVariants_descriptor, - new java.lang.String[] { - "Variants", - }); - internal_static_google_cloud_dialogflow_cx_v3_VersionVariants_Variant_descriptor = - internal_static_google_cloud_dialogflow_cx_v3_VersionVariants_descriptor - .getNestedTypes() - .get(0); - internal_static_google_cloud_dialogflow_cx_v3_VersionVariants_Variant_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dialogflow_cx_v3_VersionVariants_Variant_descriptor, - new java.lang.String[] { - "Version", "TrafficAllocation", "IsControlGroup", - }); - internal_static_google_cloud_dialogflow_cx_v3_VariantsHistory_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_dialogflow_cx_v3_VariantsHistory_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dialogflow_cx_v3_VariantsHistory_descriptor, - new java.lang.String[] { - "VersionVariants", "UpdateTime", "Variants", - }); - internal_static_google_cloud_dialogflow_cx_v3_ListExperimentsRequest_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_dialogflow_cx_v3_ListExperimentsRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dialogflow_cx_v3_ListExperimentsRequest_descriptor, - new java.lang.String[] { - "Parent", "PageSize", "PageToken", - }); - internal_static_google_cloud_dialogflow_cx_v3_ListExperimentsResponse_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_cloud_dialogflow_cx_v3_ListExperimentsResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dialogflow_cx_v3_ListExperimentsResponse_descriptor, - new java.lang.String[] { - "Experiments", "NextPageToken", - }); - internal_static_google_cloud_dialogflow_cx_v3_GetExperimentRequest_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_google_cloud_dialogflow_cx_v3_GetExperimentRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dialogflow_cx_v3_GetExperimentRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_cloud_dialogflow_cx_v3_CreateExperimentRequest_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_google_cloud_dialogflow_cx_v3_CreateExperimentRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dialogflow_cx_v3_CreateExperimentRequest_descriptor, - new java.lang.String[] { - "Parent", "Experiment", - }); - internal_static_google_cloud_dialogflow_cx_v3_UpdateExperimentRequest_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_google_cloud_dialogflow_cx_v3_UpdateExperimentRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dialogflow_cx_v3_UpdateExperimentRequest_descriptor, - new java.lang.String[] { - "Experiment", "UpdateMask", - }); - internal_static_google_cloud_dialogflow_cx_v3_DeleteExperimentRequest_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_google_cloud_dialogflow_cx_v3_DeleteExperimentRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dialogflow_cx_v3_DeleteExperimentRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_cloud_dialogflow_cx_v3_StartExperimentRequest_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_google_cloud_dialogflow_cx_v3_StartExperimentRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dialogflow_cx_v3_StartExperimentRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_cloud_dialogflow_cx_v3_StopExperimentRequest_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_google_cloud_dialogflow_cx_v3_StopExperimentRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dialogflow_cx_v3_StopExperimentRequest_descriptor, - new java.lang.String[] { - "Name", - }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.ClientProto.defaultHost); - registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); - registry.add(com.google.api.AnnotationsProto.http); - registry.add(com.google.api.ClientProto.methodSignature); - registry.add(com.google.api.ClientProto.oauthScopes); - registry.add(com.google.api.ResourceProto.resource); - registry.add(com.google.api.ResourceProto.resourceReference); - com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( - descriptor, registry); - com.google.api.AnnotationsProto.getDescriptor(); - com.google.api.ClientProto.getDescriptor(); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.api.ResourceProto.getDescriptor(); - com.google.protobuf.DurationProto.getDescriptor(); - com.google.protobuf.EmptyProto.getDescriptor(); - com.google.protobuf.FieldMaskProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportTestCasesMetadata.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportTestCasesMetadata.java new file mode 100644 index 000000000..c56a7c72b --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportTestCasesMetadata.java @@ -0,0 +1,459 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/test_case.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * Metadata returned for the [TestCases.ExportTestCases][google.cloud.dialogflow.cx.v3.TestCases.ExportTestCases] long running
+ * operation.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata} + */ +public final class ExportTestCasesMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata) + ExportTestCasesMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExportTestCasesMetadata.newBuilder() to construct. + private ExportTestCasesMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExportTestCasesMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExportTestCasesMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ExportTestCasesMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ExportTestCasesMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ExportTestCasesMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata.class, + com.google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata.Builder.class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata other = + (com.google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata) obj; + + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata returned for the [TestCases.ExportTestCases][google.cloud.dialogflow.cx.v3.TestCases.ExportTestCases] long running
+   * operation.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata) + com.google.cloud.dialogflow.cx.v3.ExportTestCasesMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ExportTestCasesMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ExportTestCasesMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata.class, + com.google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ExportTestCasesMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata build() { + com.google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata buildPartial() { + com.google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata result = + new com.google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata other) { + if (other == com.google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata) + private static final com.google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata(); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExportTestCasesMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ExportTestCasesMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportTestCasesMetadataOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportTestCasesMetadataOrBuilder.java new file mode 100644 index 000000000..98fdc3d32 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportTestCasesMetadataOrBuilder.java @@ -0,0 +1,24 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/test_case.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface ExportTestCasesMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata) + com.google.protobuf.MessageOrBuilder {} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportTestCasesRequest.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportTestCasesRequest.java new file mode 100644 index 000000000..b126621b3 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportTestCasesRequest.java @@ -0,0 +1,1513 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/test_case.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The request message for [TestCases.ExportTestCases][google.cloud.dialogflow.cx.v3.TestCases.ExportTestCases].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ExportTestCasesRequest} + */ +public final class ExportTestCasesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ExportTestCasesRequest) + ExportTestCasesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExportTestCasesRequest.newBuilder() to construct. + private ExportTestCasesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExportTestCasesRequest() { + parent_ = ""; + dataFormat_ = 0; + filter_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExportTestCasesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ExportTestCasesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + destinationCase_ = 2; + destination_ = s; + break; + } + case 24: + { + int rawValue = input.readEnum(); + + dataFormat_ = rawValue; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ExportTestCasesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ExportTestCasesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.class, + com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.Builder.class); + } + + /** + * + * + *
+   * Data format of the exported test cases.
+   * 
+ * + * Protobuf enum {@code google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.DataFormat} + */ + public enum DataFormat implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified format.
+     * 
+ * + * DATA_FORMAT_UNSPECIFIED = 0; + */ + DATA_FORMAT_UNSPECIFIED(0), + /** + * + * + *
+     * Raw bytes.
+     * 
+ * + * BLOB = 1; + */ + BLOB(1), + /** + * + * + *
+     * JSON format.
+     * 
+ * + * JSON = 2; + */ + JSON(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified format.
+     * 
+ * + * DATA_FORMAT_UNSPECIFIED = 0; + */ + public static final int DATA_FORMAT_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Raw bytes.
+     * 
+ * + * BLOB = 1; + */ + public static final int BLOB_VALUE = 1; + /** + * + * + *
+     * JSON format.
+     * 
+ * + * JSON = 2; + */ + public static final int JSON_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DataFormat valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static DataFormat forNumber(int value) { + switch (value) { + case 0: + return DATA_FORMAT_UNSPECIFIED; + case 1: + return BLOB; + case 2: + return JSON; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public DataFormat findValueByNumber(int number) { + return DataFormat.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final DataFormat[] VALUES = values(); + + public static DataFormat valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private DataFormat(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.DataFormat) + } + + private int destinationCase_ = 0; + private java.lang.Object destination_; + + public enum DestinationCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GCS_URI(2), + DESTINATION_NOT_SET(0); + private final int value; + + private DestinationCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DestinationCase valueOf(int value) { + return forNumber(value); + } + + public static DestinationCase forNumber(int value) { + switch (value) { + case 2: + return GCS_URI; + case 0: + return DESTINATION_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public DestinationCase getDestinationCase() { + return DestinationCase.forNumber(destinationCase_); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The agent where to export test cases from.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The agent where to export test cases from.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GCS_URI_FIELD_NUMBER = 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://<bucket-name>/<object-name>`. If unspecified, the serialized test
+   * cases is returned inline.
+   * 
+ * + * string gcs_uri = 2; + * + * @return The gcsUri. + */ + public java.lang.String getGcsUri() { + java.lang.Object ref = ""; + if (destinationCase_ == 2) { + ref = destination_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (destinationCase_ == 2) { + destination_ = s; + } + return s; + } + } + /** + * + * + *
+   * 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://<bucket-name>/<object-name>`. If unspecified, the serialized test
+   * cases is returned inline.
+   * 
+ * + * string gcs_uri = 2; + * + * @return The bytes for gcsUri. + */ + public com.google.protobuf.ByteString getGcsUriBytes() { + java.lang.Object ref = ""; + if (destinationCase_ == 2) { + ref = destination_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (destinationCase_ == 2) { + destination_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATA_FORMAT_FIELD_NUMBER = 3; + private int dataFormat_; + /** + * + * + *
+   * The data format of the exported test cases. If not specified, `BLOB` is
+   * assumed.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.DataFormat data_format = 3; + * + * @return The enum numeric value on the wire for dataFormat. + */ + @java.lang.Override + public int getDataFormatValue() { + return dataFormat_; + } + /** + * + * + *
+   * The data format of the exported test cases. If not specified, `BLOB` is
+   * assumed.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.DataFormat data_format = 3; + * + * @return The dataFormat. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.DataFormat getDataFormat() { + @SuppressWarnings("deprecation") + com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.DataFormat result = + com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.DataFormat.valueOf(dataFormat_); + return result == null + ? com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.DataFormat.UNRECOGNIZED + : result; + } + + public static final int FILTER_FIELD_NUMBER = 4; + private volatile java.lang.Object 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 = <value> [OR name = <value>] ...
+   * For example:
+   * *   "name = t1 OR name = t2" matches the test case with the exact resource
+   *     name "t1" or "t2".
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * 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 = <value> [OR name = <value>] ...
+   * For example:
+   * *   "name = t1 OR name = t2" matches the test case with the exact resource
+   *     name "t1" or "t2".
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (destinationCase_ == 2) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, destination_); + } + if (dataFormat_ + != com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.DataFormat + .DATA_FORMAT_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, dataFormat_); + } + if (!getFilterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (destinationCase_ == 2) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, destination_); + } + if (dataFormat_ + != com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.DataFormat + .DATA_FORMAT_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, dataFormat_); + } + if (!getFilterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest other = + (com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (dataFormat_ != other.dataFormat_) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getDestinationCase().equals(other.getDestinationCase())) return false; + switch (destinationCase_) { + case 2: + if (!getGcsUri().equals(other.getGcsUri())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + DATA_FORMAT_FIELD_NUMBER; + hash = (53 * hash) + dataFormat_; + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + switch (destinationCase_) { + case 2: + hash = (37 * hash) + GCS_URI_FIELD_NUMBER; + hash = (53 * hash) + getGcsUri().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for [TestCases.ExportTestCases][google.cloud.dialogflow.cx.v3.TestCases.ExportTestCases].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ExportTestCasesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ExportTestCasesRequest) + com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ExportTestCasesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ExportTestCasesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.class, + com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + dataFormat_ = 0; + + filter_ = ""; + + destinationCase_ = 0; + destination_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ExportTestCasesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest build() { + com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest result = + new com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest(this); + result.parent_ = parent_; + if (destinationCase_ == 2) { + result.destination_ = destination_; + } + result.dataFormat_ = dataFormat_; + result.filter_ = filter_; + result.destinationCase_ = destinationCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.dataFormat_ != 0) { + setDataFormatValue(other.getDataFormatValue()); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + switch (other.getDestinationCase()) { + case GCS_URI: + { + destinationCase_ = 2; + destination_ = other.destination_; + onChanged(); + break; + } + case DESTINATION_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int destinationCase_ = 0; + private java.lang.Object destination_; + + public DestinationCase getDestinationCase() { + return DestinationCase.forNumber(destinationCase_); + } + + public Builder clearDestination() { + destinationCase_ = 0; + destination_ = null; + onChanged(); + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The agent where to export test cases from.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The agent where to export test cases from.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The agent where to export test cases from.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The agent where to export test cases from.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The agent where to export test cases from.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + 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://<bucket-name>/<object-name>`. If unspecified, the serialized test
+     * cases is returned inline.
+     * 
+ * + * string gcs_uri = 2; + * + * @return The gcsUri. + */ + @java.lang.Override + public java.lang.String getGcsUri() { + java.lang.Object ref = ""; + if (destinationCase_ == 2) { + ref = destination_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (destinationCase_ == 2) { + destination_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * 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://<bucket-name>/<object-name>`. If unspecified, the serialized test
+     * cases is returned inline.
+     * 
+ * + * string gcs_uri = 2; + * + * @return The bytes for gcsUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGcsUriBytes() { + java.lang.Object ref = ""; + if (destinationCase_ == 2) { + ref = destination_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (destinationCase_ == 2) { + destination_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * 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://<bucket-name>/<object-name>`. If unspecified, the serialized test
+     * cases is returned inline.
+     * 
+ * + * string gcs_uri = 2; + * + * @param value The gcsUri to set. + * @return This builder for chaining. + */ + public Builder setGcsUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + destinationCase_ = 2; + destination_ = value; + onChanged(); + 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://<bucket-name>/<object-name>`. If unspecified, the serialized test
+     * cases is returned inline.
+     * 
+ * + * string gcs_uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearGcsUri() { + if (destinationCase_ == 2) { + destinationCase_ = 0; + destination_ = null; + onChanged(); + } + 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://<bucket-name>/<object-name>`. If unspecified, the serialized test
+     * cases is returned inline.
+     * 
+ * + * string gcs_uri = 2; + * + * @param value The bytes for gcsUri to set. + * @return This builder for chaining. + */ + public Builder setGcsUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + destinationCase_ = 2; + destination_ = value; + onChanged(); + return this; + } + + private int dataFormat_ = 0; + /** + * + * + *
+     * The data format of the exported test cases. If not specified, `BLOB` is
+     * assumed.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.DataFormat data_format = 3; + * + * + * @return The enum numeric value on the wire for dataFormat. + */ + @java.lang.Override + public int getDataFormatValue() { + return dataFormat_; + } + /** + * + * + *
+     * The data format of the exported test cases. If not specified, `BLOB` is
+     * assumed.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.DataFormat data_format = 3; + * + * + * @param value The enum numeric value on the wire for dataFormat to set. + * @return This builder for chaining. + */ + public Builder setDataFormatValue(int value) { + + dataFormat_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The data format of the exported test cases. If not specified, `BLOB` is
+     * assumed.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.DataFormat data_format = 3; + * + * + * @return The dataFormat. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.DataFormat getDataFormat() { + @SuppressWarnings("deprecation") + com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.DataFormat result = + com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.DataFormat.valueOf(dataFormat_); + return result == null + ? com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.DataFormat.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The data format of the exported test cases. If not specified, `BLOB` is
+     * assumed.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.DataFormat data_format = 3; + * + * + * @param value The dataFormat to set. + * @return This builder for chaining. + */ + public Builder setDataFormat( + com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.DataFormat value) { + if (value == null) { + throw new NullPointerException(); + } + + dataFormat_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The data format of the exported test cases. If not specified, `BLOB` is
+     * assumed.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.DataFormat data_format = 3; + * + * + * @return This builder for chaining. + */ + public Builder clearDataFormat() { + + dataFormat_ = 0; + onChanged(); + return this; + } + + private java.lang.Object 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 = <value> [OR name = <value>] ...
+     * For example:
+     * *   "name = t1 OR name = t2" matches the test case with the exact resource
+     *     name "t1" or "t2".
+     * 
+ * + * string filter = 4; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * 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 = <value> [OR name = <value>] ...
+     * For example:
+     * *   "name = t1 OR name = t2" matches the test case with the exact resource
+     *     name "t1" or "t2".
+     * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * 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 = <value> [OR name = <value>] ...
+     * For example:
+     * *   "name = t1 OR name = t2" matches the test case with the exact resource
+     *     name "t1" or "t2".
+     * 
+ * + * string filter = 4; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + 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 = <value> [OR name = <value>] ...
+     * For example:
+     * *   "name = t1 OR name = t2" matches the test case with the exact resource
+     *     name "t1" or "t2".
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + 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 = <value> [OR name = <value>] ...
+     * For example:
+     * *   "name = t1 OR name = t2" matches the test case with the exact resource
+     *     name "t1" or "t2".
+     * 
+ * + * string filter = 4; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.ExportTestCasesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ExportTestCasesRequest) + private static final com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExportTestCasesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ExportTestCasesRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportTestCasesRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportTestCasesRequestOrBuilder.java new file mode 100644 index 000000000..535ebcdd8 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportTestCasesRequestOrBuilder.java @@ -0,0 +1,154 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/test_case.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface ExportTestCasesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ExportTestCasesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The agent where to export test cases from.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The agent where to export test cases from.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * 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://<bucket-name>/<object-name>`. If unspecified, the serialized test
+   * cases is returned inline.
+   * 
+ * + * string gcs_uri = 2; + * + * @return The gcsUri. + */ + java.lang.String getGcsUri(); + /** + * + * + *
+   * 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://<bucket-name>/<object-name>`. If unspecified, the serialized test
+   * cases is returned inline.
+   * 
+ * + * string gcs_uri = 2; + * + * @return The bytes for gcsUri. + */ + com.google.protobuf.ByteString getGcsUriBytes(); + + /** + * + * + *
+   * The data format of the exported test cases. If not specified, `BLOB` is
+   * assumed.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.DataFormat data_format = 3; + * + * @return The enum numeric value on the wire for dataFormat. + */ + int getDataFormatValue(); + /** + * + * + *
+   * The data format of the exported test cases. If not specified, `BLOB` is
+   * assumed.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.DataFormat data_format = 3; + * + * @return The dataFormat. + */ + com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.DataFormat getDataFormat(); + + /** + * + * + *
+   * 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 = <value> [OR name = <value>] ...
+   * For example:
+   * *   "name = t1 OR name = t2" matches the test case with the exact resource
+   *     name "t1" or "t2".
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * 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 = <value> [OR name = <value>] ...
+   * For example:
+   * *   "name = t1 OR name = t2" matches the test case with the exact resource
+   *     name "t1" or "t2".
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + public com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.DestinationCase + getDestinationCase(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportTestCasesResponse.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportTestCasesResponse.java new file mode 100644 index 000000000..51ff6d42b --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportTestCasesResponse.java @@ -0,0 +1,862 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/test_case.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The response message for [TestCases.ExportTestCases][google.cloud.dialogflow.cx.v3.TestCases.ExportTestCases].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ExportTestCasesResponse} + */ +public final class ExportTestCasesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ExportTestCasesResponse) + ExportTestCasesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExportTestCasesResponse.newBuilder() to construct. + private ExportTestCasesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExportTestCasesResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExportTestCasesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ExportTestCasesResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + destinationCase_ = 1; + destination_ = s; + break; + } + case 18: + { + destinationCase_ = 2; + destination_ = input.readBytes(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ExportTestCasesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ExportTestCasesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse.class, + com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse.Builder.class); + } + + private int destinationCase_ = 0; + private java.lang.Object destination_; + + public enum DestinationCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GCS_URI(1), + CONTENT(2), + DESTINATION_NOT_SET(0); + private final int value; + + private DestinationCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DestinationCase valueOf(int value) { + return forNumber(value); + } + + public static DestinationCase forNumber(int value) { + switch (value) { + case 1: + return GCS_URI; + case 2: + return CONTENT; + case 0: + return DESTINATION_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public DestinationCase getDestinationCase() { + return DestinationCase.forNumber(destinationCase_); + } + + public static final int GCS_URI_FIELD_NUMBER = 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].
+   * 
+ * + * string gcs_uri = 1; + * + * @return The gcsUri. + */ + public java.lang.String getGcsUri() { + java.lang.Object ref = ""; + if (destinationCase_ == 1) { + ref = destination_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (destinationCase_ == 1) { + destination_ = s; + } + return s; + } + } + /** + * + * + *
+   * 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].
+   * 
+ * + * string gcs_uri = 1; + * + * @return The bytes for gcsUri. + */ + public com.google.protobuf.ByteString getGcsUriBytes() { + java.lang.Object ref = ""; + if (destinationCase_ == 1) { + ref = destination_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (destinationCase_ == 1) { + destination_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONTENT_FIELD_NUMBER = 2; + /** + * + * + *
+   * Uncompressed raw byte content for test cases.
+   * 
+ * + * bytes content = 2; + * + * @return The content. + */ + @java.lang.Override + public com.google.protobuf.ByteString getContent() { + if (destinationCase_ == 2) { + return (com.google.protobuf.ByteString) destination_; + } + return com.google.protobuf.ByteString.EMPTY; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (destinationCase_ == 1) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, destination_); + } + if (destinationCase_ == 2) { + output.writeBytes(2, (com.google.protobuf.ByteString) destination_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (destinationCase_ == 1) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, destination_); + } + if (destinationCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeBytesSize( + 2, (com.google.protobuf.ByteString) destination_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse other = + (com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse) obj; + + if (!getDestinationCase().equals(other.getDestinationCase())) return false; + switch (destinationCase_) { + case 1: + if (!getGcsUri().equals(other.getGcsUri())) return false; + break; + case 2: + if (!getContent().equals(other.getContent())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (destinationCase_) { + case 1: + hash = (37 * hash) + GCS_URI_FIELD_NUMBER; + hash = (53 * hash) + getGcsUri().hashCode(); + break; + case 2: + hash = (37 * hash) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The response message for [TestCases.ExportTestCases][google.cloud.dialogflow.cx.v3.TestCases.ExportTestCases].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ExportTestCasesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ExportTestCasesResponse) + com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ExportTestCasesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ExportTestCasesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse.class, + com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + destinationCase_ = 0; + destination_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ExportTestCasesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse build() { + com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse buildPartial() { + com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse result = + new com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse(this); + if (destinationCase_ == 1) { + result.destination_ = destination_; + } + if (destinationCase_ == 2) { + result.destination_ = destination_; + } + result.destinationCase_ = destinationCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse other) { + if (other == com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse.getDefaultInstance()) + return this; + switch (other.getDestinationCase()) { + case GCS_URI: + { + destinationCase_ = 1; + destination_ = other.destination_; + onChanged(); + break; + } + case CONTENT: + { + setContent(other.getContent()); + break; + } + case DESTINATION_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int destinationCase_ = 0; + private java.lang.Object destination_; + + public DestinationCase getDestinationCase() { + return DestinationCase.forNumber(destinationCase_); + } + + public Builder clearDestination() { + destinationCase_ = 0; + destination_ = null; + onChanged(); + return this; + } + + /** + * + * + *
+     * 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].
+     * 
+ * + * string gcs_uri = 1; + * + * @return The gcsUri. + */ + @java.lang.Override + public java.lang.String getGcsUri() { + java.lang.Object ref = ""; + if (destinationCase_ == 1) { + ref = destination_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (destinationCase_ == 1) { + destination_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * 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].
+     * 
+ * + * string gcs_uri = 1; + * + * @return The bytes for gcsUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGcsUriBytes() { + java.lang.Object ref = ""; + if (destinationCase_ == 1) { + ref = destination_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (destinationCase_ == 1) { + destination_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * 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].
+     * 
+ * + * string gcs_uri = 1; + * + * @param value The gcsUri to set. + * @return This builder for chaining. + */ + public Builder setGcsUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + destinationCase_ = 1; + destination_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * 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].
+     * 
+ * + * string gcs_uri = 1; + * + * @return This builder for chaining. + */ + public Builder clearGcsUri() { + if (destinationCase_ == 1) { + destinationCase_ = 0; + destination_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * 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].
+     * 
+ * + * string gcs_uri = 1; + * + * @param value The bytes for gcsUri to set. + * @return This builder for chaining. + */ + public Builder setGcsUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + destinationCase_ = 1; + destination_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Uncompressed raw byte content for test cases.
+     * 
+ * + * bytes content = 2; + * + * @return The content. + */ + public com.google.protobuf.ByteString getContent() { + if (destinationCase_ == 2) { + return (com.google.protobuf.ByteString) destination_; + } + return com.google.protobuf.ByteString.EMPTY; + } + /** + * + * + *
+     * Uncompressed raw byte content for test cases.
+     * 
+ * + * bytes content = 2; + * + * @param value The content to set. + * @return This builder for chaining. + */ + public Builder setContent(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + destinationCase_ = 2; + destination_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Uncompressed raw byte content for test cases.
+     * 
+ * + * bytes content = 2; + * + * @return This builder for chaining. + */ + public Builder clearContent() { + if (destinationCase_ == 2) { + destinationCase_ = 0; + destination_ = null; + onChanged(); + } + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.ExportTestCasesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ExportTestCasesResponse) + private static final com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse(); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExportTestCasesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ExportTestCasesResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportTestCasesResponseOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportTestCasesResponseOrBuilder.java new file mode 100644 index 000000000..684efa3fd --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportTestCasesResponseOrBuilder.java @@ -0,0 +1,70 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/test_case.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface ExportTestCasesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ExportTestCasesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * 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].
+   * 
+ * + * string gcs_uri = 1; + * + * @return The gcsUri. + */ + java.lang.String getGcsUri(); + /** + * + * + *
+   * 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].
+   * 
+ * + * string gcs_uri = 1; + * + * @return The bytes for gcsUri. + */ + com.google.protobuf.ByteString getGcsUriBytes(); + + /** + * + * + *
+   * Uncompressed raw byte content for test cases.
+   * 
+ * + * bytes content = 2; + * + * @return The content. + */ + com.google.protobuf.ByteString getContent(); + + public com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse.DestinationCase + getDestinationCase(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowProto.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowProto.java index 71373fd19..a1aa60f19 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowProto.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowProto.java @@ -63,6 +63,18 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dialogflow_cx_v3_TrainFlowRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_cx_v3_TrainFlowRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_ValidateFlowRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_ValidateFlowRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_GetFlowValidationResultRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_GetFlowValidationResultRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_FlowValidationResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_FlowValidationResult_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -77,86 +89,111 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "e/api/annotations.proto\032\027google/api/clie" + "nt.proto\032\037google/api/field_behavior.prot" + "o\032\031google/api/resource.proto\032(google/clo" - + "ud/dialogflow/cx/v3/page.proto\032#google/l" - + "ongrunning/operations.proto\032\033google/prot" - + "obuf/empty.proto\032 google/protobuf/field_" - + "mask.proto\032\037google/protobuf/timestamp.pr" - + "oto\"\254\003\n\013NluSettings\022H\n\nmodel_type\030\001 \001(\0162" - + "4.google.cloud.dialogflow.cx.v3.NluSetti" - + "ngs.ModelType\022 \n\030classification_threshol" - + "d\030\003 \001(\002\022Y\n\023model_training_mode\030\004 \001(\0162<.g" - + "oogle.cloud.dialogflow.cx.v3.NluSettings" - + ".ModelTrainingMode\"Y\n\tModelType\022\032\n\026MODEL" - + "_TYPE_UNSPECIFIED\020\000\022\027\n\023MODEL_TYPE_STANDA" - + "RD\020\001\022\027\n\023MODEL_TYPE_ADVANCED\020\003\"{\n\021ModelTr" - + "ainingMode\022#\n\037MODEL_TRAINING_MODE_UNSPEC" - + "IFIED\020\000\022!\n\035MODEL_TRAINING_MODE_AUTOMATIC" - + "\020\001\022\036\n\032MODEL_TRAINING_MODE_MANUAL\020\002\"\200\003\n\004F" - + "low\022\014\n\004name\030\001 \001(\t\022\031\n\014display_name\030\002 \001(\tB" - + "\003\340A\002\022\023\n\013description\030\003 \001(\t\022I\n\021transition_" - + "routes\030\004 \003(\0132..google.cloud.dialogflow.c" - + "x.v3.TransitionRoute\022C\n\016event_handlers\030\n" - + " \003(\0132+.google.cloud.dialogflow.cx.v3.Eve" - + "ntHandler\022@\n\014nlu_settings\030\013 \001(\0132*.google" - + ".cloud.dialogflow.cx.v3.NluSettings:h\352Ae" - + "\n\036dialogflow.googleapis.com/Flow\022Cprojec" - + "ts/{project}/locations/{location}/agents" - + "/{agent}/flows/{flow}\"\232\001\n\021CreateFlowRequ" - + "est\0226\n\006parent\030\001 \001(\tB&\340A\002\372A \022\036dialogflow." - + "googleapis.com/Flow\0226\n\004flow\030\002 \001(\0132#.goog" - + "le.cloud.dialogflow.cx.v3.FlowB\003\340A\002\022\025\n\rl" - + "anguage_code\030\003 \001(\t\"X\n\021DeleteFlowRequest\022" - + "4\n\004name\030\001 \001(\tB&\340A\002\372A \n\036dialogflow.google" - + "apis.com/Flow\022\r\n\005force\030\002 \001(\010\"\210\001\n\020ListFlo" - + "wsRequest\0226\n\006parent\030\001 \001(\tB&\340A\002\372A \022\036dialo" - + "gflow.googleapis.com/Flow\022\021\n\tpage_size\030\002" - + " \001(\005\022\022\n\npage_token\030\003 \001(\t\022\025\n\rlanguage_cod" - + "e\030\004 \001(\t\"`\n\021ListFlowsResponse\0222\n\005flows\030\001 " - + "\003(\0132#.google.cloud.dialogflow.cx.v3.Flow" - + "\022\027\n\017next_page_token\030\002 \001(\t\"]\n\016GetFlowRequ" - + "est\0224\n\004name\030\001 \001(\tB&\340A\002\372A \n\036dialogflow.go" - + "ogleapis.com/Flow\022\025\n\rlanguage_code\030\002 \001(\t" - + "\"\230\001\n\021UpdateFlowRequest\0226\n\004flow\030\001 \001(\0132#.g" - + "oogle.cloud.dialogflow.cx.v3.FlowB\003\340A\002\0224" - + "\n\013update_mask\030\002 \001(\0132\032.google.protobuf.Fi" - + "eldMaskB\003\340A\002\022\025\n\rlanguage_code\030\003 \001(\t\"H\n\020T" - + "rainFlowRequest\0224\n\004name\030\001 \001(\tB&\340A\002\372A \n\036d" - + "ialogflow.googleapis.com/Flow2\310\t\n\005Flows\022" - + "\263\001\n\nCreateFlow\0220.google.cloud.dialogflow" - + ".cx.v3.CreateFlowRequest\032#.google.cloud." - + "dialogflow.cx.v3.Flow\"N\202\323\344\223\002:\"2/v3/{pare" - + "nt=projects/*/locations/*/agents/*}/flow" - + "s:\004flow\332A\013parent,flow\022\231\001\n\nDeleteFlow\0220.g" - + "oogle.cloud.dialogflow.cx.v3.DeleteFlowR" - + "equest\032\026.google.protobuf.Empty\"A\202\323\344\223\0024*2" - + "/v3/{name=projects/*/locations/*/agents/" - + "*/flows/*}\332A\004name\022\263\001\n\tListFlows\022/.google" - + ".cloud.dialogflow.cx.v3.ListFlowsRequest" - + "\0320.google.cloud.dialogflow.cx.v3.ListFlo" - + "wsResponse\"C\202\323\344\223\0024\0222/v3/{parent=projects" - + "/*/locations/*/agents/*}/flows\332A\006parent\022" - + "\240\001\n\007GetFlow\022-.google.cloud.dialogflow.cx" - + ".v3.GetFlowRequest\032#.google.cloud.dialog" - + "flow.cx.v3.Flow\"A\202\323\344\223\0024\0222/v3/{name=proje" - + "cts/*/locations/*/agents/*/flows/*}\332A\004na" - + "me\022\275\001\n\nUpdateFlow\0220.google.cloud.dialogf" - + "low.cx.v3.UpdateFlowRequest\032#.google.clo" - + "ud.dialogflow.cx.v3.Flow\"X\202\323\344\223\002?27/v3/{f" - + "low.name=projects/*/locations/*/agents/*" - + "/flows/*}:\004flow\332A\020flow,update_mask\022\331\001\n\tT" - + "rainFlow\022/.google.cloud.dialogflow.cx.v3" - + ".TrainFlowRequest\032\035.google.longrunning.O" - + "peration\"|\202\323\344\223\002=\"8/v3/{name=projects/*/l" - + "ocations/*/agents/*/flows/*}:train:\001*\332A\004" - + "name\312A/\n\025google.protobuf.Empty\022\026google.p" - + "rotobuf.Struct\032x\312A\031dialogflow.googleapis" - + ".com\322AYhttps://www.googleapis.com/auth/c" - + "loud-platform,https://www.googleapis.com" - + "/auth/dialogflowB\231\001\n!com.google.cloud.di" - + "alogflow.cx.v3B\tFlowProtoP\001Z?google.gola" - + "ng.org/genproto/googleapis/cloud/dialogf" - + "low/cx/v3;cx\370\001\001\242\002\002DF\252\002\035Google.Cloud.Dial" - + "ogflow.Cx.V3b\006proto3" + + "ud/dialogflow/cx/v3/page.proto\0326google/c" + + "loud/dialogflow/cx/v3/validation_message" + + ".proto\032#google/longrunning/operations.pr" + + "oto\032\033google/protobuf/empty.proto\032 google" + + "/protobuf/field_mask.proto\032\037google/proto" + + "buf/timestamp.proto\"\254\003\n\013NluSettings\022H\n\nm" + + "odel_type\030\001 \001(\01624.google.cloud.dialogflo" + + "w.cx.v3.NluSettings.ModelType\022 \n\030classif" + + "ication_threshold\030\003 \001(\002\022Y\n\023model_trainin" + + "g_mode\030\004 \001(\0162<.google.cloud.dialogflow.c" + + "x.v3.NluSettings.ModelTrainingMode\"Y\n\tMo" + + "delType\022\032\n\026MODEL_TYPE_UNSPECIFIED\020\000\022\027\n\023M" + + "ODEL_TYPE_STANDARD\020\001\022\027\n\023MODEL_TYPE_ADVAN" + + "CED\020\003\"{\n\021ModelTrainingMode\022#\n\037MODEL_TRAI" + + "NING_MODE_UNSPECIFIED\020\000\022!\n\035MODEL_TRAININ" + + "G_MODE_AUTOMATIC\020\001\022\036\n\032MODEL_TRAINING_MOD" + + "E_MANUAL\020\002\"\200\003\n\004Flow\022\014\n\004name\030\001 \001(\t\022\031\n\014dis" + + "play_name\030\002 \001(\tB\003\340A\002\022\023\n\013description\030\003 \001(" + + "\t\022I\n\021transition_routes\030\004 \003(\0132..google.cl" + + "oud.dialogflow.cx.v3.TransitionRoute\022C\n\016" + + "event_handlers\030\n \003(\0132+.google.cloud.dial" + + "ogflow.cx.v3.EventHandler\022@\n\014nlu_setting" + + "s\030\013 \001(\0132*.google.cloud.dialogflow.cx.v3." + + "NluSettings:h\352Ae\n\036dialogflow.googleapis." + + "com/Flow\022Cprojects/{project}/locations/{" + + "location}/agents/{agent}/flows/{flow}\"\232\001" + + "\n\021CreateFlowRequest\0226\n\006parent\030\001 \001(\tB&\340A\002" + + "\372A \022\036dialogflow.googleapis.com/Flow\0226\n\004f" + + "low\030\002 \001(\0132#.google.cloud.dialogflow.cx.v" + + "3.FlowB\003\340A\002\022\025\n\rlanguage_code\030\003 \001(\t\"X\n\021De" + + "leteFlowRequest\0224\n\004name\030\001 \001(\tB&\340A\002\372A \n\036d" + + "ialogflow.googleapis.com/Flow\022\r\n\005force\030\002" + + " \001(\010\"\210\001\n\020ListFlowsRequest\0226\n\006parent\030\001 \001(" + + "\tB&\340A\002\372A \022\036dialogflow.googleapis.com/Flo" + + "w\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t" + + "\022\025\n\rlanguage_code\030\004 \001(\t\"`\n\021ListFlowsResp" + + "onse\0222\n\005flows\030\001 \003(\0132#.google.cloud.dialo" + + "gflow.cx.v3.Flow\022\027\n\017next_page_token\030\002 \001(" + + "\t\"]\n\016GetFlowRequest\0224\n\004name\030\001 \001(\tB&\340A\002\372A" + + " \n\036dialogflow.googleapis.com/Flow\022\025\n\rlan" + + "guage_code\030\002 \001(\t\"\230\001\n\021UpdateFlowRequest\0226" + + "\n\004flow\030\001 \001(\0132#.google.cloud.dialogflow.c" + + "x.v3.FlowB\003\340A\002\0224\n\013update_mask\030\002 \001(\0132\032.go" + + "ogle.protobuf.FieldMaskB\003\340A\002\022\025\n\rlanguage" + + "_code\030\003 \001(\t\"H\n\020TrainFlowRequest\0224\n\004name\030" + + "\001 \001(\tB&\340A\002\372A \n\036dialogflow.googleapis.com" + + "/Flow\"b\n\023ValidateFlowRequest\0224\n\004name\030\001 \001" + + "(\tB&\340A\002\372A \n\036dialogflow.googleapis.com/Fl" + + "ow\022\025\n\rlanguage_code\030\002 \001(\t\"}\n\036GetFlowVali" + + "dationResultRequest\022D\n\004name\030\001 \001(\tB6\340A\002\372A" + + "0\n.dialogflow.googleapis.com/FlowValidat" + + "ionResult\022\025\n\rlanguage_code\030\002 \001(\t\"\261\002\n\024Flo" + + "wValidationResult\022\014\n\004name\030\001 \001(\t\022M\n\023valid" + + "ation_messages\030\002 \003(\01320.google.cloud.dial" + + "ogflow.cx.v3.ValidationMessage\022/\n\013update" + + "_time\030\003 \001(\0132\032.google.protobuf.Timestamp:" + + "\212\001\352A\206\001\n.dialogflow.googleapis.com/FlowVa" + + "lidationResult\022Tprojects/{project}/locat" + + "ions/{location}/agents/{agent}/flows/{fl" + + "ow}/validationResult2\356\014\n\005Flows\022\263\001\n\nCreat" + + "eFlow\0220.google.cloud.dialogflow.cx.v3.Cr" + + "eateFlowRequest\032#.google.cloud.dialogflo" + + "w.cx.v3.Flow\"N\202\323\344\223\002:\"2/v3/{parent=projec" + + "ts/*/locations/*/agents/*}/flows:\004flow\332A" + + "\013parent,flow\022\231\001\n\nDeleteFlow\0220.google.clo" + + "ud.dialogflow.cx.v3.DeleteFlowRequest\032\026." + + "google.protobuf.Empty\"A\202\323\344\223\0024*2/v3/{name" + + "=projects/*/locations/*/agents/*/flows/*" + + "}\332A\004name\022\263\001\n\tListFlows\022/.google.cloud.di" + + "alogflow.cx.v3.ListFlowsRequest\0320.google" + + ".cloud.dialogflow.cx.v3.ListFlowsRespons" + + "e\"C\202\323\344\223\0024\0222/v3/{parent=projects/*/locati" + + "ons/*/agents/*}/flows\332A\006parent\022\240\001\n\007GetFl" + + "ow\022-.google.cloud.dialogflow.cx.v3.GetFl" + + "owRequest\032#.google.cloud.dialogflow.cx.v" + + "3.Flow\"A\202\323\344\223\0024\0222/v3/{name=projects/*/loc" + + "ations/*/agents/*/flows/*}\332A\004name\022\275\001\n\nUp" + + "dateFlow\0220.google.cloud.dialogflow.cx.v3" + + ".UpdateFlowRequest\032#.google.cloud.dialog" + + "flow.cx.v3.Flow\"X\202\323\344\223\002?27/v3/{flow.name=" + + "projects/*/locations/*/agents/*/flows/*}" + + ":\004flow\332A\020flow,update_mask\022\331\001\n\tTrainFlow\022" + + "/.google.cloud.dialogflow.cx.v3.TrainFlo" + + "wRequest\032\035.google.longrunning.Operation\"" + + "|\202\323\344\223\002=\"8/v3/{name=projects/*/locations/" + + "*/agents/*/flows/*}:train:\001*\332A\004name\312A/\n\025" + + "google.protobuf.Empty\022\026google.protobuf.S" + + "truct\022\277\001\n\014ValidateFlow\0222.google.cloud.di" + + "alogflow.cx.v3.ValidateFlowRequest\0323.goo" + + "gle.cloud.dialogflow.cx.v3.FlowValidatio" + + "nResult\"F\202\323\344\223\002@\";/v3/{name=projects/*/lo" + + "cations/*/agents/*/flows/*}:validate:\001*\022" + + "\341\001\n\027GetFlowValidationResult\022=.google.clo" + + "ud.dialogflow.cx.v3.GetFlowValidationRes" + + "ultRequest\0323.google.cloud.dialogflow.cx." + + "v3.FlowValidationResult\"R\202\323\344\223\002E\022C/v3/{na" + + "me=projects/*/locations/*/agents/*/flows" + + "/*/validationResult}\332A\004name\032x\312A\031dialogfl" + + "ow.googleapis.com\322AYhttps://www.googleap" + + "is.com/auth/cloud-platform,https://www.g" + + "oogleapis.com/auth/dialogflowB\231\001\n!com.go" + + "ogle.cloud.dialogflow.cx.v3B\tFlowProtoP\001" + + "Z?google.golang.org/genproto/googleapis/" + + "cloud/dialogflow/cx/v3;cx\370\001\001\242\002\002DF\252\002\035Goog" + + "le.Cloud.Dialogflow.Cx.V3b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -167,6 +204,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), com.google.cloud.dialogflow.cx.v3.PageProto.getDescriptor(), + com.google.cloud.dialogflow.cx.v3.ValidationMessageProto.getDescriptor(), com.google.longrunning.OperationsProto.getDescriptor(), com.google.protobuf.EmptyProto.getDescriptor(), com.google.protobuf.FieldMaskProto.getDescriptor(), @@ -249,6 +287,30 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Name", }); + internal_static_google_cloud_dialogflow_cx_v3_ValidateFlowRequest_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_dialogflow_cx_v3_ValidateFlowRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_ValidateFlowRequest_descriptor, + new java.lang.String[] { + "Name", "LanguageCode", + }); + internal_static_google_cloud_dialogflow_cx_v3_GetFlowValidationResultRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_dialogflow_cx_v3_GetFlowValidationResultRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_GetFlowValidationResultRequest_descriptor, + new java.lang.String[] { + "Name", "LanguageCode", + }); + internal_static_google_cloud_dialogflow_cx_v3_FlowValidationResult_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_dialogflow_cx_v3_FlowValidationResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_FlowValidationResult_descriptor, + new java.lang.String[] { + "Name", "ValidationMessages", "UpdateTime", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.ClientProto.defaultHost); @@ -266,6 +328,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); com.google.cloud.dialogflow.cx.v3.PageProto.getDescriptor(); + com.google.cloud.dialogflow.cx.v3.ValidationMessageProto.getDescriptor(); com.google.longrunning.OperationsProto.getDescriptor(); com.google.protobuf.EmptyProto.getDescriptor(); com.google.protobuf.FieldMaskProto.getDescriptor(); diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowValidationResult.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowValidationResult.java new file mode 100644 index 000000000..10345510c --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowValidationResult.java @@ -0,0 +1,1453 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/flow.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The response message for [Flows.GetFlowValidationResult][google.cloud.dialogflow.cx.v3.Flows.GetFlowValidationResult].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.FlowValidationResult} + */ +public final class FlowValidationResult extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.FlowValidationResult) + FlowValidationResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use FlowValidationResult.newBuilder() to construct. + private FlowValidationResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FlowValidationResult() { + name_ = ""; + validationMessages_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FlowValidationResult(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private FlowValidationResult( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + validationMessages_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + validationMessages_.add( + input.readMessage( + com.google.cloud.dialogflow.cx.v3.ValidationMessage.parser(), + extensionRegistry)); + break; + } + case 26: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + validationMessages_ = java.util.Collections.unmodifiableList(validationMessages_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.FlowProto + .internal_static_google_cloud_dialogflow_cx_v3_FlowValidationResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.FlowProto + .internal_static_google_cloud_dialogflow_cx_v3_FlowValidationResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.FlowValidationResult.class, + com.google.cloud.dialogflow.cx.v3.FlowValidationResult.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * The unique identifier of the flow validation result.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>/validationResult`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * The unique identifier of the flow validation result.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>/validationResult`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALIDATION_MESSAGES_FIELD_NUMBER = 2; + private java.util.List validationMessages_; + /** + * + * + *
+   * Contains all validation messages.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ValidationMessage validation_messages = 2; + */ + @java.lang.Override + public java.util.List + getValidationMessagesList() { + return validationMessages_; + } + /** + * + * + *
+   * Contains all validation messages.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ValidationMessage validation_messages = 2; + */ + @java.lang.Override + public java.util.List + getValidationMessagesOrBuilderList() { + return validationMessages_; + } + /** + * + * + *
+   * Contains all validation messages.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ValidationMessage validation_messages = 2; + */ + @java.lang.Override + public int getValidationMessagesCount() { + return validationMessages_.size(); + } + /** + * + * + *
+   * Contains all validation messages.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ValidationMessage validation_messages = 2; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ValidationMessage getValidationMessages(int index) { + return validationMessages_.get(index); + } + /** + * + * + *
+   * Contains all validation messages.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ValidationMessage validation_messages = 2; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ValidationMessageOrBuilder + getValidationMessagesOrBuilder(int index) { + return validationMessages_.get(index); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Last time the flow was validated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3; + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Last time the flow was validated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3; + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Last time the flow was validated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + for (int i = 0; i < validationMessages_.size(); i++) { + output.writeMessage(2, validationMessages_.get(i)); + } + if (updateTime_ != null) { + output.writeMessage(3, getUpdateTime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + for (int i = 0; i < validationMessages_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, validationMessages_.get(i)); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.FlowValidationResult)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.FlowValidationResult other = + (com.google.cloud.dialogflow.cx.v3.FlowValidationResult) obj; + + if (!getName().equals(other.getName())) return false; + if (!getValidationMessagesList().equals(other.getValidationMessagesList())) return false; + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getValidationMessagesCount() > 0) { + hash = (37 * hash) + VALIDATION_MESSAGES_FIELD_NUMBER; + hash = (53 * hash) + getValidationMessagesList().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.FlowValidationResult parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.FlowValidationResult parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.FlowValidationResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.FlowValidationResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.FlowValidationResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.FlowValidationResult parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.FlowValidationResult parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.FlowValidationResult parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.FlowValidationResult parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.FlowValidationResult parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.FlowValidationResult parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.FlowValidationResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3.FlowValidationResult prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The response message for [Flows.GetFlowValidationResult][google.cloud.dialogflow.cx.v3.Flows.GetFlowValidationResult].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.FlowValidationResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.FlowValidationResult) + com.google.cloud.dialogflow.cx.v3.FlowValidationResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.FlowProto + .internal_static_google_cloud_dialogflow_cx_v3_FlowValidationResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.FlowProto + .internal_static_google_cloud_dialogflow_cx_v3_FlowValidationResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.FlowValidationResult.class, + com.google.cloud.dialogflow.cx.v3.FlowValidationResult.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.FlowValidationResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getValidationMessagesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (validationMessagesBuilder_ == null) { + validationMessages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + validationMessagesBuilder_.clear(); + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.FlowProto + .internal_static_google_cloud_dialogflow_cx_v3_FlowValidationResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.FlowValidationResult getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.FlowValidationResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.FlowValidationResult build() { + com.google.cloud.dialogflow.cx.v3.FlowValidationResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.FlowValidationResult buildPartial() { + com.google.cloud.dialogflow.cx.v3.FlowValidationResult result = + new com.google.cloud.dialogflow.cx.v3.FlowValidationResult(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + if (validationMessagesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + validationMessages_ = java.util.Collections.unmodifiableList(validationMessages_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.validationMessages_ = validationMessages_; + } else { + result.validationMessages_ = validationMessagesBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.FlowValidationResult) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.FlowValidationResult) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.FlowValidationResult other) { + if (other == com.google.cloud.dialogflow.cx.v3.FlowValidationResult.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (validationMessagesBuilder_ == null) { + if (!other.validationMessages_.isEmpty()) { + if (validationMessages_.isEmpty()) { + validationMessages_ = other.validationMessages_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValidationMessagesIsMutable(); + validationMessages_.addAll(other.validationMessages_); + } + onChanged(); + } + } else { + if (!other.validationMessages_.isEmpty()) { + if (validationMessagesBuilder_.isEmpty()) { + validationMessagesBuilder_.dispose(); + validationMessagesBuilder_ = null; + validationMessages_ = other.validationMessages_; + bitField0_ = (bitField0_ & ~0x00000001); + validationMessagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getValidationMessagesFieldBuilder() + : null; + } else { + validationMessagesBuilder_.addAllMessages(other.validationMessages_); + } + } + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.FlowValidationResult parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.FlowValidationResult) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The unique identifier of the flow validation result.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>/validationResult`.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The unique identifier of the flow validation result.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>/validationResult`.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The unique identifier of the flow validation result.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>/validationResult`.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The unique identifier of the flow validation result.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>/validationResult`.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The unique identifier of the flow validation result.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>/validationResult`.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.util.List + validationMessages_ = java.util.Collections.emptyList(); + + private void ensureValidationMessagesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + validationMessages_ = + new java.util.ArrayList( + validationMessages_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ValidationMessage, + com.google.cloud.dialogflow.cx.v3.ValidationMessage.Builder, + com.google.cloud.dialogflow.cx.v3.ValidationMessageOrBuilder> + validationMessagesBuilder_; + + /** + * + * + *
+     * Contains all validation messages.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ValidationMessage validation_messages = 2; + * + */ + public java.util.List + getValidationMessagesList() { + if (validationMessagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(validationMessages_); + } else { + return validationMessagesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Contains all validation messages.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ValidationMessage validation_messages = 2; + * + */ + public int getValidationMessagesCount() { + if (validationMessagesBuilder_ == null) { + return validationMessages_.size(); + } else { + return validationMessagesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Contains all validation messages.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ValidationMessage validation_messages = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3.ValidationMessage getValidationMessages(int index) { + if (validationMessagesBuilder_ == null) { + return validationMessages_.get(index); + } else { + return validationMessagesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Contains all validation messages.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ValidationMessage validation_messages = 2; + * + */ + public Builder setValidationMessages( + int index, com.google.cloud.dialogflow.cx.v3.ValidationMessage value) { + if (validationMessagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValidationMessagesIsMutable(); + validationMessages_.set(index, value); + onChanged(); + } else { + validationMessagesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Contains all validation messages.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ValidationMessage validation_messages = 2; + * + */ + public Builder setValidationMessages( + int index, com.google.cloud.dialogflow.cx.v3.ValidationMessage.Builder builderForValue) { + if (validationMessagesBuilder_ == null) { + ensureValidationMessagesIsMutable(); + validationMessages_.set(index, builderForValue.build()); + onChanged(); + } else { + validationMessagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Contains all validation messages.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ValidationMessage validation_messages = 2; + * + */ + public Builder addValidationMessages( + com.google.cloud.dialogflow.cx.v3.ValidationMessage value) { + if (validationMessagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValidationMessagesIsMutable(); + validationMessages_.add(value); + onChanged(); + } else { + validationMessagesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Contains all validation messages.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ValidationMessage validation_messages = 2; + * + */ + public Builder addValidationMessages( + int index, com.google.cloud.dialogflow.cx.v3.ValidationMessage value) { + if (validationMessagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValidationMessagesIsMutable(); + validationMessages_.add(index, value); + onChanged(); + } else { + validationMessagesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Contains all validation messages.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ValidationMessage validation_messages = 2; + * + */ + public Builder addValidationMessages( + com.google.cloud.dialogflow.cx.v3.ValidationMessage.Builder builderForValue) { + if (validationMessagesBuilder_ == null) { + ensureValidationMessagesIsMutable(); + validationMessages_.add(builderForValue.build()); + onChanged(); + } else { + validationMessagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Contains all validation messages.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ValidationMessage validation_messages = 2; + * + */ + public Builder addValidationMessages( + int index, com.google.cloud.dialogflow.cx.v3.ValidationMessage.Builder builderForValue) { + if (validationMessagesBuilder_ == null) { + ensureValidationMessagesIsMutable(); + validationMessages_.add(index, builderForValue.build()); + onChanged(); + } else { + validationMessagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Contains all validation messages.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ValidationMessage validation_messages = 2; + * + */ + public Builder addAllValidationMessages( + java.lang.Iterable values) { + if (validationMessagesBuilder_ == null) { + ensureValidationMessagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, validationMessages_); + onChanged(); + } else { + validationMessagesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Contains all validation messages.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ValidationMessage validation_messages = 2; + * + */ + public Builder clearValidationMessages() { + if (validationMessagesBuilder_ == null) { + validationMessages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + validationMessagesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Contains all validation messages.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ValidationMessage validation_messages = 2; + * + */ + public Builder removeValidationMessages(int index) { + if (validationMessagesBuilder_ == null) { + ensureValidationMessagesIsMutable(); + validationMessages_.remove(index); + onChanged(); + } else { + validationMessagesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Contains all validation messages.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ValidationMessage validation_messages = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3.ValidationMessage.Builder getValidationMessagesBuilder( + int index) { + return getValidationMessagesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Contains all validation messages.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ValidationMessage validation_messages = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3.ValidationMessageOrBuilder + getValidationMessagesOrBuilder(int index) { + if (validationMessagesBuilder_ == null) { + return validationMessages_.get(index); + } else { + return validationMessagesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Contains all validation messages.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ValidationMessage validation_messages = 2; + * + */ + public java.util.List + getValidationMessagesOrBuilderList() { + if (validationMessagesBuilder_ != null) { + return validationMessagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(validationMessages_); + } + } + /** + * + * + *
+     * Contains all validation messages.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ValidationMessage validation_messages = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3.ValidationMessage.Builder + addValidationMessagesBuilder() { + return getValidationMessagesFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3.ValidationMessage.getDefaultInstance()); + } + /** + * + * + *
+     * Contains all validation messages.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ValidationMessage validation_messages = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3.ValidationMessage.Builder addValidationMessagesBuilder( + int index) { + return getValidationMessagesFieldBuilder() + .addBuilder( + index, com.google.cloud.dialogflow.cx.v3.ValidationMessage.getDefaultInstance()); + } + /** + * + * + *
+     * Contains all validation messages.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ValidationMessage validation_messages = 2; + * + */ + public java.util.List + getValidationMessagesBuilderList() { + return getValidationMessagesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ValidationMessage, + com.google.cloud.dialogflow.cx.v3.ValidationMessage.Builder, + com.google.cloud.dialogflow.cx.v3.ValidationMessageOrBuilder> + getValidationMessagesFieldBuilder() { + if (validationMessagesBuilder_ == null) { + validationMessagesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ValidationMessage, + com.google.cloud.dialogflow.cx.v3.ValidationMessage.Builder, + com.google.cloud.dialogflow.cx.v3.ValidationMessageOrBuilder>( + validationMessages_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + validationMessages_ = null; + } + return validationMessagesBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Last time the flow was validated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Last time the flow was validated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Last time the flow was validated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Last time the flow was validated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Last time the flow was validated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Last time the flow was validated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Last time the flow was validated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Last time the flow was validated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Last time the flow was validated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.FlowValidationResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.FlowValidationResult) + private static final com.google.cloud.dialogflow.cx.v3.FlowValidationResult DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.FlowValidationResult(); + } + + public static com.google.cloud.dialogflow.cx.v3.FlowValidationResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FlowValidationResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new FlowValidationResult(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.FlowValidationResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowValidationResultName.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowValidationResultName.java new file mode 100644 index 000000000..d5cb7c31a --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowValidationResultName.java @@ -0,0 +1,261 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.cx.v3; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class FlowValidationResultName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_AGENT_FLOW = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/validationResult"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String agent; + private final String flow; + + @Deprecated + protected FlowValidationResultName() { + project = null; + location = null; + agent = null; + flow = null; + } + + private FlowValidationResultName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + agent = Preconditions.checkNotNull(builder.getAgent()); + flow = Preconditions.checkNotNull(builder.getFlow()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAgent() { + return agent; + } + + public String getFlow() { + return flow; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static FlowValidationResultName of( + String project, String location, String agent, String flow) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAgent(agent) + .setFlow(flow) + .build(); + } + + public static String format(String project, String location, String agent, String flow) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAgent(agent) + .setFlow(flow) + .build() + .toString(); + } + + public static FlowValidationResultName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_AGENT_FLOW.validatedMatch( + formattedString, "FlowValidationResultName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("agent"), + matchMap.get("flow")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (FlowValidationResultName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_AGENT_FLOW.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (agent != null) { + fieldMapBuilder.put("agent", agent); + } + if (flow != null) { + fieldMapBuilder.put("flow", flow); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_AGENT_FLOW.instantiate( + "project", project, "location", location, "agent", agent, "flow", flow); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + FlowValidationResultName that = ((FlowValidationResultName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.agent, that.agent) + && Objects.equals(this.flow, that.flow); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(agent); + h *= 1000003; + h ^= Objects.hashCode(flow); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/validationResult. + */ + public static class Builder { + private String project; + private String location; + private String agent; + private String flow; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAgent() { + return agent; + } + + public String getFlow() { + return flow; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setAgent(String agent) { + this.agent = agent; + return this; + } + + public Builder setFlow(String flow) { + this.flow = flow; + return this; + } + + private Builder(FlowValidationResultName flowValidationResultName) { + project = flowValidationResultName.project; + location = flowValidationResultName.location; + agent = flowValidationResultName.agent; + flow = flowValidationResultName.flow; + } + + public FlowValidationResultName build() { + return new FlowValidationResultName(this); + } + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowValidationResultOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowValidationResultOrBuilder.java new file mode 100644 index 000000000..2119dd2eb --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowValidationResultOrBuilder.java @@ -0,0 +1,142 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/flow.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface FlowValidationResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.FlowValidationResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The unique identifier of the flow validation result.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>/validationResult`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The unique identifier of the flow validation result.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>/validationResult`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Contains all validation messages.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ValidationMessage validation_messages = 2; + */ + java.util.List getValidationMessagesList(); + /** + * + * + *
+   * Contains all validation messages.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ValidationMessage validation_messages = 2; + */ + com.google.cloud.dialogflow.cx.v3.ValidationMessage getValidationMessages(int index); + /** + * + * + *
+   * Contains all validation messages.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ValidationMessage validation_messages = 2; + */ + int getValidationMessagesCount(); + /** + * + * + *
+   * Contains all validation messages.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ValidationMessage validation_messages = 2; + */ + java.util.List + getValidationMessagesOrBuilderList(); + /** + * + * + *
+   * Contains all validation messages.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ValidationMessage validation_messages = 2; + */ + com.google.cloud.dialogflow.cx.v3.ValidationMessageOrBuilder getValidationMessagesOrBuilder( + int index); + + /** + * + * + *
+   * Last time the flow was validated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3; + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Last time the flow was validated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3; + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Last time the flow was validated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Form.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Form.java index 1c1e96e87..08fb41e92 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Form.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Form.java @@ -308,9 +308,12 @@ public interface ParameterOrBuilder * * *
-     * Indicates whether the parameter content is logged in text and audio. If
-     * it is set to true, the parameter content will be replaced to parameter
-     * name in both request and response. The default value is false.
+     * Indicates whether the parameter content should be redacted in text and
+     * audio. If the flag is set to true, the parameter content will be replaced
+     * by parameter name in both request and response.
+     * 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.
      * 
* * bool redact = 11; @@ -2882,9 +2885,12 @@ public com.google.protobuf.ValueOrBuilder getDefaultValueOrBuilder() { * * *
-     * Indicates whether the parameter content is logged in text and audio. If
-     * it is set to true, the parameter content will be replaced to parameter
-     * name in both request and response. The default value is false.
+     * Indicates whether the parameter content should be redacted in text and
+     * audio. If the flag is set to true, the parameter content will be replaced
+     * by parameter name in both request and response.
+     * 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.
      * 
* * bool redact = 11; @@ -4103,9 +4109,12 @@ public com.google.protobuf.ValueOrBuilder getDefaultValueOrBuilder() { * * *
-       * Indicates whether the parameter content is logged in text and audio. If
-       * it is set to true, the parameter content will be replaced to parameter
-       * name in both request and response. The default value is false.
+       * Indicates whether the parameter content should be redacted in text and
+       * audio. If the flag is set to true, the parameter content will be replaced
+       * by parameter name in both request and response.
+       * 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.
        * 
* * bool redact = 11; @@ -4120,9 +4129,12 @@ public boolean getRedact() { * * *
-       * Indicates whether the parameter content is logged in text and audio. If
-       * it is set to true, the parameter content will be replaced to parameter
-       * name in both request and response. The default value is false.
+       * Indicates whether the parameter content should be redacted in text and
+       * audio. If the flag is set to true, the parameter content will be replaced
+       * by parameter name in both request and response.
+       * 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.
        * 
* * bool redact = 11; @@ -4140,9 +4152,12 @@ public Builder setRedact(boolean value) { * * *
-       * Indicates whether the parameter content is logged in text and audio. If
-       * it is set to true, the parameter content will be replaced to parameter
-       * name in both request and response. The default value is false.
+       * Indicates whether the parameter content should be redacted in text and
+       * audio. If the flag is set to true, the parameter content will be replaced
+       * by parameter name in both request and response.
+       * 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.
        * 
* * bool redact = 11; diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetAgentValidationResultRequest.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetAgentValidationResultRequest.java new file mode 100644 index 000000000..2d5c8978e --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetAgentValidationResultRequest.java @@ -0,0 +1,854 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/agent.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The request message for [Agents.GetAgentValidationResult][google.cloud.dialogflow.cx.v3.Agents.GetAgentValidationResult].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest} + */ +public final class GetAgentValidationResultRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest) + GetAgentValidationResultRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetAgentValidationResultRequest.newBuilder() to construct. + private GetAgentValidationResultRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetAgentValidationResultRequest() { + name_ = ""; + languageCode_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetAgentValidationResultRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetAgentValidationResultRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + languageCode_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.AgentProto + .internal_static_google_cloud_dialogflow_cx_v3_GetAgentValidationResultRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.AgentProto + .internal_static_google_cloud_dialogflow_cx_v3_GetAgentValidationResultRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest.class, + com.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The agent name.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/validationResult`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The agent name.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/validationResult`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 2; + private volatile java.lang.Object languageCode_; + /** + * + * + *
+   * If not specified, the agent's default language is used.
+   * 
+ * + * string language_code = 2; + * + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } + } + /** + * + * + *
+   * If not specified, the agent's default language is used.
+   * 
+ * + * string language_code = 2; + * + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getLanguageCodeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, languageCode_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getLanguageCodeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, languageCode_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest other = + (com.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getLanguageCode().equals(other.getLanguageCode())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for [Agents.GetAgentValidationResult][google.cloud.dialogflow.cx.v3.Agents.GetAgentValidationResult].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest) + com.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.AgentProto + .internal_static_google_cloud_dialogflow_cx_v3_GetAgentValidationResultRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.AgentProto + .internal_static_google_cloud_dialogflow_cx_v3_GetAgentValidationResultRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest.class, + com.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest.Builder.class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + languageCode_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.AgentProto + .internal_static_google_cloud_dialogflow_cx_v3_GetAgentValidationResultRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest build() { + com.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest result = + new com.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest(this); + result.name_ = name_; + result.languageCode_ = languageCode_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest other) { + if (other + == com.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The agent name.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/validationResult`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The agent name.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/validationResult`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The agent name.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/validationResult`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The agent name.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/validationResult`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The agent name.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/validationResult`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object languageCode_ = ""; + /** + * + * + *
+     * If not specified, the agent's default language is used.
+     * 
+ * + * string language_code = 2; + * + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * If not specified, the agent's default language is used.
+     * 
+ * + * string language_code = 2; + * + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * If not specified, the agent's default language is used.
+     * 
+ * + * string language_code = 2; + * + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + languageCode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If not specified, the agent's default language is used.
+     * 
+ * + * string language_code = 2; + * + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + + languageCode_ = getDefaultInstance().getLanguageCode(); + onChanged(); + return this; + } + /** + * + * + *
+     * If not specified, the agent's default language is used.
+     * 
+ * + * string language_code = 2; + * + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + languageCode_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest) + private static final com.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetAgentValidationResultRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetAgentValidationResultRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetExperimentRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetAgentValidationResultRequestOrBuilder.java similarity index 66% rename from proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetExperimentRequestOrBuilder.java rename to proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetAgentValidationResultRequestOrBuilder.java index 539db127a..6c6b9fdf6 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetExperimentRequestOrBuilder.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetAgentValidationResultRequestOrBuilder.java @@ -14,22 +14,22 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dialogflow/cx/v3/experiment.proto +// source: google/cloud/dialogflow/cx/v3/agent.proto package com.google.cloud.dialogflow.cx.v3; -public interface GetExperimentRequestOrBuilder +public interface GetAgentValidationResultRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.GetExperimentRequest) + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest) com.google.protobuf.MessageOrBuilder { /** * * *
-   * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment].
+   * Required. The agent name.
    * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * ID>/validationResult`.
    * 
* * @@ -43,9 +43,9 @@ public interface GetExperimentRequestOrBuilder * * *
-   * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment].
+   * Required. The agent name.
    * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * ID>/validationResult`.
    * 
* * @@ -55,4 +55,29 @@ public interface GetExperimentRequestOrBuilder * @return The bytes for name. */ com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * If not specified, the agent's default language is used.
+   * 
+ * + * string language_code = 2; + * + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + /** + * + * + *
+   * If not specified, the agent's default language is used.
+   * 
+ * + * string language_code = 2; + * + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString getLanguageCodeBytes(); } diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetFlowValidationResultRequest.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetFlowValidationResultRequest.java new file mode 100644 index 000000000..e8de9778c --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetFlowValidationResultRequest.java @@ -0,0 +1,852 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/flow.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The request message for [Flows.GetFlowValidationResult][google.cloud.dialogflow.cx.v3.Flows.GetFlowValidationResult].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest} + */ +public final class GetFlowValidationResultRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest) + GetFlowValidationResultRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetFlowValidationResultRequest.newBuilder() to construct. + private GetFlowValidationResultRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetFlowValidationResultRequest() { + name_ = ""; + languageCode_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetFlowValidationResultRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetFlowValidationResultRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + languageCode_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.FlowProto + .internal_static_google_cloud_dialogflow_cx_v3_GetFlowValidationResultRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.FlowProto + .internal_static_google_cloud_dialogflow_cx_v3_GetFlowValidationResultRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest.class, + com.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The flow name.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>/validationResult`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The flow name.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>/validationResult`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 2; + private volatile java.lang.Object languageCode_; + /** + * + * + *
+   * If not specified, the agent's default language is used.
+   * 
+ * + * string language_code = 2; + * + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } + } + /** + * + * + *
+   * If not specified, the agent's default language is used.
+   * 
+ * + * string language_code = 2; + * + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getLanguageCodeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, languageCode_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getLanguageCodeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, languageCode_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest other = + (com.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getLanguageCode().equals(other.getLanguageCode())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for [Flows.GetFlowValidationResult][google.cloud.dialogflow.cx.v3.Flows.GetFlowValidationResult].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest) + com.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.FlowProto + .internal_static_google_cloud_dialogflow_cx_v3_GetFlowValidationResultRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.FlowProto + .internal_static_google_cloud_dialogflow_cx_v3_GetFlowValidationResultRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest.class, + com.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + languageCode_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.FlowProto + .internal_static_google_cloud_dialogflow_cx_v3_GetFlowValidationResultRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest build() { + com.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest result = + new com.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest(this); + result.name_ = name_; + result.languageCode_ = languageCode_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest other) { + if (other + == com.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The flow name.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>/validationResult`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The flow name.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>/validationResult`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The flow name.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>/validationResult`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The flow name.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>/validationResult`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The flow name.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>/validationResult`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object languageCode_ = ""; + /** + * + * + *
+     * If not specified, the agent's default language is used.
+     * 
+ * + * string language_code = 2; + * + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * If not specified, the agent's default language is used.
+     * 
+ * + * string language_code = 2; + * + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * If not specified, the agent's default language is used.
+     * 
+ * + * string language_code = 2; + * + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + languageCode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If not specified, the agent's default language is used.
+     * 
+ * + * string language_code = 2; + * + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + + languageCode_ = getDefaultInstance().getLanguageCode(); + onChanged(); + return this; + } + /** + * + * + *
+     * If not specified, the agent's default language is used.
+     * 
+ * + * string language_code = 2; + * + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + languageCode_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest) + private static final com.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetFlowValidationResultRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetFlowValidationResultRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetFlowValidationResultRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetFlowValidationResultRequestOrBuilder.java new file mode 100644 index 000000000..fa8aea789 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetFlowValidationResultRequestOrBuilder.java @@ -0,0 +1,83 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/flow.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface GetFlowValidationResultRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The flow name.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>/validationResult`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The flow name.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>/validationResult`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * If not specified, the agent's default language is used.
+   * 
+ * + * string language_code = 2; + * + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + /** + * + * + *
+   * If not specified, the agent's default language is used.
+   * 
+ * + * string language_code = 2; + * + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString getLanguageCodeBytes(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetExperimentRequest.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetTestCaseRequest.java similarity index 72% rename from proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetExperimentRequest.java rename to proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetTestCaseRequest.java index 5a7f0cdee..a51d9b0fc 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetExperimentRequest.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetTestCaseRequest.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dialogflow/cx/v3/experiment.proto +// source: google/cloud/dialogflow/cx/v3/test_case.proto package com.google.cloud.dialogflow.cx.v3; @@ -22,29 +22,29 @@ * * *
- * The request message for [Experiments.GetExperiment][google.cloud.dialogflow.cx.v3.Experiments.GetExperiment].
+ * The request message for [TestCases.GetTestCase][google.cloud.dialogflow.cx.v3.TestCases.GetTestCase].
  * 
* - * Protobuf type {@code google.cloud.dialogflow.cx.v3.GetExperimentRequest} + * Protobuf type {@code google.cloud.dialogflow.cx.v3.GetTestCaseRequest} */ -public final class GetExperimentRequest extends com.google.protobuf.GeneratedMessageV3 +public final class GetTestCaseRequest extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.GetExperimentRequest) - GetExperimentRequestOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.GetTestCaseRequest) + GetTestCaseRequestOrBuilder { private static final long serialVersionUID = 0L; - // Use GetExperimentRequest.newBuilder() to construct. - private GetExperimentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use GetTestCaseRequest.newBuilder() to construct. + private GetTestCaseRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private GetExperimentRequest() { + private GetTestCaseRequest() { name_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetExperimentRequest(); + return new GetTestCaseRequest(); } @java.lang.Override @@ -52,7 +52,7 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetExperimentRequest( + private GetTestCaseRequest( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -97,18 +97,18 @@ private GetExperimentRequest( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_GetExperimentRequest_descriptor; + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_GetTestCaseRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_GetExperimentRequest_fieldAccessorTable + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_GetTestCaseRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3.GetExperimentRequest.class, - com.google.cloud.dialogflow.cx.v3.GetExperimentRequest.Builder.class); + com.google.cloud.dialogflow.cx.v3.GetTestCaseRequest.class, + com.google.cloud.dialogflow.cx.v3.GetTestCaseRequest.Builder.class); } public static final int NAME_FIELD_NUMBER = 1; @@ -117,9 +117,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment].
+   * Required. The name of the testcase.
    * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * ID>/testCases/<TestCase ID>`.
    * 
* * @@ -144,9 +144,9 @@ public java.lang.String getName() { * * *
-   * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment].
+   * Required. The name of the testcase.
    * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * ID>/testCases/<TestCase ID>`.
    * 
* * @@ -207,11 +207,11 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.GetExperimentRequest)) { + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.GetTestCaseRequest)) { return super.equals(obj); } - com.google.cloud.dialogflow.cx.v3.GetExperimentRequest other = - (com.google.cloud.dialogflow.cx.v3.GetExperimentRequest) obj; + com.google.cloud.dialogflow.cx.v3.GetTestCaseRequest other = + (com.google.cloud.dialogflow.cx.v3.GetTestCaseRequest) obj; if (!getName().equals(other.getName())) return false; if (!unknownFields.equals(other.unknownFields)) return false; @@ -232,71 +232,71 @@ public int hashCode() { return hash; } - public static com.google.cloud.dialogflow.cx.v3.GetExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.GetTestCaseRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3.GetExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.GetTestCaseRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.GetExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.GetTestCaseRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3.GetExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.GetTestCaseRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.GetExperimentRequest parseFrom(byte[] data) + public static com.google.cloud.dialogflow.cx.v3.GetTestCaseRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3.GetExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.GetTestCaseRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.GetExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.GetTestCaseRequest parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3.GetExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.GetTestCaseRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.GetExperimentRequest parseDelimitedFrom( + public static com.google.cloud.dialogflow.cx.v3.GetTestCaseRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3.GetExperimentRequest parseDelimitedFrom( + public static com.google.cloud.dialogflow.cx.v3.GetTestCaseRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.GetExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.GetTestCaseRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3.GetExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.GetTestCaseRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -313,8 +313,7 @@ public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder( - com.google.cloud.dialogflow.cx.v3.GetExperimentRequest prototype) { + public static Builder newBuilder(com.google.cloud.dialogflow.cx.v3.GetTestCaseRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -332,31 +331,31 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The request message for [Experiments.GetExperiment][google.cloud.dialogflow.cx.v3.Experiments.GetExperiment].
+   * The request message for [TestCases.GetTestCase][google.cloud.dialogflow.cx.v3.TestCases.GetTestCase].
    * 
* - * Protobuf type {@code google.cloud.dialogflow.cx.v3.GetExperimentRequest} + * Protobuf type {@code google.cloud.dialogflow.cx.v3.GetTestCaseRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.GetExperimentRequest) - com.google.cloud.dialogflow.cx.v3.GetExperimentRequestOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.GetTestCaseRequest) + com.google.cloud.dialogflow.cx.v3.GetTestCaseRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_GetExperimentRequest_descriptor; + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_GetTestCaseRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_GetExperimentRequest_fieldAccessorTable + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_GetTestCaseRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3.GetExperimentRequest.class, - com.google.cloud.dialogflow.cx.v3.GetExperimentRequest.Builder.class); + com.google.cloud.dialogflow.cx.v3.GetTestCaseRequest.class, + com.google.cloud.dialogflow.cx.v3.GetTestCaseRequest.Builder.class); } - // Construct using com.google.cloud.dialogflow.cx.v3.GetExperimentRequest.newBuilder() + // Construct using com.google.cloud.dialogflow.cx.v3.GetTestCaseRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -380,18 +379,18 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_GetExperimentRequest_descriptor; + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_GetTestCaseRequest_descriptor; } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.GetExperimentRequest getDefaultInstanceForType() { - return com.google.cloud.dialogflow.cx.v3.GetExperimentRequest.getDefaultInstance(); + public com.google.cloud.dialogflow.cx.v3.GetTestCaseRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.GetTestCaseRequest.getDefaultInstance(); } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.GetExperimentRequest build() { - com.google.cloud.dialogflow.cx.v3.GetExperimentRequest result = buildPartial(); + public com.google.cloud.dialogflow.cx.v3.GetTestCaseRequest build() { + com.google.cloud.dialogflow.cx.v3.GetTestCaseRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -399,9 +398,9 @@ public com.google.cloud.dialogflow.cx.v3.GetExperimentRequest build() { } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.GetExperimentRequest buildPartial() { - com.google.cloud.dialogflow.cx.v3.GetExperimentRequest result = - new com.google.cloud.dialogflow.cx.v3.GetExperimentRequest(this); + public com.google.cloud.dialogflow.cx.v3.GetTestCaseRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3.GetTestCaseRequest result = + new com.google.cloud.dialogflow.cx.v3.GetTestCaseRequest(this); result.name_ = name_; onBuilt(); return result; @@ -442,16 +441,16 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.dialogflow.cx.v3.GetExperimentRequest) { - return mergeFrom((com.google.cloud.dialogflow.cx.v3.GetExperimentRequest) other); + if (other instanceof com.google.cloud.dialogflow.cx.v3.GetTestCaseRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.GetTestCaseRequest) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.GetExperimentRequest other) { - if (other == com.google.cloud.dialogflow.cx.v3.GetExperimentRequest.getDefaultInstance()) + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.GetTestCaseRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3.GetTestCaseRequest.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; @@ -472,12 +471,12 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dialogflow.cx.v3.GetExperimentRequest parsedMessage = null; + com.google.cloud.dialogflow.cx.v3.GetTestCaseRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = - (com.google.cloud.dialogflow.cx.v3.GetExperimentRequest) e.getUnfinishedMessage(); + (com.google.cloud.dialogflow.cx.v3.GetTestCaseRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -492,9 +491,9 @@ public Builder mergeFrom( * * *
-     * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment].
+     * Required. The name of the testcase.
      * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * ID>/testCases/<TestCase ID>`.
      * 
* * @@ -518,9 +517,9 @@ public java.lang.String getName() { * * *
-     * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment].
+     * Required. The name of the testcase.
      * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * ID>/testCases/<TestCase ID>`.
      * 
* * @@ -544,9 +543,9 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-     * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment].
+     * Required. The name of the testcase.
      * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * ID>/testCases/<TestCase ID>`.
      * 
* * @@ -569,9 +568,9 @@ public Builder setName(java.lang.String value) { * * *
-     * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment].
+     * Required. The name of the testcase.
      * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * ID>/testCases/<TestCase ID>`.
      * 
* * @@ -590,9 +589,9 @@ public Builder clearName() { * * *
-     * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment].
+     * Required. The name of the testcase.
      * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * ID>/testCases/<TestCase ID>`.
      * 
* * @@ -624,42 +623,42 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.GetExperimentRequest) + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.GetTestCaseRequest) } - // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.GetExperimentRequest) - private static final com.google.cloud.dialogflow.cx.v3.GetExperimentRequest DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.GetTestCaseRequest) + private static final com.google.cloud.dialogflow.cx.v3.GetTestCaseRequest DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.GetExperimentRequest(); + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.GetTestCaseRequest(); } - public static com.google.cloud.dialogflow.cx.v3.GetExperimentRequest getDefaultInstance() { + public static com.google.cloud.dialogflow.cx.v3.GetTestCaseRequest getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public GetExperimentRequest parsePartialFrom( + public GetTestCaseRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetExperimentRequest(input, extensionRegistry); + return new GetTestCaseRequest(input, extensionRegistry); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.GetExperimentRequest getDefaultInstanceForType() { + public com.google.cloud.dialogflow.cx.v3.GetTestCaseRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StopExperimentRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetTestCaseRequestOrBuilder.java similarity index 78% rename from proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StopExperimentRequestOrBuilder.java rename to proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetTestCaseRequestOrBuilder.java index 263361f38..e24c1d761 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StopExperimentRequestOrBuilder.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetTestCaseRequestOrBuilder.java @@ -14,22 +14,22 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dialogflow/cx/v3/experiment.proto +// source: google/cloud/dialogflow/cx/v3/test_case.proto package com.google.cloud.dialogflow.cx.v3; -public interface StopExperimentRequestOrBuilder +public interface GetTestCaseRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.StopExperimentRequest) + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.GetTestCaseRequest) com.google.protobuf.MessageOrBuilder { /** * * *
-   * Required. Resource name of the experiment to stop.
+   * Required. The name of the testcase.
    * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * ID>/testCases/<TestCase ID>`.
    * 
* * @@ -43,9 +43,9 @@ public interface StopExperimentRequestOrBuilder * * *
-   * Required. Resource name of the experiment to stop.
+   * Required. The name of the testcase.
    * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * ID>/testCases/<TestCase ID>`.
    * 
* * diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportTestCasesMetadata.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportTestCasesMetadata.java new file mode 100644 index 000000000..210b2bece --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportTestCasesMetadata.java @@ -0,0 +1,954 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/test_case.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * Metadata returned for the [TestCases.ImportTestCases][google.cloud.dialogflow.cx.v3.TestCases.ImportTestCases] long running
+ * operation.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata} + */ +public final class ImportTestCasesMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata) + ImportTestCasesMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImportTestCasesMetadata.newBuilder() to construct. + private ImportTestCasesMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImportTestCasesMetadata() { + errors_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImportTestCasesMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ImportTestCasesMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + errors_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + errors_.add( + input.readMessage( + com.google.cloud.dialogflow.cx.v3.TestCaseError.parser(), extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + errors_ = java.util.Collections.unmodifiableList(errors_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ImportTestCasesMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ImportTestCasesMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata.class, + com.google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata.Builder.class); + } + + public static final int ERRORS_FIELD_NUMBER = 1; + private java.util.List errors_; + /** + * + * + *
+   * Errors for failed test cases.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseError errors = 1; + */ + @java.lang.Override + public java.util.List getErrorsList() { + return errors_; + } + /** + * + * + *
+   * Errors for failed test cases.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseError errors = 1; + */ + @java.lang.Override + public java.util.List + getErrorsOrBuilderList() { + return errors_; + } + /** + * + * + *
+   * Errors for failed test cases.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseError errors = 1; + */ + @java.lang.Override + public int getErrorsCount() { + return errors_.size(); + } + /** + * + * + *
+   * Errors for failed test cases.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseError errors = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TestCaseError getErrors(int index) { + return errors_.get(index); + } + /** + * + * + *
+   * Errors for failed test cases.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseError errors = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TestCaseErrorOrBuilder getErrorsOrBuilder(int index) { + return errors_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < errors_.size(); i++) { + output.writeMessage(1, errors_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < errors_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, errors_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata other = + (com.google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata) obj; + + if (!getErrorsList().equals(other.getErrorsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getErrorsCount() > 0) { + hash = (37 * hash) + ERRORS_FIELD_NUMBER; + hash = (53 * hash) + getErrorsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata returned for the [TestCases.ImportTestCases][google.cloud.dialogflow.cx.v3.TestCases.ImportTestCases] long running
+   * operation.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata) + com.google.cloud.dialogflow.cx.v3.ImportTestCasesMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ImportTestCasesMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ImportTestCasesMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata.class, + com.google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getErrorsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (errorsBuilder_ == null) { + errors_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + errorsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ImportTestCasesMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata build() { + com.google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata buildPartial() { + com.google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata result = + new com.google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata(this); + int from_bitField0_ = bitField0_; + if (errorsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + errors_ = java.util.Collections.unmodifiableList(errors_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.errors_ = errors_; + } else { + result.errors_ = errorsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata other) { + if (other == com.google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata.getDefaultInstance()) + return this; + if (errorsBuilder_ == null) { + if (!other.errors_.isEmpty()) { + if (errors_.isEmpty()) { + errors_ = other.errors_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureErrorsIsMutable(); + errors_.addAll(other.errors_); + } + onChanged(); + } + } else { + if (!other.errors_.isEmpty()) { + if (errorsBuilder_.isEmpty()) { + errorsBuilder_.dispose(); + errorsBuilder_ = null; + errors_ = other.errors_; + bitField0_ = (bitField0_ & ~0x00000001); + errorsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getErrorsFieldBuilder() + : null; + } else { + errorsBuilder_.addAllMessages(other.errors_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List errors_ = + java.util.Collections.emptyList(); + + private void ensureErrorsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + errors_ = new java.util.ArrayList(errors_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TestCaseError, + com.google.cloud.dialogflow.cx.v3.TestCaseError.Builder, + com.google.cloud.dialogflow.cx.v3.TestCaseErrorOrBuilder> + errorsBuilder_; + + /** + * + * + *
+     * Errors for failed test cases.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseError errors = 1; + */ + public java.util.List getErrorsList() { + if (errorsBuilder_ == null) { + return java.util.Collections.unmodifiableList(errors_); + } else { + return errorsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Errors for failed test cases.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseError errors = 1; + */ + public int getErrorsCount() { + if (errorsBuilder_ == null) { + return errors_.size(); + } else { + return errorsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Errors for failed test cases.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseError errors = 1; + */ + public com.google.cloud.dialogflow.cx.v3.TestCaseError getErrors(int index) { + if (errorsBuilder_ == null) { + return errors_.get(index); + } else { + return errorsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Errors for failed test cases.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseError errors = 1; + */ + public Builder setErrors(int index, com.google.cloud.dialogflow.cx.v3.TestCaseError value) { + if (errorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorsIsMutable(); + errors_.set(index, value); + onChanged(); + } else { + errorsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Errors for failed test cases.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseError errors = 1; + */ + public Builder setErrors( + int index, com.google.cloud.dialogflow.cx.v3.TestCaseError.Builder builderForValue) { + if (errorsBuilder_ == null) { + ensureErrorsIsMutable(); + errors_.set(index, builderForValue.build()); + onChanged(); + } else { + errorsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Errors for failed test cases.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseError errors = 1; + */ + public Builder addErrors(com.google.cloud.dialogflow.cx.v3.TestCaseError value) { + if (errorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorsIsMutable(); + errors_.add(value); + onChanged(); + } else { + errorsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Errors for failed test cases.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseError errors = 1; + */ + public Builder addErrors(int index, com.google.cloud.dialogflow.cx.v3.TestCaseError value) { + if (errorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorsIsMutable(); + errors_.add(index, value); + onChanged(); + } else { + errorsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Errors for failed test cases.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseError errors = 1; + */ + public Builder addErrors( + com.google.cloud.dialogflow.cx.v3.TestCaseError.Builder builderForValue) { + if (errorsBuilder_ == null) { + ensureErrorsIsMutable(); + errors_.add(builderForValue.build()); + onChanged(); + } else { + errorsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Errors for failed test cases.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseError errors = 1; + */ + public Builder addErrors( + int index, com.google.cloud.dialogflow.cx.v3.TestCaseError.Builder builderForValue) { + if (errorsBuilder_ == null) { + ensureErrorsIsMutable(); + errors_.add(index, builderForValue.build()); + onChanged(); + } else { + errorsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Errors for failed test cases.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseError errors = 1; + */ + public Builder addAllErrors( + java.lang.Iterable values) { + if (errorsBuilder_ == null) { + ensureErrorsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, errors_); + onChanged(); + } else { + errorsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Errors for failed test cases.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseError errors = 1; + */ + public Builder clearErrors() { + if (errorsBuilder_ == null) { + errors_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + errorsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Errors for failed test cases.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseError errors = 1; + */ + public Builder removeErrors(int index) { + if (errorsBuilder_ == null) { + ensureErrorsIsMutable(); + errors_.remove(index); + onChanged(); + } else { + errorsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Errors for failed test cases.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseError errors = 1; + */ + public com.google.cloud.dialogflow.cx.v3.TestCaseError.Builder getErrorsBuilder(int index) { + return getErrorsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Errors for failed test cases.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseError errors = 1; + */ + public com.google.cloud.dialogflow.cx.v3.TestCaseErrorOrBuilder getErrorsOrBuilder(int index) { + if (errorsBuilder_ == null) { + return errors_.get(index); + } else { + return errorsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Errors for failed test cases.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseError errors = 1; + */ + public java.util.List + getErrorsOrBuilderList() { + if (errorsBuilder_ != null) { + return errorsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(errors_); + } + } + /** + * + * + *
+     * Errors for failed test cases.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseError errors = 1; + */ + public com.google.cloud.dialogflow.cx.v3.TestCaseError.Builder addErrorsBuilder() { + return getErrorsFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3.TestCaseError.getDefaultInstance()); + } + /** + * + * + *
+     * Errors for failed test cases.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseError errors = 1; + */ + public com.google.cloud.dialogflow.cx.v3.TestCaseError.Builder addErrorsBuilder(int index) { + return getErrorsFieldBuilder() + .addBuilder(index, com.google.cloud.dialogflow.cx.v3.TestCaseError.getDefaultInstance()); + } + /** + * + * + *
+     * Errors for failed test cases.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseError errors = 1; + */ + public java.util.List + getErrorsBuilderList() { + return getErrorsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TestCaseError, + com.google.cloud.dialogflow.cx.v3.TestCaseError.Builder, + com.google.cloud.dialogflow.cx.v3.TestCaseErrorOrBuilder> + getErrorsFieldBuilder() { + if (errorsBuilder_ == null) { + errorsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TestCaseError, + com.google.cloud.dialogflow.cx.v3.TestCaseError.Builder, + com.google.cloud.dialogflow.cx.v3.TestCaseErrorOrBuilder>( + errors_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + errors_ = null; + } + return errorsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata) + private static final com.google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata(); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportTestCasesMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImportTestCasesMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportTestCasesMetadataOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportTestCasesMetadataOrBuilder.java new file mode 100644 index 000000000..dbf12ae03 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportTestCasesMetadataOrBuilder.java @@ -0,0 +1,77 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/test_case.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface ImportTestCasesMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Errors for failed test cases.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseError errors = 1; + */ + java.util.List getErrorsList(); + /** + * + * + *
+   * Errors for failed test cases.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseError errors = 1; + */ + com.google.cloud.dialogflow.cx.v3.TestCaseError getErrors(int index); + /** + * + * + *
+   * Errors for failed test cases.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseError errors = 1; + */ + int getErrorsCount(); + /** + * + * + *
+   * Errors for failed test cases.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseError errors = 1; + */ + java.util.List + getErrorsOrBuilderList(); + /** + * + * + *
+   * Errors for failed test cases.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseError errors = 1; + */ + com.google.cloud.dialogflow.cx.v3.TestCaseErrorOrBuilder getErrorsOrBuilder(int index); +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListExperimentsRequest.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportTestCasesRequest.java similarity index 60% rename from proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListExperimentsRequest.java rename to proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportTestCasesRequest.java index ab70e7930..0225b33ca 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListExperimentsRequest.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportTestCasesRequest.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dialogflow/cx/v3/experiment.proto +// source: google/cloud/dialogflow/cx/v3/test_case.proto package com.google.cloud.dialogflow.cx.v3; @@ -22,30 +22,29 @@ * * *
- * The request message for [Experiments.ListExperiments][google.cloud.dialogflow.cx.v3.Experiments.ListExperiments].
+ * The request message for [TestCases.ImportTestCases][google.cloud.dialogflow.cx.v3.TestCases.ImportTestCases].
  * 
* - * Protobuf type {@code google.cloud.dialogflow.cx.v3.ListExperimentsRequest} + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ImportTestCasesRequest} */ -public final class ListExperimentsRequest extends com.google.protobuf.GeneratedMessageV3 +public final class ImportTestCasesRequest extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ListExperimentsRequest) - ListExperimentsRequestOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ImportTestCasesRequest) + ImportTestCasesRequestOrBuilder { private static final long serialVersionUID = 0L; - // Use ListExperimentsRequest.newBuilder() to construct. - private ListExperimentsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use ImportTestCasesRequest.newBuilder() to construct. + private ImportTestCasesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private ListExperimentsRequest() { + private ImportTestCasesRequest() { parent_ = ""; - pageToken_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListExperimentsRequest(); + return new ImportTestCasesRequest(); } @java.lang.Override @@ -53,7 +52,7 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListExperimentsRequest( + private ImportTestCasesRequest( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -78,16 +77,17 @@ private ListExperimentsRequest( parent_ = s; break; } - case 16: + case 18: { - pageSize_ = input.readInt32(); + java.lang.String s = input.readStringRequireUtf8(); + sourceCase_ = 2; + source_ = s; break; } case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; + sourceCase_ = 3; + source_ = input.readBytes(); break; } default: @@ -110,18 +110,65 @@ private ListExperimentsRequest( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_ListExperimentsRequest_descriptor; + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ImportTestCasesRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_ListExperimentsRequest_fieldAccessorTable + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ImportTestCasesRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest.class, - com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest.Builder.class); + com.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest.class, + com.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest.Builder.class); + } + + private int sourceCase_ = 0; + private java.lang.Object source_; + + public enum SourceCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GCS_URI(2), + CONTENT(3), + SOURCE_NOT_SET(0); + private final int value; + + private SourceCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SourceCase valueOf(int value) { + return forNumber(value); + } + + public static SourceCase forNumber(int value) { + switch (value) { + case 2: + return GCS_URI; + case 3: + return CONTENT; + case 0: + return SOURCE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public SourceCase getSourceCase() { + return SourceCase.forNumber(sourceCase_); } public static final int PARENT_FIELD_NUMBER = 1; @@ -130,9 +177,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to list all environments for.
-   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/environments/<Environment ID>`.
+   * Required. The agent to import test cases to.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
    * 
* * @@ -157,9 +203,8 @@ public java.lang.String getParent() { * * *
-   * Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to list all environments for.
-   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/environments/<Environment ID>`.
+   * Required. The agent to import test cases to.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
    * 
* * @@ -181,47 +226,33 @@ public com.google.protobuf.ByteString getParentBytes() { } } - public static final int PAGE_SIZE_FIELD_NUMBER = 2; - private int pageSize_; + public static final int GCS_URI_FIELD_NUMBER = 2; /** * * *
-   * The maximum number of items to return in a single page. By default 20 and
-   * at most 100.
+   * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI
+   * to import test cases from. The format of this URI must be
+   * `gs://<bucket-name>/<object-name>`.
    * 
* - * int32 page_size = 2; + * string gcs_uri = 2; * - * @return The pageSize. + * @return The gcsUri. */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - private volatile java.lang.Object pageToken_; - /** - * - * - *
-   * The next_page_token value returned from a previous list request.
-   * 
- * - * string page_token = 3; - * - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; + public java.lang.String getGcsUri() { + java.lang.Object ref = ""; + if (sourceCase_ == 2) { + ref = source_; + } if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; + if (sourceCase_ == 2) { + source_ = s; + } return s; } } @@ -229,26 +260,52 @@ public java.lang.String getPageToken() { * * *
-   * The next_page_token value returned from a previous list request.
+   * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI
+   * to import test cases from. The format of this URI must be
+   * `gs://<bucket-name>/<object-name>`.
    * 
* - * string page_token = 3; + * string gcs_uri = 2; * - * @return The bytes for pageToken. + * @return The bytes for gcsUri. */ - @java.lang.Override - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; + public com.google.protobuf.ByteString getGcsUriBytes() { + java.lang.Object ref = ""; + if (sourceCase_ == 2) { + ref = source_; + } if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; + if (sourceCase_ == 2) { + source_ = b; + } return b; } else { return (com.google.protobuf.ByteString) ref; } } + public static final int CONTENT_FIELD_NUMBER = 3; + /** + * + * + *
+   * Uncompressed raw byte content for test cases.
+   * 
+ * + * bytes content = 3; + * + * @return The content. + */ + @java.lang.Override + public com.google.protobuf.ByteString getContent() { + if (sourceCase_ == 3) { + return (com.google.protobuf.ByteString) source_; + } + return com.google.protobuf.ByteString.EMPTY; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -266,11 +323,11 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!getParentBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); + if (sourceCase_ == 2) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, source_); } - if (!getPageTokenBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + if (sourceCase_ == 3) { + output.writeBytes(3, (com.google.protobuf.ByteString) source_); } unknownFields.writeTo(output); } @@ -284,11 +341,13 @@ public int getSerializedSize() { if (!getParentBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + if (sourceCase_ == 2) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, source_); } - if (!getPageTokenBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + if (sourceCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeBytesSize( + 3, (com.google.protobuf.ByteString) source_); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -300,15 +359,24 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest)) { + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest)) { return super.equals(obj); } - com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest other = - (com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest) obj; + com.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest other = + (com.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest) obj; if (!getParent().equals(other.getParent())) return false; - if (getPageSize() != other.getPageSize()) return false; - if (!getPageToken().equals(other.getPageToken())) return false; + if (!getSourceCase().equals(other.getSourceCase())) return false; + switch (sourceCase_) { + case 2: + if (!getGcsUri().equals(other.getGcsUri())) return false; + break; + case 3: + if (!getContent().equals(other.getContent())) return false; + break; + case 0: + default: + } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -322,80 +390,88 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + PARENT_FIELD_NUMBER; hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); + switch (sourceCase_) { + case 2: + hash = (37 * hash) + GCS_URI_FIELD_NUMBER; + hash = (53 * hash) + getGcsUri().hashCode(); + break; + case 3: + hash = (37 * hash) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + break; + case 0: + default: + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest parseFrom(byte[] data) + public static com.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest parseDelimitedFrom( + public static com.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest parseDelimitedFrom( + public static com.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -413,7 +489,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest prototype) { + com.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -431,31 +507,31 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The request message for [Experiments.ListExperiments][google.cloud.dialogflow.cx.v3.Experiments.ListExperiments].
+   * The request message for [TestCases.ImportTestCases][google.cloud.dialogflow.cx.v3.TestCases.ImportTestCases].
    * 
* - * Protobuf type {@code google.cloud.dialogflow.cx.v3.ListExperimentsRequest} + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ImportTestCasesRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ListExperimentsRequest) - com.google.cloud.dialogflow.cx.v3.ListExperimentsRequestOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ImportTestCasesRequest) + com.google.cloud.dialogflow.cx.v3.ImportTestCasesRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_ListExperimentsRequest_descriptor; + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ImportTestCasesRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_ListExperimentsRequest_fieldAccessorTable + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ImportTestCasesRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest.class, - com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest.Builder.class); + com.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest.class, + com.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest.Builder.class); } - // Construct using com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest.newBuilder() + // Construct using com.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -474,27 +550,25 @@ public Builder clear() { super.clear(); parent_ = ""; - pageSize_ = 0; - - pageToken_ = ""; - + sourceCase_ = 0; + source_ = null; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_ListExperimentsRequest_descriptor; + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ImportTestCasesRequest_descriptor; } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest getDefaultInstanceForType() { - return com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest.getDefaultInstance(); + public com.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest.getDefaultInstance(); } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest build() { - com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest result = buildPartial(); + public com.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest build() { + com.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -502,12 +576,17 @@ public com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest build() { } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest buildPartial() { - com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest result = - new com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest(this); + public com.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest result = + new com.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest(this); result.parent_ = parent_; - result.pageSize_ = pageSize_; - result.pageToken_ = pageToken_; + if (sourceCase_ == 2) { + result.source_ = source_; + } + if (sourceCase_ == 3) { + result.source_ = source_; + } + result.sourceCase_ = sourceCase_; onBuilt(); return result; } @@ -547,27 +626,38 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest) { - return mergeFrom((com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest) other); + if (other instanceof com.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest other) { - if (other == com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest.getDefaultInstance()) + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest.getDefaultInstance()) return this; if (!other.getParent().isEmpty()) { parent_ = other.parent_; onChanged(); } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - onChanged(); + switch (other.getSourceCase()) { + case GCS_URI: + { + sourceCase_ = 2; + source_ = other.source_; + onChanged(); + break; + } + case CONTENT: + { + setContent(other.getContent()); + break; + } + case SOURCE_NOT_SET: + { + break; + } } this.mergeUnknownFields(other.unknownFields); onChanged(); @@ -584,12 +674,12 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest parsedMessage = null; + com.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = - (com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest) e.getUnfinishedMessage(); + (com.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -599,14 +689,27 @@ public Builder mergeFrom( return this; } + private int sourceCase_ = 0; + private java.lang.Object source_; + + public SourceCase getSourceCase() { + return SourceCase.forNumber(sourceCase_); + } + + public Builder clearSource() { + sourceCase_ = 0; + source_ = null; + onChanged(); + return this; + } + private java.lang.Object parent_ = ""; /** * * *
-     * Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to list all environments for.
-     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>`.
+     * Required. The agent to import test cases to.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
      * 
* * @@ -630,9 +733,8 @@ public java.lang.String getParent() { * * *
-     * Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to list all environments for.
-     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>`.
+     * Required. The agent to import test cases to.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
      * 
* * @@ -656,9 +758,8 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
-     * Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to list all environments for.
-     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>`.
+     * Required. The agent to import test cases to.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
      * 
* * @@ -681,9 +782,8 @@ public Builder setParent(java.lang.String value) { * * *
-     * Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to list all environments for.
-     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>`.
+     * Required. The agent to import test cases to.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
      * 
* * @@ -702,9 +802,8 @@ public Builder clearParent() { * * *
-     * Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to list all environments for.
-     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>`.
+     * Required. The agent to import test cases to.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
      * 
* * @@ -725,141 +824,170 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { return this; } - private int pageSize_; /** * * *
-     * The maximum number of items to return in a single page. By default 20 and
-     * at most 100.
+     * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI
+     * to import test cases from. The format of this URI must be
+     * `gs://<bucket-name>/<object-name>`.
      * 
* - * int32 page_size = 2; + * string gcs_uri = 2; * - * @return The pageSize. + * @return The gcsUri. */ @java.lang.Override - public int getPageSize() { - return pageSize_; + public java.lang.String getGcsUri() { + java.lang.Object ref = ""; + if (sourceCase_ == 2) { + ref = source_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (sourceCase_ == 2) { + source_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } } /** * * *
-     * The maximum number of items to return in a single page. By default 20 and
-     * at most 100.
+     * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI
+     * to import test cases from. The format of this URI must be
+     * `gs://<bucket-name>/<object-name>`.
      * 
* - * int32 page_size = 2; + * string gcs_uri = 2; * - * @param value The pageSize to set. - * @return This builder for chaining. + * @return The bytes for gcsUri. */ - public Builder setPageSize(int value) { - - pageSize_ = value; - onChanged(); - return this; + @java.lang.Override + public com.google.protobuf.ByteString getGcsUriBytes() { + java.lang.Object ref = ""; + if (sourceCase_ == 2) { + ref = source_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (sourceCase_ == 2) { + source_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } /** * * *
-     * The maximum number of items to return in a single page. By default 20 and
-     * at most 100.
+     * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI
+     * to import test cases from. The format of this URI must be
+     * `gs://<bucket-name>/<object-name>`.
      * 
* - * int32 page_size = 2; + * string gcs_uri = 2; * + * @param value The gcsUri to set. * @return This builder for chaining. */ - public Builder clearPageSize() { - - pageSize_ = 0; + public Builder setGcsUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sourceCase_ = 2; + source_ = value; onChanged(); return this; } - - private java.lang.Object pageToken_ = ""; /** * * *
-     * The next_page_token value returned from a previous list request.
+     * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI
+     * to import test cases from. The format of this URI must be
+     * `gs://<bucket-name>/<object-name>`.
      * 
* - * string page_token = 3; + * string gcs_uri = 2; * - * @return The pageToken. + * @return This builder for chaining. */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; + public Builder clearGcsUri() { + if (sourceCase_ == 2) { + sourceCase_ = 0; + source_ = null; + onChanged(); } + return this; } /** * * *
-     * The next_page_token value returned from a previous list request.
+     * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI
+     * to import test cases from. The format of this URI must be
+     * `gs://<bucket-name>/<object-name>`.
      * 
* - * string page_token = 3; + * string gcs_uri = 2; * - * @return The bytes for pageToken. + * @param value The bytes for gcsUri to set. + * @return This builder for chaining. */ - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + public Builder setGcsUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } + checkByteStringIsUtf8(value); + sourceCase_ = 2; + source_ = value; + onChanged(); + return this; } + /** * * *
-     * The next_page_token value returned from a previous list request.
+     * Uncompressed raw byte content for test cases.
      * 
* - * string page_token = 3; + * bytes content = 3; * - * @param value The pageToken to set. - * @return This builder for chaining. + * @return The content. */ - public Builder setPageToken(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public com.google.protobuf.ByteString getContent() { + if (sourceCase_ == 3) { + return (com.google.protobuf.ByteString) source_; } - - pageToken_ = value; - onChanged(); - return this; + return com.google.protobuf.ByteString.EMPTY; } /** * * *
-     * The next_page_token value returned from a previous list request.
+     * Uncompressed raw byte content for test cases.
      * 
* - * string page_token = 3; + * bytes content = 3; * + * @param value The content to set. * @return This builder for chaining. */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); + public Builder setContent(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + sourceCase_ = 3; + source_ = value; onChanged(); return this; } @@ -867,22 +995,19 @@ public Builder clearPageToken() { * * *
-     * The next_page_token value returned from a previous list request.
+     * Uncompressed raw byte content for test cases.
      * 
* - * string page_token = 3; + * bytes content = 3; * - * @param value The bytes for pageToken to set. * @return This builder for chaining. */ - public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public Builder clearContent() { + if (sourceCase_ == 3) { + sourceCase_ = 0; + source_ = null; + onChanged(); } - checkByteStringIsUtf8(value); - - pageToken_ = value; - onChanged(); return this; } @@ -897,42 +1022,42 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.ListExperimentsRequest) + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.ImportTestCasesRequest) } - // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ListExperimentsRequest) - private static final com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ImportTestCasesRequest) + private static final com.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest(); + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest(); } - public static com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest getDefaultInstance() { + public static com.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public ListExperimentsRequest parsePartialFrom( + public ImportTestCasesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListExperimentsRequest(input, extensionRegistry); + return new ImportTestCasesRequest(input, extensionRegistry); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest getDefaultInstanceForType() { + public com.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportTestCasesRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportTestCasesRequestOrBuilder.java new file mode 100644 index 000000000..1862984fd --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportTestCasesRequestOrBuilder.java @@ -0,0 +1,100 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/test_case.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface ImportTestCasesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ImportTestCasesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The agent to import test cases to.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The agent to import test cases to.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI
+   * to import test cases from. The format of this URI must be
+   * `gs://<bucket-name>/<object-name>`.
+   * 
+ * + * string gcs_uri = 2; + * + * @return The gcsUri. + */ + java.lang.String getGcsUri(); + /** + * + * + *
+   * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI
+   * to import test cases from. The format of this URI must be
+   * `gs://<bucket-name>/<object-name>`.
+   * 
+ * + * string gcs_uri = 2; + * + * @return The bytes for gcsUri. + */ + com.google.protobuf.ByteString getGcsUriBytes(); + + /** + * + * + *
+   * Uncompressed raw byte content for test cases.
+   * 
+ * + * bytes content = 3; + * + * @return The content. + */ + com.google.protobuf.ByteString getContent(); + + public com.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest.SourceCase getSourceCase(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportTestCasesResponse.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportTestCasesResponse.java new file mode 100644 index 000000000..37c4d2c43 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportTestCasesResponse.java @@ -0,0 +1,764 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/test_case.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The response message for [TestCases.ImportTestCases][google.cloud.dialogflow.cx.v3.TestCases.ImportTestCases].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ImportTestCasesResponse} + */ +public final class ImportTestCasesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ImportTestCasesResponse) + ImportTestCasesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImportTestCasesResponse.newBuilder() to construct. + private ImportTestCasesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImportTestCasesResponse() { + names_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImportTestCasesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ImportTestCasesResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + names_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + names_.add(s); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + names_ = names_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ImportTestCasesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ImportTestCasesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ImportTestCasesResponse.class, + com.google.cloud.dialogflow.cx.v3.ImportTestCasesResponse.Builder.class); + } + + public static final int NAMES_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList names_; + /** + * + * + *
+   * The unique identifiers of the new test cases.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/testCases/<TestCase ID>`.
+   * 
+ * + * repeated string names = 1 [(.google.api.resource_reference) = { ... } + * + * @return A list containing the names. + */ + public com.google.protobuf.ProtocolStringList getNamesList() { + return names_; + } + /** + * + * + *
+   * The unique identifiers of the new test cases.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/testCases/<TestCase ID>`.
+   * 
+ * + * repeated string names = 1 [(.google.api.resource_reference) = { ... } + * + * @return The count of names. + */ + public int getNamesCount() { + return names_.size(); + } + /** + * + * + *
+   * The unique identifiers of the new test cases.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/testCases/<TestCase ID>`.
+   * 
+ * + * repeated string names = 1 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the element to return. + * @return The names at the given index. + */ + public java.lang.String getNames(int index) { + return names_.get(index); + } + /** + * + * + *
+   * The unique identifiers of the new test cases.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/testCases/<TestCase ID>`.
+   * 
+ * + * repeated string names = 1 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the value to return. + * @return The bytes of the names at the given index. + */ + public com.google.protobuf.ByteString getNamesBytes(int index) { + return names_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < names_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, names_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < names_.size(); i++) { + dataSize += computeStringSizeNoTag(names_.getRaw(i)); + } + size += dataSize; + size += 1 * getNamesList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.ImportTestCasesResponse)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.ImportTestCasesResponse other = + (com.google.cloud.dialogflow.cx.v3.ImportTestCasesResponse) obj; + + if (!getNamesList().equals(other.getNamesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getNamesCount() > 0) { + hash = (37 * hash) + NAMES_FIELD_NUMBER; + hash = (53 * hash) + getNamesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.ImportTestCasesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportTestCasesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportTestCasesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportTestCasesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportTestCasesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportTestCasesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportTestCasesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportTestCasesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportTestCasesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportTestCasesResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportTestCasesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportTestCasesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3.ImportTestCasesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The response message for [TestCases.ImportTestCases][google.cloud.dialogflow.cx.v3.TestCases.ImportTestCases].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ImportTestCasesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ImportTestCasesResponse) + com.google.cloud.dialogflow.cx.v3.ImportTestCasesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ImportTestCasesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ImportTestCasesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ImportTestCasesResponse.class, + com.google.cloud.dialogflow.cx.v3.ImportTestCasesResponse.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.ImportTestCasesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + names_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ImportTestCasesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ImportTestCasesResponse getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.ImportTestCasesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ImportTestCasesResponse build() { + com.google.cloud.dialogflow.cx.v3.ImportTestCasesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ImportTestCasesResponse buildPartial() { + com.google.cloud.dialogflow.cx.v3.ImportTestCasesResponse result = + new com.google.cloud.dialogflow.cx.v3.ImportTestCasesResponse(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + names_ = names_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.names_ = names_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.ImportTestCasesResponse) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.ImportTestCasesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ImportTestCasesResponse other) { + if (other == com.google.cloud.dialogflow.cx.v3.ImportTestCasesResponse.getDefaultInstance()) + return this; + if (!other.names_.isEmpty()) { + if (names_.isEmpty()) { + names_ = other.names_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureNamesIsMutable(); + names_.addAll(other.names_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.ImportTestCasesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.ImportTestCasesResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringList names_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureNamesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + names_ = new com.google.protobuf.LazyStringArrayList(names_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * The unique identifiers of the new test cases.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/testCases/<TestCase ID>`.
+     * 
+ * + * repeated string names = 1 [(.google.api.resource_reference) = { ... } + * + * @return A list containing the names. + */ + public com.google.protobuf.ProtocolStringList getNamesList() { + return names_.getUnmodifiableView(); + } + /** + * + * + *
+     * The unique identifiers of the new test cases.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/testCases/<TestCase ID>`.
+     * 
+ * + * repeated string names = 1 [(.google.api.resource_reference) = { ... } + * + * @return The count of names. + */ + public int getNamesCount() { + return names_.size(); + } + /** + * + * + *
+     * The unique identifiers of the new test cases.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/testCases/<TestCase ID>`.
+     * 
+ * + * repeated string names = 1 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the element to return. + * @return The names at the given index. + */ + public java.lang.String getNames(int index) { + return names_.get(index); + } + /** + * + * + *
+     * The unique identifiers of the new test cases.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/testCases/<TestCase ID>`.
+     * 
+ * + * repeated string names = 1 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the value to return. + * @return The bytes of the names at the given index. + */ + public com.google.protobuf.ByteString getNamesBytes(int index) { + return names_.getByteString(index); + } + /** + * + * + *
+     * The unique identifiers of the new test cases.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/testCases/<TestCase ID>`.
+     * 
+ * + * repeated string names = 1 [(.google.api.resource_reference) = { ... } + * + * @param index The index to set the value at. + * @param value The names to set. + * @return This builder for chaining. + */ + public Builder setNames(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureNamesIsMutable(); + names_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * The unique identifiers of the new test cases.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/testCases/<TestCase ID>`.
+     * 
+ * + * repeated string names = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The names to add. + * @return This builder for chaining. + */ + public Builder addNames(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureNamesIsMutable(); + names_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * The unique identifiers of the new test cases.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/testCases/<TestCase ID>`.
+     * 
+ * + * repeated string names = 1 [(.google.api.resource_reference) = { ... } + * + * @param values The names to add. + * @return This builder for chaining. + */ + public Builder addAllNames(java.lang.Iterable values) { + ensureNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, names_); + onChanged(); + return this; + } + /** + * + * + *
+     * The unique identifiers of the new test cases.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/testCases/<TestCase ID>`.
+     * 
+ * + * repeated string names = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearNames() { + names_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The unique identifiers of the new test cases.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/testCases/<TestCase ID>`.
+     * 
+ * + * repeated string names = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes of the names to add. + * @return This builder for chaining. + */ + public Builder addNamesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureNamesIsMutable(); + names_.add(value); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.ImportTestCasesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ImportTestCasesResponse) + private static final com.google.cloud.dialogflow.cx.v3.ImportTestCasesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ImportTestCasesResponse(); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportTestCasesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportTestCasesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImportTestCasesResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ImportTestCasesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportTestCasesResponseOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportTestCasesResponseOrBuilder.java new file mode 100644 index 000000000..a7c44de99 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportTestCasesResponseOrBuilder.java @@ -0,0 +1,84 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/test_case.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface ImportTestCasesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ImportTestCasesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The unique identifiers of the new test cases.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/testCases/<TestCase ID>`.
+   * 
+ * + * repeated string names = 1 [(.google.api.resource_reference) = { ... } + * + * @return A list containing the names. + */ + java.util.List getNamesList(); + /** + * + * + *
+   * The unique identifiers of the new test cases.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/testCases/<TestCase ID>`.
+   * 
+ * + * repeated string names = 1 [(.google.api.resource_reference) = { ... } + * + * @return The count of names. + */ + int getNamesCount(); + /** + * + * + *
+   * The unique identifiers of the new test cases.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/testCases/<TestCase ID>`.
+   * 
+ * + * repeated string names = 1 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the element to return. + * @return The names at the given index. + */ + java.lang.String getNames(int index); + /** + * + * + *
+   * The unique identifiers of the new test cases.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/testCases/<TestCase ID>`.
+   * 
+ * + * repeated string names = 1 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the value to return. + * @return The bytes of the names at the given index. + */ + com.google.protobuf.ByteString getNamesBytes(int index); +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Intent.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Intent.java index 5515bbe5c..24840390c 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Intent.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Intent.java @@ -2889,9 +2889,12 @@ public interface ParameterOrBuilder * * *
-     * Indicates whether the parameter content is logged in text and audio. If
-     * it is set to true, the parameter content will be replaced to parameter
-     * id in both request and response. The default value is false.
+     * Indicates whether the parameter content should be redacted in text and
+     * audio. If the flag is set to true, the parameter content will be replaced
+     * by parameter name in both request and response.
+     * 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.
      * 
* * bool redact = 4; @@ -3151,9 +3154,12 @@ public boolean getIsList() { * * *
-     * Indicates whether the parameter content is logged in text and audio. If
-     * it is set to true, the parameter content will be replaced to parameter
-     * id in both request and response. The default value is false.
+     * Indicates whether the parameter content should be redacted in text and
+     * audio. If the flag is set to true, the parameter content will be replaced
+     * by parameter name in both request and response.
+     * 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.
      * 
* * bool redact = 4; @@ -3847,9 +3853,12 @@ public Builder clearIsList() { * * *
-       * Indicates whether the parameter content is logged in text and audio. If
-       * it is set to true, the parameter content will be replaced to parameter
-       * id in both request and response. The default value is false.
+       * Indicates whether the parameter content should be redacted in text and
+       * audio. If the flag is set to true, the parameter content will be replaced
+       * by parameter name in both request and response.
+       * 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.
        * 
* * bool redact = 4; @@ -3864,9 +3873,12 @@ public boolean getRedact() { * * *
-       * Indicates whether the parameter content is logged in text and audio. If
-       * it is set to true, the parameter content will be replaced to parameter
-       * id in both request and response. The default value is false.
+       * Indicates whether the parameter content should be redacted in text and
+       * audio. If the flag is set to true, the parameter content will be replaced
+       * by parameter name in both request and response.
+       * 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.
        * 
* * bool redact = 4; @@ -3884,9 +3896,12 @@ public Builder setRedact(boolean value) { * * *
-       * Indicates whether the parameter content is logged in text and audio. If
-       * it is set to true, the parameter content will be replaced to parameter
-       * id in both request and response. The default value is false.
+       * Indicates whether the parameter content should be redacted in text and
+       * audio. If the flag is set to true, the parameter content will be replaced
+       * by parameter name in both request and response.
+       * 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.
        * 
* * bool redact = 4; diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VersionVariants.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/IntentCoverage.java similarity index 50% rename from proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VersionVariants.java rename to proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/IntentCoverage.java index 8724079e6..48b982093 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VersionVariants.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/IntentCoverage.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dialogflow/cx/v3/experiment.proto +// source: google/cloud/dialogflow/cx/v3/test_case.proto package com.google.cloud.dialogflow.cx.v3; @@ -22,29 +22,30 @@ * * *
- * A list of flow version variants.
+ * Intent coverage represents the percentage of all possible intents in the
+ * agent that are triggered in any of a parent's test cases.
  * 
* - * Protobuf type {@code google.cloud.dialogflow.cx.v3.VersionVariants} + * Protobuf type {@code google.cloud.dialogflow.cx.v3.IntentCoverage} */ -public final class VersionVariants extends com.google.protobuf.GeneratedMessageV3 +public final class IntentCoverage extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.VersionVariants) - VersionVariantsOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.IntentCoverage) + IntentCoverageOrBuilder { private static final long serialVersionUID = 0L; - // Use VersionVariants.newBuilder() to construct. - private VersionVariants(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use IntentCoverage.newBuilder() to construct. + private IntentCoverage(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private VersionVariants() { - variants_ = java.util.Collections.emptyList(); + private IntentCoverage() { + intents_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new VersionVariants(); + return new IntentCoverage(); } @java.lang.Override @@ -52,7 +53,7 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private VersionVariants( + private IntentCoverage( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -74,17 +75,22 @@ private VersionVariants( case 10: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { - variants_ = + intents_ = new java.util.ArrayList< - com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant>(); + com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent>(); mutable_bitField0_ |= 0x00000001; } - variants_.add( + intents_.add( input.readMessage( - com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant.parser(), + com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent.parser(), extensionRegistry)); break; } + case 21: + { + coverageScore_ = input.readFloat(); + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -100,7 +106,7 @@ private VersionVariants( throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000001) != 0)) { - variants_ = java.util.Collections.unmodifiableList(variants_); + intents_ = java.util.Collections.unmodifiableList(intents_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); @@ -108,108 +114,91 @@ private VersionVariants( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_VersionVariants_descriptor; + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_IntentCoverage_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_VersionVariants_fieldAccessorTable + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_IntentCoverage_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3.VersionVariants.class, - com.google.cloud.dialogflow.cx.v3.VersionVariants.Builder.class); + com.google.cloud.dialogflow.cx.v3.IntentCoverage.class, + com.google.cloud.dialogflow.cx.v3.IntentCoverage.Builder.class); } - public interface VariantOrBuilder + public interface IntentOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.VersionVariants.Variant) + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.IntentCoverage.Intent) com.google.protobuf.MessageOrBuilder { /** * * *
-     * The name of the flow version.
-     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/flows/<Flow ID>/versions/<Version ID>`.
+     * The intent full resource name
      * 
* - * string version = 1; + * string intent = 1 [(.google.api.resource_reference) = { ... } * - * @return The version. + * @return The intent. */ - java.lang.String getVersion(); + java.lang.String getIntent(); /** * * *
-     * The name of the flow version.
-     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/flows/<Flow ID>/versions/<Version ID>`.
+     * The intent full resource name
      * 
* - * string version = 1; + * string intent = 1 [(.google.api.resource_reference) = { ... } * - * @return The bytes for version. + * @return The bytes for intent. */ - com.google.protobuf.ByteString getVersionBytes(); + com.google.protobuf.ByteString getIntentBytes(); /** * * *
-     * 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.
+     * Whether or not the intent is covered by at least one of the agent's
+     * test cases.
      * 
* - * float traffic_allocation = 2; + * bool covered = 2; * - * @return The trafficAllocation. + * @return The covered. */ - float getTrafficAllocation(); - - /** - * - * - *
-     * Whether the variant is for the control group.
-     * 
- * - * bool is_control_group = 3; - * - * @return The isControlGroup. - */ - boolean getIsControlGroup(); + boolean getCovered(); } /** * * *
-   * A single flow version with specified traffic allocation.
+   * The agent's intent.
    * 
* - * Protobuf type {@code google.cloud.dialogflow.cx.v3.VersionVariants.Variant} + * Protobuf type {@code google.cloud.dialogflow.cx.v3.IntentCoverage.Intent} */ - public static final class Variant extends com.google.protobuf.GeneratedMessageV3 + public static final class Intent extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.VersionVariants.Variant) - VariantOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.IntentCoverage.Intent) + IntentOrBuilder { private static final long serialVersionUID = 0L; - // Use Variant.newBuilder() to construct. - private Variant(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use Intent.newBuilder() to construct. + private Intent(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private Variant() { - version_ = ""; + private Intent() { + intent_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Variant(); + return new Intent(); } @java.lang.Override @@ -217,7 +206,7 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Variant( + private Intent( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -239,17 +228,12 @@ private Variant( { java.lang.String s = input.readStringRequireUtf8(); - version_ = s; - break; - } - case 21: - { - trafficAllocation_ = input.readFloat(); + intent_ = s; break; } - case 24: + case 16: { - isControlGroup_ = input.readBool(); + covered_ = input.readBool(); break; } default: @@ -272,44 +256,42 @@ private Variant( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_VersionVariants_Variant_descriptor; + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_IntentCoverage_Intent_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_VersionVariants_Variant_fieldAccessorTable + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_IntentCoverage_Intent_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant.class, - com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant.Builder.class); + com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent.class, + com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent.Builder.class); } - public static final int VERSION_FIELD_NUMBER = 1; - private volatile java.lang.Object version_; + public static final int INTENT_FIELD_NUMBER = 1; + private volatile java.lang.Object intent_; /** * * *
-     * The name of the flow version.
-     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/flows/<Flow ID>/versions/<Version ID>`.
+     * The intent full resource name
      * 
* - * string version = 1; + * string intent = 1 [(.google.api.resource_reference) = { ... } * - * @return The version. + * @return The intent. */ @java.lang.Override - public java.lang.String getVersion() { - java.lang.Object ref = version_; + public java.lang.String getIntent() { + java.lang.Object ref = intent_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - version_ = s; + intent_ = s; return s; } } @@ -317,63 +299,43 @@ public java.lang.String getVersion() { * * *
-     * The name of the flow version.
-     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/flows/<Flow ID>/versions/<Version ID>`.
+     * The intent full resource name
      * 
* - * string version = 1; + * string intent = 1 [(.google.api.resource_reference) = { ... } * - * @return The bytes for version. + * @return The bytes for intent. */ @java.lang.Override - public com.google.protobuf.ByteString getVersionBytes() { - java.lang.Object ref = version_; + public com.google.protobuf.ByteString getIntentBytes() { + java.lang.Object ref = intent_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - version_ = b; + intent_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - public static final int TRAFFIC_ALLOCATION_FIELD_NUMBER = 2; - private float trafficAllocation_; + public static final int COVERED_FIELD_NUMBER = 2; + private boolean covered_; /** * * *
-     * 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.
+     * Whether or not the intent is covered by at least one of the agent's
+     * test cases.
      * 
* - * float traffic_allocation = 2; + * bool covered = 2; * - * @return The trafficAllocation. + * @return The covered. */ @java.lang.Override - public float getTrafficAllocation() { - return trafficAllocation_; - } - - public static final int IS_CONTROL_GROUP_FIELD_NUMBER = 3; - private boolean isControlGroup_; - /** - * - * - *
-     * Whether the variant is for the control group.
-     * 
- * - * bool is_control_group = 3; - * - * @return The isControlGroup. - */ - @java.lang.Override - public boolean getIsControlGroup() { - return isControlGroup_; + public boolean getCovered() { + return covered_; } private byte memoizedIsInitialized = -1; @@ -390,14 +352,11 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getVersionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, version_); - } - if (trafficAllocation_ != 0F) { - output.writeFloat(2, trafficAllocation_); + if (!getIntentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, intent_); } - if (isControlGroup_ != false) { - output.writeBool(3, isControlGroup_); + if (covered_ != false) { + output.writeBool(2, covered_); } unknownFields.writeTo(output); } @@ -408,14 +367,11 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getVersionBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, version_); + if (!getIntentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, intent_); } - if (trafficAllocation_ != 0F) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, trafficAllocation_); - } - if (isControlGroup_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, isControlGroup_); + if (covered_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, covered_); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -427,16 +383,14 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant)) { + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent)) { return super.equals(obj); } - com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant other = - (com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant) obj; + com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent other = + (com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent) obj; - if (!getVersion().equals(other.getVersion())) return false; - if (java.lang.Float.floatToIntBits(getTrafficAllocation()) - != java.lang.Float.floatToIntBits(other.getTrafficAllocation())) return false; - if (getIsControlGroup() != other.getIsControlGroup()) return false; + if (!getIntent().equals(other.getIntent())) return false; + if (getCovered() != other.getCovered()) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -448,82 +402,80 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + VERSION_FIELD_NUMBER; - hash = (53 * hash) + getVersion().hashCode(); - hash = (37 * hash) + TRAFFIC_ALLOCATION_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getTrafficAllocation()); - hash = (37 * hash) + IS_CONTROL_GROUP_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsControlGroup()); + hash = (37 * hash) + INTENT_FIELD_NUMBER; + hash = (53 * hash) + getIntent().hashCode(); + hash = (37 * hash) + COVERED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getCovered()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant parseFrom( + public static com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant parseFrom( + public static com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant parseFrom( + public static com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant parseFrom( + public static com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant parseFrom(byte[] data) + public static com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant parseFrom( + public static com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant parseFrom( + public static com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant parseFrom( + public static com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant parseDelimitedFrom( + public static com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant parseDelimitedFrom( + public static com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant parseFrom( + public static com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant parseFrom( + public static com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -541,7 +493,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant prototype) { + com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -560,32 +512,32 @@ protected Builder newBuilderForType( * * *
-     * A single flow version with specified traffic allocation.
+     * The agent's intent.
      * 
* - * Protobuf type {@code google.cloud.dialogflow.cx.v3.VersionVariants.Variant} + * Protobuf type {@code google.cloud.dialogflow.cx.v3.IntentCoverage.Intent} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.VersionVariants.Variant) - com.google.cloud.dialogflow.cx.v3.VersionVariants.VariantOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.IntentCoverage.Intent) + com.google.cloud.dialogflow.cx.v3.IntentCoverage.IntentOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_VersionVariants_Variant_descriptor; + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_IntentCoverage_Intent_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_VersionVariants_Variant_fieldAccessorTable + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_IntentCoverage_Intent_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant.class, - com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant.Builder.class); + com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent.class, + com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent.Builder.class); } - // Construct using com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant.newBuilder() + // Construct using com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -602,29 +554,27 @@ private void maybeForceBuilderInitialization() { @java.lang.Override public Builder clear() { super.clear(); - version_ = ""; - - trafficAllocation_ = 0F; + intent_ = ""; - isControlGroup_ = false; + covered_ = false; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_VersionVariants_Variant_descriptor; + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_IntentCoverage_Intent_descriptor; } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant getDefaultInstanceForType() { - return com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant.getDefaultInstance(); + public com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent.getDefaultInstance(); } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant build() { - com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant result = buildPartial(); + public com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent build() { + com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -632,12 +582,11 @@ public com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant build() { } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant buildPartial() { - com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant result = - new com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant(this); - result.version_ = version_; - result.trafficAllocation_ = trafficAllocation_; - result.isControlGroup_ = isControlGroup_; + public com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent buildPartial() { + com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent result = + new com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent(this); + result.intent_ = intent_; + result.covered_ = covered_; onBuilt(); return result; } @@ -679,26 +628,23 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant) { - return mergeFrom((com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant) other); + if (other instanceof com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant other) { - if (other == com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant.getDefaultInstance()) + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent other) { + if (other == com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent.getDefaultInstance()) return this; - if (!other.getVersion().isEmpty()) { - version_ = other.version_; + if (!other.getIntent().isEmpty()) { + intent_ = other.intent_; onChanged(); } - if (other.getTrafficAllocation() != 0F) { - setTrafficAllocation(other.getTrafficAllocation()); - } - if (other.getIsControlGroup() != false) { - setIsControlGroup(other.getIsControlGroup()); + if (other.getCovered() != false) { + setCovered(other.getCovered()); } this.mergeUnknownFields(other.unknownFields); onChanged(); @@ -715,12 +661,12 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant parsedMessage = null; + com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = - (com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant) e.getUnfinishedMessage(); + (com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -730,26 +676,24 @@ public Builder mergeFrom( return this; } - private java.lang.Object version_ = ""; + private java.lang.Object intent_ = ""; /** * * *
-       * The name of the flow version.
-       * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-       * ID>/flows/<Flow ID>/versions/<Version ID>`.
+       * The intent full resource name
        * 
* - * string version = 1; + * string intent = 1 [(.google.api.resource_reference) = { ... } * - * @return The version. + * @return The intent. */ - public java.lang.String getVersion() { - java.lang.Object ref = version_; + public java.lang.String getIntent() { + java.lang.Object ref = intent_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - version_ = s; + intent_ = s; return s; } else { return (java.lang.String) ref; @@ -759,21 +703,19 @@ public java.lang.String getVersion() { * * *
-       * The name of the flow version.
-       * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-       * ID>/flows/<Flow ID>/versions/<Version ID>`.
+       * The intent full resource name
        * 
* - * string version = 1; + * string intent = 1 [(.google.api.resource_reference) = { ... } * - * @return The bytes for version. + * @return The bytes for intent. */ - public com.google.protobuf.ByteString getVersionBytes() { - java.lang.Object ref = version_; + public com.google.protobuf.ByteString getIntentBytes() { + java.lang.Object ref = intent_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - version_ = b; + intent_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -783,22 +725,20 @@ public com.google.protobuf.ByteString getVersionBytes() { * * *
-       * The name of the flow version.
-       * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-       * ID>/flows/<Flow ID>/versions/<Version ID>`.
+       * The intent full resource name
        * 
* - * string version = 1; + * string intent = 1 [(.google.api.resource_reference) = { ... } * - * @param value The version to set. + * @param value The intent to set. * @return This builder for chaining. */ - public Builder setVersion(java.lang.String value) { + public Builder setIntent(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - version_ = value; + intent_ = value; onChanged(); return this; } @@ -806,18 +746,16 @@ public Builder setVersion(java.lang.String value) { * * *
-       * The name of the flow version.
-       * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-       * ID>/flows/<Flow ID>/versions/<Version ID>`.
+       * The intent full resource name
        * 
* - * string version = 1; + * string intent = 1 [(.google.api.resource_reference) = { ... } * * @return This builder for chaining. */ - public Builder clearVersion() { + public Builder clearIntent() { - version_ = getDefaultInstance().getVersion(); + intent_ = getDefaultInstance().getIntent(); onChanged(); return this; } @@ -825,60 +763,58 @@ public Builder clearVersion() { * * *
-       * The name of the flow version.
-       * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-       * ID>/flows/<Flow ID>/versions/<Version ID>`.
+       * The intent full resource name
        * 
* - * string version = 1; + * string intent = 1 [(.google.api.resource_reference) = { ... } * - * @param value The bytes for version to set. + * @param value The bytes for intent to set. * @return This builder for chaining. */ - public Builder setVersionBytes(com.google.protobuf.ByteString value) { + public Builder setIntentBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - version_ = value; + intent_ = value; onChanged(); return this; } - private float trafficAllocation_; + private boolean covered_; /** * * *
-       * 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.
+       * Whether or not the intent is covered by at least one of the agent's
+       * test cases.
        * 
* - * float traffic_allocation = 2; + * bool covered = 2; * - * @return The trafficAllocation. + * @return The covered. */ @java.lang.Override - public float getTrafficAllocation() { - return trafficAllocation_; + public boolean getCovered() { + return covered_; } /** * * *
-       * 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.
+       * Whether or not the intent is covered by at least one of the agent's
+       * test cases.
        * 
* - * float traffic_allocation = 2; + * bool covered = 2; * - * @param value The trafficAllocation to set. + * @param value The covered to set. * @return This builder for chaining. */ - public Builder setTrafficAllocation(float value) { + public Builder setCovered(boolean value) { - trafficAllocation_ = value; + covered_ = value; onChanged(); return this; } @@ -886,69 +822,17 @@ public Builder setTrafficAllocation(float value) { * * *
-       * 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.
+       * Whether or not the intent is covered by at least one of the agent's
+       * test cases.
        * 
* - * float traffic_allocation = 2; + * bool covered = 2; * * @return This builder for chaining. */ - public Builder clearTrafficAllocation() { + public Builder clearCovered() { - trafficAllocation_ = 0F; - onChanged(); - return this; - } - - private boolean isControlGroup_; - /** - * - * - *
-       * Whether the variant is for the control group.
-       * 
- * - * bool is_control_group = 3; - * - * @return The isControlGroup. - */ - @java.lang.Override - public boolean getIsControlGroup() { - return isControlGroup_; - } - /** - * - * - *
-       * Whether the variant is for the control group.
-       * 
- * - * bool is_control_group = 3; - * - * @param value The isControlGroup to set. - * @return This builder for chaining. - */ - public Builder setIsControlGroup(boolean value) { - - isControlGroup_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Whether the variant is for the control group.
-       * 
- * - * bool is_control_group = 3; - * - * @return This builder for chaining. - */ - public Builder clearIsControlGroup() { - - isControlGroup_ = false; + covered_ = false; onChanged(); return this; } @@ -965,116 +849,132 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.VersionVariants.Variant) + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.IntentCoverage.Intent) } - // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.VersionVariants.Variant) - private static final com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.IntentCoverage.Intent) + private static final com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant(); + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent(); } - public static com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant getDefaultInstance() { + public static com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public Variant parsePartialFrom( + public Intent parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Variant(input, extensionRegistry); + return new Intent(input, extensionRegistry); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant getDefaultInstanceForType() { + public com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public static final int VARIANTS_FIELD_NUMBER = 1; - private java.util.List variants_; + public static final int INTENTS_FIELD_NUMBER = 1; + private java.util.List intents_; /** * * *
-   * A list of flow version variants.
+   * The list of Intents present in the agent
    * 
* - * repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; + * repeated .google.cloud.dialogflow.cx.v3.IntentCoverage.Intent intents = 1; */ @java.lang.Override - public java.util.List - getVariantsList() { - return variants_; + public java.util.List getIntentsList() { + return intents_; } /** * * *
-   * A list of flow version variants.
+   * The list of Intents present in the agent
    * 
* - * repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; + * repeated .google.cloud.dialogflow.cx.v3.IntentCoverage.Intent intents = 1; */ @java.lang.Override - public java.util.List< - ? extends com.google.cloud.dialogflow.cx.v3.VersionVariants.VariantOrBuilder> - getVariantsOrBuilderList() { - return variants_; + public java.util.List + getIntentsOrBuilderList() { + return intents_; } /** * * *
-   * A list of flow version variants.
+   * The list of Intents present in the agent
    * 
* - * repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; + * repeated .google.cloud.dialogflow.cx.v3.IntentCoverage.Intent intents = 1; */ @java.lang.Override - public int getVariantsCount() { - return variants_.size(); + public int getIntentsCount() { + return intents_.size(); } /** * * *
-   * A list of flow version variants.
+   * The list of Intents present in the agent
    * 
* - * repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; + * repeated .google.cloud.dialogflow.cx.v3.IntentCoverage.Intent intents = 1; */ @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant getVariants(int index) { - return variants_.get(index); + public com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent getIntents(int index) { + return intents_.get(index); } /** * * *
-   * A list of flow version variants.
+   * The list of Intents present in the agent
    * 
* - * repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; + * repeated .google.cloud.dialogflow.cx.v3.IntentCoverage.Intent intents = 1; */ @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.VersionVariants.VariantOrBuilder getVariantsOrBuilder( + public com.google.cloud.dialogflow.cx.v3.IntentCoverage.IntentOrBuilder getIntentsOrBuilder( int index) { - return variants_.get(index); + return intents_.get(index); + } + + public static final int COVERAGE_SCORE_FIELD_NUMBER = 2; + private float coverageScore_; + /** + * + * + *
+   * The percent of intents in the agent that are covered.
+   * 
+ * + * float coverage_score = 2; + * + * @return The coverageScore. + */ + @java.lang.Override + public float getCoverageScore() { + return coverageScore_; } private byte memoizedIsInitialized = -1; @@ -1091,8 +991,11 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < variants_.size(); i++) { - output.writeMessage(1, variants_.get(i)); + for (int i = 0; i < intents_.size(); i++) { + output.writeMessage(1, intents_.get(i)); + } + if (coverageScore_ != 0F) { + output.writeFloat(2, coverageScore_); } unknownFields.writeTo(output); } @@ -1103,8 +1006,11 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - for (int i = 0; i < variants_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, variants_.get(i)); + for (int i = 0; i < intents_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, intents_.get(i)); + } + if (coverageScore_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, coverageScore_); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -1116,13 +1022,15 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.VersionVariants)) { + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.IntentCoverage)) { return super.equals(obj); } - com.google.cloud.dialogflow.cx.v3.VersionVariants other = - (com.google.cloud.dialogflow.cx.v3.VersionVariants) obj; + com.google.cloud.dialogflow.cx.v3.IntentCoverage other = + (com.google.cloud.dialogflow.cx.v3.IntentCoverage) obj; - if (!getVariantsList().equals(other.getVariantsList())) return false; + if (!getIntentsList().equals(other.getIntentsList())) return false; + if (java.lang.Float.floatToIntBits(getCoverageScore()) + != java.lang.Float.floatToIntBits(other.getCoverageScore())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -1134,80 +1042,82 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (getVariantsCount() > 0) { - hash = (37 * hash) + VARIANTS_FIELD_NUMBER; - hash = (53 * hash) + getVariantsList().hashCode(); + if (getIntentsCount() > 0) { + hash = (37 * hash) + INTENTS_FIELD_NUMBER; + hash = (53 * hash) + getIntentsList().hashCode(); } + hash = (37 * hash) + COVERAGE_SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getCoverageScore()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.cloud.dialogflow.cx.v3.VersionVariants parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.dialogflow.cx.v3.IntentCoverage parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3.VersionVariants parseFrom( + public static com.google.cloud.dialogflow.cx.v3.IntentCoverage parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.VersionVariants parseFrom( + public static com.google.cloud.dialogflow.cx.v3.IntentCoverage parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3.VersionVariants parseFrom( + public static com.google.cloud.dialogflow.cx.v3.IntentCoverage parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.VersionVariants parseFrom(byte[] data) + public static com.google.cloud.dialogflow.cx.v3.IntentCoverage parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3.VersionVariants parseFrom( + public static com.google.cloud.dialogflow.cx.v3.IntentCoverage parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.VersionVariants parseFrom( + public static com.google.cloud.dialogflow.cx.v3.IntentCoverage parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3.VersionVariants parseFrom( + public static com.google.cloud.dialogflow.cx.v3.IntentCoverage parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.VersionVariants parseDelimitedFrom( + public static com.google.cloud.dialogflow.cx.v3.IntentCoverage parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3.VersionVariants parseDelimitedFrom( + public static com.google.cloud.dialogflow.cx.v3.IntentCoverage parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.VersionVariants parseFrom( + public static com.google.cloud.dialogflow.cx.v3.IntentCoverage parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3.VersionVariants parseFrom( + public static com.google.cloud.dialogflow.cx.v3.IntentCoverage parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -1224,7 +1134,7 @@ public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.cloud.dialogflow.cx.v3.VersionVariants prototype) { + public static Builder newBuilder(com.google.cloud.dialogflow.cx.v3.IntentCoverage prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -1242,31 +1152,32 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * A list of flow version variants.
+   * Intent coverage represents the percentage of all possible intents in the
+   * agent that are triggered in any of a parent's test cases.
    * 
* - * Protobuf type {@code google.cloud.dialogflow.cx.v3.VersionVariants} + * Protobuf type {@code google.cloud.dialogflow.cx.v3.IntentCoverage} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.VersionVariants) - com.google.cloud.dialogflow.cx.v3.VersionVariantsOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.IntentCoverage) + com.google.cloud.dialogflow.cx.v3.IntentCoverageOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_VersionVariants_descriptor; + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_IntentCoverage_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_VersionVariants_fieldAccessorTable + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_IntentCoverage_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3.VersionVariants.class, - com.google.cloud.dialogflow.cx.v3.VersionVariants.Builder.class); + com.google.cloud.dialogflow.cx.v3.IntentCoverage.class, + com.google.cloud.dialogflow.cx.v3.IntentCoverage.Builder.class); } - // Construct using com.google.cloud.dialogflow.cx.v3.VersionVariants.newBuilder() + // Construct using com.google.cloud.dialogflow.cx.v3.IntentCoverage.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -1278,36 +1189,38 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getVariantsFieldBuilder(); + getIntentsFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); - if (variantsBuilder_ == null) { - variants_ = java.util.Collections.emptyList(); + if (intentsBuilder_ == null) { + intents_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { - variantsBuilder_.clear(); + intentsBuilder_.clear(); } + coverageScore_ = 0F; + return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_VersionVariants_descriptor; + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_IntentCoverage_descriptor; } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.VersionVariants getDefaultInstanceForType() { - return com.google.cloud.dialogflow.cx.v3.VersionVariants.getDefaultInstance(); + public com.google.cloud.dialogflow.cx.v3.IntentCoverage getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.IntentCoverage.getDefaultInstance(); } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.VersionVariants build() { - com.google.cloud.dialogflow.cx.v3.VersionVariants result = buildPartial(); + public com.google.cloud.dialogflow.cx.v3.IntentCoverage build() { + com.google.cloud.dialogflow.cx.v3.IntentCoverage result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -1315,19 +1228,20 @@ public com.google.cloud.dialogflow.cx.v3.VersionVariants build() { } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.VersionVariants buildPartial() { - com.google.cloud.dialogflow.cx.v3.VersionVariants result = - new com.google.cloud.dialogflow.cx.v3.VersionVariants(this); + public com.google.cloud.dialogflow.cx.v3.IntentCoverage buildPartial() { + com.google.cloud.dialogflow.cx.v3.IntentCoverage result = + new com.google.cloud.dialogflow.cx.v3.IntentCoverage(this); int from_bitField0_ = bitField0_; - if (variantsBuilder_ == null) { + if (intentsBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { - variants_ = java.util.Collections.unmodifiableList(variants_); + intents_ = java.util.Collections.unmodifiableList(intents_); bitField0_ = (bitField0_ & ~0x00000001); } - result.variants_ = variants_; + result.intents_ = intents_; } else { - result.variants_ = variantsBuilder_.build(); + result.intents_ = intentsBuilder_.build(); } + result.coverageScore_ = coverageScore_; onBuilt(); return result; } @@ -1367,44 +1281,47 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.dialogflow.cx.v3.VersionVariants) { - return mergeFrom((com.google.cloud.dialogflow.cx.v3.VersionVariants) other); + if (other instanceof com.google.cloud.dialogflow.cx.v3.IntentCoverage) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.IntentCoverage) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.VersionVariants other) { - if (other == com.google.cloud.dialogflow.cx.v3.VersionVariants.getDefaultInstance()) + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.IntentCoverage other) { + if (other == com.google.cloud.dialogflow.cx.v3.IntentCoverage.getDefaultInstance()) return this; - if (variantsBuilder_ == null) { - if (!other.variants_.isEmpty()) { - if (variants_.isEmpty()) { - variants_ = other.variants_; + if (intentsBuilder_ == null) { + if (!other.intents_.isEmpty()) { + if (intents_.isEmpty()) { + intents_ = other.intents_; bitField0_ = (bitField0_ & ~0x00000001); } else { - ensureVariantsIsMutable(); - variants_.addAll(other.variants_); + ensureIntentsIsMutable(); + intents_.addAll(other.intents_); } onChanged(); } } else { - if (!other.variants_.isEmpty()) { - if (variantsBuilder_.isEmpty()) { - variantsBuilder_.dispose(); - variantsBuilder_ = null; - variants_ = other.variants_; + if (!other.intents_.isEmpty()) { + if (intentsBuilder_.isEmpty()) { + intentsBuilder_.dispose(); + intentsBuilder_ = null; + intents_ = other.intents_; bitField0_ = (bitField0_ & ~0x00000001); - variantsBuilder_ = + intentsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getVariantsFieldBuilder() + ? getIntentsFieldBuilder() : null; } else { - variantsBuilder_.addAllMessages(other.variants_); + intentsBuilder_.addAllMessages(other.intents_); } } } + if (other.getCoverageScore() != 0F) { + setCoverageScore(other.getCoverageScore()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -1420,12 +1337,11 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dialogflow.cx.v3.VersionVariants parsedMessage = null; + com.google.cloud.dialogflow.cx.v3.IntentCoverage parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dialogflow.cx.v3.VersionVariants) e.getUnfinishedMessage(); + parsedMessage = (com.google.cloud.dialogflow.cx.v3.IntentCoverage) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -1437,93 +1353,93 @@ public Builder mergeFrom( private int bitField0_; - private java.util.List variants_ = + private java.util.List intents_ = java.util.Collections.emptyList(); - private void ensureVariantsIsMutable() { + private void ensureIntentsIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { - variants_ = - new java.util.ArrayList( - variants_); + intents_ = + new java.util.ArrayList( + intents_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant, - com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant.Builder, - com.google.cloud.dialogflow.cx.v3.VersionVariants.VariantOrBuilder> - variantsBuilder_; + com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent, + com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent.Builder, + com.google.cloud.dialogflow.cx.v3.IntentCoverage.IntentOrBuilder> + intentsBuilder_; /** * * *
-     * A list of flow version variants.
+     * The list of Intents present in the agent
      * 
* - * repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; + * repeated .google.cloud.dialogflow.cx.v3.IntentCoverage.Intent intents = 1; */ - public java.util.List - getVariantsList() { - if (variantsBuilder_ == null) { - return java.util.Collections.unmodifiableList(variants_); + public java.util.List + getIntentsList() { + if (intentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(intents_); } else { - return variantsBuilder_.getMessageList(); + return intentsBuilder_.getMessageList(); } } /** * * *
-     * A list of flow version variants.
+     * The list of Intents present in the agent
      * 
* - * repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; + * repeated .google.cloud.dialogflow.cx.v3.IntentCoverage.Intent intents = 1; */ - public int getVariantsCount() { - if (variantsBuilder_ == null) { - return variants_.size(); + public int getIntentsCount() { + if (intentsBuilder_ == null) { + return intents_.size(); } else { - return variantsBuilder_.getCount(); + return intentsBuilder_.getCount(); } } /** * * *
-     * A list of flow version variants.
+     * The list of Intents present in the agent
      * 
* - * repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; + * repeated .google.cloud.dialogflow.cx.v3.IntentCoverage.Intent intents = 1; */ - public com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant getVariants(int index) { - if (variantsBuilder_ == null) { - return variants_.get(index); + public com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent getIntents(int index) { + if (intentsBuilder_ == null) { + return intents_.get(index); } else { - return variantsBuilder_.getMessage(index); + return intentsBuilder_.getMessage(index); } } /** * * *
-     * A list of flow version variants.
+     * The list of Intents present in the agent
      * 
* - * repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; + * repeated .google.cloud.dialogflow.cx.v3.IntentCoverage.Intent intents = 1; */ - public Builder setVariants( - int index, com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant value) { - if (variantsBuilder_ == null) { + public Builder setIntents( + int index, com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent value) { + if (intentsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureVariantsIsMutable(); - variants_.set(index, value); + ensureIntentsIsMutable(); + intents_.set(index, value); onChanged(); } else { - variantsBuilder_.setMessage(index, value); + intentsBuilder_.setMessage(index, value); } return this; } @@ -1531,20 +1447,20 @@ public Builder setVariants( * * *
-     * A list of flow version variants.
+     * The list of Intents present in the agent
      * 
* - * repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; + * repeated .google.cloud.dialogflow.cx.v3.IntentCoverage.Intent intents = 1; */ - public Builder setVariants( + public Builder setIntents( int index, - com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant.Builder builderForValue) { - if (variantsBuilder_ == null) { - ensureVariantsIsMutable(); - variants_.set(index, builderForValue.build()); + com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent.Builder builderForValue) { + if (intentsBuilder_ == null) { + ensureIntentsIsMutable(); + intents_.set(index, builderForValue.build()); onChanged(); } else { - variantsBuilder_.setMessage(index, builderForValue.build()); + intentsBuilder_.setMessage(index, builderForValue.build()); } return this; } @@ -1552,21 +1468,21 @@ public Builder setVariants( * * *
-     * A list of flow version variants.
+     * The list of Intents present in the agent
      * 
* - * repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; + * repeated .google.cloud.dialogflow.cx.v3.IntentCoverage.Intent intents = 1; */ - public Builder addVariants(com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant value) { - if (variantsBuilder_ == null) { + public Builder addIntents(com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent value) { + if (intentsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureVariantsIsMutable(); - variants_.add(value); + ensureIntentsIsMutable(); + intents_.add(value); onChanged(); } else { - variantsBuilder_.addMessage(value); + intentsBuilder_.addMessage(value); } return this; } @@ -1574,22 +1490,22 @@ public Builder addVariants(com.google.cloud.dialogflow.cx.v3.VersionVariants.Var * * *
-     * A list of flow version variants.
+     * The list of Intents present in the agent
      * 
* - * repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; + * repeated .google.cloud.dialogflow.cx.v3.IntentCoverage.Intent intents = 1; */ - public Builder addVariants( - int index, com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant value) { - if (variantsBuilder_ == null) { + public Builder addIntents( + int index, com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent value) { + if (intentsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureVariantsIsMutable(); - variants_.add(index, value); + ensureIntentsIsMutable(); + intents_.add(index, value); onChanged(); } else { - variantsBuilder_.addMessage(index, value); + intentsBuilder_.addMessage(index, value); } return this; } @@ -1597,19 +1513,19 @@ public Builder addVariants( * * *
-     * A list of flow version variants.
+     * The list of Intents present in the agent
      * 
* - * repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; + * repeated .google.cloud.dialogflow.cx.v3.IntentCoverage.Intent intents = 1; */ - public Builder addVariants( - com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant.Builder builderForValue) { - if (variantsBuilder_ == null) { - ensureVariantsIsMutable(); - variants_.add(builderForValue.build()); + public Builder addIntents( + com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent.Builder builderForValue) { + if (intentsBuilder_ == null) { + ensureIntentsIsMutable(); + intents_.add(builderForValue.build()); onChanged(); } else { - variantsBuilder_.addMessage(builderForValue.build()); + intentsBuilder_.addMessage(builderForValue.build()); } return this; } @@ -1617,20 +1533,20 @@ public Builder addVariants( * * *
-     * A list of flow version variants.
+     * The list of Intents present in the agent
      * 
* - * repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; + * repeated .google.cloud.dialogflow.cx.v3.IntentCoverage.Intent intents = 1; */ - public Builder addVariants( + public Builder addIntents( int index, - com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant.Builder builderForValue) { - if (variantsBuilder_ == null) { - ensureVariantsIsMutable(); - variants_.add(index, builderForValue.build()); + com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent.Builder builderForValue) { + if (intentsBuilder_ == null) { + ensureIntentsIsMutable(); + intents_.add(index, builderForValue.build()); onChanged(); } else { - variantsBuilder_.addMessage(index, builderForValue.build()); + intentsBuilder_.addMessage(index, builderForValue.build()); } return this; } @@ -1638,20 +1554,20 @@ public Builder addVariants( * * *
-     * A list of flow version variants.
+     * The list of Intents present in the agent
      * 
* - * repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; + * repeated .google.cloud.dialogflow.cx.v3.IntentCoverage.Intent intents = 1; */ - public Builder addAllVariants( - java.lang.Iterable + public Builder addAllIntents( + java.lang.Iterable values) { - if (variantsBuilder_ == null) { - ensureVariantsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, variants_); + if (intentsBuilder_ == null) { + ensureIntentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, intents_); onChanged(); } else { - variantsBuilder_.addAllMessages(values); + intentsBuilder_.addAllMessages(values); } return this; } @@ -1659,18 +1575,18 @@ public Builder addAllVariants( * * *
-     * A list of flow version variants.
+     * The list of Intents present in the agent
      * 
* - * repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; + * repeated .google.cloud.dialogflow.cx.v3.IntentCoverage.Intent intents = 1; */ - public Builder clearVariants() { - if (variantsBuilder_ == null) { - variants_ = java.util.Collections.emptyList(); + public Builder clearIntents() { + if (intentsBuilder_ == null) { + intents_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { - variantsBuilder_.clear(); + intentsBuilder_.clear(); } return this; } @@ -1678,18 +1594,18 @@ public Builder clearVariants() { * * *
-     * A list of flow version variants.
+     * The list of Intents present in the agent
      * 
* - * repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; + * repeated .google.cloud.dialogflow.cx.v3.IntentCoverage.Intent intents = 1; */ - public Builder removeVariants(int index) { - if (variantsBuilder_ == null) { - ensureVariantsIsMutable(); - variants_.remove(index); + public Builder removeIntents(int index) { + if (intentsBuilder_ == null) { + ensureIntentsIsMutable(); + intents_.remove(index); onChanged(); } else { - variantsBuilder_.remove(index); + intentsBuilder_.remove(index); } return this; } @@ -1697,109 +1613,159 @@ public Builder removeVariants(int index) { * * *
-     * A list of flow version variants.
+     * The list of Intents present in the agent
      * 
* - * repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; + * repeated .google.cloud.dialogflow.cx.v3.IntentCoverage.Intent intents = 1; */ - public com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant.Builder getVariantsBuilder( + public com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent.Builder getIntentsBuilder( int index) { - return getVariantsFieldBuilder().getBuilder(index); + return getIntentsFieldBuilder().getBuilder(index); } /** * * *
-     * A list of flow version variants.
+     * The list of Intents present in the agent
      * 
* - * repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; + * repeated .google.cloud.dialogflow.cx.v3.IntentCoverage.Intent intents = 1; */ - public com.google.cloud.dialogflow.cx.v3.VersionVariants.VariantOrBuilder getVariantsOrBuilder( + public com.google.cloud.dialogflow.cx.v3.IntentCoverage.IntentOrBuilder getIntentsOrBuilder( int index) { - if (variantsBuilder_ == null) { - return variants_.get(index); + if (intentsBuilder_ == null) { + return intents_.get(index); } else { - return variantsBuilder_.getMessageOrBuilder(index); + return intentsBuilder_.getMessageOrBuilder(index); } } /** * * *
-     * A list of flow version variants.
+     * The list of Intents present in the agent
      * 
* - * repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; + * repeated .google.cloud.dialogflow.cx.v3.IntentCoverage.Intent intents = 1; */ public java.util.List< - ? extends com.google.cloud.dialogflow.cx.v3.VersionVariants.VariantOrBuilder> - getVariantsOrBuilderList() { - if (variantsBuilder_ != null) { - return variantsBuilder_.getMessageOrBuilderList(); + ? extends com.google.cloud.dialogflow.cx.v3.IntentCoverage.IntentOrBuilder> + getIntentsOrBuilderList() { + if (intentsBuilder_ != null) { + return intentsBuilder_.getMessageOrBuilderList(); } else { - return java.util.Collections.unmodifiableList(variants_); + return java.util.Collections.unmodifiableList(intents_); } } /** * * *
-     * A list of flow version variants.
+     * The list of Intents present in the agent
      * 
* - * repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; + * repeated .google.cloud.dialogflow.cx.v3.IntentCoverage.Intent intents = 1; */ - public com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant.Builder addVariantsBuilder() { - return getVariantsFieldBuilder() - .addBuilder( - com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant.getDefaultInstance()); + public com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent.Builder addIntentsBuilder() { + return getIntentsFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent.getDefaultInstance()); } /** * * *
-     * A list of flow version variants.
+     * The list of Intents present in the agent
      * 
* - * repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; + * repeated .google.cloud.dialogflow.cx.v3.IntentCoverage.Intent intents = 1; */ - public com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant.Builder addVariantsBuilder( + public com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent.Builder addIntentsBuilder( int index) { - return getVariantsFieldBuilder() + return getIntentsFieldBuilder() .addBuilder( - index, - com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant.getDefaultInstance()); + index, com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent.getDefaultInstance()); } /** * * *
-     * A list of flow version variants.
+     * The list of Intents present in the agent
      * 
* - * repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; + * repeated .google.cloud.dialogflow.cx.v3.IntentCoverage.Intent intents = 1; */ - public java.util.List - getVariantsBuilderList() { - return getVariantsFieldBuilder().getBuilderList(); + public java.util.List + getIntentsBuilderList() { + return getIntentsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant, - com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant.Builder, - com.google.cloud.dialogflow.cx.v3.VersionVariants.VariantOrBuilder> - getVariantsFieldBuilder() { - if (variantsBuilder_ == null) { - variantsBuilder_ = + com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent, + com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent.Builder, + com.google.cloud.dialogflow.cx.v3.IntentCoverage.IntentOrBuilder> + getIntentsFieldBuilder() { + if (intentsBuilder_ == null) { + intentsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant, - com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant.Builder, - com.google.cloud.dialogflow.cx.v3.VersionVariants.VariantOrBuilder>( - variants_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - variants_ = null; + com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent, + com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent.Builder, + com.google.cloud.dialogflow.cx.v3.IntentCoverage.IntentOrBuilder>( + intents_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + intents_ = null; } - return variantsBuilder_; + return intentsBuilder_; + } + + private float coverageScore_; + /** + * + * + *
+     * The percent of intents in the agent that are covered.
+     * 
+ * + * float coverage_score = 2; + * + * @return The coverageScore. + */ + @java.lang.Override + public float getCoverageScore() { + return coverageScore_; + } + /** + * + * + *
+     * The percent of intents in the agent that are covered.
+     * 
+ * + * float coverage_score = 2; + * + * @param value The coverageScore to set. + * @return This builder for chaining. + */ + public Builder setCoverageScore(float value) { + + coverageScore_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The percent of intents in the agent that are covered.
+     * 
+ * + * float coverage_score = 2; + * + * @return This builder for chaining. + */ + public Builder clearCoverageScore() { + + coverageScore_ = 0F; + onChanged(); + return this; } @java.lang.Override @@ -1813,42 +1779,42 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.VersionVariants) + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.IntentCoverage) } - // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.VersionVariants) - private static final com.google.cloud.dialogflow.cx.v3.VersionVariants DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.IntentCoverage) + private static final com.google.cloud.dialogflow.cx.v3.IntentCoverage DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.VersionVariants(); + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.IntentCoverage(); } - public static com.google.cloud.dialogflow.cx.v3.VersionVariants getDefaultInstance() { + public static com.google.cloud.dialogflow.cx.v3.IntentCoverage getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public VersionVariants parsePartialFrom( + public IntentCoverage parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new VersionVariants(input, extensionRegistry); + return new IntentCoverage(input, extensionRegistry); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.VersionVariants getDefaultInstanceForType() { + public com.google.cloud.dialogflow.cx.v3.IntentCoverage getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/IntentCoverageOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/IntentCoverageOrBuilder.java new file mode 100644 index 000000000..4883ae65f --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/IntentCoverageOrBuilder.java @@ -0,0 +1,90 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/test_case.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface IntentCoverageOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.IntentCoverage) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of Intents present in the agent
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.IntentCoverage.Intent intents = 1; + */ + java.util.List getIntentsList(); + /** + * + * + *
+   * The list of Intents present in the agent
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.IntentCoverage.Intent intents = 1; + */ + com.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent getIntents(int index); + /** + * + * + *
+   * The list of Intents present in the agent
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.IntentCoverage.Intent intents = 1; + */ + int getIntentsCount(); + /** + * + * + *
+   * The list of Intents present in the agent
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.IntentCoverage.Intent intents = 1; + */ + java.util.List + getIntentsOrBuilderList(); + /** + * + * + *
+   * The list of Intents present in the agent
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.IntentCoverage.Intent intents = 1; + */ + com.google.cloud.dialogflow.cx.v3.IntentCoverage.IntentOrBuilder getIntentsOrBuilder(int index); + + /** + * + * + *
+   * The percent of intents in the agent that are covered.
+   * 
+ * + * float coverage_score = 2; + * + * @return The coverageScore. + */ + float getCoverageScore(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListExperimentsResponse.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListExperimentsResponse.java deleted file mode 100644 index a9458ea36..000000000 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListExperimentsResponse.java +++ /dev/null @@ -1,1209 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dialogflow/cx/v3/experiment.proto - -package com.google.cloud.dialogflow.cx.v3; - -/** - * - * - *
- * The response message for [Experiments.ListExperiments][google.cloud.dialogflow.cx.v3.Experiments.ListExperiments].
- * 
- * - * Protobuf type {@code google.cloud.dialogflow.cx.v3.ListExperimentsResponse} - */ -public final class ListExperimentsResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ListExperimentsResponse) - ListExperimentsResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListExperimentsResponse.newBuilder() to construct. - private ListExperimentsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListExperimentsResponse() { - experiments_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListExperimentsResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ListExperimentsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - experiments_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - experiments_.add( - input.readMessage( - com.google.cloud.dialogflow.cx.v3.Experiment.parser(), extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - experiments_ = java.util.Collections.unmodifiableList(experiments_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_ListExperimentsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_ListExperimentsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse.class, - com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse.Builder.class); - } - - public static final int EXPERIMENTS_FIELD_NUMBER = 1; - private java.util.List 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.
-   * 
- * - * repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; - */ - @java.lang.Override - public java.util.List getExperimentsList() { - return 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.
-   * 
- * - * repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; - */ - @java.lang.Override - public java.util.List - getExperimentsOrBuilderList() { - return 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.
-   * 
- * - * repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; - */ - @java.lang.Override - public int getExperimentsCount() { - return experiments_.size(); - } - /** - * - * - *
-   * 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.
-   * 
- * - * repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.Experiment getExperiments(int index) { - return experiments_.get(index); - } - /** - * - * - *
-   * 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.
-   * 
- * - * repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.ExperimentOrBuilder getExperimentsOrBuilder(int index) { - return experiments_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - private volatile java.lang.Object nextPageToken_; - /** - * - * - *
-   * Token to retrieve the next page of results, or empty if there are no more
-   * results in the list.
-   * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - * - * - *
-   * Token to retrieve the next page of results, or empty if there are no more
-   * results in the list.
-   * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < experiments_.size(); i++) { - output.writeMessage(1, experiments_.get(i)); - } - if (!getNextPageTokenBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < experiments_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, experiments_.get(i)); - } - if (!getNextPageTokenBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse)) { - return super.equals(obj); - } - com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse other = - (com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse) obj; - - if (!getExperimentsList().equals(other.getExperimentsList())) return false; - if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getExperimentsCount() > 0) { - hash = (37 * hash) + EXPERIMENTS_FIELD_NUMBER; - hash = (53 * hash) + getExperimentsList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * The response message for [Experiments.ListExperiments][google.cloud.dialogflow.cx.v3.Experiments.ListExperiments].
-   * 
- * - * Protobuf type {@code google.cloud.dialogflow.cx.v3.ListExperimentsResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ListExperimentsResponse) - com.google.cloud.dialogflow.cx.v3.ListExperimentsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_ListExperimentsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_ListExperimentsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse.class, - com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse.Builder.class); - } - - // Construct using com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getExperimentsFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (experimentsBuilder_ == null) { - experiments_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - experimentsBuilder_.clear(); - } - nextPageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_ListExperimentsResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse getDefaultInstanceForType() { - return com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse build() { - com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse buildPartial() { - com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse result = - new com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse(this); - int from_bitField0_ = bitField0_; - if (experimentsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - experiments_ = java.util.Collections.unmodifiableList(experiments_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.experiments_ = experiments_; - } else { - result.experiments_ = experimentsBuilder_.build(); - } - result.nextPageToken_ = nextPageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse) { - return mergeFrom((com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse other) { - if (other == com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse.getDefaultInstance()) - return this; - if (experimentsBuilder_ == null) { - if (!other.experiments_.isEmpty()) { - if (experiments_.isEmpty()) { - experiments_ = other.experiments_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureExperimentsIsMutable(); - experiments_.addAll(other.experiments_); - } - onChanged(); - } - } else { - if (!other.experiments_.isEmpty()) { - if (experimentsBuilder_.isEmpty()) { - experimentsBuilder_.dispose(); - experimentsBuilder_ = null; - experiments_ = other.experiments_; - bitField0_ = (bitField0_ & ~0x00000001); - experimentsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getExperimentsFieldBuilder() - : null; - } else { - experimentsBuilder_.addAllMessages(other.experiments_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.util.List experiments_ = - java.util.Collections.emptyList(); - - private void ensureExperimentsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - experiments_ = - new java.util.ArrayList(experiments_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3.Experiment, - com.google.cloud.dialogflow.cx.v3.Experiment.Builder, - com.google.cloud.dialogflow.cx.v3.ExperimentOrBuilder> - experimentsBuilder_; - - /** - * - * - *
-     * 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.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; - */ - public java.util.List getExperimentsList() { - if (experimentsBuilder_ == null) { - return java.util.Collections.unmodifiableList(experiments_); - } else { - return experimentsBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * 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.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; - */ - public int getExperimentsCount() { - if (experimentsBuilder_ == null) { - return experiments_.size(); - } else { - return experimentsBuilder_.getCount(); - } - } - /** - * - * - *
-     * 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.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; - */ - public com.google.cloud.dialogflow.cx.v3.Experiment getExperiments(int index) { - if (experimentsBuilder_ == null) { - return experiments_.get(index); - } else { - return experimentsBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * 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.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; - */ - public Builder setExperiments(int index, com.google.cloud.dialogflow.cx.v3.Experiment value) { - if (experimentsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureExperimentsIsMutable(); - experiments_.set(index, value); - onChanged(); - } else { - experimentsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; - */ - public Builder setExperiments( - int index, com.google.cloud.dialogflow.cx.v3.Experiment.Builder builderForValue) { - if (experimentsBuilder_ == null) { - ensureExperimentsIsMutable(); - experiments_.set(index, builderForValue.build()); - onChanged(); - } else { - experimentsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; - */ - public Builder addExperiments(com.google.cloud.dialogflow.cx.v3.Experiment value) { - if (experimentsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureExperimentsIsMutable(); - experiments_.add(value); - onChanged(); - } else { - experimentsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; - */ - public Builder addExperiments(int index, com.google.cloud.dialogflow.cx.v3.Experiment value) { - if (experimentsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureExperimentsIsMutable(); - experiments_.add(index, value); - onChanged(); - } else { - experimentsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; - */ - public Builder addExperiments( - com.google.cloud.dialogflow.cx.v3.Experiment.Builder builderForValue) { - if (experimentsBuilder_ == null) { - ensureExperimentsIsMutable(); - experiments_.add(builderForValue.build()); - onChanged(); - } else { - experimentsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; - */ - public Builder addExperiments( - int index, com.google.cloud.dialogflow.cx.v3.Experiment.Builder builderForValue) { - if (experimentsBuilder_ == null) { - ensureExperimentsIsMutable(); - experiments_.add(index, builderForValue.build()); - onChanged(); - } else { - experimentsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; - */ - public Builder addAllExperiments( - java.lang.Iterable values) { - if (experimentsBuilder_ == null) { - ensureExperimentsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, experiments_); - onChanged(); - } else { - experimentsBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; - */ - public Builder clearExperiments() { - if (experimentsBuilder_ == null) { - experiments_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - experimentsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; - */ - public Builder removeExperiments(int index) { - if (experimentsBuilder_ == null) { - ensureExperimentsIsMutable(); - experiments_.remove(index); - onChanged(); - } else { - experimentsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; - */ - public com.google.cloud.dialogflow.cx.v3.Experiment.Builder getExperimentsBuilder(int index) { - return getExperimentsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * 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.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; - */ - public com.google.cloud.dialogflow.cx.v3.ExperimentOrBuilder getExperimentsOrBuilder( - int index) { - if (experimentsBuilder_ == null) { - return experiments_.get(index); - } else { - return experimentsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * 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.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; - */ - public java.util.List - getExperimentsOrBuilderList() { - if (experimentsBuilder_ != null) { - return experimentsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(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.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; - */ - public com.google.cloud.dialogflow.cx.v3.Experiment.Builder addExperimentsBuilder() { - return getExperimentsFieldBuilder() - .addBuilder(com.google.cloud.dialogflow.cx.v3.Experiment.getDefaultInstance()); - } - /** - * - * - *
-     * 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.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; - */ - public com.google.cloud.dialogflow.cx.v3.Experiment.Builder addExperimentsBuilder(int index) { - return getExperimentsFieldBuilder() - .addBuilder(index, com.google.cloud.dialogflow.cx.v3.Experiment.getDefaultInstance()); - } - /** - * - * - *
-     * 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.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; - */ - public java.util.List - getExperimentsBuilderList() { - return getExperimentsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3.Experiment, - com.google.cloud.dialogflow.cx.v3.Experiment.Builder, - com.google.cloud.dialogflow.cx.v3.ExperimentOrBuilder> - getExperimentsFieldBuilder() { - if (experimentsBuilder_ == null) { - experimentsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3.Experiment, - com.google.cloud.dialogflow.cx.v3.Experiment.Builder, - com.google.cloud.dialogflow.cx.v3.ExperimentOrBuilder>( - experiments_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - experiments_ = null; - } - return experimentsBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - * - * - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results in the list.
-     * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results in the list.
-     * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results in the list.
-     * 
- * - * string next_page_token = 2; - * - * @param value The nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageToken(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - nextPageToken_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results in the list.
-     * 
- * - * string next_page_token = 2; - * - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - - nextPageToken_ = getDefaultInstance().getNextPageToken(); - onChanged(); - return this; - } - /** - * - * - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results in the list.
-     * 
- * - * string next_page_token = 2; - * - * @param value The bytes for nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - nextPageToken_ = value; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.ListExperimentsResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ListExperimentsResponse) - private static final com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse(); - } - - public static com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListExperimentsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListExperimentsResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListExperimentsResponseOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListExperimentsResponseOrBuilder.java deleted file mode 100644 index 38837a57b..000000000 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListExperimentsResponseOrBuilder.java +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dialogflow/cx/v3/experiment.proto - -package com.google.cloud.dialogflow.cx.v3; - -public interface ListExperimentsResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ListExperimentsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * 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.
-   * 
- * - * repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; - */ - java.util.List getExperimentsList(); - /** - * - * - *
-   * 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.
-   * 
- * - * repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; - */ - com.google.cloud.dialogflow.cx.v3.Experiment getExperiments(int index); - /** - * - * - *
-   * 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.
-   * 
- * - * repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; - */ - int getExperimentsCount(); - /** - * - * - *
-   * 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.
-   * 
- * - * repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; - */ - java.util.List - getExperimentsOrBuilderList(); - /** - * - * - *
-   * 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.
-   * 
- * - * repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; - */ - com.google.cloud.dialogflow.cx.v3.ExperimentOrBuilder getExperimentsOrBuilder(int index); - - /** - * - * - *
-   * Token to retrieve the next page of results, or empty if there are no more
-   * results in the list.
-   * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - * - * - *
-   * Token to retrieve the next page of results, or empty if there are no more
-   * results in the list.
-   * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString getNextPageTokenBytes(); -} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListTestCaseResultsRequest.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListTestCaseResultsRequest.java new file mode 100644 index 000000000..84ae32915 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListTestCaseResultsRequest.java @@ -0,0 +1,1253 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/test_case.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The request message for [TestCases.ListTestCaseResults][google.cloud.dialogflow.cx.v3.TestCases.ListTestCaseResults].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest} + */ +public final class ListTestCaseResultsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest) + ListTestCaseResultsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListTestCaseResultsRequest.newBuilder() to construct. + private ListTestCaseResultsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListTestCaseResultsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListTestCaseResultsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListTestCaseResultsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: + { + pageSize_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ListTestCaseResultsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ListTestCaseResultsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest.class, + com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The test case to list results for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/
+   * testCases/<TestCase ID>`. Specify a `-` as a wildcard for TestCase ID to
+   * list results across multiple test cases.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The test case to list results for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/
+   * testCases/<TestCase ID>`. Specify a `-` as a wildcard for TestCase ID to
+   * list results across multiple test cases.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * The maximum number of items to return in a single page. By default 100 and
+   * at most 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * The next_page_token value returned from a previous list request.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The next_page_token value returned from a previous list request.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + private volatile java.lang.Object 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:
+   *   <field> <operator> <value> [AND <field> <operator> <value>] ...
+   *   [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.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * 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:
+   *   <field> <operator> <value> [AND <field> <operator> <value>] ...
+   *   [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.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!getFilterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!getFilterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest other = + (com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for [TestCases.ListTestCaseResults][google.cloud.dialogflow.cx.v3.TestCases.ListTestCaseResults].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest) + com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ListTestCaseResultsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ListTestCaseResultsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest.class, + com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + filter_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ListTestCaseResultsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest build() { + com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest result = + new com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + result.filter_ = filter_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest other) { + if (other + == com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The test case to list results for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/
+     * testCases/<TestCase ID>`. Specify a `-` as a wildcard for TestCase ID to
+     * list results across multiple test cases.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The test case to list results for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/
+     * testCases/<TestCase ID>`. Specify a `-` as a wildcard for TestCase ID to
+     * list results across multiple test cases.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The test case to list results for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/
+     * testCases/<TestCase ID>`. Specify a `-` as a wildcard for TestCase ID to
+     * list results across multiple test cases.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The test case to list results for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/
+     * testCases/<TestCase ID>`. Specify a `-` as a wildcard for TestCase ID to
+     * list results across multiple test cases.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The test case to list results for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/
+     * testCases/<TestCase ID>`. Specify a `-` as a wildcard for TestCase ID to
+     * list results across multiple test cases.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of items to return in a single page. By default 100 and
+     * at most 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of items to return in a single page. By default 100 and
+     * at most 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of items to return in a single page. By default 100 and
+     * at most 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The next_page_token value returned from a previous list request.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The next_page_token value returned from a previous list request.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The next_page_token value returned from a previous list request.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The next_page_token value returned from a previous list request.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The next_page_token value returned from a previous list request.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private java.lang.Object 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:
+     *   <field> <operator> <value> [AND <field> <operator> <value>] ...
+     *   [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.
+     * 
+ * + * string filter = 4; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * 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:
+     *   <field> <operator> <value> [AND <field> <operator> <value>] ...
+     *   [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.
+     * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * 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:
+     *   <field> <operator> <value> [AND <field> <operator> <value>] ...
+     *   [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.
+     * 
+ * + * string filter = 4; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + 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:
+     *   <field> <operator> <value> [AND <field> <operator> <value>] ...
+     *   [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.
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + 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:
+     *   <field> <operator> <value> [AND <field> <operator> <value>] ...
+     *   [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.
+     * 
+ * + * string filter = 4; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest) + private static final com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListTestCaseResultsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListTestCaseResultsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListTestCaseResultsRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListTestCaseResultsRequestOrBuilder.java new file mode 100644 index 000000000..0efd96e30 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListTestCaseResultsRequestOrBuilder.java @@ -0,0 +1,160 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/test_case.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface ListTestCaseResultsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The test case to list results for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/
+   * testCases/<TestCase ID>`. Specify a `-` as a wildcard for TestCase ID to
+   * list results across multiple test cases.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The test case to list results for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/
+   * testCases/<TestCase ID>`. Specify a `-` as a wildcard for TestCase ID to
+   * list results across multiple test cases.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of items to return in a single page. By default 100 and
+   * at most 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The next_page_token value returned from a previous list request.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The next_page_token value returned from a previous list request.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * 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:
+   *   <field> <operator> <value> [AND <field> <operator> <value>] ...
+   *   [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.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * 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:
+   *   <field> <operator> <value> [AND <field> <operator> <value>] ...
+   *   [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.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListTestCaseResultsResponse.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListTestCaseResultsResponse.java new file mode 100644 index 000000000..f71b0f77e --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListTestCaseResultsResponse.java @@ -0,0 +1,1155 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/test_case.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The response message for [TestCases.ListTestCaseResults][google.cloud.dialogflow.cx.v3.TestCases.ListTestCaseResults].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse} + */ +public final class ListTestCaseResultsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse) + ListTestCaseResultsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListTestCaseResultsResponse.newBuilder() to construct. + private ListTestCaseResultsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListTestCaseResultsResponse() { + testCaseResults_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListTestCaseResultsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListTestCaseResultsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + testCaseResults_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + testCaseResults_.add( + input.readMessage( + com.google.cloud.dialogflow.cx.v3.TestCaseResult.parser(), + extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + testCaseResults_ = java.util.Collections.unmodifiableList(testCaseResults_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ListTestCaseResultsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ListTestCaseResultsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse.class, + com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse.Builder.class); + } + + public static final int TEST_CASE_RESULTS_FIELD_NUMBER = 1; + private java.util.List testCaseResults_; + /** + * + * + *
+   * The list of test case results.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseResult test_case_results = 1; + */ + @java.lang.Override + public java.util.List getTestCaseResultsList() { + return testCaseResults_; + } + /** + * + * + *
+   * The list of test case results.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseResult test_case_results = 1; + */ + @java.lang.Override + public java.util.List + getTestCaseResultsOrBuilderList() { + return testCaseResults_; + } + /** + * + * + *
+   * The list of test case results.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseResult test_case_results = 1; + */ + @java.lang.Override + public int getTestCaseResultsCount() { + return testCaseResults_.size(); + } + /** + * + * + *
+   * The list of test case results.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseResult test_case_results = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TestCaseResult getTestCaseResults(int index) { + return testCaseResults_.get(index); + } + /** + * + * + *
+   * The list of test case results.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseResult test_case_results = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TestCaseResultOrBuilder getTestCaseResultsOrBuilder( + int index) { + return testCaseResults_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < testCaseResults_.size(); i++) { + output.writeMessage(1, testCaseResults_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < testCaseResults_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, testCaseResults_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse other = + (com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse) obj; + + if (!getTestCaseResultsList().equals(other.getTestCaseResultsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getTestCaseResultsCount() > 0) { + hash = (37 * hash) + TEST_CASE_RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getTestCaseResultsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The response message for [TestCases.ListTestCaseResults][google.cloud.dialogflow.cx.v3.TestCases.ListTestCaseResults].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse) + com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ListTestCaseResultsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ListTestCaseResultsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse.class, + com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getTestCaseResultsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (testCaseResultsBuilder_ == null) { + testCaseResults_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + testCaseResultsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ListTestCaseResultsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse build() { + com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse buildPartial() { + com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse result = + new com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse(this); + int from_bitField0_ = bitField0_; + if (testCaseResultsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + testCaseResults_ = java.util.Collections.unmodifiableList(testCaseResults_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.testCaseResults_ = testCaseResults_; + } else { + result.testCaseResults_ = testCaseResultsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse other) { + if (other + == com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse.getDefaultInstance()) + return this; + if (testCaseResultsBuilder_ == null) { + if (!other.testCaseResults_.isEmpty()) { + if (testCaseResults_.isEmpty()) { + testCaseResults_ = other.testCaseResults_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTestCaseResultsIsMutable(); + testCaseResults_.addAll(other.testCaseResults_); + } + onChanged(); + } + } else { + if (!other.testCaseResults_.isEmpty()) { + if (testCaseResultsBuilder_.isEmpty()) { + testCaseResultsBuilder_.dispose(); + testCaseResultsBuilder_ = null; + testCaseResults_ = other.testCaseResults_; + bitField0_ = (bitField0_ & ~0x00000001); + testCaseResultsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTestCaseResultsFieldBuilder() + : null; + } else { + testCaseResultsBuilder_.addAllMessages(other.testCaseResults_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List testCaseResults_ = + java.util.Collections.emptyList(); + + private void ensureTestCaseResultsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + testCaseResults_ = + new java.util.ArrayList( + testCaseResults_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TestCaseResult, + com.google.cloud.dialogflow.cx.v3.TestCaseResult.Builder, + com.google.cloud.dialogflow.cx.v3.TestCaseResultOrBuilder> + testCaseResultsBuilder_; + + /** + * + * + *
+     * The list of test case results.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseResult test_case_results = 1; + */ + public java.util.List + getTestCaseResultsList() { + if (testCaseResultsBuilder_ == null) { + return java.util.Collections.unmodifiableList(testCaseResults_); + } else { + return testCaseResultsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of test case results.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseResult test_case_results = 1; + */ + public int getTestCaseResultsCount() { + if (testCaseResultsBuilder_ == null) { + return testCaseResults_.size(); + } else { + return testCaseResultsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of test case results.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseResult test_case_results = 1; + */ + public com.google.cloud.dialogflow.cx.v3.TestCaseResult getTestCaseResults(int index) { + if (testCaseResultsBuilder_ == null) { + return testCaseResults_.get(index); + } else { + return testCaseResultsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of test case results.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseResult test_case_results = 1; + */ + public Builder setTestCaseResults( + int index, com.google.cloud.dialogflow.cx.v3.TestCaseResult value) { + if (testCaseResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTestCaseResultsIsMutable(); + testCaseResults_.set(index, value); + onChanged(); + } else { + testCaseResultsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of test case results.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseResult test_case_results = 1; + */ + public Builder setTestCaseResults( + int index, com.google.cloud.dialogflow.cx.v3.TestCaseResult.Builder builderForValue) { + if (testCaseResultsBuilder_ == null) { + ensureTestCaseResultsIsMutable(); + testCaseResults_.set(index, builderForValue.build()); + onChanged(); + } else { + testCaseResultsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of test case results.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseResult test_case_results = 1; + */ + public Builder addTestCaseResults(com.google.cloud.dialogflow.cx.v3.TestCaseResult value) { + if (testCaseResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTestCaseResultsIsMutable(); + testCaseResults_.add(value); + onChanged(); + } else { + testCaseResultsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of test case results.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseResult test_case_results = 1; + */ + public Builder addTestCaseResults( + int index, com.google.cloud.dialogflow.cx.v3.TestCaseResult value) { + if (testCaseResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTestCaseResultsIsMutable(); + testCaseResults_.add(index, value); + onChanged(); + } else { + testCaseResultsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of test case results.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseResult test_case_results = 1; + */ + public Builder addTestCaseResults( + com.google.cloud.dialogflow.cx.v3.TestCaseResult.Builder builderForValue) { + if (testCaseResultsBuilder_ == null) { + ensureTestCaseResultsIsMutable(); + testCaseResults_.add(builderForValue.build()); + onChanged(); + } else { + testCaseResultsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of test case results.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseResult test_case_results = 1; + */ + public Builder addTestCaseResults( + int index, com.google.cloud.dialogflow.cx.v3.TestCaseResult.Builder builderForValue) { + if (testCaseResultsBuilder_ == null) { + ensureTestCaseResultsIsMutable(); + testCaseResults_.add(index, builderForValue.build()); + onChanged(); + } else { + testCaseResultsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of test case results.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseResult test_case_results = 1; + */ + public Builder addAllTestCaseResults( + java.lang.Iterable values) { + if (testCaseResultsBuilder_ == null) { + ensureTestCaseResultsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, testCaseResults_); + onChanged(); + } else { + testCaseResultsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of test case results.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseResult test_case_results = 1; + */ + public Builder clearTestCaseResults() { + if (testCaseResultsBuilder_ == null) { + testCaseResults_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + testCaseResultsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of test case results.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseResult test_case_results = 1; + */ + public Builder removeTestCaseResults(int index) { + if (testCaseResultsBuilder_ == null) { + ensureTestCaseResultsIsMutable(); + testCaseResults_.remove(index); + onChanged(); + } else { + testCaseResultsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of test case results.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseResult test_case_results = 1; + */ + public com.google.cloud.dialogflow.cx.v3.TestCaseResult.Builder getTestCaseResultsBuilder( + int index) { + return getTestCaseResultsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of test case results.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseResult test_case_results = 1; + */ + public com.google.cloud.dialogflow.cx.v3.TestCaseResultOrBuilder getTestCaseResultsOrBuilder( + int index) { + if (testCaseResultsBuilder_ == null) { + return testCaseResults_.get(index); + } else { + return testCaseResultsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of test case results.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseResult test_case_results = 1; + */ + public java.util.List + getTestCaseResultsOrBuilderList() { + if (testCaseResultsBuilder_ != null) { + return testCaseResultsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(testCaseResults_); + } + } + /** + * + * + *
+     * The list of test case results.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseResult test_case_results = 1; + */ + public com.google.cloud.dialogflow.cx.v3.TestCaseResult.Builder addTestCaseResultsBuilder() { + return getTestCaseResultsFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3.TestCaseResult.getDefaultInstance()); + } + /** + * + * + *
+     * The list of test case results.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseResult test_case_results = 1; + */ + public com.google.cloud.dialogflow.cx.v3.TestCaseResult.Builder addTestCaseResultsBuilder( + int index) { + return getTestCaseResultsFieldBuilder() + .addBuilder(index, com.google.cloud.dialogflow.cx.v3.TestCaseResult.getDefaultInstance()); + } + /** + * + * + *
+     * The list of test case results.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseResult test_case_results = 1; + */ + public java.util.List + getTestCaseResultsBuilderList() { + return getTestCaseResultsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TestCaseResult, + com.google.cloud.dialogflow.cx.v3.TestCaseResult.Builder, + com.google.cloud.dialogflow.cx.v3.TestCaseResultOrBuilder> + getTestCaseResultsFieldBuilder() { + if (testCaseResultsBuilder_ == null) { + testCaseResultsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TestCaseResult, + com.google.cloud.dialogflow.cx.v3.TestCaseResult.Builder, + com.google.cloud.dialogflow.cx.v3.TestCaseResultOrBuilder>( + testCaseResults_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + testCaseResults_ = null; + } + return testCaseResultsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse) + private static final com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse(); + } + + public static com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListTestCaseResultsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListTestCaseResultsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListTestCaseResultsResponseOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListTestCaseResultsResponseOrBuilder.java new file mode 100644 index 000000000..2d1b57541 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListTestCaseResultsResponseOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/test_case.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface ListTestCaseResultsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of test case results.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseResult test_case_results = 1; + */ + java.util.List getTestCaseResultsList(); + /** + * + * + *
+   * The list of test case results.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseResult test_case_results = 1; + */ + com.google.cloud.dialogflow.cx.v3.TestCaseResult getTestCaseResults(int index); + /** + * + * + *
+   * The list of test case results.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseResult test_case_results = 1; + */ + int getTestCaseResultsCount(); + /** + * + * + *
+   * The list of test case results.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseResult test_case_results = 1; + */ + java.util.List + getTestCaseResultsOrBuilderList(); + /** + * + * + *
+   * The list of test case results.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCaseResult test_case_results = 1; + */ + com.google.cloud.dialogflow.cx.v3.TestCaseResultOrBuilder getTestCaseResultsOrBuilder(int index); + + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListTestCasesRequest.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListTestCasesRequest.java new file mode 100644 index 000000000..0a189516b --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListTestCasesRequest.java @@ -0,0 +1,1259 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/test_case.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The request message for [TestCases.ListTestCases][google.cloud.dialogflow.cx.v3.TestCases.ListTestCases].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ListTestCasesRequest} + */ +public final class ListTestCasesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ListTestCasesRequest) + ListTestCasesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListTestCasesRequest.newBuilder() to construct. + private ListTestCasesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListTestCasesRequest() { + parent_ = ""; + pageToken_ = ""; + view_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListTestCasesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListTestCasesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: + { + pageSize_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 32: + { + int rawValue = input.readEnum(); + + view_ = rawValue; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ListTestCasesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ListTestCasesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest.class, + com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest.Builder.class); + } + + /** + * + * + *
+   * Specifies how much test case information to include in the response.
+   * 
+ * + * Protobuf enum {@code google.cloud.dialogflow.cx.v3.ListTestCasesRequest.TestCaseView} + */ + public enum TestCaseView implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The default / unset value.
+     * The API will default to the BASIC view.
+     * 
+ * + * TEST_CASE_VIEW_UNSPECIFIED = 0; + */ + TEST_CASE_VIEW_UNSPECIFIED(0), + /** + * + * + *
+     * Include basic metadata about the test case, but not the conversation
+     * turns. This is the default value.
+     * 
+ * + * BASIC = 1; + */ + BASIC(1), + /** + * + * + *
+     * Include everything.
+     * 
+ * + * FULL = 2; + */ + FULL(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The default / unset value.
+     * The API will default to the BASIC view.
+     * 
+ * + * TEST_CASE_VIEW_UNSPECIFIED = 0; + */ + public static final int TEST_CASE_VIEW_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Include basic metadata about the test case, but not the conversation
+     * turns. This is the default value.
+     * 
+ * + * BASIC = 1; + */ + public static final int BASIC_VALUE = 1; + /** + * + * + *
+     * Include everything.
+     * 
+ * + * FULL = 2; + */ + public static final int FULL_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TestCaseView valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static TestCaseView forNumber(int value) { + switch (value) { + case 0: + return TEST_CASE_VIEW_UNSPECIFIED; + case 1: + return BASIC; + case 2: + return FULL; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public TestCaseView findValueByNumber(int number) { + return TestCaseView.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final TestCaseView[] VALUES = values(); + + public static TestCaseView valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private TestCaseView(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3.ListTestCasesRequest.TestCaseView) + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The agent to list all pages for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The agent to list all pages for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * 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.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * The next_page_token value returned from a previous list request.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The next_page_token value returned from a previous list request.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VIEW_FIELD_NUMBER = 4; + private int view_; + /** + * + * + *
+   * Specifies whether response should include all fields or just the metadata.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.ListTestCasesRequest.TestCaseView view = 4; + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + /** + * + * + *
+   * Specifies whether response should include all fields or just the metadata.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.ListTestCasesRequest.TestCaseView view = 4; + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest.TestCaseView getView() { + @SuppressWarnings("deprecation") + com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest.TestCaseView result = + com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest.TestCaseView.valueOf(view_); + return result == null + ? com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest.TestCaseView.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (view_ + != com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest.TestCaseView + .TEST_CASE_VIEW_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, view_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (view_ + != com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest.TestCaseView + .TEST_CASE_VIEW_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, view_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest other = + (com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (view_ != other.view_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + VIEW_FIELD_NUMBER; + hash = (53 * hash) + view_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for [TestCases.ListTestCases][google.cloud.dialogflow.cx.v3.TestCases.ListTestCases].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ListTestCasesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ListTestCasesRequest) + com.google.cloud.dialogflow.cx.v3.ListTestCasesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ListTestCasesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ListTestCasesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest.class, + com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + view_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ListTestCasesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest build() { + com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest result = + new com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + result.view_ = view_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (other.view_ != 0) { + setViewValue(other.getViewValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The agent to list all pages for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The agent to list all pages for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The agent to list all pages for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The agent to list all pages for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The agent to list all pages for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * 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.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + 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.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The next_page_token value returned from a previous list request.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The next_page_token value returned from a previous list request.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The next_page_token value returned from a previous list request.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The next_page_token value returned from a previous list request.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The next_page_token value returned from a previous list request.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private int view_ = 0; + /** + * + * + *
+     * Specifies whether response should include all fields or just the metadata.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ListTestCasesRequest.TestCaseView view = 4; + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + /** + * + * + *
+     * Specifies whether response should include all fields or just the metadata.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ListTestCasesRequest.TestCaseView view = 4; + * + * @param value The enum numeric value on the wire for view to set. + * @return This builder for chaining. + */ + public Builder setViewValue(int value) { + + view_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies whether response should include all fields or just the metadata.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ListTestCasesRequest.TestCaseView view = 4; + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest.TestCaseView getView() { + @SuppressWarnings("deprecation") + com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest.TestCaseView result = + com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest.TestCaseView.valueOf(view_); + return result == null + ? com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest.TestCaseView.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Specifies whether response should include all fields or just the metadata.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ListTestCasesRequest.TestCaseView view = 4; + * + * @param value The view to set. + * @return This builder for chaining. + */ + public Builder setView( + com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest.TestCaseView value) { + if (value == null) { + throw new NullPointerException(); + } + + view_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies whether response should include all fields or just the metadata.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ListTestCasesRequest.TestCaseView view = 4; + * + * @return This builder for chaining. + */ + public Builder clearView() { + + view_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.ListTestCasesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ListTestCasesRequest) + private static final com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListTestCasesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListTestCasesRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListExperimentsRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListTestCasesRequestOrBuilder.java similarity index 66% rename from proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListExperimentsRequestOrBuilder.java rename to proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListTestCasesRequestOrBuilder.java index fc5ffe75b..2b0ac31d1 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListExperimentsRequestOrBuilder.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListTestCasesRequestOrBuilder.java @@ -14,22 +14,21 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dialogflow/cx/v3/experiment.proto +// source: google/cloud/dialogflow/cx/v3/test_case.proto package com.google.cloud.dialogflow.cx.v3; -public interface ListExperimentsRequestOrBuilder +public interface ListTestCasesRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ListExperimentsRequest) + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ListTestCasesRequest) com.google.protobuf.MessageOrBuilder { /** * * *
-   * Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to list all environments for.
-   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/environments/<Environment ID>`.
+   * Required. The agent to list all pages for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
    * 
* * @@ -43,9 +42,8 @@ public interface ListExperimentsRequestOrBuilder * * *
-   * Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to list all environments for.
-   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/environments/<Environment ID>`.
+   * Required. The agent to list all pages for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
    * 
* * @@ -60,8 +58,9 @@ public interface ListExperimentsRequestOrBuilder * * *
-   * The maximum number of items to return in a single page. By default 20 and
-   * at most 100.
+   * 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.
    * 
* * int32 page_size = 2; @@ -94,4 +93,29 @@ public interface ListExperimentsRequestOrBuilder * @return The bytes for pageToken. */ com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Specifies whether response should include all fields or just the metadata.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.ListTestCasesRequest.TestCaseView view = 4; + * + * @return The enum numeric value on the wire for view. + */ + int getViewValue(); + /** + * + * + *
+   * Specifies whether response should include all fields or just the metadata.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.ListTestCasesRequest.TestCaseView view = 4; + * + * @return The view. + */ + com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest.TestCaseView getView(); } diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListTestCasesResponse.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListTestCasesResponse.java new file mode 100644 index 000000000..05419f453 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListTestCasesResponse.java @@ -0,0 +1,1161 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/test_case.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The response message for [TestCases.ListTestCases][google.cloud.dialogflow.cx.v3.TestCases.ListTestCases].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ListTestCasesResponse} + */ +public final class ListTestCasesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ListTestCasesResponse) + ListTestCasesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListTestCasesResponse.newBuilder() to construct. + private ListTestCasesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListTestCasesResponse() { + testCases_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListTestCasesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListTestCasesResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + testCases_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + testCases_.add( + input.readMessage( + com.google.cloud.dialogflow.cx.v3.TestCase.parser(), extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + testCases_ = java.util.Collections.unmodifiableList(testCases_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ListTestCasesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ListTestCasesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ListTestCasesResponse.class, + com.google.cloud.dialogflow.cx.v3.ListTestCasesResponse.Builder.class); + } + + public static final int TEST_CASES_FIELD_NUMBER = 1; + private java.util.List testCases_; + /** + * + * + *
+   * The list of test cases. There will be a maximum number of items returned
+   * based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCase test_cases = 1; + */ + @java.lang.Override + public java.util.List getTestCasesList() { + return testCases_; + } + /** + * + * + *
+   * The list of test cases. There will be a maximum number of items returned
+   * based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCase test_cases = 1; + */ + @java.lang.Override + public java.util.List + getTestCasesOrBuilderList() { + return testCases_; + } + /** + * + * + *
+   * The list of test cases. There will be a maximum number of items returned
+   * based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCase test_cases = 1; + */ + @java.lang.Override + public int getTestCasesCount() { + return testCases_.size(); + } + /** + * + * + *
+   * The list of test cases. There will be a maximum number of items returned
+   * based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCase test_cases = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TestCase getTestCases(int index) { + return testCases_.get(index); + } + /** + * + * + *
+   * The list of test cases. There will be a maximum number of items returned
+   * based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCase test_cases = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TestCaseOrBuilder getTestCasesOrBuilder(int index) { + return testCases_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < testCases_.size(); i++) { + output.writeMessage(1, testCases_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < testCases_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, testCases_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.ListTestCasesResponse)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.ListTestCasesResponse other = + (com.google.cloud.dialogflow.cx.v3.ListTestCasesResponse) obj; + + if (!getTestCasesList().equals(other.getTestCasesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getTestCasesCount() > 0) { + hash = (37 * hash) + TEST_CASES_FIELD_NUMBER; + hash = (53 * hash) + getTestCasesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.ListTestCasesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ListTestCasesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ListTestCasesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ListTestCasesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ListTestCasesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ListTestCasesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ListTestCasesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ListTestCasesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ListTestCasesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ListTestCasesResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ListTestCasesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ListTestCasesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3.ListTestCasesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The response message for [TestCases.ListTestCases][google.cloud.dialogflow.cx.v3.TestCases.ListTestCases].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ListTestCasesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ListTestCasesResponse) + com.google.cloud.dialogflow.cx.v3.ListTestCasesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ListTestCasesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ListTestCasesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ListTestCasesResponse.class, + com.google.cloud.dialogflow.cx.v3.ListTestCasesResponse.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.ListTestCasesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getTestCasesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (testCasesBuilder_ == null) { + testCases_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + testCasesBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_ListTestCasesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ListTestCasesResponse getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.ListTestCasesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ListTestCasesResponse build() { + com.google.cloud.dialogflow.cx.v3.ListTestCasesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ListTestCasesResponse buildPartial() { + com.google.cloud.dialogflow.cx.v3.ListTestCasesResponse result = + new com.google.cloud.dialogflow.cx.v3.ListTestCasesResponse(this); + int from_bitField0_ = bitField0_; + if (testCasesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + testCases_ = java.util.Collections.unmodifiableList(testCases_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.testCases_ = testCases_; + } else { + result.testCases_ = testCasesBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.ListTestCasesResponse) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.ListTestCasesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ListTestCasesResponse other) { + if (other == com.google.cloud.dialogflow.cx.v3.ListTestCasesResponse.getDefaultInstance()) + return this; + if (testCasesBuilder_ == null) { + if (!other.testCases_.isEmpty()) { + if (testCases_.isEmpty()) { + testCases_ = other.testCases_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTestCasesIsMutable(); + testCases_.addAll(other.testCases_); + } + onChanged(); + } + } else { + if (!other.testCases_.isEmpty()) { + if (testCasesBuilder_.isEmpty()) { + testCasesBuilder_.dispose(); + testCasesBuilder_ = null; + testCases_ = other.testCases_; + bitField0_ = (bitField0_ & ~0x00000001); + testCasesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTestCasesFieldBuilder() + : null; + } else { + testCasesBuilder_.addAllMessages(other.testCases_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.ListTestCasesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.ListTestCasesResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List testCases_ = + java.util.Collections.emptyList(); + + private void ensureTestCasesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + testCases_ = + new java.util.ArrayList(testCases_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TestCase, + com.google.cloud.dialogflow.cx.v3.TestCase.Builder, + com.google.cloud.dialogflow.cx.v3.TestCaseOrBuilder> + testCasesBuilder_; + + /** + * + * + *
+     * The list of test cases. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCase test_cases = 1; + */ + public java.util.List getTestCasesList() { + if (testCasesBuilder_ == null) { + return java.util.Collections.unmodifiableList(testCases_); + } else { + return testCasesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of test cases. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCase test_cases = 1; + */ + public int getTestCasesCount() { + if (testCasesBuilder_ == null) { + return testCases_.size(); + } else { + return testCasesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of test cases. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCase test_cases = 1; + */ + public com.google.cloud.dialogflow.cx.v3.TestCase getTestCases(int index) { + if (testCasesBuilder_ == null) { + return testCases_.get(index); + } else { + return testCasesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of test cases. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCase test_cases = 1; + */ + public Builder setTestCases(int index, com.google.cloud.dialogflow.cx.v3.TestCase value) { + if (testCasesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTestCasesIsMutable(); + testCases_.set(index, value); + onChanged(); + } else { + testCasesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of test cases. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCase test_cases = 1; + */ + public Builder setTestCases( + int index, com.google.cloud.dialogflow.cx.v3.TestCase.Builder builderForValue) { + if (testCasesBuilder_ == null) { + ensureTestCasesIsMutable(); + testCases_.set(index, builderForValue.build()); + onChanged(); + } else { + testCasesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of test cases. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCase test_cases = 1; + */ + public Builder addTestCases(com.google.cloud.dialogflow.cx.v3.TestCase value) { + if (testCasesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTestCasesIsMutable(); + testCases_.add(value); + onChanged(); + } else { + testCasesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of test cases. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCase test_cases = 1; + */ + public Builder addTestCases(int index, com.google.cloud.dialogflow.cx.v3.TestCase value) { + if (testCasesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTestCasesIsMutable(); + testCases_.add(index, value); + onChanged(); + } else { + testCasesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of test cases. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCase test_cases = 1; + */ + public Builder addTestCases( + com.google.cloud.dialogflow.cx.v3.TestCase.Builder builderForValue) { + if (testCasesBuilder_ == null) { + ensureTestCasesIsMutable(); + testCases_.add(builderForValue.build()); + onChanged(); + } else { + testCasesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of test cases. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCase test_cases = 1; + */ + public Builder addTestCases( + int index, com.google.cloud.dialogflow.cx.v3.TestCase.Builder builderForValue) { + if (testCasesBuilder_ == null) { + ensureTestCasesIsMutable(); + testCases_.add(index, builderForValue.build()); + onChanged(); + } else { + testCasesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of test cases. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCase test_cases = 1; + */ + public Builder addAllTestCases( + java.lang.Iterable values) { + if (testCasesBuilder_ == null) { + ensureTestCasesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, testCases_); + onChanged(); + } else { + testCasesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of test cases. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCase test_cases = 1; + */ + public Builder clearTestCases() { + if (testCasesBuilder_ == null) { + testCases_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + testCasesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of test cases. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCase test_cases = 1; + */ + public Builder removeTestCases(int index) { + if (testCasesBuilder_ == null) { + ensureTestCasesIsMutable(); + testCases_.remove(index); + onChanged(); + } else { + testCasesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of test cases. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCase test_cases = 1; + */ + public com.google.cloud.dialogflow.cx.v3.TestCase.Builder getTestCasesBuilder(int index) { + return getTestCasesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of test cases. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCase test_cases = 1; + */ + public com.google.cloud.dialogflow.cx.v3.TestCaseOrBuilder getTestCasesOrBuilder(int index) { + if (testCasesBuilder_ == null) { + return testCases_.get(index); + } else { + return testCasesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of test cases. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCase test_cases = 1; + */ + public java.util.List + getTestCasesOrBuilderList() { + if (testCasesBuilder_ != null) { + return testCasesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(testCases_); + } + } + /** + * + * + *
+     * The list of test cases. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCase test_cases = 1; + */ + public com.google.cloud.dialogflow.cx.v3.TestCase.Builder addTestCasesBuilder() { + return getTestCasesFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3.TestCase.getDefaultInstance()); + } + /** + * + * + *
+     * The list of test cases. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCase test_cases = 1; + */ + public com.google.cloud.dialogflow.cx.v3.TestCase.Builder addTestCasesBuilder(int index) { + return getTestCasesFieldBuilder() + .addBuilder(index, com.google.cloud.dialogflow.cx.v3.TestCase.getDefaultInstance()); + } + /** + * + * + *
+     * The list of test cases. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCase test_cases = 1; + */ + public java.util.List + getTestCasesBuilderList() { + return getTestCasesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TestCase, + com.google.cloud.dialogflow.cx.v3.TestCase.Builder, + com.google.cloud.dialogflow.cx.v3.TestCaseOrBuilder> + getTestCasesFieldBuilder() { + if (testCasesBuilder_ == null) { + testCasesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TestCase, + com.google.cloud.dialogflow.cx.v3.TestCase.Builder, + com.google.cloud.dialogflow.cx.v3.TestCaseOrBuilder>( + testCases_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + testCases_ = null; + } + return testCasesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.ListTestCasesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ListTestCasesResponse) + private static final com.google.cloud.dialogflow.cx.v3.ListTestCasesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ListTestCasesResponse(); + } + + public static com.google.cloud.dialogflow.cx.v3.ListTestCasesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListTestCasesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListTestCasesResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ListTestCasesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListTestCasesResponseOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListTestCasesResponseOrBuilder.java new file mode 100644 index 000000000..f9a66e3ad --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListTestCasesResponseOrBuilder.java @@ -0,0 +1,109 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/test_case.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface ListTestCasesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ListTestCasesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of test cases. There will be a maximum number of items returned
+   * based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCase test_cases = 1; + */ + java.util.List getTestCasesList(); + /** + * + * + *
+   * The list of test cases. There will be a maximum number of items returned
+   * based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCase test_cases = 1; + */ + com.google.cloud.dialogflow.cx.v3.TestCase getTestCases(int index); + /** + * + * + *
+   * The list of test cases. There will be a maximum number of items returned
+   * based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCase test_cases = 1; + */ + int getTestCasesCount(); + /** + * + * + *
+   * The list of test cases. There will be a maximum number of items returned
+   * based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCase test_cases = 1; + */ + java.util.List + getTestCasesOrBuilderList(); + /** + * + * + *
+   * The list of test cases. There will be a maximum number of items returned
+   * based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestCase test_cases = 1; + */ + com.google.cloud.dialogflow.cx.v3.TestCaseOrBuilder getTestCasesOrBuilder(int index); + + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Page.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Page.java index 57057211a..6d84e0e0a 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Page.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Page.java @@ -524,9 +524,13 @@ public com.google.protobuf.ByteString getTransitionRouteGroupsBytes(int index) { * 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]. + * [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 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. * * * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 9; @@ -547,9 +551,13 @@ public com.google.protobuf.ByteString getTransitionRouteGroupsBytes(int index) { * 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]. + * [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 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. * * * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 9; @@ -570,9 +578,13 @@ public com.google.protobuf.ByteString getTransitionRouteGroupsBytes(int index) { * 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]. + * [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 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. * * * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 9; @@ -592,9 +604,13 @@ public int getTransitionRoutesCount() { * 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]. + * [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 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. * * * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 9; @@ -614,9 +630,13 @@ public com.google.cloud.dialogflow.cx.v3.TransitionRoute getTransitionRoutes(int * 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]. + * [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 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. * * * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 9; @@ -2143,9 +2163,13 @@ private void ensureTransitionRoutesIsMutable() { * 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]. + * [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 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. * * * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 9; @@ -2169,9 +2193,13 @@ private void ensureTransitionRoutesIsMutable() { * 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]. + * [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 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. * * * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 9; @@ -2194,9 +2222,13 @@ public int getTransitionRoutesCount() { * 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]. + * [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 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. * * * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 9; @@ -2219,9 +2251,13 @@ public com.google.cloud.dialogflow.cx.v3.TransitionRoute getTransitionRoutes(int * 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]. + * [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 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. * * * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 9; @@ -2251,9 +2287,13 @@ public Builder setTransitionRoutes( * 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]. + * [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 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. * * * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 9; @@ -2280,9 +2320,13 @@ public Builder setTransitionRoutes( * 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]. + * [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 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. * * * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 9; @@ -2311,9 +2355,13 @@ public Builder addTransitionRoutes(com.google.cloud.dialogflow.cx.v3.TransitionR * 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]. + * [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 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. * * * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 9; @@ -2343,9 +2391,13 @@ public Builder addTransitionRoutes( * 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]. + * [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 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. * * * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 9; @@ -2372,9 +2424,13 @@ public Builder addTransitionRoutes( * 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]. + * [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 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. * * * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 9; @@ -2401,9 +2457,13 @@ public Builder addTransitionRoutes( * 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]. + * [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 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. * * * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 9; @@ -2430,9 +2490,13 @@ public Builder addAllTransitionRoutes( * 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]. + * [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 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. * * * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 9; @@ -2458,9 +2522,13 @@ public Builder clearTransitionRoutes() { * 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]. + * [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 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. * * * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 9; @@ -2486,9 +2554,13 @@ public Builder removeTransitionRoutes(int index) { * 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]. + * [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 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. * * * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 9; @@ -2508,9 +2580,13 @@ public com.google.cloud.dialogflow.cx.v3.TransitionRoute.Builder getTransitionRo * 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]. + * [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 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. * * * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 9; @@ -2534,9 +2610,13 @@ public com.google.cloud.dialogflow.cx.v3.TransitionRouteOrBuilder getTransitionR * 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]. + * [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 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. * * * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 9; @@ -2560,9 +2640,13 @@ public com.google.cloud.dialogflow.cx.v3.TransitionRouteOrBuilder getTransitionR * 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]. + * [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 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. * * * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 9; @@ -2582,9 +2666,13 @@ public com.google.cloud.dialogflow.cx.v3.TransitionRoute.Builder addTransitionRo * 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]. + * [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 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. * * * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 9; @@ -2606,9 +2694,13 @@ public com.google.cloud.dialogflow.cx.v3.TransitionRoute.Builder addTransitionRo * 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]. + * [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 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. * * * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 9; diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PageOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PageOrBuilder.java index 79b3c7212..db43b4951 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PageOrBuilder.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PageOrBuilder.java @@ -252,9 +252,13 @@ public interface PageOrBuilder * 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]. + * [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 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. * * * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 9; @@ -271,9 +275,13 @@ public interface PageOrBuilder * 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]. + * [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 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. * * * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 9; @@ -290,9 +298,13 @@ public interface PageOrBuilder * 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]. + * [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 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. * * * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 9; @@ -309,9 +321,13 @@ public interface PageOrBuilder * 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]. + * [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 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. * * * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 9; @@ -329,9 +345,13 @@ public interface PageOrBuilder * 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]. + * [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 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. * * * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 9; diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeleteExperimentRequest.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResourceName.java similarity index 59% rename from proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeleteExperimentRequest.java rename to proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResourceName.java index 453bc158a..5e5edf0fa 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeleteExperimentRequest.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResourceName.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dialogflow/cx/v3/experiment.proto +// source: google/cloud/dialogflow/cx/v3/validation_message.proto package com.google.cloud.dialogflow.cx.v3; @@ -22,29 +22,30 @@ * * *
- * The request message for [Experiments.DeleteExperiment][google.cloud.dialogflow.cx.v3.Experiments.DeleteExperiment].
+ * Resource name and display name.
  * 
* - * Protobuf type {@code google.cloud.dialogflow.cx.v3.DeleteExperimentRequest} + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ResourceName} */ -public final class DeleteExperimentRequest extends com.google.protobuf.GeneratedMessageV3 +public final class ResourceName extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.DeleteExperimentRequest) - DeleteExperimentRequestOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ResourceName) + ResourceNameOrBuilder { private static final long serialVersionUID = 0L; - // Use DeleteExperimentRequest.newBuilder() to construct. - private DeleteExperimentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use ResourceName.newBuilder() to construct. + private ResourceName(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private DeleteExperimentRequest() { + private ResourceName() { name_ = ""; + displayName_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DeleteExperimentRequest(); + return new ResourceName(); } @java.lang.Override @@ -52,7 +53,7 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteExperimentRequest( + private ResourceName( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -77,6 +78,13 @@ private DeleteExperimentRequest( name_ = s; break; } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -97,18 +105,18 @@ private DeleteExperimentRequest( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_DeleteExperimentRequest_descriptor; + return com.google.cloud.dialogflow.cx.v3.ValidationMessageProto + .internal_static_google_cloud_dialogflow_cx_v3_ResourceName_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_DeleteExperimentRequest_fieldAccessorTable + return com.google.cloud.dialogflow.cx.v3.ValidationMessageProto + .internal_static_google_cloud_dialogflow_cx_v3_ResourceName_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest.class, - com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest.Builder.class); + com.google.cloud.dialogflow.cx.v3.ResourceName.class, + com.google.cloud.dialogflow.cx.v3.ResourceName.Builder.class); } public static final int NAME_FIELD_NUMBER = 1; @@ -117,14 +125,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment] to delete.
-   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * Name.
    * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * + * string name = 1; * * @return The name. */ @@ -144,14 +148,10 @@ public java.lang.String getName() { * * *
-   * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment] to delete.
-   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * Name.
    * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * + * string name = 1; * * @return The bytes for name. */ @@ -168,6 +168,55 @@ public com.google.protobuf.ByteString getNameBytes() { } } + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Display name.
+   * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Display name.
+   * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -185,6 +234,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!getNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } unknownFields.writeTo(output); } @@ -197,6 +249,9 @@ public int getSerializedSize() { if (!getNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -207,13 +262,14 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest)) { + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.ResourceName)) { return super.equals(obj); } - com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest other = - (com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest) obj; + com.google.cloud.dialogflow.cx.v3.ResourceName other = + (com.google.cloud.dialogflow.cx.v3.ResourceName) obj; if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -227,76 +283,78 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.dialogflow.cx.v3.ResourceName parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResourceName parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResourceName parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResourceName parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest parseFrom(byte[] data) + public static com.google.cloud.dialogflow.cx.v3.ResourceName parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResourceName parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { + public static com.google.cloud.dialogflow.cx.v3.ResourceName parseFrom(java.io.InputStream input) + throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResourceName parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest parseDelimitedFrom( + public static com.google.cloud.dialogflow.cx.v3.ResourceName parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest parseDelimitedFrom( + public static com.google.cloud.dialogflow.cx.v3.ResourceName parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResourceName parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResourceName parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -313,8 +371,7 @@ public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder( - com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest prototype) { + public static Builder newBuilder(com.google.cloud.dialogflow.cx.v3.ResourceName prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -332,31 +389,31 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The request message for [Experiments.DeleteExperiment][google.cloud.dialogflow.cx.v3.Experiments.DeleteExperiment].
+   * Resource name and display name.
    * 
* - * Protobuf type {@code google.cloud.dialogflow.cx.v3.DeleteExperimentRequest} + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ResourceName} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.DeleteExperimentRequest) - com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequestOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ResourceName) + com.google.cloud.dialogflow.cx.v3.ResourceNameOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_DeleteExperimentRequest_descriptor; + return com.google.cloud.dialogflow.cx.v3.ValidationMessageProto + .internal_static_google_cloud_dialogflow_cx_v3_ResourceName_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_DeleteExperimentRequest_fieldAccessorTable + return com.google.cloud.dialogflow.cx.v3.ValidationMessageProto + .internal_static_google_cloud_dialogflow_cx_v3_ResourceName_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest.class, - com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest.Builder.class); + com.google.cloud.dialogflow.cx.v3.ResourceName.class, + com.google.cloud.dialogflow.cx.v3.ResourceName.Builder.class); } - // Construct using com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest.newBuilder() + // Construct using com.google.cloud.dialogflow.cx.v3.ResourceName.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -375,23 +432,25 @@ public Builder clear() { super.clear(); name_ = ""; + displayName_ = ""; + return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_DeleteExperimentRequest_descriptor; + return com.google.cloud.dialogflow.cx.v3.ValidationMessageProto + .internal_static_google_cloud_dialogflow_cx_v3_ResourceName_descriptor; } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest getDefaultInstanceForType() { - return com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest.getDefaultInstance(); + public com.google.cloud.dialogflow.cx.v3.ResourceName getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.ResourceName.getDefaultInstance(); } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest build() { - com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest result = buildPartial(); + public com.google.cloud.dialogflow.cx.v3.ResourceName build() { + com.google.cloud.dialogflow.cx.v3.ResourceName result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -399,10 +458,11 @@ public com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest build() { } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest buildPartial() { - com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest result = - new com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest(this); + public com.google.cloud.dialogflow.cx.v3.ResourceName buildPartial() { + com.google.cloud.dialogflow.cx.v3.ResourceName result = + new com.google.cloud.dialogflow.cx.v3.ResourceName(this); result.name_ = name_; + result.displayName_ = displayName_; onBuilt(); return result; } @@ -442,21 +502,24 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest) { - return mergeFrom((com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest) other); + if (other instanceof com.google.cloud.dialogflow.cx.v3.ResourceName) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.ResourceName) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest other) { - if (other == com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest.getDefaultInstance()) - return this; + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ResourceName other) { + if (other == com.google.cloud.dialogflow.cx.v3.ResourceName.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -472,12 +535,11 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest parsedMessage = null; + com.google.cloud.dialogflow.cx.v3.ResourceName parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest) e.getUnfinishedMessage(); + parsedMessage = (com.google.cloud.dialogflow.cx.v3.ResourceName) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -492,14 +554,10 @@ public Builder mergeFrom( * * *
-     * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment] to delete.
-     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * Name.
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * + * string name = 1; * * @return The name. */ @@ -518,14 +576,10 @@ public java.lang.String getName() { * * *
-     * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment] to delete.
-     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * Name.
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * + * string name = 1; * * @return The bytes for name. */ @@ -544,14 +598,10 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-     * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment] to delete.
-     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * Name.
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * + * string name = 1; * * @param value The name to set. * @return This builder for chaining. @@ -569,14 +619,10 @@ public Builder setName(java.lang.String value) { * * *
-     * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment] to delete.
-     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * Name.
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * + * string name = 1; * * @return This builder for chaining. */ @@ -590,14 +636,10 @@ public Builder clearName() { * * *
-     * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment] to delete.
-     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * Name.
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * + * string name = 1; * * @param value The bytes for name to set. * @return This builder for chaining. @@ -613,6 +655,112 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Display name.
+     * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Display name.
+     * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Display name.
+     * 
+ * + * string display_name = 2; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Display name.
+     * 
+ * + * string display_name = 2; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Display name.
+     * 
+ * + * string display_name = 2; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); @@ -624,42 +772,42 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.DeleteExperimentRequest) + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.ResourceName) } - // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.DeleteExperimentRequest) - private static final com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ResourceName) + private static final com.google.cloud.dialogflow.cx.v3.ResourceName DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest(); + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ResourceName(); } - public static com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest getDefaultInstance() { + public static com.google.cloud.dialogflow.cx.v3.ResourceName getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public DeleteExperimentRequest parsePartialFrom( + public ResourceName parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteExperimentRequest(input, extensionRegistry); + return new ResourceName(input, extensionRegistry); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest getDefaultInstanceForType() { + public com.google.cloud.dialogflow.cx.v3.ResourceName getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResourceNameOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResourceNameOrBuilder.java new file mode 100644 index 000000000..bc2ceb3e0 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResourceNameOrBuilder.java @@ -0,0 +1,75 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/validation_message.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface ResourceNameOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ResourceName) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Name.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Display name.
+   * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Display name.
+   * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessage.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessage.java index 9e7fe3b1f..9e8a68620 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessage.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessage.java @@ -4351,81 +4351,109 @@ public com.google.protobuf.Parser getParserForType() { } } - public interface PlayAudioOrBuilder + public interface MixedAudioOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio) com.google.protobuf.MessageOrBuilder { /** * * *
-     * Required. URI of the audio clip. Dialogflow does not impose any validation on this
-     * value. It is specific to the client that reads it.
+     * Segments this audio response is composed of.
      * 
* - * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The audioUri. + * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; + * */ - java.lang.String getAudioUri(); + java.util.List + getSegmentsList(); /** * * *
-     * Required. URI of the audio clip. Dialogflow does not impose any validation on this
-     * value. It is specific to the client that reads it.
+     * Segments this audio response is composed of.
      * 
* - * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment getSegments(int index); + /** * - * @return The bytes for audioUri. + * + *
+     * Segments this audio response is composed of.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; + * */ - com.google.protobuf.ByteString getAudioUriBytes(); - + int getSegmentsCount(); /** * * *
-     * 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.
+     * Segments this audio response is composed of.
      * 
* - * bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; * + */ + java.util.List< + ? extends com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.SegmentOrBuilder> + getSegmentsOrBuilderList(); + /** * - * @return The allowPlaybackInterruption. + * + *
+     * Segments this audio response is composed of.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; + * */ - boolean getAllowPlaybackInterruption(); + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.SegmentOrBuilder + getSegmentsOrBuilder(int index); } /** * * *
-   * Specifies an audio clip to be played by the client as part of the response.
+   * Represents an audio message that is composed of both segments
+   * synthesized from the Dialogflow agent prompts and ones hosted externally
+   * at the specified URIs.
+   * The external URIs are specified 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.
    * 
* - * Protobuf type {@code google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio} + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio} */ - public static final class PlayAudio extends com.google.protobuf.GeneratedMessageV3 + public static final class MixedAudio extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) - PlayAudioOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio) + MixedAudioOrBuilder { private static final long serialVersionUID = 0L; - // Use PlayAudio.newBuilder() to construct. - private PlayAudio(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use MixedAudio.newBuilder() to construct. + private MixedAudio(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private PlayAudio() { - audioUri_ = ""; + private MixedAudio() { + segments_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new PlayAudio(); + return new MixedAudio(); } @java.lang.Override @@ -4433,7 +4461,7 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PlayAudio( + private MixedAudio( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -4441,6 +4469,7 @@ private PlayAudio( if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } + int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { @@ -4453,14 +4482,17 @@ private PlayAudio( break; case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - audioUri_ = s; - break; - } - case 16: - { - allowPlaybackInterruption_ = input.readBool(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + segments_ = + new java.util.ArrayList< + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment>(); + mutable_bitField0_ |= 0x00000001; + } + segments_.add( + input.readMessage( + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment + .parser(), + extensionRegistry)); break; } default: @@ -4477,6 +4509,9 @@ private PlayAudio( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + segments_ = java.util.Collections.unmodifiableList(segments_); + } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } @@ -4484,1953 +4519,2192 @@ private PlayAudio( public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_descriptor; + .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_fieldAccessorTable + .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.class, - com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.Builder.class); + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.class, + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Builder.class); } - public static final int AUDIO_URI_FIELD_NUMBER = 1; - private volatile java.lang.Object audioUri_; - /** - * - * - *
-     * Required. URI of the audio clip. Dialogflow does not impose any validation on this
-     * value. It is specific to the client that reads it.
-     * 
- * - * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The audioUri. - */ - @java.lang.Override - public java.lang.String getAudioUri() { - java.lang.Object ref = audioUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - audioUri_ = s; - return s; - } + public interface SegmentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Raw audio synthesized from the Dialogflow agent's response using
+       * the output config specified in the request.
+       * 
+ * + * bytes audio = 1; + * + * @return The audio. + */ + com.google.protobuf.ByteString getAudio(); + + /** + * + * + *
+       * Client-specific URI that points to an audio clip accessible to the
+       * client. Dialogflow does not impose any validation on it.
+       * 
+ * + * string uri = 2; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+       * Client-specific URI that points to an audio clip accessible to the
+       * client. Dialogflow does not impose any validation on it.
+       * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+       * 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.
+       * 
+ * + * bool allow_playback_interruption = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The allowPlaybackInterruption. + */ + boolean getAllowPlaybackInterruption(); + + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.ContentCase + getContentCase(); } /** * * *
-     * Required. URI of the audio clip. Dialogflow does not impose any validation on this
-     * value. It is specific to the client that reads it.
+     * Represents one segment of audio.
      * 
* - * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for audioUri. + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment} */ - @java.lang.Override - public com.google.protobuf.ByteString getAudioUriBytes() { - java.lang.Object ref = audioUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - audioUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + public static final class Segment extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment) + SegmentOrBuilder { + private static final long serialVersionUID = 0L; + // Use Segment.newBuilder() to construct. + private Segment(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); } - } - public static final int ALLOW_PLAYBACK_INTERRUPTION_FIELD_NUMBER = 2; - private boolean allowPlaybackInterruption_; - /** - * - * - *
-     * 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.
-     * 
- * - * bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The allowPlaybackInterruption. - */ - @java.lang.Override - public boolean getAllowPlaybackInterruption() { - return allowPlaybackInterruption_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getAudioUriBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, audioUri_); - } - if (allowPlaybackInterruption_ != false) { - output.writeBool(2, allowPlaybackInterruption_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + private Segment() {} - size = 0; - if (!getAudioUriBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, audioUri_); - } - if (allowPlaybackInterruption_ != false) { - size += - com.google.protobuf.CodedOutputStream.computeBoolSize(2, allowPlaybackInterruption_); + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Segment(); } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio)) { - return super.equals(obj); + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; } - com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio other = - (com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) obj; - if (!getAudioUri().equals(other.getAudioUri())) return false; - if (getAllowPlaybackInterruption() != other.getAllowPlaybackInterruption()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; + private Segment( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + contentCase_ = 1; + content_ = input.readBytes(); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + contentCase_ = 2; + content_ = s; + break; + } + case 24: + { + allowPlaybackInterruption_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + AUDIO_URI_FIELD_NUMBER; - hash = (53 * hash) + getAudioUri().hashCode(); - hash = (37 * hash) + ALLOW_PLAYBACK_INTERRUPTION_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowPlaybackInterruption()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-     * Specifies an audio clip to be played by the client as part of the response.
-     * 
- * - * Protobuf type {@code google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) - com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudioOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_descriptor; + .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_Segment_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_fieldAccessorTable + .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_Segment_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.class, - com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.Builder.class); + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.class, + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.Builder.class); } - // Construct using com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private int contentCase_ = 0; + private java.lang.Object content_; - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - audioUri_ = ""; - - allowPlaybackInterruption_ = false; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_descriptor; - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio - getDefaultInstanceForType() { - return com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.getDefaultInstance(); - } + public enum ContentCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + AUDIO(1), + URI(2), + CONTENT_NOT_SET(0); + private final int value; - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio build() { - com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); + private ContentCase(int value) { + this.value = value; } - return result; - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio buildPartial() { - com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio result = - new com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio(this); - result.audioUri_ = audioUri_; - result.allowPlaybackInterruption_ = allowPlaybackInterruption_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) { - return mergeFrom((com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) other); - } else { - super.mergeFrom(other); - return this; + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ContentCase valueOf(int value) { + return forNumber(value); } - } - public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio other) { - if (other - == com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.getDefaultInstance()) - return this; - if (!other.getAudioUri().isEmpty()) { - audioUri_ = other.audioUri_; - onChanged(); + public static ContentCase forNumber(int value) { + switch (value) { + case 1: + return AUDIO; + case 2: + return URI; + case 0: + return CONTENT_NOT_SET; + default: + return null; + } } - if (other.getAllowPlaybackInterruption() != false) { - setAllowPlaybackInterruption(other.getAllowPlaybackInterruption()); + + public int getNumber() { + return this.value; } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } + }; - @java.lang.Override - public final boolean isInitialized() { - return true; + public ContentCase getContentCase() { + return ContentCase.forNumber(contentCase_); } + public static final int AUDIO_FIELD_NUMBER = 1; + /** + * + * + *
+       * Raw audio synthesized from the Dialogflow agent's response using
+       * the output config specified in the request.
+       * 
+ * + * bytes audio = 1; + * + * @return The audio. + */ @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + public com.google.protobuf.ByteString getAudio() { + if (contentCase_ == 1) { + return (com.google.protobuf.ByteString) content_; } - return this; + return com.google.protobuf.ByteString.EMPTY; } - private java.lang.Object audioUri_ = ""; + public static final int URI_FIELD_NUMBER = 2; /** * * *
-       * Required. URI of the audio clip. Dialogflow does not impose any validation on this
-       * value. It is specific to the client that reads it.
+       * Client-specific URI that points to an audio clip accessible to the
+       * client. Dialogflow does not impose any validation on it.
        * 
* - * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * string uri = 2; * - * @return The audioUri. + * @return The uri. */ - public java.lang.String getAudioUri() { - java.lang.Object ref = audioUri_; - if (!(ref instanceof java.lang.String)) { + public java.lang.String getUri() { + java.lang.Object ref = ""; + if (contentCase_ == 2) { + ref = content_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - audioUri_ = s; + if (contentCase_ == 2) { + content_ = s; + } return s; - } else { - return (java.lang.String) ref; } } /** * * *
-       * Required. URI of the audio clip. Dialogflow does not impose any validation on this
-       * value. It is specific to the client that reads it.
+       * Client-specific URI that points to an audio clip accessible to the
+       * client. Dialogflow does not impose any validation on it.
        * 
* - * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * string uri = 2; * - * @return The bytes for audioUri. + * @return The bytes for uri. */ - public com.google.protobuf.ByteString getAudioUriBytes() { - java.lang.Object ref = audioUri_; - if (ref instanceof String) { + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = ""; + if (contentCase_ == 2) { + ref = content_; + } + if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - audioUri_ = b; + if (contentCase_ == 2) { + content_ = b; + } return b; } else { return (com.google.protobuf.ByteString) ref; } } - /** - * - * - *
-       * Required. URI of the audio clip. Dialogflow does not impose any validation on this
-       * value. It is specific to the client that reads it.
-       * 
- * - * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The audioUri to set. - * @return This builder for chaining. - */ - public Builder setAudioUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - audioUri_ = value; - onChanged(); - return this; - } + public static final int ALLOW_PLAYBACK_INTERRUPTION_FIELD_NUMBER = 3; + private boolean allowPlaybackInterruption_; /** * * *
-       * Required. URI of the audio clip. Dialogflow does not impose any validation on this
-       * value. It is specific to the client that reads it.
+       * 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.
        * 
* - * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * bool allow_playback_interruption = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * - * @return This builder for chaining. + * @return The allowPlaybackInterruption. */ - public Builder clearAudioUri() { - - audioUri_ = getDefaultInstance().getAudioUri(); - onChanged(); - return this; + @java.lang.Override + public boolean getAllowPlaybackInterruption() { + return allowPlaybackInterruption_; } - /** - * - * - *
-       * Required. URI of the audio clip. Dialogflow does not impose any validation on this
-       * value. It is specific to the client that reads it.
-       * 
- * - * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for audioUri to set. - * @return This builder for chaining. - */ - public Builder setAudioUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - audioUri_ = value; - onChanged(); - return this; - } + private byte memoizedIsInitialized = -1; - private boolean allowPlaybackInterruption_; - /** - * - * - *
-       * 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.
-       * 
- * - * bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The allowPlaybackInterruption. - */ @java.lang.Override - public boolean getAllowPlaybackInterruption() { - return allowPlaybackInterruption_; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; } - /** - * - * - *
-       * 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.
-       * 
- * - * bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The allowPlaybackInterruption to set. - * @return This builder for chaining. - */ - public Builder setAllowPlaybackInterruption(boolean value) { - allowPlaybackInterruption_ = value; - onChanged(); - return this; + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (contentCase_ == 1) { + output.writeBytes(1, (com.google.protobuf.ByteString) content_); + } + if (contentCase_ == 2) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, content_); + } + if (allowPlaybackInterruption_ != false) { + output.writeBool(3, allowPlaybackInterruption_); + } + unknownFields.writeTo(output); } - /** - * - * - *
-       * 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.
-       * 
- * - * bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearAllowPlaybackInterruption() { - allowPlaybackInterruption_ = false; - onChanged(); - return this; + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (contentCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeBytesSize( + 1, (com.google.protobuf.ByteString) content_); + } + if (contentCase_ == 2) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, content_); + } + if (allowPlaybackInterruption_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(3, allowPlaybackInterruption_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; } @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment other = + (com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment) obj; + + if (getAllowPlaybackInterruption() != other.getAllowPlaybackInterruption()) return false; + if (!getContentCase().equals(other.getContentCase())) return false; + switch (contentCase_) { + case 1: + if (!getAudio().equals(other.getAudio())) return false; + break; + case 2: + if (!getUri().equals(other.getUri())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ALLOW_PLAYBACK_INTERRUPTION_FIELD_NUMBER; + hash = + (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowPlaybackInterruption()); + switch (contentCase_) { + case 1: + hash = (37 * hash) + AUDIO_FIELD_NUMBER; + hash = (53 * hash) + getAudio().hashCode(); + break; + case 2: + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; } - // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) - } + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) - private static final com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio - DEFAULT_INSTANCE; + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - static { - DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio(); - } + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio getDefaultInstance() { - return DEFAULT_INSTANCE; - } + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PlayAudio parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new PlayAudio(input, extensionRegistry); - } - }; + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static com.google.protobuf.Parser parser() { - return PARSER; - } + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } - public interface MixedAudioOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Segments this audio response is composed of.
-     * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; - * - */ - java.util.List - getSegmentsList(); - /** - * - * - *
-     * Segments this audio response is composed of.
-     * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; - * - */ - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment getSegments(int index); - /** - * - * - *
-     * Segments this audio response is composed of.
-     * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; - * - */ - int getSegmentsCount(); - /** - * - * - *
-     * Segments this audio response is composed of.
-     * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; - * - */ - java.util.List< - ? extends com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.SegmentOrBuilder> - getSegmentsOrBuilderList(); - /** - * - * - *
-     * Segments this audio response is composed of.
-     * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; - * - */ - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.SegmentOrBuilder - getSegmentsOrBuilder(int index); - } - /** - * - * - *
-   * Represents an audio message that is composed of both segments
-   * synthesized from the Dialogflow agent prompts and ones hosted externally
-   * at the specified URIs.
-   * The external URIs are specified 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.
-   * 
- * - * Protobuf type {@code google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio} - */ - public static final class MixedAudio extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio) - MixedAudioOrBuilder { - private static final long serialVersionUID = 0L; - // Use MixedAudio.newBuilder() to construct. - private MixedAudio(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private MixedAudio() { - segments_ = java.util.Collections.emptyList(); - } + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new MixedAudio(); - } + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - private MixedAudio( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - segments_ = - new java.util.ArrayList< - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment>(); - mutable_bitField0_ |= 0x00000001; - } - segments_.add( - input.readMessage( - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment - .parser(), - extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - segments_ = java.util.Collections.unmodifiableList(segments_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_descriptor; - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.class, - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Builder.class); - } + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - public interface SegmentOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment) - com.google.protobuf.MessageOrBuilder { + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } /** * * *
-       * Raw audio synthesized from the Dialogflow agent's response using
-       * the output config specified in the request.
+       * Represents one segment of audio.
        * 
* - * bytes audio = 1; - * - * @return The audio. + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment} */ - com.google.protobuf.ByteString getAudio(); + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment) + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.SegmentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto + .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_Segment_descriptor; + } - /** - * - * - *
-       * Client-specific URI that points to an audio clip accessible to the
-       * client. Dialogflow does not impose any validation on it.
-       * 
- * - * string uri = 2; - * - * @return The uri. - */ - java.lang.String getUri(); - /** - * - * - *
-       * Client-specific URI that points to an audio clip accessible to the
-       * client. Dialogflow does not impose any validation on it.
-       * 
- * - * string uri = 2; - * - * @return The bytes for uri. - */ - com.google.protobuf.ByteString getUriBytes(); + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto + .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_Segment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.class, + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.Builder + .class); + } - /** - * - * - *
-       * 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.
-       * 
- * - * bool allow_playback_interruption = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The allowPlaybackInterruption. - */ - boolean getAllowPlaybackInterruption(); + // Construct using + // com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.ContentCase - getContentCase(); - } - /** - * - * - *
-     * Represents one segment of audio.
-     * 
- * - * Protobuf type {@code google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment} - */ - public static final class Segment extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment) - SegmentOrBuilder { - private static final long serialVersionUID = 0L; - // Use Segment.newBuilder() to construct. - private Segment(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } - private Segment() {} + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Segment(); - } + @java.lang.Override + public Builder clear() { + super.clear(); + allowPlaybackInterruption_ = false; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } + contentCase_ = 0; + content_ = null; + return this; + } - private Segment( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto + .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_Segment_descriptor; } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - contentCase_ = 1; - content_ = input.readBytes(); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - contentCase_ = 2; - content_ = s; - break; - } - case 24: - { - allowPlaybackInterruption_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment + .getDefaultInstance(); } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_Segment_descriptor; - } + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment build() { + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_Segment_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.class, - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.Builder.class); - } + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment buildPartial() { + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment result = + new com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment(this); + if (contentCase_ == 1) { + result.content_ = content_; + } + if (contentCase_ == 2) { + result.content_ = content_; + } + result.allowPlaybackInterruption_ = allowPlaybackInterruption_; + result.contentCase_ = contentCase_; + onBuilt(); + return result; + } - private int contentCase_ = 0; - private java.lang.Object content_; + @java.lang.Override + public Builder clone() { + return super.clone(); + } - public enum ContentCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - AUDIO(1), - URI(2), - CONTENT_NOT_SET(0); - private final int value; + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } - private ContentCase(int value) { - this.value = value; + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ContentCase valueOf(int value) { - return forNumber(value); + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); } - public static ContentCase forNumber(int value) { - switch (value) { - case 1: - return AUDIO; - case 2: - return URI; - case 0: - return CONTENT_NOT_SET; - default: - return null; - } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); } - public int getNumber() { - return this.value; + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); } - }; - public ContentCase getContentCase() { - return ContentCase.forNumber(contentCase_); - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment) other); + } else { + super.mergeFrom(other); + return this; + } + } - public static final int AUDIO_FIELD_NUMBER = 1; - /** - * - * - *
-       * Raw audio synthesized from the Dialogflow agent's response using
-       * the output config specified in the request.
-       * 
- * - * bytes audio = 1; - * - * @return The audio. - */ - @java.lang.Override - public com.google.protobuf.ByteString getAudio() { - if (contentCase_ == 1) { - return (com.google.protobuf.ByteString) content_; - } - return com.google.protobuf.ByteString.EMPTY; - } - - public static final int URI_FIELD_NUMBER = 2; - /** - * - * - *
-       * Client-specific URI that points to an audio clip accessible to the
-       * client. Dialogflow does not impose any validation on it.
-       * 
- * - * string uri = 2; - * - * @return The uri. - */ - public java.lang.String getUri() { - java.lang.Object ref = ""; - if (contentCase_ == 2) { - ref = content_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (contentCase_ == 2) { - content_ = s; + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment other) { + if (other + == com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment + .getDefaultInstance()) return this; + if (other.getAllowPlaybackInterruption() != false) { + setAllowPlaybackInterruption(other.getAllowPlaybackInterruption()); } - return s; - } - } - /** - * - * - *
-       * Client-specific URI that points to an audio clip accessible to the
-       * client. Dialogflow does not impose any validation on it.
-       * 
- * - * string uri = 2; - * - * @return The bytes for uri. - */ - public com.google.protobuf.ByteString getUriBytes() { - java.lang.Object ref = ""; - if (contentCase_ == 2) { - ref = content_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (contentCase_ == 2) { - content_ = b; + switch (other.getContentCase()) { + case AUDIO: + { + setAudio(other.getAudio()); + break; + } + case URI: + { + contentCase_ = 2; + content_ = other.content_; + onChanged(); + break; + } + case CONTENT_NOT_SET: + { + break; + } } - return b; - } else { - return (com.google.protobuf.ByteString) ref; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; } - } - - public static final int ALLOW_PLAYBACK_INTERRUPTION_FIELD_NUMBER = 3; - private boolean allowPlaybackInterruption_; - /** - * - * - *
-       * 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.
-       * 
- * - * bool allow_playback_interruption = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The allowPlaybackInterruption. - */ - @java.lang.Override - public boolean getAllowPlaybackInterruption() { - return allowPlaybackInterruption_; - } - private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + return true; + } - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } - memoizedIsInitialized = 1; - return true; - } + private int contentCase_ = 0; + private java.lang.Object content_; - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (contentCase_ == 1) { - output.writeBytes(1, (com.google.protobuf.ByteString) content_); - } - if (contentCase_ == 2) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, content_); - } - if (allowPlaybackInterruption_ != false) { - output.writeBool(3, allowPlaybackInterruption_); + public ContentCase getContentCase() { + return ContentCase.forNumber(contentCase_); } - unknownFields.writeTo(output); - } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + public Builder clearContent() { + contentCase_ = 0; + content_ = null; + onChanged(); + return this; + } - size = 0; - if (contentCase_ == 1) { - size += - com.google.protobuf.CodedOutputStream.computeBytesSize( - 1, (com.google.protobuf.ByteString) content_); + /** + * + * + *
+         * Raw audio synthesized from the Dialogflow agent's response using
+         * the output config specified in the request.
+         * 
+ * + * bytes audio = 1; + * + * @return The audio. + */ + public com.google.protobuf.ByteString getAudio() { + if (contentCase_ == 1) { + return (com.google.protobuf.ByteString) content_; + } + return com.google.protobuf.ByteString.EMPTY; } - if (contentCase_ == 2) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, content_); + /** + * + * + *
+         * Raw audio synthesized from the Dialogflow agent's response using
+         * the output config specified in the request.
+         * 
+ * + * bytes audio = 1; + * + * @param value The audio to set. + * @return This builder for chaining. + */ + public Builder setAudio(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + contentCase_ = 1; + content_ = value; + onChanged(); + return this; } - if (allowPlaybackInterruption_ != false) { - size += - com.google.protobuf.CodedOutputStream.computeBoolSize(3, allowPlaybackInterruption_); + /** + * + * + *
+         * Raw audio synthesized from the Dialogflow agent's response using
+         * the output config specified in the request.
+         * 
+ * + * bytes audio = 1; + * + * @return This builder for chaining. + */ + public Builder clearAudio() { + if (contentCase_ == 1) { + contentCase_ = 0; + content_ = null; + onChanged(); + } + return this; } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment)) { - return super.equals(obj); + /** + * + * + *
+         * Client-specific URI that points to an audio clip accessible to the
+         * client. Dialogflow does not impose any validation on it.
+         * 
+ * + * string uri = 2; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = ""; + if (contentCase_ == 2) { + ref = content_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (contentCase_ == 2) { + content_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Client-specific URI that points to an audio clip accessible to the
+         * client. Dialogflow does not impose any validation on it.
+         * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = ""; + if (contentCase_ == 2) { + ref = content_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (contentCase_ == 2) { + content_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Client-specific URI that points to an audio clip accessible to the
+         * client. Dialogflow does not impose any validation on it.
+         * 
+ * + * string uri = 2; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + contentCase_ = 2; + content_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Client-specific URI that points to an audio clip accessible to the
+         * client. Dialogflow does not impose any validation on it.
+         * 
+ * + * string uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + if (contentCase_ == 2) { + contentCase_ = 0; + content_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+         * Client-specific URI that points to an audio clip accessible to the
+         * client. Dialogflow does not impose any validation on it.
+         * 
+ * + * string uri = 2; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + contentCase_ = 2; + content_ = value; + onChanged(); + return this; } - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment other = - (com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment) obj; - if (getAllowPlaybackInterruption() != other.getAllowPlaybackInterruption()) return false; - if (!getContentCase().equals(other.getContentCase())) return false; - switch (contentCase_) { - case 1: - if (!getAudio().equals(other.getAudio())) return false; - break; - case 2: - if (!getUri().equals(other.getUri())) return false; - break; - case 0: - default: + private boolean allowPlaybackInterruption_; + /** + * + * + *
+         * 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.
+         * 
+ * + * bool allow_playback_interruption = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The allowPlaybackInterruption. + */ + @java.lang.Override + public boolean getAllowPlaybackInterruption() { + return allowPlaybackInterruption_; } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + /** + * + * + *
+         * 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.
+         * 
+ * + * bool allow_playback_interruption = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The allowPlaybackInterruption to set. + * @return This builder for chaining. + */ + public Builder setAllowPlaybackInterruption(boolean value) { - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; + allowPlaybackInterruption_ = value; + onChanged(); + return this; } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ALLOW_PLAYBACK_INTERRUPTION_FIELD_NUMBER; - hash = - (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowPlaybackInterruption()); - switch (contentCase_) { - case 1: - hash = (37 * hash) + AUDIO_FIELD_NUMBER; - hash = (53 * hash) + getAudio().hashCode(); - break; - case 2: - hash = (37 * hash) + URI_FIELD_NUMBER; - hash = (53 * hash) + getUri().hashCode(); - break; - case 0: - default: + /** + * + * + *
+         * 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.
+         * 
+ * + * bool allow_playback_interruption = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearAllowPlaybackInterruption() { + + allowPlaybackInterruption_ = false; + onChanged(); + return this; } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment) } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment) + private static final com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment(); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment + getDefaultInstance() { + return DEFAULT_INSTANCE; } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Segment parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Segment(input, extensionRegistry); + } + }; - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + public static com.google.protobuf.Parser parser() { + return PARSER; } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } + } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment - parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } + public static final int SEGMENTS_FIELD_NUMBER = 1; + private java.util.List + segments_; + /** + * + * + *
+     * Segments this audio response is composed of.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + @java.lang.Override + public java.util.List + getSegmentsList() { + return segments_; + } + /** + * + * + *
+     * Segments this audio response is composed of.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.SegmentOrBuilder> + getSegmentsOrBuilderList() { + return segments_; + } + /** + * + * + *
+     * Segments this audio response is composed of.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + @java.lang.Override + public int getSegmentsCount() { + return segments_.size(); + } + /** + * + * + *
+     * Segments this audio response is composed of.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment getSegments( + int index) { + return segments_.get(index); + } + /** + * + * + *
+     * Segments this audio response is composed of.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.SegmentOrBuilder + getSegmentsOrBuilder(int index) { + return segments_.get(index); + } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } + private byte memoizedIsInitialized = -1; - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } + memoizedIsInitialized = 1; + return true; + } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < segments_.size(); i++) { + output.writeMessage(1, segments_.get(i)); } + unknownFields.writeTo(output); + } - public static Builder newBuilder( - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + size = 0; + for (int i = 0; i < segments_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, segments_.get(i)); } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; } - /** - * - * - *
-       * Represents one segment of audio.
-       * 
- * - * Protobuf type {@code google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment) - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.SegmentOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_Segment_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_Segment_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.class, - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.Builder - .class); - } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio other = + (com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio) obj; - // Construct using - // com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + if (!getSegmentsList().equals(other.getSegmentsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getSegmentsCount() > 0) { + hash = (37 * hash) + SEGMENTS_FIELD_NUMBER; + hash = (53 * hash) + getSegmentsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public Builder clear() { - super.clear(); - allowPlaybackInterruption_ = false; + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - contentCase_ = 0; - content_ = null; - return this; - } + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_Segment_descriptor; - } + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment - getDefaultInstanceForType() { - return com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment - .getDefaultInstance(); - } + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment build() { - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment buildPartial() { - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment result = - new com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment(this); - if (contentCase_ == 1) { - result.content_ = content_; - } - if (contentCase_ == 2) { - result.content_ = content_; - } - result.allowPlaybackInterruption_ = allowPlaybackInterruption_; - result.contentCase_ = contentCase_; - onBuilt(); - return result; - } + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - @java.lang.Override - public Builder clone() { - return super.clone(); - } + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment) { - return mergeFrom( - (com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment) other); - } else { - super.mergeFrom(other); - return this; - } - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - public Builder mergeFrom( - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment other) { - if (other - == com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment - .getDefaultInstance()) return this; - if (other.getAllowPlaybackInterruption() != false) { - setAllowPlaybackInterruption(other.getAllowPlaybackInterruption()); - } - switch (other.getContentCase()) { - case AUDIO: - { - setAudio(other.getAudio()); - break; - } - case URI: - { - contentCase_ = 2; - content_ = other.content_; - onChanged(); - break; - } - case CONTENT_NOT_SET: - { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - @java.lang.Override - public final boolean isInitialized() { - return true; - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Represents an audio message that is composed of both segments
+     * synthesized from the Dialogflow agent prompts and ones hosted externally
+     * at the specified URIs.
+     * The external URIs are specified 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.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio) + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudioOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto + .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_descriptor; + } - private int contentCase_ = 0; - private java.lang.Object content_; + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto + .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.class, + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Builder.class); + } - public ContentCase getContentCase() { - return ContentCase.forNumber(contentCase_); + // Construct using com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getSegmentsFieldBuilder(); } + } - public Builder clearContent() { - contentCase_ = 0; - content_ = null; - onChanged(); - return this; + @java.lang.Override + public Builder clear() { + super.clear(); + if (segmentsBuilder_ == null) { + segments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + segmentsBuilder_.clear(); } + return this; + } - /** - * - * - *
-         * Raw audio synthesized from the Dialogflow agent's response using
-         * the output config specified in the request.
-         * 
- * - * bytes audio = 1; - * - * @return The audio. - */ - public com.google.protobuf.ByteString getAudio() { - if (contentCase_ == 1) { - return (com.google.protobuf.ByteString) content_; - } - return com.google.protobuf.ByteString.EMPTY; + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto + .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio build() { + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); } - /** - * - * - *
-         * Raw audio synthesized from the Dialogflow agent's response using
-         * the output config specified in the request.
-         * 
- * - * bytes audio = 1; - * - * @param value The audio to set. - * @return This builder for chaining. - */ - public Builder setAudio(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio buildPartial() { + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio result = + new com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio(this); + int from_bitField0_ = bitField0_; + if (segmentsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + segments_ = java.util.Collections.unmodifiableList(segments_); + bitField0_ = (bitField0_ & ~0x00000001); } - contentCase_ = 1; - content_ = value; - onChanged(); - return this; + result.segments_ = segments_; + } else { + result.segments_ = segmentsBuilder_.build(); } - /** - * - * - *
-         * Raw audio synthesized from the Dialogflow agent's response using
-         * the output config specified in the request.
-         * 
- * - * bytes audio = 1; - * - * @return This builder for chaining. - */ - public Builder clearAudio() { - if (contentCase_ == 1) { - contentCase_ = 0; - content_ = null; - onChanged(); - } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio) other); + } else { + super.mergeFrom(other); return this; } + } - /** - * - * - *
-         * Client-specific URI that points to an audio clip accessible to the
-         * client. Dialogflow does not impose any validation on it.
-         * 
- * - * string uri = 2; - * - * @return The uri. - */ - @java.lang.Override - public java.lang.String getUri() { - java.lang.Object ref = ""; - if (contentCase_ == 2) { - ref = content_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (contentCase_ == 2) { - content_ = s; + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio other) { + if (other + == com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.getDefaultInstance()) + return this; + if (segmentsBuilder_ == null) { + if (!other.segments_.isEmpty()) { + if (segments_.isEmpty()) { + segments_ = other.segments_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSegmentsIsMutable(); + segments_.addAll(other.segments_); } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-         * Client-specific URI that points to an audio clip accessible to the
-         * client. Dialogflow does not impose any validation on it.
-         * 
- * - * string uri = 2; - * - * @return The bytes for uri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getUriBytes() { - java.lang.Object ref = ""; - if (contentCase_ == 2) { - ref = content_; + onChanged(); } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (contentCase_ == 2) { - content_ = b; + } else { + if (!other.segments_.isEmpty()) { + if (segmentsBuilder_.isEmpty()) { + segmentsBuilder_.dispose(); + segmentsBuilder_ = null; + segments_ = other.segments_; + bitField0_ = (bitField0_ & ~0x00000001); + segmentsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getSegmentsFieldBuilder() + : null; + } else { + segmentsBuilder_.addAllMessages(other.segments_); } - return b; - } else { - return (com.google.protobuf.ByteString) ref; } } - /** - * - * - *
-         * Client-specific URI that points to an audio clip accessible to the
-         * client. Dialogflow does not impose any validation on it.
-         * 
- * - * string uri = 2; - * - * @param value The uri to set. - * @return This builder for chaining. - */ - public Builder setUri(java.lang.String value) { - if (value == null) { + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List + segments_ = java.util.Collections.emptyList(); + + private void ensureSegmentsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + segments_ = + new java.util.ArrayList< + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment>(segments_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment, + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.Builder, + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.SegmentOrBuilder> + segmentsBuilder_; + + /** + * + * + *
+       * Segments this audio response is composed of.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + public java.util.List + getSegmentsList() { + if (segmentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(segments_); + } else { + return segmentsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Segments this audio response is composed of.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + public int getSegmentsCount() { + if (segmentsBuilder_ == null) { + return segments_.size(); + } else { + return segmentsBuilder_.getCount(); + } + } + /** + * + * + *
+       * Segments this audio response is composed of.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment getSegments( + int index) { + if (segmentsBuilder_ == null) { + return segments_.get(index); + } else { + return segmentsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Segments this audio response is composed of.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + public Builder setSegments( + int index, com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment value) { + if (segmentsBuilder_ == null) { + if (value == null) { throw new NullPointerException(); } - contentCase_ = 2; - content_ = value; + ensureSegmentsIsMutable(); + segments_.set(index, value); onChanged(); - return this; + } else { + segmentsBuilder_.setMessage(index, value); } - /** - * - * - *
-         * Client-specific URI that points to an audio clip accessible to the
-         * client. Dialogflow does not impose any validation on it.
-         * 
- * - * string uri = 2; - * - * @return This builder for chaining. - */ - public Builder clearUri() { - if (contentCase_ == 2) { - contentCase_ = 0; - content_ = null; - onChanged(); + return this; + } + /** + * + * + *
+       * Segments this audio response is composed of.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + public Builder setSegments( + int index, + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.Builder + builderForValue) { + if (segmentsBuilder_ == null) { + ensureSegmentsIsMutable(); + segments_.set(index, builderForValue.build()); + onChanged(); + } else { + segmentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Segments this audio response is composed of.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + public Builder addSegments( + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment value) { + if (segmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } - return this; + ensureSegmentsIsMutable(); + segments_.add(value); + onChanged(); + } else { + segmentsBuilder_.addMessage(value); } - /** - * - * - *
-         * Client-specific URI that points to an audio clip accessible to the
-         * client. Dialogflow does not impose any validation on it.
-         * 
- * - * string uri = 2; - * - * @param value The bytes for uri to set. - * @return This builder for chaining. - */ - public Builder setUriBytes(com.google.protobuf.ByteString value) { + return this; + } + /** + * + * + *
+       * Segments this audio response is composed of.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + public Builder addSegments( + int index, com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment value) { + if (segmentsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - contentCase_ = 2; - content_ = value; + ensureSegmentsIsMutable(); + segments_.add(index, value); onChanged(); - return this; + } else { + segmentsBuilder_.addMessage(index, value); } - - private boolean allowPlaybackInterruption_; - /** - * - * - *
-         * 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.
-         * 
- * - * bool allow_playback_interruption = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The allowPlaybackInterruption. - */ - @java.lang.Override - public boolean getAllowPlaybackInterruption() { - return allowPlaybackInterruption_; + return this; + } + /** + * + * + *
+       * Segments this audio response is composed of.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + public Builder addSegments( + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.Builder + builderForValue) { + if (segmentsBuilder_ == null) { + ensureSegmentsIsMutable(); + segments_.add(builderForValue.build()); + onChanged(); + } else { + segmentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Segments this audio response is composed of.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + public Builder addSegments( + int index, + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.Builder + builderForValue) { + if (segmentsBuilder_ == null) { + ensureSegmentsIsMutable(); + segments_.add(index, builderForValue.build()); + onChanged(); + } else { + segmentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Segments this audio response is composed of.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + public Builder addAllSegments( + java.lang.Iterable< + ? extends com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment> + values) { + if (segmentsBuilder_ == null) { + ensureSegmentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, segments_); + onChanged(); + } else { + segmentsBuilder_.addAllMessages(values); } - /** - * - * - *
-         * 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.
-         * 
- * - * bool allow_playback_interruption = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The allowPlaybackInterruption to set. - * @return This builder for chaining. - */ - public Builder setAllowPlaybackInterruption(boolean value) { - - allowPlaybackInterruption_ = value; + return this; + } + /** + * + * + *
+       * Segments this audio response is composed of.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + public Builder clearSegments() { + if (segmentsBuilder_ == null) { + segments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); - return this; + } else { + segmentsBuilder_.clear(); } - /** - * - * - *
-         * 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.
-         * 
- * - * bool allow_playback_interruption = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearAllowPlaybackInterruption() { - - allowPlaybackInterruption_ = false; + return this; + } + /** + * + * + *
+       * Segments this audio response is composed of.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + public Builder removeSegments(int index) { + if (segmentsBuilder_ == null) { + ensureSegmentsIsMutable(); + segments_.remove(index); onChanged(); - return this; + } else { + segmentsBuilder_.remove(index); } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); + return this; + } + /** + * + * + *
+       * Segments this audio response is composed of.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.Builder + getSegmentsBuilder(int index) { + return getSegmentsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Segments this audio response is composed of.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.SegmentOrBuilder + getSegmentsOrBuilder(int index) { + if (segmentsBuilder_ == null) { + return segments_.get(index); + } else { + return segmentsBuilder_.getMessageOrBuilder(index); } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + } + /** + * + * + *
+       * Segments this audio response is composed of.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + public java.util.List< + ? extends + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.SegmentOrBuilder> + getSegmentsOrBuilderList() { + if (segmentsBuilder_ != null) { + return segmentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(segments_); } - - // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment) } - - // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment) - private static final com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment(); + /** + * + * + *
+       * Segments this audio response is composed of.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.Builder + addSegmentsBuilder() { + return getSegmentsFieldBuilder() + .addBuilder( + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment + .getDefaultInstance()); } - - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment - getDefaultInstance() { - return DEFAULT_INSTANCE; + /** + * + * + *
+       * Segments this audio response is composed of.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.Builder + addSegmentsBuilder(int index) { + return getSegmentsFieldBuilder() + .addBuilder( + index, + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment + .getDefaultInstance()); + } + /** + * + * + *
+       * Segments this audio response is composed of.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + public java.util.List< + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.Builder> + getSegmentsBuilderList() { + return getSegmentsFieldBuilder().getBuilderList(); } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Segment parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Segment(input, extensionRegistry); - } - }; + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment, + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.Builder, + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.SegmentOrBuilder> + getSegmentsFieldBuilder() { + if (segmentsBuilder_ == null) { + segmentsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment, + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.Builder, + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.SegmentOrBuilder>( + segments_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + segments_ = null; + } + return segmentsBuilder_; + } - public static com.google.protobuf.Parser parser() { - return PARSER; + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); } - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio) } - public static final int SEGMENTS_FIELD_NUMBER = 1; - private java.util.List - segments_; + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio) + private static final com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio(); + } + + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MixedAudio parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new MixedAudio(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface PlayAudioOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) + com.google.protobuf.MessageOrBuilder { + /** * * *
-     * Segments this audio response is composed of.
+     * Required. URI of the audio clip. Dialogflow does not impose any validation on this
+     * value. It is specific to the client that reads it.
      * 
* - * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; - * + * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The audioUri. */ - @java.lang.Override - public java.util.List - getSegmentsList() { - return segments_; - } + java.lang.String getAudioUri(); /** * * *
-     * Segments this audio response is composed of.
+     * Required. URI of the audio clip. Dialogflow does not impose any validation on this
+     * value. It is specific to the client that reads it.
      * 
* - * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; + * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for audioUri. + */ + com.google.protobuf.ByteString getAudioUriBytes(); + + /** + * + * + *
+     * 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.
+     * 
+ * + * bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * + * + * @return The allowPlaybackInterruption. */ + boolean getAllowPlaybackInterruption(); + } + /** + * + * + *
+   * Specifies an audio clip to be played by the client as part of the response.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio} + */ + public static final class PlayAudio extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) + PlayAudioOrBuilder { + private static final long serialVersionUID = 0L; + // Use PlayAudio.newBuilder() to construct. + private PlayAudio(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PlayAudio() { + audioUri_ = ""; + } + @java.lang.Override - public java.util.List< - ? extends com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.SegmentOrBuilder> - getSegmentsOrBuilderList() { - return segments_; + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PlayAudio(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private PlayAudio( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + audioUri_ = s; + break; + } + case 16: + { + allowPlaybackInterruption_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto + .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto + .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.class, + com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.Builder.class); } + + public static final int AUDIO_URI_FIELD_NUMBER = 1; + private volatile java.lang.Object audioUri_; /** * * *
-     * Segments this audio response is composed of.
+     * Required. URI of the audio clip. Dialogflow does not impose any validation on this
+     * value. It is specific to the client that reads it.
      * 
* - * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; - * + * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The audioUri. */ @java.lang.Override - public int getSegmentsCount() { - return segments_.size(); + public java.lang.String getAudioUri() { + java.lang.Object ref = audioUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + audioUri_ = s; + return s; + } } /** * * *
-     * Segments this audio response is composed of.
+     * Required. URI of the audio clip. Dialogflow does not impose any validation on this
+     * value. It is specific to the client that reads it.
      * 
* - * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; - * + * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for audioUri. */ @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment getSegments( - int index) { - return segments_.get(index); + public com.google.protobuf.ByteString getAudioUriBytes() { + java.lang.Object ref = audioUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + audioUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } + + public static final int ALLOW_PLAYBACK_INTERRUPTION_FIELD_NUMBER = 2; + private boolean allowPlaybackInterruption_; /** * * *
-     * Segments this audio response is composed of.
+     * 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.
      * 
* - * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; + * bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * + * + * @return The allowPlaybackInterruption. */ @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.SegmentOrBuilder - getSegmentsOrBuilder(int index) { - return segments_.get(index); + public boolean getAllowPlaybackInterruption() { + return allowPlaybackInterruption_; } private byte memoizedIsInitialized = -1; @@ -6447,8 +6721,11 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < segments_.size(); i++) { - output.writeMessage(1, segments_.get(i)); + if (!getAudioUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, audioUri_); + } + if (allowPlaybackInterruption_ != false) { + output.writeBool(2, allowPlaybackInterruption_); } unknownFields.writeTo(output); } @@ -6459,8 +6736,12 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - for (int i = 0; i < segments_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, segments_.get(i)); + if (!getAudioUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, audioUri_); + } + if (allowPlaybackInterruption_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(2, allowPlaybackInterruption_); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -6472,13 +6753,14 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio)) { + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio)) { return super.equals(obj); } - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio other = - (com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio) obj; + com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio other = + (com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) obj; - if (!getSegmentsList().equals(other.getSegmentsList())) return false; + if (!getAudioUri().equals(other.getAudioUri())) return false; + if (getAllowPlaybackInterruption() != other.getAllowPlaybackInterruption()) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -6490,80 +6772,80 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (getSegmentsCount() > 0) { - hash = (37 * hash) + SEGMENTS_FIELD_NUMBER; - hash = (53 * hash) + getSegmentsList().hashCode(); - } + hash = (37 * hash) + AUDIO_URI_FIELD_NUMBER; + hash = (53 * hash) + getAudioUri().hashCode(); + hash = (37 * hash) + ALLOW_PLAYBACK_INTERRUPTION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowPlaybackInterruption()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio parseDelimitedFrom( + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio parseDelimitedFrom( + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -6581,7 +6863,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio prototype) { + com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -6600,38 +6882,32 @@ protected Builder newBuilderForType( * * *
-     * Represents an audio message that is composed of both segments
-     * synthesized from the Dialogflow agent prompts and ones hosted externally
-     * at the specified URIs.
-     * The external URIs are specified 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.
+     * Specifies an audio clip to be played by the client as part of the response.
      * 
* - * Protobuf type {@code google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio} + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio) - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudioOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) + com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudioOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_descriptor; + .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_fieldAccessorTable + .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.class, - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Builder.class); + com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.class, + com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.Builder.class); } - // Construct using com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.newBuilder() + // Construct using com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -6642,581 +6918,307 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getSegmentsFieldBuilder(); - } + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override public Builder clear() { super.clear(); - if (segmentsBuilder_ == null) { - segments_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - segmentsBuilder_.clear(); - } + audioUri_ = ""; + + allowPlaybackInterruption_ = false; + return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_descriptor; + .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_descriptor; } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio getDefaultInstanceForType() { - return com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio build() { - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio buildPartial() { - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio result = - new com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio(this); - int from_bitField0_ = bitField0_; - if (segmentsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - segments_ = java.util.Collections.unmodifiableList(segments_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.segments_ = segments_; - } else { - result.segments_ = segmentsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio) { - return mergeFrom((com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio other) { - if (other - == com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.getDefaultInstance()) - return this; - if (segmentsBuilder_ == null) { - if (!other.segments_.isEmpty()) { - if (segments_.isEmpty()) { - segments_ = other.segments_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureSegmentsIsMutable(); - segments_.addAll(other.segments_); - } - onChanged(); - } - } else { - if (!other.segments_.isEmpty()) { - if (segmentsBuilder_.isEmpty()) { - segmentsBuilder_.dispose(); - segmentsBuilder_ = null; - segments_ = other.segments_; - bitField0_ = (bitField0_ & ~0x00000001); - segmentsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getSegmentsFieldBuilder() - : null; - } else { - segmentsBuilder_.addAllMessages(other.segments_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; + return com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.getDefaultInstance(); } - - private int bitField0_; - - private java.util.List - segments_ = java.util.Collections.emptyList(); - - private void ensureSegmentsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - segments_ = - new java.util.ArrayList< - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment>(segments_); - bitField0_ |= 0x00000001; + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio build() { + com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); } + return result; } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment, - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.Builder, - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.SegmentOrBuilder> - segmentsBuilder_; + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio buildPartial() { + com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio result = + new com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio(this); + result.audioUri_ = audioUri_; + result.allowPlaybackInterruption_ = allowPlaybackInterruption_; + onBuilt(); + return result; + } - /** - * - * - *
-       * Segments this audio response is composed of.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; - * - */ - public java.util.List - getSegmentsList() { - if (segmentsBuilder_ == null) { - return java.util.Collections.unmodifiableList(segments_); - } else { - return segmentsBuilder_.getMessageList(); - } + @java.lang.Override + public Builder clone() { + return super.clone(); } - /** - * - * - *
-       * Segments this audio response is composed of.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; - * - */ - public int getSegmentsCount() { - if (segmentsBuilder_ == null) { - return segments_.size(); - } else { - return segmentsBuilder_.getCount(); - } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); } - /** - * - * - *
-       * Segments this audio response is composed of.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; - * - */ - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment getSegments( - int index) { - if (segmentsBuilder_ == null) { - return segments_.get(index); - } else { - return segmentsBuilder_.getMessage(index); - } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); } - /** - * - * - *
-       * Segments this audio response is composed of.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; - * - */ - public Builder setSegments( - int index, com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment value) { - if (segmentsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSegmentsIsMutable(); - segments_.set(index, value); - onChanged(); - } else { - segmentsBuilder_.setMessage(index, value); - } - return this; + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); } - /** - * - * - *
-       * Segments this audio response is composed of.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; - * - */ - public Builder setSegments( + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.Builder - builderForValue) { - if (segmentsBuilder_ == null) { - ensureSegmentsIsMutable(); - segments_.set(index, builderForValue.build()); - onChanged(); - } else { - segmentsBuilder_.setMessage(index, builderForValue.build()); - } - return this; + java.lang.Object value) { + return super.setRepeatedField(field, index, value); } - /** - * - * - *
-       * Segments this audio response is composed of.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; - * - */ - public Builder addSegments( - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment value) { - if (segmentsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSegmentsIsMutable(); - segments_.add(value); - onChanged(); - } else { - segmentsBuilder_.addMessage(value); - } - return this; + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); } - /** - * - * - *
-       * Segments this audio response is composed of.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; - * - */ - public Builder addSegments( - int index, com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment value) { - if (segmentsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSegmentsIsMutable(); - segments_.add(index, value); - onChanged(); + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) other); } else { - segmentsBuilder_.addMessage(index, value); + super.mergeFrom(other); + return this; } - return this; } - /** - * - * - *
-       * Segments this audio response is composed of.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; - * - */ - public Builder addSegments( - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.Builder - builderForValue) { - if (segmentsBuilder_ == null) { - ensureSegmentsIsMutable(); - segments_.add(builderForValue.build()); + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio other) { + if (other + == com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.getDefaultInstance()) + return this; + if (!other.getAudioUri().isEmpty()) { + audioUri_ = other.audioUri_; onChanged(); - } else { - segmentsBuilder_.addMessage(builderForValue.build()); } + if (other.getAllowPlaybackInterruption() != false) { + setAllowPlaybackInterruption(other.getAllowPlaybackInterruption()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } - /** - * - * - *
-       * Segments this audio response is composed of.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; - * - */ - public Builder addSegments( - int index, - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.Builder - builderForValue) { - if (segmentsBuilder_ == null) { - ensureSegmentsIsMutable(); - segments_.add(index, builderForValue.build()); - onChanged(); - } else { - segmentsBuilder_.addMessage(index, builderForValue.build()); + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } } return this; } + + private java.lang.Object audioUri_ = ""; /** * * *
-       * Segments this audio response is composed of.
+       * Required. URI of the audio clip. Dialogflow does not impose any validation on this
+       * value. It is specific to the client that reads it.
        * 
* - * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; - * + * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The audioUri. */ - public Builder addAllSegments( - java.lang.Iterable< - ? extends com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment> - values) { - if (segmentsBuilder_ == null) { - ensureSegmentsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, segments_); - onChanged(); + public java.lang.String getAudioUri() { + java.lang.Object ref = audioUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + audioUri_ = s; + return s; } else { - segmentsBuilder_.addAllMessages(values); + return (java.lang.String) ref; } - return this; } /** * * *
-       * Segments this audio response is composed of.
+       * Required. URI of the audio clip. Dialogflow does not impose any validation on this
+       * value. It is specific to the client that reads it.
        * 
* - * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; - * + * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for audioUri. */ - public Builder clearSegments() { - if (segmentsBuilder_ == null) { - segments_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); + public com.google.protobuf.ByteString getAudioUriBytes() { + java.lang.Object ref = audioUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + audioUri_ = b; + return b; } else { - segmentsBuilder_.clear(); + return (com.google.protobuf.ByteString) ref; } - return this; } /** * * *
-       * Segments this audio response is composed of.
+       * Required. URI of the audio clip. Dialogflow does not impose any validation on this
+       * value. It is specific to the client that reads it.
        * 
* - * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; - * + * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The audioUri to set. + * @return This builder for chaining. */ - public Builder removeSegments(int index) { - if (segmentsBuilder_ == null) { - ensureSegmentsIsMutable(); - segments_.remove(index); - onChanged(); - } else { - segmentsBuilder_.remove(index); + public Builder setAudioUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } + + audioUri_ = value; + onChanged(); return this; } /** * * *
-       * Segments this audio response is composed of.
+       * Required. URI of the audio clip. Dialogflow does not impose any validation on this
+       * value. It is specific to the client that reads it.
        * 
* - * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; - * - */ - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.Builder - getSegmentsBuilder(int index) { - return getSegmentsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-       * Segments this audio response is composed of.
-       * 
+ * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; * - * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; - * + * @return This builder for chaining. */ - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.SegmentOrBuilder - getSegmentsOrBuilder(int index) { - if (segmentsBuilder_ == null) { - return segments_.get(index); - } else { - return segmentsBuilder_.getMessageOrBuilder(index); - } + public Builder clearAudioUri() { + + audioUri_ = getDefaultInstance().getAudioUri(); + onChanged(); + return this; } /** * * *
-       * Segments this audio response is composed of.
+       * Required. URI of the audio clip. Dialogflow does not impose any validation on this
+       * value. It is specific to the client that reads it.
        * 
* - * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; - * + * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for audioUri to set. + * @return This builder for chaining. */ - public java.util.List< - ? extends - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.SegmentOrBuilder> - getSegmentsOrBuilderList() { - if (segmentsBuilder_ != null) { - return segmentsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(segments_); + public Builder setAudioUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } + checkByteStringIsUtf8(value); + + audioUri_ = value; + onChanged(); + return this; } + + private boolean allowPlaybackInterruption_; /** * * *
-       * Segments this audio response is composed of.
+       * 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.
        * 
* - * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; + * bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * + * + * @return The allowPlaybackInterruption. */ - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.Builder - addSegmentsBuilder() { - return getSegmentsFieldBuilder() - .addBuilder( - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment - .getDefaultInstance()); + @java.lang.Override + public boolean getAllowPlaybackInterruption() { + return allowPlaybackInterruption_; } /** * * *
-       * Segments this audio response is composed of.
+       * 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.
        * 
* - * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; + * bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * + * + * @param value The allowPlaybackInterruption to set. + * @return This builder for chaining. */ - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.Builder - addSegmentsBuilder(int index) { - return getSegmentsFieldBuilder() - .addBuilder( - index, - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment - .getDefaultInstance()); + public Builder setAllowPlaybackInterruption(boolean value) { + + allowPlaybackInterruption_ = value; + onChanged(); + return this; } /** * * *
-       * Segments this audio response is composed of.
+       * 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.
        * 
* - * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; + * bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * + * + * @return This builder for chaining. */ - public java.util.List< - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.Builder> - getSegmentsBuilderList() { - return getSegmentsFieldBuilder().getBuilderList(); - } + public Builder clearAllowPlaybackInterruption() { - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment, - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.Builder, - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.SegmentOrBuilder> - getSegmentsFieldBuilder() { - if (segmentsBuilder_ == null) { - segmentsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment, - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.Builder, - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.SegmentOrBuilder>( - segments_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - segments_ = null; - } - return segmentsBuilder_; + allowPlaybackInterruption_ = false; + onChanged(); + return this; } @java.lang.Override @@ -7231,45 +7233,43 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio) + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) } - // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio) - private static final com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) + private static final com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio(); + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio(); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio - getDefaultInstance() { + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public MixedAudio parsePartialFrom( + public PlayAudio parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new MixedAudio(input, extensionRegistry); + return new PlayAudio(input, extensionRegistry); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio - getDefaultInstanceForType() { + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessageProto.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessageProto.java index 64f09b7b1..4f504d07d 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessageProto.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessageProto.java @@ -51,10 +51,6 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_EndInteraction_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_EndInteraction_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -63,6 +59,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_Segment_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_Segment_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -101,14 +101,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "gle.protobuf.Struct\032e\n\017OutputAudioText\022\016" + "\n\004text\030\001 \001(\tH\000\022\016\n\004ssml\030\002 \001(\tH\000\022(\n\033allow_" + "playback_interruption\030\003 \001(\010B\003\340A\003B\010\n\006sour" - + "ce\032\020\n\016EndInteraction\032M\n\tPlayAudio\022\026\n\taud" - + "io_uri\030\001 \001(\tB\003\340A\002\022(\n\033allow_playback_inte" - + "rruption\030\002 \001(\010B\003\340A\003\032\301\001\n\nMixedAudio\022S\n\010se" - + "gments\030\001 \003(\0132A.google.cloud.dialogflow.c" - + "x.v3.ResponseMessage.MixedAudio.Segment\032" - + "^\n\007Segment\022\017\n\005audio\030\001 \001(\014H\000\022\r\n\003uri\030\002 \001(\t" - + "H\000\022(\n\033allow_playback_interruption\030\003 \001(\010B" - + "\003\340A\003B\t\n\007contentB\t\n\007messageB\244\001\n!com.googl" + + "ce\032\020\n\016EndInteraction\032\301\001\n\nMixedAudio\022S\n\010s" + + "egments\030\001 \003(\0132A.google.cloud.dialogflow." + + "cx.v3.ResponseMessage.MixedAudio.Segment" + + "\032^\n\007Segment\022\017\n\005audio\030\001 \001(\014H\000\022\r\n\003uri\030\002 \001(" + + "\tH\000\022(\n\033allow_playback_interruption\030\003 \001(\010" + + "B\003\340A\003B\t\n\007content\032M\n\tPlayAudio\022\026\n\taudio_u" + + "ri\030\001 \001(\tB\003\340A\002\022(\n\033allow_playback_interrup" + + "tion\030\002 \001(\010B\003\340A\003B\t\n\007messageB\244\001\n!com.googl" + "e.cloud.dialogflow.cx.v3B\024ResponseMessag" + "eProtoP\001Z?google.golang.org/genproto/goo" + "gleapis/cloud/dialogflow/cx/v3;cx\370\001\001\242\002\002D" @@ -187,20 +187,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_EndInteraction_descriptor, new java.lang.String[] {}); - internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_descriptor = - internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_descriptor - .getNestedTypes() - .get(5); - internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_descriptor, - new java.lang.String[] { - "AudioUri", "AllowPlaybackInterruption", - }); internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_descriptor = internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_descriptor .getNestedTypes() - .get(6); + .get(5); internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_descriptor, @@ -217,6 +207,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Audio", "Uri", "AllowPlaybackInterruption", "Content", }); + internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_descriptor + .getNestedTypes() + .get(6); + internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_descriptor, + new java.lang.String[] { + "AudioUri", "AllowPlaybackInterruption", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RunTestCaseMetadata.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RunTestCaseMetadata.java new file mode 100644 index 000000000..abf17aa37 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RunTestCaseMetadata.java @@ -0,0 +1,457 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/test_case.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * Metadata returned for the [TestCases.RunTestCase][google.cloud.dialogflow.cx.v3.TestCases.RunTestCase] long running operation.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.RunTestCaseMetadata} + */ +public final class RunTestCaseMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.RunTestCaseMetadata) + RunTestCaseMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use RunTestCaseMetadata.newBuilder() to construct. + private RunTestCaseMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RunTestCaseMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RunTestCaseMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RunTestCaseMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_RunTestCaseMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_RunTestCaseMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.RunTestCaseMetadata.class, + com.google.cloud.dialogflow.cx.v3.RunTestCaseMetadata.Builder.class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.RunTestCaseMetadata)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.RunTestCaseMetadata other = + (com.google.cloud.dialogflow.cx.v3.RunTestCaseMetadata) obj; + + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.RunTestCaseMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.RunTestCaseMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.RunTestCaseMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.RunTestCaseMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.RunTestCaseMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.RunTestCaseMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.RunTestCaseMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.RunTestCaseMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.RunTestCaseMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.RunTestCaseMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.RunTestCaseMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.RunTestCaseMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3.RunTestCaseMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata returned for the [TestCases.RunTestCase][google.cloud.dialogflow.cx.v3.TestCases.RunTestCase] long running operation.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.RunTestCaseMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.RunTestCaseMetadata) + com.google.cloud.dialogflow.cx.v3.RunTestCaseMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_RunTestCaseMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_RunTestCaseMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.RunTestCaseMetadata.class, + com.google.cloud.dialogflow.cx.v3.RunTestCaseMetadata.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.RunTestCaseMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_RunTestCaseMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.RunTestCaseMetadata getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.RunTestCaseMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.RunTestCaseMetadata build() { + com.google.cloud.dialogflow.cx.v3.RunTestCaseMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.RunTestCaseMetadata buildPartial() { + com.google.cloud.dialogflow.cx.v3.RunTestCaseMetadata result = + new com.google.cloud.dialogflow.cx.v3.RunTestCaseMetadata(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.RunTestCaseMetadata) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.RunTestCaseMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.RunTestCaseMetadata other) { + if (other == com.google.cloud.dialogflow.cx.v3.RunTestCaseMetadata.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.RunTestCaseMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.RunTestCaseMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.RunTestCaseMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.RunTestCaseMetadata) + private static final com.google.cloud.dialogflow.cx.v3.RunTestCaseMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.RunTestCaseMetadata(); + } + + public static com.google.cloud.dialogflow.cx.v3.RunTestCaseMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RunTestCaseMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RunTestCaseMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.RunTestCaseMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RunTestCaseMetadataOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RunTestCaseMetadataOrBuilder.java new file mode 100644 index 000000000..6a1d1366a --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RunTestCaseMetadataOrBuilder.java @@ -0,0 +1,24 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/test_case.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface RunTestCaseMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.RunTestCaseMetadata) + com.google.protobuf.MessageOrBuilder {} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RunTestCaseRequest.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RunTestCaseRequest.java new file mode 100644 index 000000000..d71b05be3 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RunTestCaseRequest.java @@ -0,0 +1,864 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/test_case.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The request message for [TestCases.RunTestCase][google.cloud.dialogflow.cx.v3.TestCases.RunTestCase].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.RunTestCaseRequest} + */ +public final class RunTestCaseRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.RunTestCaseRequest) + RunTestCaseRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use RunTestCaseRequest.newBuilder() to construct. + private RunTestCaseRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RunTestCaseRequest() { + name_ = ""; + environment_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RunTestCaseRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RunTestCaseRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + environment_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_RunTestCaseRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_RunTestCaseRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.RunTestCaseRequest.class, + com.google.cloud.dialogflow.cx.v3.RunTestCaseRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Format of test case name to run: `projects/<Project ID>/locations/
+   * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Format of test case name to run: `projects/<Project ID>/locations/
+   * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENVIRONMENT_FIELD_NUMBER = 2; + private volatile java.lang.Object environment_; + /** + * + * + *
+   * Optional. Environment name. If not set, draft environment is assumed.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>`.
+   * 
+ * + * + * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The environment. + */ + @java.lang.Override + public java.lang.String getEnvironment() { + java.lang.Object ref = environment_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + environment_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Environment name. If not set, draft environment is assumed.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>`.
+   * 
+ * + * + * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for environment. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEnvironmentBytes() { + java.lang.Object ref = environment_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + environment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getEnvironmentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, environment_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getEnvironmentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, environment_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.RunTestCaseRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.RunTestCaseRequest other = + (com.google.cloud.dialogflow.cx.v3.RunTestCaseRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getEnvironment().equals(other.getEnvironment())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER; + hash = (53 * hash) + getEnvironment().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.RunTestCaseRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.RunTestCaseRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.RunTestCaseRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.RunTestCaseRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.RunTestCaseRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.RunTestCaseRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.RunTestCaseRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.RunTestCaseRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.RunTestCaseRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.RunTestCaseRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.RunTestCaseRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.RunTestCaseRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.dialogflow.cx.v3.RunTestCaseRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for [TestCases.RunTestCase][google.cloud.dialogflow.cx.v3.TestCases.RunTestCase].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.RunTestCaseRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.RunTestCaseRequest) + com.google.cloud.dialogflow.cx.v3.RunTestCaseRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_RunTestCaseRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_RunTestCaseRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.RunTestCaseRequest.class, + com.google.cloud.dialogflow.cx.v3.RunTestCaseRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.RunTestCaseRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + environment_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_RunTestCaseRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.RunTestCaseRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.RunTestCaseRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.RunTestCaseRequest build() { + com.google.cloud.dialogflow.cx.v3.RunTestCaseRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.RunTestCaseRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3.RunTestCaseRequest result = + new com.google.cloud.dialogflow.cx.v3.RunTestCaseRequest(this); + result.name_ = name_; + result.environment_ = environment_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.RunTestCaseRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.RunTestCaseRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.RunTestCaseRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3.RunTestCaseRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getEnvironment().isEmpty()) { + environment_ = other.environment_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.RunTestCaseRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.RunTestCaseRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Format of test case name to run: `projects/<Project ID>/locations/
+     * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Format of test case name to run: `projects/<Project ID>/locations/
+     * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Format of test case name to run: `projects/<Project ID>/locations/
+     * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format of test case name to run: `projects/<Project ID>/locations/
+     * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format of test case name to run: `projects/<Project ID>/locations/
+     * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object environment_ = ""; + /** + * + * + *
+     * Optional. Environment name. If not set, draft environment is assumed.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>`.
+     * 
+ * + * + * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The environment. + */ + public java.lang.String getEnvironment() { + java.lang.Object ref = environment_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + environment_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Environment name. If not set, draft environment is assumed.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>`.
+     * 
+ * + * + * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for environment. + */ + public com.google.protobuf.ByteString getEnvironmentBytes() { + java.lang.Object ref = environment_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + environment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Environment name. If not set, draft environment is assumed.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>`.
+     * 
+ * + * + * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The environment to set. + * @return This builder for chaining. + */ + public Builder setEnvironment(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + environment_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Environment name. If not set, draft environment is assumed.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>`.
+     * 
+ * + * + * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearEnvironment() { + + environment_ = getDefaultInstance().getEnvironment(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Environment name. If not set, draft environment is assumed.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>`.
+     * 
+ * + * + * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for environment to set. + * @return This builder for chaining. + */ + public Builder setEnvironmentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + environment_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.RunTestCaseRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.RunTestCaseRequest) + private static final com.google.cloud.dialogflow.cx.v3.RunTestCaseRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.RunTestCaseRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3.RunTestCaseRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RunTestCaseRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RunTestCaseRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.RunTestCaseRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RunTestCaseRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RunTestCaseRequestOrBuilder.java new file mode 100644 index 000000000..c458ce12e --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RunTestCaseRequestOrBuilder.java @@ -0,0 +1,89 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/test_case.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface RunTestCaseRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.RunTestCaseRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Format of test case name to run: `projects/<Project ID>/locations/
+   * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Format of test case name to run: `projects/<Project ID>/locations/
+   * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. Environment name. If not set, draft environment is assumed.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>`.
+   * 
+ * + * + * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The environment. + */ + java.lang.String getEnvironment(); + /** + * + * + *
+   * Optional. Environment name. If not set, draft environment is assumed.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>`.
+   * 
+ * + * + * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for environment. + */ + com.google.protobuf.ByteString getEnvironmentBytes(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RunTestCaseResponse.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RunTestCaseResponse.java new file mode 100644 index 000000000..2fe86bf49 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RunTestCaseResponse.java @@ -0,0 +1,735 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/test_case.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The response message for [TestCases.RunTestCase][google.cloud.dialogflow.cx.v3.TestCases.RunTestCase].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.RunTestCaseResponse} + */ +public final class RunTestCaseResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.RunTestCaseResponse) + RunTestCaseResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use RunTestCaseResponse.newBuilder() to construct. + private RunTestCaseResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RunTestCaseResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RunTestCaseResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RunTestCaseResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + com.google.cloud.dialogflow.cx.v3.TestCaseResult.Builder subBuilder = null; + if (result_ != null) { + subBuilder = result_.toBuilder(); + } + result_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.TestCaseResult.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(result_); + result_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_RunTestCaseResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_RunTestCaseResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.RunTestCaseResponse.class, + com.google.cloud.dialogflow.cx.v3.RunTestCaseResponse.Builder.class); + } + + public static final int RESULT_FIELD_NUMBER = 2; + private com.google.cloud.dialogflow.cx.v3.TestCaseResult result_; + /** + * + * + *
+   * The result.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.TestCaseResult result = 2; + * + * @return Whether the result field is set. + */ + @java.lang.Override + public boolean hasResult() { + return result_ != null; + } + /** + * + * + *
+   * The result.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.TestCaseResult result = 2; + * + * @return The result. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TestCaseResult getResult() { + return result_ == null + ? com.google.cloud.dialogflow.cx.v3.TestCaseResult.getDefaultInstance() + : result_; + } + /** + * + * + *
+   * The result.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.TestCaseResult result = 2; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TestCaseResultOrBuilder getResultOrBuilder() { + return getResult(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (result_ != null) { + output.writeMessage(2, getResult()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (result_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getResult()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.RunTestCaseResponse)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.RunTestCaseResponse other = + (com.google.cloud.dialogflow.cx.v3.RunTestCaseResponse) obj; + + if (hasResult() != other.hasResult()) return false; + if (hasResult()) { + if (!getResult().equals(other.getResult())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasResult()) { + hash = (37 * hash) + RESULT_FIELD_NUMBER; + hash = (53 * hash) + getResult().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.RunTestCaseResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.RunTestCaseResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.RunTestCaseResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.RunTestCaseResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.RunTestCaseResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.RunTestCaseResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.RunTestCaseResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.RunTestCaseResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.RunTestCaseResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.RunTestCaseResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.RunTestCaseResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.RunTestCaseResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3.RunTestCaseResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The response message for [TestCases.RunTestCase][google.cloud.dialogflow.cx.v3.TestCases.RunTestCase].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.RunTestCaseResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.RunTestCaseResponse) + com.google.cloud.dialogflow.cx.v3.RunTestCaseResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_RunTestCaseResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_RunTestCaseResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.RunTestCaseResponse.class, + com.google.cloud.dialogflow.cx.v3.RunTestCaseResponse.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.RunTestCaseResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (resultBuilder_ == null) { + result_ = null; + } else { + result_ = null; + resultBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_RunTestCaseResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.RunTestCaseResponse getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.RunTestCaseResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.RunTestCaseResponse build() { + com.google.cloud.dialogflow.cx.v3.RunTestCaseResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.RunTestCaseResponse buildPartial() { + com.google.cloud.dialogflow.cx.v3.RunTestCaseResponse result = + new com.google.cloud.dialogflow.cx.v3.RunTestCaseResponse(this); + if (resultBuilder_ == null) { + result.result_ = result_; + } else { + result.result_ = resultBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.RunTestCaseResponse) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.RunTestCaseResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.RunTestCaseResponse other) { + if (other == com.google.cloud.dialogflow.cx.v3.RunTestCaseResponse.getDefaultInstance()) + return this; + if (other.hasResult()) { + mergeResult(other.getResult()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.RunTestCaseResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.RunTestCaseResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.dialogflow.cx.v3.TestCaseResult result_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TestCaseResult, + com.google.cloud.dialogflow.cx.v3.TestCaseResult.Builder, + com.google.cloud.dialogflow.cx.v3.TestCaseResultOrBuilder> + resultBuilder_; + /** + * + * + *
+     * The result.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TestCaseResult result = 2; + * + * @return Whether the result field is set. + */ + public boolean hasResult() { + return resultBuilder_ != null || result_ != null; + } + /** + * + * + *
+     * The result.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TestCaseResult result = 2; + * + * @return The result. + */ + public com.google.cloud.dialogflow.cx.v3.TestCaseResult getResult() { + if (resultBuilder_ == null) { + return result_ == null + ? com.google.cloud.dialogflow.cx.v3.TestCaseResult.getDefaultInstance() + : result_; + } else { + return resultBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The result.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TestCaseResult result = 2; + */ + public Builder setResult(com.google.cloud.dialogflow.cx.v3.TestCaseResult value) { + if (resultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + result_ = value; + onChanged(); + } else { + resultBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The result.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TestCaseResult result = 2; + */ + public Builder setResult( + com.google.cloud.dialogflow.cx.v3.TestCaseResult.Builder builderForValue) { + if (resultBuilder_ == null) { + result_ = builderForValue.build(); + onChanged(); + } else { + resultBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The result.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TestCaseResult result = 2; + */ + public Builder mergeResult(com.google.cloud.dialogflow.cx.v3.TestCaseResult value) { + if (resultBuilder_ == null) { + if (result_ != null) { + result_ = + com.google.cloud.dialogflow.cx.v3.TestCaseResult.newBuilder(result_) + .mergeFrom(value) + .buildPartial(); + } else { + result_ = value; + } + onChanged(); + } else { + resultBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The result.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TestCaseResult result = 2; + */ + public Builder clearResult() { + if (resultBuilder_ == null) { + result_ = null; + onChanged(); + } else { + result_ = null; + resultBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The result.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TestCaseResult result = 2; + */ + public com.google.cloud.dialogflow.cx.v3.TestCaseResult.Builder getResultBuilder() { + + onChanged(); + return getResultFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The result.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TestCaseResult result = 2; + */ + public com.google.cloud.dialogflow.cx.v3.TestCaseResultOrBuilder getResultOrBuilder() { + if (resultBuilder_ != null) { + return resultBuilder_.getMessageOrBuilder(); + } else { + return result_ == null + ? com.google.cloud.dialogflow.cx.v3.TestCaseResult.getDefaultInstance() + : result_; + } + } + /** + * + * + *
+     * The result.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TestCaseResult result = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TestCaseResult, + com.google.cloud.dialogflow.cx.v3.TestCaseResult.Builder, + com.google.cloud.dialogflow.cx.v3.TestCaseResultOrBuilder> + getResultFieldBuilder() { + if (resultBuilder_ == null) { + resultBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TestCaseResult, + com.google.cloud.dialogflow.cx.v3.TestCaseResult.Builder, + com.google.cloud.dialogflow.cx.v3.TestCaseResultOrBuilder>( + getResult(), getParentForChildren(), isClean()); + result_ = null; + } + return resultBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.RunTestCaseResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.RunTestCaseResponse) + private static final com.google.cloud.dialogflow.cx.v3.RunTestCaseResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.RunTestCaseResponse(); + } + + public static com.google.cloud.dialogflow.cx.v3.RunTestCaseResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RunTestCaseResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RunTestCaseResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.RunTestCaseResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RunTestCaseResponseOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RunTestCaseResponseOrBuilder.java new file mode 100644 index 000000000..fa9e71742 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RunTestCaseResponseOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/test_case.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface RunTestCaseResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.RunTestCaseResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The result.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.TestCaseResult result = 2; + * + * @return Whether the result field is set. + */ + boolean hasResult(); + /** + * + * + *
+   * The result.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.TestCaseResult result = 2; + * + * @return The result. + */ + com.google.cloud.dialogflow.cx.v3.TestCaseResult getResult(); + /** + * + * + *
+   * The result.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.TestCaseResult result = 2; + */ + com.google.cloud.dialogflow.cx.v3.TestCaseResultOrBuilder getResultOrBuilder(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionInfo.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionInfo.java index 1e03f6c20..642c0286e 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionInfo.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionInfo.java @@ -147,9 +147,11 @@ protected com.google.protobuf.MapField internalGetMapField(int number) { *
    * 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 user.
+   * field can be used by the webhook to identify a session.
    * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/sessions/<Session ID>`.
+   * ID>/sessions/<Session ID>` or `projects/<Project ID>/locations/<Location
+   * ID>/agents/<Agent ID>/environments/<Environment ID>/sessions/<Session ID>`
+   * if environment is specified.
    * 
* * string session = 1 [(.google.api.resource_reference) = { ... } @@ -174,9 +176,11 @@ public java.lang.String getSession() { *
    * 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 user.
+   * field can be used by the webhook to identify a session.
    * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/sessions/<Session ID>`.
+   * ID>/sessions/<Session ID>` or `projects/<Project ID>/locations/<Location
+   * ID>/agents/<Agent ID>/environments/<Environment ID>/sessions/<Session ID>`
+   * if environment is specified.
    * 
* * string session = 1 [(.google.api.resource_reference) = { ... } @@ -687,9 +691,11 @@ public Builder mergeFrom( *
      * 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 user.
+     * field can be used by the webhook to identify a session.
      * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/sessions/<Session ID>`.
+     * ID>/sessions/<Session ID>` or `projects/<Project ID>/locations/<Location
+     * ID>/agents/<Agent ID>/environments/<Environment ID>/sessions/<Session ID>`
+     * if environment is specified.
      * 
* * string session = 1 [(.google.api.resource_reference) = { ... } @@ -713,9 +719,11 @@ public java.lang.String getSession() { *
      * 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 user.
+     * field can be used by the webhook to identify a session.
      * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/sessions/<Session ID>`.
+     * ID>/sessions/<Session ID>` or `projects/<Project ID>/locations/<Location
+     * ID>/agents/<Agent ID>/environments/<Environment ID>/sessions/<Session ID>`
+     * if environment is specified.
      * 
* * string session = 1 [(.google.api.resource_reference) = { ... } @@ -739,9 +747,11 @@ public com.google.protobuf.ByteString getSessionBytes() { *
      * 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 user.
+     * field can be used by the webhook to identify a session.
      * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/sessions/<Session ID>`.
+     * ID>/sessions/<Session ID>` or `projects/<Project ID>/locations/<Location
+     * ID>/agents/<Agent ID>/environments/<Environment ID>/sessions/<Session ID>`
+     * if environment is specified.
      * 
* * string session = 1 [(.google.api.resource_reference) = { ... } @@ -764,9 +774,11 @@ public Builder setSession(java.lang.String value) { *
      * 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 user.
+     * field can be used by the webhook to identify a session.
      * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/sessions/<Session ID>`.
+     * ID>/sessions/<Session ID>` or `projects/<Project ID>/locations/<Location
+     * ID>/agents/<Agent ID>/environments/<Environment ID>/sessions/<Session ID>`
+     * if environment is specified.
      * 
* * string session = 1 [(.google.api.resource_reference) = { ... } @@ -785,9 +797,11 @@ public Builder clearSession() { *
      * 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 user.
+     * field can be used by the webhook to identify a session.
      * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/sessions/<Session ID>`.
+     * ID>/sessions/<Session ID>` or `projects/<Project ID>/locations/<Location
+     * ID>/agents/<Agent ID>/environments/<Environment ID>/sessions/<Session ID>`
+     * if environment is specified.
      * 
* * string session = 1 [(.google.api.resource_reference) = { ... } diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionInfoOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionInfoOrBuilder.java index 0beb1fb4a..2a8b7a3af 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionInfoOrBuilder.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionInfoOrBuilder.java @@ -29,9 +29,11 @@ public interface SessionInfoOrBuilder *
    * 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 user.
+   * field can be used by the webhook to identify a session.
    * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/sessions/<Session ID>`.
+   * ID>/sessions/<Session ID>` or `projects/<Project ID>/locations/<Location
+   * ID>/agents/<Agent ID>/environments/<Environment ID>/sessions/<Session ID>`
+   * if environment is specified.
    * 
* * string session = 1 [(.google.api.resource_reference) = { ... } @@ -45,9 +47,11 @@ public interface SessionInfoOrBuilder *
    * 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 user.
+   * field can be used by the webhook to identify a session.
    * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/sessions/<Session ID>`.
+   * ID>/sessions/<Session ID>` or `projects/<Project ID>/locations/<Location
+   * ID>/agents/<Agent ID>/environments/<Environment ID>/sessions/<Session ID>`
+   * if environment is specified.
    * 
* * string session = 1 [(.google.api.resource_reference) = { ... } diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCase.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCase.java new file mode 100644 index 000000000..4fac6bfc6 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCase.java @@ -0,0 +1,2789 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/test_case.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * Represents a test case.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.TestCase} + */ +public final class TestCase extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.TestCase) + TestCaseOrBuilder { + private static final long serialVersionUID = 0L; + // Use TestCase.newBuilder() to construct. + private TestCase(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TestCase() { + name_ = ""; + tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + displayName_ = ""; + notes_ = ""; + testCaseConversationTurns_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TestCase(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TestCase( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + tags_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + tags_.add(s); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + notes_ = s; + break; + } + case 42: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + testCaseConversationTurns_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + testCaseConversationTurns_.add( + input.readMessage( + com.google.cloud.dialogflow.cx.v3.ConversationTurn.parser(), + extensionRegistry)); + break; + } + case 82: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (creationTime_ != null) { + subBuilder = creationTime_.toBuilder(); + } + creationTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(creationTime_); + creationTime_ = subBuilder.buildPartial(); + } + + break; + } + case 98: + { + com.google.cloud.dialogflow.cx.v3.TestCaseResult.Builder subBuilder = null; + if (lastTestResult_ != null) { + subBuilder = lastTestResult_.toBuilder(); + } + lastTestResult_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.TestCaseResult.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(lastTestResult_); + lastTestResult_ = subBuilder.buildPartial(); + } + + break; + } + case 106: + { + com.google.cloud.dialogflow.cx.v3.TestConfig.Builder subBuilder = null; + if (testConfig_ != null) { + subBuilder = testConfig_.toBuilder(); + } + testConfig_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.TestConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(testConfig_); + testConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + tags_ = tags_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + testCaseConversationTurns_ = + java.util.Collections.unmodifiableList(testCaseConversationTurns_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_TestCase_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_TestCase_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.TestCase.class, + com.google.cloud.dialogflow.cx.v3.TestCase.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object 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/<Project ID>/locations/<LocationID>/agents/
+   * <AgentID>/testCases/<TestCase ID>`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * 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/<Project ID>/locations/<LocationID>/agents/
+   * <AgentID>/testCases/<TestCase ID>`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TAGS_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList 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.
+   * 
+ * + * repeated string tags = 2; + * + * @return A list containing the tags. + */ + public com.google.protobuf.ProtocolStringList getTagsList() { + return 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.
+   * 
+ * + * repeated string tags = 2; + * + * @return The count of tags. + */ + public int getTagsCount() { + return tags_.size(); + } + /** + * + * + *
+   * 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.
+   * 
+ * + * repeated string tags = 2; + * + * @param index The index of the element to return. + * @return The tags at the given index. + */ + public java.lang.String getTags(int index) { + return tags_.get(index); + } + /** + * + * + *
+   * 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.
+   * 
+ * + * repeated string tags = 2; + * + * @param index The index of the value to return. + * @return The bytes of the tags at the given index. + */ + public com.google.protobuf.ByteString getTagsBytes(int index) { + return tags_.getByteString(index); + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 3; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Required. The human-readable name of the test case, unique within the agent. Limit of
+   * 200 characters.
+   * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The human-readable name of the test case, unique within the agent. Limit of
+   * 200 characters.
+   * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NOTES_FIELD_NUMBER = 4; + private volatile java.lang.Object notes_; + /** + * + * + *
+   * Additional freeform notes about the test case. Limit of 400 characters.
+   * 
+ * + * string notes = 4; + * + * @return The notes. + */ + @java.lang.Override + public java.lang.String getNotes() { + java.lang.Object ref = notes_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + notes_ = s; + return s; + } + } + /** + * + * + *
+   * Additional freeform notes about the test case. Limit of 400 characters.
+   * 
+ * + * string notes = 4; + * + * @return The bytes for notes. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNotesBytes() { + java.lang.Object ref = notes_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + notes_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TEST_CONFIG_FIELD_NUMBER = 13; + private com.google.cloud.dialogflow.cx.v3.TestConfig testConfig_; + /** + * + * + *
+   * Config for the test case.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.TestConfig test_config = 13; + * + * @return Whether the testConfig field is set. + */ + @java.lang.Override + public boolean hasTestConfig() { + return testConfig_ != null; + } + /** + * + * + *
+   * Config for the test case.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.TestConfig test_config = 13; + * + * @return The testConfig. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TestConfig getTestConfig() { + return testConfig_ == null + ? com.google.cloud.dialogflow.cx.v3.TestConfig.getDefaultInstance() + : testConfig_; + } + /** + * + * + *
+   * Config for the test case.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.TestConfig test_config = 13; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TestConfigOrBuilder getTestConfigOrBuilder() { + return getTestConfig(); + } + + public static final int TEST_CASE_CONVERSATION_TURNS_FIELD_NUMBER = 5; + private java.util.List + testCaseConversationTurns_; + /** + * + * + *
+   * 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.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn test_case_conversation_turns = 5; + * + */ + @java.lang.Override + public java.util.List + getTestCaseConversationTurnsList() { + return testCaseConversationTurns_; + } + /** + * + * + *
+   * 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.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn test_case_conversation_turns = 5; + * + */ + @java.lang.Override + public java.util.List + getTestCaseConversationTurnsOrBuilderList() { + return testCaseConversationTurns_; + } + /** + * + * + *
+   * 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.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn test_case_conversation_turns = 5; + * + */ + @java.lang.Override + public int getTestCaseConversationTurnsCount() { + return testCaseConversationTurns_.size(); + } + /** + * + * + *
+   * 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.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn test_case_conversation_turns = 5; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ConversationTurn getTestCaseConversationTurns( + int index) { + return testCaseConversationTurns_.get(index); + } + /** + * + * + *
+   * 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.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn test_case_conversation_turns = 5; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ConversationTurnOrBuilder + getTestCaseConversationTurnsOrBuilder(int index) { + return testCaseConversationTurns_.get(index); + } + + public static final int CREATION_TIME_FIELD_NUMBER = 10; + private com.google.protobuf.Timestamp creationTime_; + /** + * + * + *
+   * Output only. When the test was created.
+   * 
+ * + * + * .google.protobuf.Timestamp creation_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the creationTime field is set. + */ + @java.lang.Override + public boolean hasCreationTime() { + return creationTime_ != null; + } + /** + * + * + *
+   * Output only. When the test was created.
+   * 
+ * + * + * .google.protobuf.Timestamp creation_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The creationTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreationTime() { + return creationTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : creationTime_; + } + /** + * + * + *
+   * Output only. When the test was created.
+   * 
+ * + * + * .google.protobuf.Timestamp creation_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreationTimeOrBuilder() { + return getCreationTime(); + } + + public static final int LAST_TEST_RESULT_FIELD_NUMBER = 12; + private com.google.cloud.dialogflow.cx.v3.TestCaseResult lastTestResult_; + /** + * + * + *
+   * The latest test result.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.TestCaseResult last_test_result = 12; + * + * @return Whether the lastTestResult field is set. + */ + @java.lang.Override + public boolean hasLastTestResult() { + return lastTestResult_ != null; + } + /** + * + * + *
+   * The latest test result.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.TestCaseResult last_test_result = 12; + * + * @return The lastTestResult. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TestCaseResult getLastTestResult() { + return lastTestResult_ == null + ? com.google.cloud.dialogflow.cx.v3.TestCaseResult.getDefaultInstance() + : lastTestResult_; + } + /** + * + * + *
+   * The latest test result.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.TestCaseResult last_test_result = 12; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TestCaseResultOrBuilder getLastTestResultOrBuilder() { + return getLastTestResult(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + for (int i = 0; i < tags_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, tags_.getRaw(i)); + } + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, displayName_); + } + if (!getNotesBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, notes_); + } + for (int i = 0; i < testCaseConversationTurns_.size(); i++) { + output.writeMessage(5, testCaseConversationTurns_.get(i)); + } + if (creationTime_ != null) { + output.writeMessage(10, getCreationTime()); + } + if (lastTestResult_ != null) { + output.writeMessage(12, getLastTestResult()); + } + if (testConfig_ != null) { + output.writeMessage(13, getTestConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + { + int dataSize = 0; + for (int i = 0; i < tags_.size(); i++) { + dataSize += computeStringSizeNoTag(tags_.getRaw(i)); + } + size += dataSize; + size += 1 * getTagsList().size(); + } + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, displayName_); + } + if (!getNotesBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, notes_); + } + for (int i = 0; i < testCaseConversationTurns_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, testCaseConversationTurns_.get(i)); + } + if (creationTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getCreationTime()); + } + if (lastTestResult_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getLastTestResult()); + } + if (testConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getTestConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.TestCase)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.TestCase other = + (com.google.cloud.dialogflow.cx.v3.TestCase) obj; + + if (!getName().equals(other.getName())) return false; + if (!getTagsList().equals(other.getTagsList())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getNotes().equals(other.getNotes())) return false; + if (hasTestConfig() != other.hasTestConfig()) return false; + if (hasTestConfig()) { + if (!getTestConfig().equals(other.getTestConfig())) return false; + } + if (!getTestCaseConversationTurnsList().equals(other.getTestCaseConversationTurnsList())) + return false; + if (hasCreationTime() != other.hasCreationTime()) return false; + if (hasCreationTime()) { + if (!getCreationTime().equals(other.getCreationTime())) return false; + } + if (hasLastTestResult() != other.hasLastTestResult()) return false; + if (hasLastTestResult()) { + if (!getLastTestResult().equals(other.getLastTestResult())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getTagsCount() > 0) { + hash = (37 * hash) + TAGS_FIELD_NUMBER; + hash = (53 * hash) + getTagsList().hashCode(); + } + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + NOTES_FIELD_NUMBER; + hash = (53 * hash) + getNotes().hashCode(); + if (hasTestConfig()) { + hash = (37 * hash) + TEST_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getTestConfig().hashCode(); + } + if (getTestCaseConversationTurnsCount() > 0) { + hash = (37 * hash) + TEST_CASE_CONVERSATION_TURNS_FIELD_NUMBER; + hash = (53 * hash) + getTestCaseConversationTurnsList().hashCode(); + } + if (hasCreationTime()) { + hash = (37 * hash) + CREATION_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreationTime().hashCode(); + } + if (hasLastTestResult()) { + hash = (37 * hash) + LAST_TEST_RESULT_FIELD_NUMBER; + hash = (53 * hash) + getLastTestResult().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.TestCase parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.TestCase parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.TestCase parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.TestCase parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.TestCase parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.TestCase parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.TestCase parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.TestCase parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.TestCase parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.TestCase parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.TestCase parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.TestCase parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.dialogflow.cx.v3.TestCase prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Represents a test case.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.TestCase} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.TestCase) + com.google.cloud.dialogflow.cx.v3.TestCaseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_TestCase_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_TestCase_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.TestCase.class, + com.google.cloud.dialogflow.cx.v3.TestCase.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.TestCase.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getTestCaseConversationTurnsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + displayName_ = ""; + + notes_ = ""; + + if (testConfigBuilder_ == null) { + testConfig_ = null; + } else { + testConfig_ = null; + testConfigBuilder_ = null; + } + if (testCaseConversationTurnsBuilder_ == null) { + testCaseConversationTurns_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + testCaseConversationTurnsBuilder_.clear(); + } + if (creationTimeBuilder_ == null) { + creationTime_ = null; + } else { + creationTime_ = null; + creationTimeBuilder_ = null; + } + if (lastTestResultBuilder_ == null) { + lastTestResult_ = null; + } else { + lastTestResult_ = null; + lastTestResultBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_TestCase_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TestCase getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.TestCase.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TestCase build() { + com.google.cloud.dialogflow.cx.v3.TestCase result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TestCase buildPartial() { + com.google.cloud.dialogflow.cx.v3.TestCase result = + new com.google.cloud.dialogflow.cx.v3.TestCase(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + if (((bitField0_ & 0x00000001) != 0)) { + tags_ = tags_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.tags_ = tags_; + result.displayName_ = displayName_; + result.notes_ = notes_; + if (testConfigBuilder_ == null) { + result.testConfig_ = testConfig_; + } else { + result.testConfig_ = testConfigBuilder_.build(); + } + if (testCaseConversationTurnsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + testCaseConversationTurns_ = + java.util.Collections.unmodifiableList(testCaseConversationTurns_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.testCaseConversationTurns_ = testCaseConversationTurns_; + } else { + result.testCaseConversationTurns_ = testCaseConversationTurnsBuilder_.build(); + } + if (creationTimeBuilder_ == null) { + result.creationTime_ = creationTime_; + } else { + result.creationTime_ = creationTimeBuilder_.build(); + } + if (lastTestResultBuilder_ == null) { + result.lastTestResult_ = lastTestResult_; + } else { + result.lastTestResult_ = lastTestResultBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.TestCase) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.TestCase) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.TestCase other) { + if (other == com.google.cloud.dialogflow.cx.v3.TestCase.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.tags_.isEmpty()) { + if (tags_.isEmpty()) { + tags_ = other.tags_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTagsIsMutable(); + tags_.addAll(other.tags_); + } + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getNotes().isEmpty()) { + notes_ = other.notes_; + onChanged(); + } + if (other.hasTestConfig()) { + mergeTestConfig(other.getTestConfig()); + } + if (testCaseConversationTurnsBuilder_ == null) { + if (!other.testCaseConversationTurns_.isEmpty()) { + if (testCaseConversationTurns_.isEmpty()) { + testCaseConversationTurns_ = other.testCaseConversationTurns_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureTestCaseConversationTurnsIsMutable(); + testCaseConversationTurns_.addAll(other.testCaseConversationTurns_); + } + onChanged(); + } + } else { + if (!other.testCaseConversationTurns_.isEmpty()) { + if (testCaseConversationTurnsBuilder_.isEmpty()) { + testCaseConversationTurnsBuilder_.dispose(); + testCaseConversationTurnsBuilder_ = null; + testCaseConversationTurns_ = other.testCaseConversationTurns_; + bitField0_ = (bitField0_ & ~0x00000002); + testCaseConversationTurnsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTestCaseConversationTurnsFieldBuilder() + : null; + } else { + testCaseConversationTurnsBuilder_.addAllMessages(other.testCaseConversationTurns_); + } + } + } + if (other.hasCreationTime()) { + mergeCreationTime(other.getCreationTime()); + } + if (other.hasLastTestResult()) { + mergeLastTestResult(other.getLastTestResult()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.TestCase parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.dialogflow.cx.v3.TestCase) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object 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/<Project ID>/locations/<LocationID>/agents/
+     * <AgentID>/testCases/<TestCase ID>`.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * 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/<Project ID>/locations/<LocationID>/agents/
+     * <AgentID>/testCases/<TestCase ID>`.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * 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/<Project ID>/locations/<LocationID>/agents/
+     * <AgentID>/testCases/<TestCase ID>`.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * 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/<Project ID>/locations/<LocationID>/agents/
+     * <AgentID>/testCases/<TestCase ID>`.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * 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/<Project ID>/locations/<LocationID>/agents/
+     * <AgentID>/testCases/<TestCase ID>`.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList tags_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureTagsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + tags_ = new com.google.protobuf.LazyStringArrayList(tags_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated string tags = 2; + * + * @return A list containing the tags. + */ + public com.google.protobuf.ProtocolStringList getTagsList() { + return tags_.getUnmodifiableView(); + } + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated string tags = 2; + * + * @return The count of tags. + */ + public int getTagsCount() { + return tags_.size(); + } + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated string tags = 2; + * + * @param index The index of the element to return. + * @return The tags at the given index. + */ + public java.lang.String getTags(int index) { + return tags_.get(index); + } + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated string tags = 2; + * + * @param index The index of the value to return. + * @return The bytes of the tags at the given index. + */ + public com.google.protobuf.ByteString getTagsBytes(int index) { + return tags_.getByteString(index); + } + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated string tags = 2; + * + * @param index The index to set the value at. + * @param value The tags to set. + * @return This builder for chaining. + */ + public Builder setTags(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagsIsMutable(); + tags_.set(index, value); + onChanged(); + 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.
+     * 
+ * + * repeated string tags = 2; + * + * @param value The tags to add. + * @return This builder for chaining. + */ + public Builder addTags(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagsIsMutable(); + tags_.add(value); + onChanged(); + 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.
+     * 
+ * + * repeated string tags = 2; + * + * @param values The tags to add. + * @return This builder for chaining. + */ + public Builder addAllTags(java.lang.Iterable values) { + ensureTagsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tags_); + onChanged(); + 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.
+     * 
+ * + * repeated string tags = 2; + * + * @return This builder for chaining. + */ + public Builder clearTags() { + tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + 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.
+     * 
+ * + * repeated string tags = 2; + * + * @param value The bytes of the tags to add. + * @return This builder for chaining. + */ + public Builder addTagsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureTagsIsMutable(); + tags_.add(value); + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Required. The human-readable name of the test case, unique within the agent. Limit of
+     * 200 characters.
+     * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The human-readable name of the test case, unique within the agent. Limit of
+     * 200 characters.
+     * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The human-readable name of the test case, unique within the agent. Limit of
+     * 200 characters.
+     * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The human-readable name of the test case, unique within the agent. Limit of
+     * 200 characters.
+     * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The human-readable name of the test case, unique within the agent. Limit of
+     * 200 characters.
+     * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.lang.Object notes_ = ""; + /** + * + * + *
+     * Additional freeform notes about the test case. Limit of 400 characters.
+     * 
+ * + * string notes = 4; + * + * @return The notes. + */ + public java.lang.String getNotes() { + java.lang.Object ref = notes_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + notes_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Additional freeform notes about the test case. Limit of 400 characters.
+     * 
+ * + * string notes = 4; + * + * @return The bytes for notes. + */ + public com.google.protobuf.ByteString getNotesBytes() { + java.lang.Object ref = notes_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + notes_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Additional freeform notes about the test case. Limit of 400 characters.
+     * 
+ * + * string notes = 4; + * + * @param value The notes to set. + * @return This builder for chaining. + */ + public Builder setNotes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + notes_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Additional freeform notes about the test case. Limit of 400 characters.
+     * 
+ * + * string notes = 4; + * + * @return This builder for chaining. + */ + public Builder clearNotes() { + + notes_ = getDefaultInstance().getNotes(); + onChanged(); + return this; + } + /** + * + * + *
+     * Additional freeform notes about the test case. Limit of 400 characters.
+     * 
+ * + * string notes = 4; + * + * @param value The bytes for notes to set. + * @return This builder for chaining. + */ + public Builder setNotesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + notes_ = value; + onChanged(); + return this; + } + + private com.google.cloud.dialogflow.cx.v3.TestConfig testConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TestConfig, + com.google.cloud.dialogflow.cx.v3.TestConfig.Builder, + com.google.cloud.dialogflow.cx.v3.TestConfigOrBuilder> + testConfigBuilder_; + /** + * + * + *
+     * Config for the test case.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TestConfig test_config = 13; + * + * @return Whether the testConfig field is set. + */ + public boolean hasTestConfig() { + return testConfigBuilder_ != null || testConfig_ != null; + } + /** + * + * + *
+     * Config for the test case.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TestConfig test_config = 13; + * + * @return The testConfig. + */ + public com.google.cloud.dialogflow.cx.v3.TestConfig getTestConfig() { + if (testConfigBuilder_ == null) { + return testConfig_ == null + ? com.google.cloud.dialogflow.cx.v3.TestConfig.getDefaultInstance() + : testConfig_; + } else { + return testConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Config for the test case.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TestConfig test_config = 13; + */ + public Builder setTestConfig(com.google.cloud.dialogflow.cx.v3.TestConfig value) { + if (testConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + testConfig_ = value; + onChanged(); + } else { + testConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Config for the test case.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TestConfig test_config = 13; + */ + public Builder setTestConfig( + com.google.cloud.dialogflow.cx.v3.TestConfig.Builder builderForValue) { + if (testConfigBuilder_ == null) { + testConfig_ = builderForValue.build(); + onChanged(); + } else { + testConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Config for the test case.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TestConfig test_config = 13; + */ + public Builder mergeTestConfig(com.google.cloud.dialogflow.cx.v3.TestConfig value) { + if (testConfigBuilder_ == null) { + if (testConfig_ != null) { + testConfig_ = + com.google.cloud.dialogflow.cx.v3.TestConfig.newBuilder(testConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + testConfig_ = value; + } + onChanged(); + } else { + testConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Config for the test case.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TestConfig test_config = 13; + */ + public Builder clearTestConfig() { + if (testConfigBuilder_ == null) { + testConfig_ = null; + onChanged(); + } else { + testConfig_ = null; + testConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Config for the test case.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TestConfig test_config = 13; + */ + public com.google.cloud.dialogflow.cx.v3.TestConfig.Builder getTestConfigBuilder() { + + onChanged(); + return getTestConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Config for the test case.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TestConfig test_config = 13; + */ + public com.google.cloud.dialogflow.cx.v3.TestConfigOrBuilder getTestConfigOrBuilder() { + if (testConfigBuilder_ != null) { + return testConfigBuilder_.getMessageOrBuilder(); + } else { + return testConfig_ == null + ? com.google.cloud.dialogflow.cx.v3.TestConfig.getDefaultInstance() + : testConfig_; + } + } + /** + * + * + *
+     * Config for the test case.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TestConfig test_config = 13; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TestConfig, + com.google.cloud.dialogflow.cx.v3.TestConfig.Builder, + com.google.cloud.dialogflow.cx.v3.TestConfigOrBuilder> + getTestConfigFieldBuilder() { + if (testConfigBuilder_ == null) { + testConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TestConfig, + com.google.cloud.dialogflow.cx.v3.TestConfig.Builder, + com.google.cloud.dialogflow.cx.v3.TestConfigOrBuilder>( + getTestConfig(), getParentForChildren(), isClean()); + testConfig_ = null; + } + return testConfigBuilder_; + } + + private java.util.List + testCaseConversationTurns_ = java.util.Collections.emptyList(); + + private void ensureTestCaseConversationTurnsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + testCaseConversationTurns_ = + new java.util.ArrayList( + testCaseConversationTurns_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ConversationTurn, + com.google.cloud.dialogflow.cx.v3.ConversationTurn.Builder, + com.google.cloud.dialogflow.cx.v3.ConversationTurnOrBuilder> + testCaseConversationTurnsBuilder_; + + /** + * + * + *
+     * 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.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn test_case_conversation_turns = 5; + * + */ + public java.util.List + getTestCaseConversationTurnsList() { + if (testCaseConversationTurnsBuilder_ == null) { + return java.util.Collections.unmodifiableList(testCaseConversationTurns_); + } else { + return testCaseConversationTurnsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * 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.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn test_case_conversation_turns = 5; + * + */ + public int getTestCaseConversationTurnsCount() { + if (testCaseConversationTurnsBuilder_ == null) { + return testCaseConversationTurns_.size(); + } else { + return testCaseConversationTurnsBuilder_.getCount(); + } + } + /** + * + * + *
+     * 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.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn test_case_conversation_turns = 5; + * + */ + public com.google.cloud.dialogflow.cx.v3.ConversationTurn getTestCaseConversationTurns( + int index) { + if (testCaseConversationTurnsBuilder_ == null) { + return testCaseConversationTurns_.get(index); + } else { + return testCaseConversationTurnsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * 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.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn test_case_conversation_turns = 5; + * + */ + public Builder setTestCaseConversationTurns( + int index, com.google.cloud.dialogflow.cx.v3.ConversationTurn value) { + if (testCaseConversationTurnsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTestCaseConversationTurnsIsMutable(); + testCaseConversationTurns_.set(index, value); + onChanged(); + } else { + testCaseConversationTurnsBuilder_.setMessage(index, value); + } + 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.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn test_case_conversation_turns = 5; + * + */ + public Builder setTestCaseConversationTurns( + int index, com.google.cloud.dialogflow.cx.v3.ConversationTurn.Builder builderForValue) { + if (testCaseConversationTurnsBuilder_ == null) { + ensureTestCaseConversationTurnsIsMutable(); + testCaseConversationTurns_.set(index, builderForValue.build()); + onChanged(); + } else { + testCaseConversationTurnsBuilder_.setMessage(index, builderForValue.build()); + } + 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.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn test_case_conversation_turns = 5; + * + */ + public Builder addTestCaseConversationTurns( + com.google.cloud.dialogflow.cx.v3.ConversationTurn value) { + if (testCaseConversationTurnsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTestCaseConversationTurnsIsMutable(); + testCaseConversationTurns_.add(value); + onChanged(); + } else { + testCaseConversationTurnsBuilder_.addMessage(value); + } + 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.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn test_case_conversation_turns = 5; + * + */ + public Builder addTestCaseConversationTurns( + int index, com.google.cloud.dialogflow.cx.v3.ConversationTurn value) { + if (testCaseConversationTurnsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTestCaseConversationTurnsIsMutable(); + testCaseConversationTurns_.add(index, value); + onChanged(); + } else { + testCaseConversationTurnsBuilder_.addMessage(index, value); + } + 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.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn test_case_conversation_turns = 5; + * + */ + public Builder addTestCaseConversationTurns( + com.google.cloud.dialogflow.cx.v3.ConversationTurn.Builder builderForValue) { + if (testCaseConversationTurnsBuilder_ == null) { + ensureTestCaseConversationTurnsIsMutable(); + testCaseConversationTurns_.add(builderForValue.build()); + onChanged(); + } else { + testCaseConversationTurnsBuilder_.addMessage(builderForValue.build()); + } + 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.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn test_case_conversation_turns = 5; + * + */ + public Builder addTestCaseConversationTurns( + int index, com.google.cloud.dialogflow.cx.v3.ConversationTurn.Builder builderForValue) { + if (testCaseConversationTurnsBuilder_ == null) { + ensureTestCaseConversationTurnsIsMutable(); + testCaseConversationTurns_.add(index, builderForValue.build()); + onChanged(); + } else { + testCaseConversationTurnsBuilder_.addMessage(index, builderForValue.build()); + } + 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.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn test_case_conversation_turns = 5; + * + */ + public Builder addAllTestCaseConversationTurns( + java.lang.Iterable values) { + if (testCaseConversationTurnsBuilder_ == null) { + ensureTestCaseConversationTurnsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, testCaseConversationTurns_); + onChanged(); + } else { + testCaseConversationTurnsBuilder_.addAllMessages(values); + } + 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.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn test_case_conversation_turns = 5; + * + */ + public Builder clearTestCaseConversationTurns() { + if (testCaseConversationTurnsBuilder_ == null) { + testCaseConversationTurns_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + testCaseConversationTurnsBuilder_.clear(); + } + 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.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn test_case_conversation_turns = 5; + * + */ + public Builder removeTestCaseConversationTurns(int index) { + if (testCaseConversationTurnsBuilder_ == null) { + ensureTestCaseConversationTurnsIsMutable(); + testCaseConversationTurns_.remove(index); + onChanged(); + } else { + testCaseConversationTurnsBuilder_.remove(index); + } + 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.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn test_case_conversation_turns = 5; + * + */ + public com.google.cloud.dialogflow.cx.v3.ConversationTurn.Builder + getTestCaseConversationTurnsBuilder(int index) { + return getTestCaseConversationTurnsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * 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.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn test_case_conversation_turns = 5; + * + */ + public com.google.cloud.dialogflow.cx.v3.ConversationTurnOrBuilder + getTestCaseConversationTurnsOrBuilder(int index) { + if (testCaseConversationTurnsBuilder_ == null) { + return testCaseConversationTurns_.get(index); + } else { + return testCaseConversationTurnsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * 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.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn test_case_conversation_turns = 5; + * + */ + public java.util.List + getTestCaseConversationTurnsOrBuilderList() { + if (testCaseConversationTurnsBuilder_ != null) { + return testCaseConversationTurnsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(testCaseConversationTurns_); + } + } + /** + * + * + *
+     * 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.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn test_case_conversation_turns = 5; + * + */ + public com.google.cloud.dialogflow.cx.v3.ConversationTurn.Builder + addTestCaseConversationTurnsBuilder() { + return getTestCaseConversationTurnsFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3.ConversationTurn.getDefaultInstance()); + } + /** + * + * + *
+     * 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.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn test_case_conversation_turns = 5; + * + */ + public com.google.cloud.dialogflow.cx.v3.ConversationTurn.Builder + addTestCaseConversationTurnsBuilder(int index) { + return getTestCaseConversationTurnsFieldBuilder() + .addBuilder( + index, com.google.cloud.dialogflow.cx.v3.ConversationTurn.getDefaultInstance()); + } + /** + * + * + *
+     * 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.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn test_case_conversation_turns = 5; + * + */ + public java.util.List + getTestCaseConversationTurnsBuilderList() { + return getTestCaseConversationTurnsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ConversationTurn, + com.google.cloud.dialogflow.cx.v3.ConversationTurn.Builder, + com.google.cloud.dialogflow.cx.v3.ConversationTurnOrBuilder> + getTestCaseConversationTurnsFieldBuilder() { + if (testCaseConversationTurnsBuilder_ == null) { + testCaseConversationTurnsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ConversationTurn, + com.google.cloud.dialogflow.cx.v3.ConversationTurn.Builder, + com.google.cloud.dialogflow.cx.v3.ConversationTurnOrBuilder>( + testCaseConversationTurns_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + testCaseConversationTurns_ = null; + } + return testCaseConversationTurnsBuilder_; + } + + private com.google.protobuf.Timestamp creationTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + creationTimeBuilder_; + /** + * + * + *
+     * Output only. When the test was created.
+     * 
+ * + * + * .google.protobuf.Timestamp creation_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the creationTime field is set. + */ + public boolean hasCreationTime() { + return creationTimeBuilder_ != null || creationTime_ != null; + } + /** + * + * + *
+     * Output only. When the test was created.
+     * 
+ * + * + * .google.protobuf.Timestamp creation_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The creationTime. + */ + public com.google.protobuf.Timestamp getCreationTime() { + if (creationTimeBuilder_ == null) { + return creationTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : creationTime_; + } else { + return creationTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. When the test was created.
+     * 
+ * + * + * .google.protobuf.Timestamp creation_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreationTime(com.google.protobuf.Timestamp value) { + if (creationTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + creationTime_ = value; + onChanged(); + } else { + creationTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. When the test was created.
+     * 
+ * + * + * .google.protobuf.Timestamp creation_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreationTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (creationTimeBuilder_ == null) { + creationTime_ = builderForValue.build(); + onChanged(); + } else { + creationTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. When the test was created.
+     * 
+ * + * + * .google.protobuf.Timestamp creation_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreationTime(com.google.protobuf.Timestamp value) { + if (creationTimeBuilder_ == null) { + if (creationTime_ != null) { + creationTime_ = + com.google.protobuf.Timestamp.newBuilder(creationTime_) + .mergeFrom(value) + .buildPartial(); + } else { + creationTime_ = value; + } + onChanged(); + } else { + creationTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. When the test was created.
+     * 
+ * + * + * .google.protobuf.Timestamp creation_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreationTime() { + if (creationTimeBuilder_ == null) { + creationTime_ = null; + onChanged(); + } else { + creationTime_ = null; + creationTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. When the test was created.
+     * 
+ * + * + * .google.protobuf.Timestamp creation_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreationTimeBuilder() { + + onChanged(); + return getCreationTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. When the test was created.
+     * 
+ * + * + * .google.protobuf.Timestamp creation_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreationTimeOrBuilder() { + if (creationTimeBuilder_ != null) { + return creationTimeBuilder_.getMessageOrBuilder(); + } else { + return creationTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : creationTime_; + } + } + /** + * + * + *
+     * Output only. When the test was created.
+     * 
+ * + * + * .google.protobuf.Timestamp creation_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreationTimeFieldBuilder() { + if (creationTimeBuilder_ == null) { + creationTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreationTime(), getParentForChildren(), isClean()); + creationTime_ = null; + } + return creationTimeBuilder_; + } + + private com.google.cloud.dialogflow.cx.v3.TestCaseResult lastTestResult_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TestCaseResult, + com.google.cloud.dialogflow.cx.v3.TestCaseResult.Builder, + com.google.cloud.dialogflow.cx.v3.TestCaseResultOrBuilder> + lastTestResultBuilder_; + /** + * + * + *
+     * The latest test result.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TestCaseResult last_test_result = 12; + * + * @return Whether the lastTestResult field is set. + */ + public boolean hasLastTestResult() { + return lastTestResultBuilder_ != null || lastTestResult_ != null; + } + /** + * + * + *
+     * The latest test result.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TestCaseResult last_test_result = 12; + * + * @return The lastTestResult. + */ + public com.google.cloud.dialogflow.cx.v3.TestCaseResult getLastTestResult() { + if (lastTestResultBuilder_ == null) { + return lastTestResult_ == null + ? com.google.cloud.dialogflow.cx.v3.TestCaseResult.getDefaultInstance() + : lastTestResult_; + } else { + return lastTestResultBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The latest test result.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TestCaseResult last_test_result = 12; + */ + public Builder setLastTestResult(com.google.cloud.dialogflow.cx.v3.TestCaseResult value) { + if (lastTestResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lastTestResult_ = value; + onChanged(); + } else { + lastTestResultBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The latest test result.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TestCaseResult last_test_result = 12; + */ + public Builder setLastTestResult( + com.google.cloud.dialogflow.cx.v3.TestCaseResult.Builder builderForValue) { + if (lastTestResultBuilder_ == null) { + lastTestResult_ = builderForValue.build(); + onChanged(); + } else { + lastTestResultBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The latest test result.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TestCaseResult last_test_result = 12; + */ + public Builder mergeLastTestResult(com.google.cloud.dialogflow.cx.v3.TestCaseResult value) { + if (lastTestResultBuilder_ == null) { + if (lastTestResult_ != null) { + lastTestResult_ = + com.google.cloud.dialogflow.cx.v3.TestCaseResult.newBuilder(lastTestResult_) + .mergeFrom(value) + .buildPartial(); + } else { + lastTestResult_ = value; + } + onChanged(); + } else { + lastTestResultBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The latest test result.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TestCaseResult last_test_result = 12; + */ + public Builder clearLastTestResult() { + if (lastTestResultBuilder_ == null) { + lastTestResult_ = null; + onChanged(); + } else { + lastTestResult_ = null; + lastTestResultBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The latest test result.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TestCaseResult last_test_result = 12; + */ + public com.google.cloud.dialogflow.cx.v3.TestCaseResult.Builder getLastTestResultBuilder() { + + onChanged(); + return getLastTestResultFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The latest test result.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TestCaseResult last_test_result = 12; + */ + public com.google.cloud.dialogflow.cx.v3.TestCaseResultOrBuilder getLastTestResultOrBuilder() { + if (lastTestResultBuilder_ != null) { + return lastTestResultBuilder_.getMessageOrBuilder(); + } else { + return lastTestResult_ == null + ? com.google.cloud.dialogflow.cx.v3.TestCaseResult.getDefaultInstance() + : lastTestResult_; + } + } + /** + * + * + *
+     * The latest test result.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TestCaseResult last_test_result = 12; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TestCaseResult, + com.google.cloud.dialogflow.cx.v3.TestCaseResult.Builder, + com.google.cloud.dialogflow.cx.v3.TestCaseResultOrBuilder> + getLastTestResultFieldBuilder() { + if (lastTestResultBuilder_ == null) { + lastTestResultBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TestCaseResult, + com.google.cloud.dialogflow.cx.v3.TestCaseResult.Builder, + com.google.cloud.dialogflow.cx.v3.TestCaseResultOrBuilder>( + getLastTestResult(), getParentForChildren(), isClean()); + lastTestResult_ = null; + } + return lastTestResultBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.TestCase) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.TestCase) + private static final com.google.cloud.dialogflow.cx.v3.TestCase DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.TestCase(); + } + + public static com.google.cloud.dialogflow.cx.v3.TestCase getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TestCase parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TestCase(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TestCase getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseError.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseError.java new file mode 100644 index 000000000..010c52e99 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseError.java @@ -0,0 +1,993 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/test_case.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * Error info for importing a test.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.TestCaseError} + */ +public final class TestCaseError extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.TestCaseError) + TestCaseErrorOrBuilder { + private static final long serialVersionUID = 0L; + // Use TestCaseError.newBuilder() to construct. + private TestCaseError(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TestCaseError() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TestCaseError(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TestCaseError( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.dialogflow.cx.v3.TestCase.Builder subBuilder = null; + if (testCase_ != null) { + subBuilder = testCase_.toBuilder(); + } + testCase_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.TestCase.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(testCase_); + testCase_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.rpc.Status.Builder subBuilder = null; + if (status_ != null) { + subBuilder = status_.toBuilder(); + } + status_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(status_); + status_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_TestCaseError_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_TestCaseError_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.TestCaseError.class, + com.google.cloud.dialogflow.cx.v3.TestCaseError.Builder.class); + } + + public static final int TEST_CASE_FIELD_NUMBER = 1; + private com.google.cloud.dialogflow.cx.v3.TestCase testCase_; + /** + * + * + *
+   * The test case.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 1; + * + * @return Whether the testCase field is set. + */ + @java.lang.Override + public boolean hasTestCase() { + return testCase_ != null; + } + /** + * + * + *
+   * The test case.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 1; + * + * @return The testCase. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TestCase getTestCase() { + return testCase_ == null + ? com.google.cloud.dialogflow.cx.v3.TestCase.getDefaultInstance() + : testCase_; + } + /** + * + * + *
+   * The test case.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TestCaseOrBuilder getTestCaseOrBuilder() { + return getTestCase(); + } + + public static final int STATUS_FIELD_NUMBER = 2; + private com.google.rpc.Status status_; + /** + * + * + *
+   * The status associated with the test case.
+   * 
+ * + * .google.rpc.Status status = 2; + * + * @return Whether the status field is set. + */ + @java.lang.Override + public boolean hasStatus() { + return status_ != null; + } + /** + * + * + *
+   * The status associated with the test case.
+   * 
+ * + * .google.rpc.Status status = 2; + * + * @return The status. + */ + @java.lang.Override + public com.google.rpc.Status getStatus() { + return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; + } + /** + * + * + *
+   * The status associated with the test case.
+   * 
+ * + * .google.rpc.Status status = 2; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { + return getStatus(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (testCase_ != null) { + output.writeMessage(1, getTestCase()); + } + if (status_ != null) { + output.writeMessage(2, getStatus()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (testCase_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTestCase()); + } + if (status_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStatus()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.TestCaseError)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.TestCaseError other = + (com.google.cloud.dialogflow.cx.v3.TestCaseError) obj; + + if (hasTestCase() != other.hasTestCase()) return false; + if (hasTestCase()) { + if (!getTestCase().equals(other.getTestCase())) return false; + } + if (hasStatus() != other.hasStatus()) return false; + if (hasStatus()) { + if (!getStatus().equals(other.getStatus())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasTestCase()) { + hash = (37 * hash) + TEST_CASE_FIELD_NUMBER; + hash = (53 * hash) + getTestCase().hashCode(); + } + if (hasStatus()) { + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + getStatus().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.TestCaseError parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.TestCaseError parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.TestCaseError parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.TestCaseError parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.TestCaseError parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.TestCaseError parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.TestCaseError parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.TestCaseError parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.TestCaseError parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.TestCaseError parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.TestCaseError parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.TestCaseError parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.dialogflow.cx.v3.TestCaseError prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Error info for importing a test.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.TestCaseError} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.TestCaseError) + com.google.cloud.dialogflow.cx.v3.TestCaseErrorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_TestCaseError_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_TestCaseError_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.TestCaseError.class, + com.google.cloud.dialogflow.cx.v3.TestCaseError.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.TestCaseError.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (testCaseBuilder_ == null) { + testCase_ = null; + } else { + testCase_ = null; + testCaseBuilder_ = null; + } + if (statusBuilder_ == null) { + status_ = null; + } else { + status_ = null; + statusBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_TestCaseError_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TestCaseError getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.TestCaseError.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TestCaseError build() { + com.google.cloud.dialogflow.cx.v3.TestCaseError result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TestCaseError buildPartial() { + com.google.cloud.dialogflow.cx.v3.TestCaseError result = + new com.google.cloud.dialogflow.cx.v3.TestCaseError(this); + if (testCaseBuilder_ == null) { + result.testCase_ = testCase_; + } else { + result.testCase_ = testCaseBuilder_.build(); + } + if (statusBuilder_ == null) { + result.status_ = status_; + } else { + result.status_ = statusBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.TestCaseError) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.TestCaseError) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.TestCaseError other) { + if (other == com.google.cloud.dialogflow.cx.v3.TestCaseError.getDefaultInstance()) + return this; + if (other.hasTestCase()) { + mergeTestCase(other.getTestCase()); + } + if (other.hasStatus()) { + mergeStatus(other.getStatus()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.TestCaseError parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.dialogflow.cx.v3.TestCaseError) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.dialogflow.cx.v3.TestCase testCase_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TestCase, + com.google.cloud.dialogflow.cx.v3.TestCase.Builder, + com.google.cloud.dialogflow.cx.v3.TestCaseOrBuilder> + testCaseBuilder_; + /** + * + * + *
+     * The test case.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 1; + * + * @return Whether the testCase field is set. + */ + public boolean hasTestCase() { + return testCaseBuilder_ != null || testCase_ != null; + } + /** + * + * + *
+     * The test case.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 1; + * + * @return The testCase. + */ + public com.google.cloud.dialogflow.cx.v3.TestCase getTestCase() { + if (testCaseBuilder_ == null) { + return testCase_ == null + ? com.google.cloud.dialogflow.cx.v3.TestCase.getDefaultInstance() + : testCase_; + } else { + return testCaseBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The test case.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 1; + */ + public Builder setTestCase(com.google.cloud.dialogflow.cx.v3.TestCase value) { + if (testCaseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + testCase_ = value; + onChanged(); + } else { + testCaseBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The test case.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 1; + */ + public Builder setTestCase(com.google.cloud.dialogflow.cx.v3.TestCase.Builder builderForValue) { + if (testCaseBuilder_ == null) { + testCase_ = builderForValue.build(); + onChanged(); + } else { + testCaseBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The test case.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 1; + */ + public Builder mergeTestCase(com.google.cloud.dialogflow.cx.v3.TestCase value) { + if (testCaseBuilder_ == null) { + if (testCase_ != null) { + testCase_ = + com.google.cloud.dialogflow.cx.v3.TestCase.newBuilder(testCase_) + .mergeFrom(value) + .buildPartial(); + } else { + testCase_ = value; + } + onChanged(); + } else { + testCaseBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The test case.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 1; + */ + public Builder clearTestCase() { + if (testCaseBuilder_ == null) { + testCase_ = null; + onChanged(); + } else { + testCase_ = null; + testCaseBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The test case.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 1; + */ + public com.google.cloud.dialogflow.cx.v3.TestCase.Builder getTestCaseBuilder() { + + onChanged(); + return getTestCaseFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The test case.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 1; + */ + public com.google.cloud.dialogflow.cx.v3.TestCaseOrBuilder getTestCaseOrBuilder() { + if (testCaseBuilder_ != null) { + return testCaseBuilder_.getMessageOrBuilder(); + } else { + return testCase_ == null + ? com.google.cloud.dialogflow.cx.v3.TestCase.getDefaultInstance() + : testCase_; + } + } + /** + * + * + *
+     * The test case.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TestCase, + com.google.cloud.dialogflow.cx.v3.TestCase.Builder, + com.google.cloud.dialogflow.cx.v3.TestCaseOrBuilder> + getTestCaseFieldBuilder() { + if (testCaseBuilder_ == null) { + testCaseBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TestCase, + com.google.cloud.dialogflow.cx.v3.TestCase.Builder, + com.google.cloud.dialogflow.cx.v3.TestCaseOrBuilder>( + getTestCase(), getParentForChildren(), isClean()); + testCase_ = null; + } + return testCaseBuilder_; + } + + private com.google.rpc.Status status_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + statusBuilder_; + /** + * + * + *
+     * The status associated with the test case.
+     * 
+ * + * .google.rpc.Status status = 2; + * + * @return Whether the status field is set. + */ + public boolean hasStatus() { + return statusBuilder_ != null || status_ != null; + } + /** + * + * + *
+     * The status associated with the test case.
+     * 
+ * + * .google.rpc.Status status = 2; + * + * @return The status. + */ + public com.google.rpc.Status getStatus() { + if (statusBuilder_ == null) { + return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; + } else { + return statusBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The status associated with the test case.
+     * 
+ * + * .google.rpc.Status status = 2; + */ + public Builder setStatus(com.google.rpc.Status value) { + if (statusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + status_ = value; + onChanged(); + } else { + statusBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The status associated with the test case.
+     * 
+ * + * .google.rpc.Status status = 2; + */ + public Builder setStatus(com.google.rpc.Status.Builder builderForValue) { + if (statusBuilder_ == null) { + status_ = builderForValue.build(); + onChanged(); + } else { + statusBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The status associated with the test case.
+     * 
+ * + * .google.rpc.Status status = 2; + */ + public Builder mergeStatus(com.google.rpc.Status value) { + if (statusBuilder_ == null) { + if (status_ != null) { + status_ = com.google.rpc.Status.newBuilder(status_).mergeFrom(value).buildPartial(); + } else { + status_ = value; + } + onChanged(); + } else { + statusBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The status associated with the test case.
+     * 
+ * + * .google.rpc.Status status = 2; + */ + public Builder clearStatus() { + if (statusBuilder_ == null) { + status_ = null; + onChanged(); + } else { + status_ = null; + statusBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The status associated with the test case.
+     * 
+ * + * .google.rpc.Status status = 2; + */ + public com.google.rpc.Status.Builder getStatusBuilder() { + + onChanged(); + return getStatusFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The status associated with the test case.
+     * 
+ * + * .google.rpc.Status status = 2; + */ + public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { + if (statusBuilder_ != null) { + return statusBuilder_.getMessageOrBuilder(); + } else { + return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; + } + } + /** + * + * + *
+     * The status associated with the test case.
+     * 
+ * + * .google.rpc.Status status = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getStatusFieldBuilder() { + if (statusBuilder_ == null) { + statusBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>(getStatus(), getParentForChildren(), isClean()); + status_ = null; + } + return statusBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.TestCaseError) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.TestCaseError) + private static final com.google.cloud.dialogflow.cx.v3.TestCaseError DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.TestCaseError(); + } + + public static com.google.cloud.dialogflow.cx.v3.TestCaseError getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TestCaseError parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TestCaseError(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TestCaseError getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseErrorOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseErrorOrBuilder.java new file mode 100644 index 000000000..37bad2567 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseErrorOrBuilder.java @@ -0,0 +1,95 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/test_case.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface TestCaseErrorOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.TestCaseError) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The test case.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 1; + * + * @return Whether the testCase field is set. + */ + boolean hasTestCase(); + /** + * + * + *
+   * The test case.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 1; + * + * @return The testCase. + */ + com.google.cloud.dialogflow.cx.v3.TestCase getTestCase(); + /** + * + * + *
+   * The test case.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 1; + */ + com.google.cloud.dialogflow.cx.v3.TestCaseOrBuilder getTestCaseOrBuilder(); + + /** + * + * + *
+   * The status associated with the test case.
+   * 
+ * + * .google.rpc.Status status = 2; + * + * @return Whether the status field is set. + */ + boolean hasStatus(); + /** + * + * + *
+   * The status associated with the test case.
+   * 
+ * + * .google.rpc.Status status = 2; + * + * @return The status. + */ + com.google.rpc.Status getStatus(); + /** + * + * + *
+   * The status associated with the test case.
+   * 
+ * + * .google.rpc.Status status = 2; + */ + com.google.rpc.StatusOrBuilder getStatusOrBuilder(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseName.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseName.java new file mode 100644 index 000000000..14f8c2d01 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseName.java @@ -0,0 +1,257 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.cx.v3; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class TestCaseName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_AGENT_TEST_CASE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/agents/{agent}/testCases/{test_case}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String agent; + private final String testCase; + + @Deprecated + protected TestCaseName() { + project = null; + location = null; + agent = null; + testCase = null; + } + + private TestCaseName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + agent = Preconditions.checkNotNull(builder.getAgent()); + testCase = Preconditions.checkNotNull(builder.getTestCase()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAgent() { + return agent; + } + + public String getTestCase() { + return testCase; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static TestCaseName of(String project, String location, String agent, String testCase) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAgent(agent) + .setTestCase(testCase) + .build(); + } + + public static String format(String project, String location, String agent, String testCase) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAgent(agent) + .setTestCase(testCase) + .build() + .toString(); + } + + public static TestCaseName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_AGENT_TEST_CASE.validatedMatch( + formattedString, "TestCaseName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("agent"), + matchMap.get("test_case")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (TestCaseName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_AGENT_TEST_CASE.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (agent != null) { + fieldMapBuilder.put("agent", agent); + } + if (testCase != null) { + fieldMapBuilder.put("test_case", testCase); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_AGENT_TEST_CASE.instantiate( + "project", project, "location", location, "agent", agent, "test_case", testCase); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + TestCaseName that = ((TestCaseName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.agent, that.agent) + && Objects.equals(this.testCase, that.testCase); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(agent); + h *= 1000003; + h ^= Objects.hashCode(testCase); + return h; + } + + /** Builder for projects/{project}/locations/{location}/agents/{agent}/testCases/{test_case}. */ + public static class Builder { + private String project; + private String location; + private String agent; + private String testCase; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAgent() { + return agent; + } + + public String getTestCase() { + return testCase; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setAgent(String agent) { + this.agent = agent; + return this; + } + + public Builder setTestCase(String testCase) { + this.testCase = testCase; + return this; + } + + private Builder(TestCaseName testCaseName) { + project = testCaseName.project; + location = testCaseName.location; + agent = testCaseName.agent; + testCase = testCaseName.testCase; + } + + public TestCaseName build() { + return new TestCaseName(this); + } + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseOrBuilder.java new file mode 100644 index 000000000..37f92f80c --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseOrBuilder.java @@ -0,0 +1,352 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/test_case.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface TestCaseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.TestCase) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * 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/<Project ID>/locations/<LocationID>/agents/
+   * <AgentID>/testCases/<TestCase ID>`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * 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/<Project ID>/locations/<LocationID>/agents/
+   * <AgentID>/testCases/<TestCase ID>`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * 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.
+   * 
+ * + * repeated string tags = 2; + * + * @return A list containing the tags. + */ + java.util.List getTagsList(); + /** + * + * + *
+   * 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.
+   * 
+ * + * repeated string tags = 2; + * + * @return The count of tags. + */ + int getTagsCount(); + /** + * + * + *
+   * 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.
+   * 
+ * + * repeated string tags = 2; + * + * @param index The index of the element to return. + * @return The tags at the given index. + */ + java.lang.String getTags(int index); + /** + * + * + *
+   * 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.
+   * 
+ * + * repeated string tags = 2; + * + * @param index The index of the value to return. + * @return The bytes of the tags at the given index. + */ + com.google.protobuf.ByteString getTagsBytes(int index); + + /** + * + * + *
+   * Required. The human-readable name of the test case, unique within the agent. Limit of
+   * 200 characters.
+   * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Required. The human-readable name of the test case, unique within the agent. Limit of
+   * 200 characters.
+   * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Additional freeform notes about the test case. Limit of 400 characters.
+   * 
+ * + * string notes = 4; + * + * @return The notes. + */ + java.lang.String getNotes(); + /** + * + * + *
+   * Additional freeform notes about the test case. Limit of 400 characters.
+   * 
+ * + * string notes = 4; + * + * @return The bytes for notes. + */ + com.google.protobuf.ByteString getNotesBytes(); + + /** + * + * + *
+   * Config for the test case.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.TestConfig test_config = 13; + * + * @return Whether the testConfig field is set. + */ + boolean hasTestConfig(); + /** + * + * + *
+   * Config for the test case.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.TestConfig test_config = 13; + * + * @return The testConfig. + */ + com.google.cloud.dialogflow.cx.v3.TestConfig getTestConfig(); + /** + * + * + *
+   * Config for the test case.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.TestConfig test_config = 13; + */ + com.google.cloud.dialogflow.cx.v3.TestConfigOrBuilder getTestConfigOrBuilder(); + + /** + * + * + *
+   * 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.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn test_case_conversation_turns = 5; + * + */ + java.util.List + getTestCaseConversationTurnsList(); + /** + * + * + *
+   * 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.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn test_case_conversation_turns = 5; + * + */ + com.google.cloud.dialogflow.cx.v3.ConversationTurn getTestCaseConversationTurns(int index); + /** + * + * + *
+   * 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.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn test_case_conversation_turns = 5; + * + */ + int getTestCaseConversationTurnsCount(); + /** + * + * + *
+   * 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.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn test_case_conversation_turns = 5; + * + */ + java.util.List + getTestCaseConversationTurnsOrBuilderList(); + /** + * + * + *
+   * 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.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn test_case_conversation_turns = 5; + * + */ + com.google.cloud.dialogflow.cx.v3.ConversationTurnOrBuilder getTestCaseConversationTurnsOrBuilder( + int index); + + /** + * + * + *
+   * Output only. When the test was created.
+   * 
+ * + * + * .google.protobuf.Timestamp creation_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the creationTime field is set. + */ + boolean hasCreationTime(); + /** + * + * + *
+   * Output only. When the test was created.
+   * 
+ * + * + * .google.protobuf.Timestamp creation_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The creationTime. + */ + com.google.protobuf.Timestamp getCreationTime(); + /** + * + * + *
+   * Output only. When the test was created.
+   * 
+ * + * + * .google.protobuf.Timestamp creation_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreationTimeOrBuilder(); + + /** + * + * + *
+   * The latest test result.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.TestCaseResult last_test_result = 12; + * + * @return Whether the lastTestResult field is set. + */ + boolean hasLastTestResult(); + /** + * + * + *
+   * The latest test result.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.TestCaseResult last_test_result = 12; + * + * @return The lastTestResult. + */ + com.google.cloud.dialogflow.cx.v3.TestCaseResult getLastTestResult(); + /** + * + * + *
+   * The latest test result.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.TestCaseResult last_test_result = 12; + */ + com.google.cloud.dialogflow.cx.v3.TestCaseResultOrBuilder getLastTestResultOrBuilder(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseProto.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseProto.java new file mode 100644 index 000000000..424e8fa5b --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseProto.java @@ -0,0 +1,779 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/test_case.proto + +package com.google.cloud.dialogflow.cx.v3; + +public final class TestCaseProto { + private TestCaseProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_TestCase_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_TestCase_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_TestCaseResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_TestCaseResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_TestConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_TestConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_ConversationTurn_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_ConversationTurn_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_ConversationTurn_UserInput_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_ConversationTurn_UserInput_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_ConversationTurn_VirtualAgentOutput_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_ConversationTurn_VirtualAgentOutput_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_TestRunDifference_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_TestRunDifference_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_TransitionCoverage_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_TransitionCoverage_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_TransitionCoverage_TransitionNode_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_TransitionCoverage_TransitionNode_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_TransitionCoverage_Transition_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_TransitionCoverage_Transition_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_IntentCoverage_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_IntentCoverage_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_IntentCoverage_Intent_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_IntentCoverage_Intent_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_CalculateCoverageRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_CalculateCoverageRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_CalculateCoverageResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_CalculateCoverageResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_ListTestCasesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_ListTestCasesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_ListTestCasesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_ListTestCasesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_BatchDeleteTestCasesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_BatchDeleteTestCasesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_CreateTestCaseRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_CreateTestCaseRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_UpdateTestCaseRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_UpdateTestCaseRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_GetTestCaseRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_GetTestCaseRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_RunTestCaseRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_RunTestCaseRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_RunTestCaseResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_RunTestCaseResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_RunTestCaseMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_RunTestCaseMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_BatchRunTestCasesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_BatchRunTestCasesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_BatchRunTestCasesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_BatchRunTestCasesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_BatchRunTestCasesMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_BatchRunTestCasesMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_TestError_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_TestError_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_ImportTestCasesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_ImportTestCasesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_ImportTestCasesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_ImportTestCasesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_ImportTestCasesMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_ImportTestCasesMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_TestCaseError_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_TestCaseError_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_ExportTestCasesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_ExportTestCasesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_ExportTestCasesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_ExportTestCasesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_ExportTestCasesMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_ExportTestCasesMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_ListTestCaseResultsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_ListTestCaseResultsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_ListTestCaseResultsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_ListTestCaseResultsResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n-google/cloud/dialogflow/cx/v3/test_cas" + + "e.proto\022\035google.cloud.dialogflow.cx.v3\032\034" + + "google/api/annotations.proto\032\027google/api" + + "/client.proto\032\037google/api/field_behavior" + + ".proto\032\031google/api/resource.proto\032(googl" + + "e/cloud/dialogflow/cx/v3/flow.proto\032*goo" + + "gle/cloud/dialogflow/cx/v3/intent.proto\032" + + "(google/cloud/dialogflow/cx/v3/page.prot" + + "o\0324google/cloud/dialogflow/cx/v3/respons" + + "e_message.proto\032+google/cloud/dialogflow" + + "/cx/v3/session.proto\032#google/longrunning" + + "/operations.proto\032\033google/protobuf/empty" + + ".proto\032 google/protobuf/field_mask.proto" + + "\032\034google/protobuf/struct.proto\032\037google/p" + + "rotobuf/timestamp.proto\032\027google/rpc/stat" + + "us.proto\"\337\003\n\010TestCase\022\014\n\004name\030\001 \001(\t\022\014\n\004t" + + "ags\030\002 \003(\t\022\031\n\014display_name\030\003 \001(\tB\003\340A\002\022\r\n\005" + + "notes\030\004 \001(\t\022>\n\013test_config\030\r \001(\0132).googl" + + "e.cloud.dialogflow.cx.v3.TestConfig\022U\n\034t" + + "est_case_conversation_turns\030\005 \003(\0132/.goog" + + "le.cloud.dialogflow.cx.v3.ConversationTu" + + "rn\0226\n\rcreation_time\030\n \001(\0132\032.google.proto" + + "buf.TimestampB\003\340A\003\022G\n\020last_test_result\030\014" + + " \001(\0132-.google.cloud.dialogflow.cx.v3.Tes" + + "tCaseResult:u\352Ar\n\"dialogflow.googleapis." + + "com/TestCase\022Lprojects/{project}/locatio" + + "ns/{location}/agents/{agent}/testCases/{" + + "test_case}\"\256\003\n\016TestCaseResult\022\014\n\004name\030\001 " + + "\001(\t\022B\n\013environment\030\002 \001(\tB-\340A\001\372A\'\n%dialog" + + "flow.googleapis.com/Environment\022K\n\022conve" + + "rsation_turns\030\003 \003(\0132/.google.cloud.dialo" + + "gflow.cx.v3.ConversationTurn\022>\n\013test_res" + + "ult\030\004 \001(\0162).google.cloud.dialogflow.cx.v" + + "3.TestResult\022-\n\ttest_time\030\005 \001(\0132\032.google" + + ".protobuf.Timestamp:\215\001\352A\211\001\n(dialogflow.g" + + "oogleapis.com/TestCaseResult\022]projects/{" + + "project}/locations/{location}/agents/{ag" + + "ent}/testCases/{test_case}/results/{resu" + + "lt}\"\\\n\nTestConfig\022\033\n\023tracking_parameters" + + "\030\001 \003(\t\0221\n\004flow\030\002 \001(\tB#\372A \n\036dialogflow.go" + + "ogleapis.com/Flow\"\234\006\n\020ConversationTurn\022M" + + "\n\nuser_input\030\001 \001(\01329.google.cloud.dialog" + + "flow.cx.v3.ConversationTurn.UserInput\022`\n" + + "\024virtual_agent_output\030\002 \001(\0132B.google.clo" + + "ud.dialogflow.cx.v3.ConversationTurn.Vir" + + "tualAgentOutput\032\227\001\n\tUserInput\0228\n\005input\030\005" + + " \001(\0132).google.cloud.dialogflow.cx.v3.Que" + + "ryInput\0224\n\023injected_parameters\030\002 \001(\0132\027.g" + + "oogle.protobuf.Struct\022\032\n\022is_webhook_enab" + + "led\030\003 \001(\010\032\274\003\n\022VirtualAgentOutput\0223\n\022sess" + + "ion_parameters\030\004 \001(\0132\027.google.protobuf.S" + + "truct\022J\n\013differences\030\005 \003(\01320.google.clou" + + "d.dialogflow.cx.v3.TestRunDifferenceB\003\340A" + + "\003\0228\n\017diagnostic_info\030\006 \001(\0132\027.google.prot" + + "obuf.StructB\006\340A\002\340A\004\022?\n\020triggered_intent\030" + + "\007 \001(\0132%.google.cloud.dialogflow.cx.v3.In" + + "tent\0229\n\014current_page\030\010 \001(\0132#.google.clou" + + "d.dialogflow.cx.v3.Page\022K\n\016text_response" + + "s\030\t \003(\01323.google.cloud.dialogflow.cx.v3." + + "ResponseMessage.Text\022\"\n\006status\030\n \001(\0132\022.g" + + "oogle.rpc.Status\"\315\001\n\021TestRunDifference\022G" + + "\n\004type\030\001 \001(\01629.google.cloud.dialogflow.c" + + "x.v3.TestRunDifference.DiffType\022\023\n\013descr" + + "iption\030\002 \001(\t\"Z\n\010DiffType\022\031\n\025DIFF_TYPE_UN" + + "SPECIFIED\020\000\022\n\n\006INTENT\020\001\022\010\n\004PAGE\020\002\022\016\n\nPAR" + + "AMETERS\020\003\022\r\n\tUTTERANCE\020\004\"\363\004\n\022TransitionC" + + "overage\022Q\n\013transitions\030\001 \003(\0132<.google.cl" + + "oud.dialogflow.cx.v3.TransitionCoverage." + + "Transition\022\026\n\016coverage_score\030\002 \001(\002\032\202\001\n\016T" + + "ransitionNode\0223\n\004page\030\001 \001(\0132#.google.clo" + + "ud.dialogflow.cx.v3.PageH\000\0223\n\004flow\030\002 \001(\013" + + "2#.google.cloud.dialogflow.cx.v3.FlowH\000B" + + "\006\n\004kind\032\354\002\n\nTransition\022P\n\006source\030\001 \001(\0132@" + + ".google.cloud.dialogflow.cx.v3.Transitio" + + "nCoverage.TransitionNode\022\r\n\005index\030\004 \001(\005\022" + + "P\n\006target\030\002 \001(\0132@.google.cloud.dialogflo" + + "w.cx.v3.TransitionCoverage.TransitionNod" + + "e\022\017\n\007covered\030\003 \001(\010\022J\n\020transition_route\030\005" + + " \001(\0132..google.cloud.dialogflow.cx.v3.Tra" + + "nsitionRouteH\000\022D\n\revent_handler\030\006 \001(\0132+." + + "google.cloud.dialogflow.cx.v3.EventHandl" + + "erH\000B\010\n\006detail\"\301\001\n\016IntentCoverage\022E\n\007int" + + "ents\030\001 \003(\01324.google.cloud.dialogflow.cx." + + "v3.IntentCoverage.Intent\022\026\n\016coverage_sco" + + "re\030\002 \001(\002\032P\n\006Intent\0225\n\006intent\030\001 \001(\tB%\372A\"\n" + + " dialogflow.googleapis.com/Intent\022\017\n\007cov" + + "ered\030\002 \001(\010\"\373\001\n\030CalculateCoverageRequest\022" + + "6\n\005agent\030\003 \001(\tB\'\340A\002\372A!\n\037dialogflow.googl" + + "eapis.com/Agent\022W\n\004type\030\002 \001(\0162D.google.c" + + "loud.dialogflow.cx.v3.CalculateCoverageR" + + "equest.CoverageTypeB\003\340A\002\"N\n\014CoverageType" + + "\022\035\n\031COVERAGE_TYPE_UNSPECIFIED\020\000\022\n\n\006INTEN" + + "T\020\001\022\023\n\017PAGE_TRANSITION\020\002\"\375\001\n\031CalculateCo" + + "verageResponse\0223\n\005agent\030\005 \001(\tB$\372A!\n\037dial" + + "ogflow.googleapis.com/Agent\022H\n\017intent_co" + + "verage\030\002 \001(\0132-.google.cloud.dialogflow.c" + + "x.v3.IntentCoverageH\000\022P\n\023transition_cove" + + "rage\030\004 \001(\01321.google.cloud.dialogflow.cx." + + "v3.TransitionCoverageH\000B\017\n\rcoverage_type" + + "\"\216\002\n\024ListTestCasesRequest\022:\n\006parent\030\001 \001(" + + "\tB*\340A\002\372A$\022\"dialogflow.googleapis.com/Tes" + + "tCase\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003" + + " \001(\t\022N\n\004view\030\004 \001(\0162@.google.cloud.dialog" + + "flow.cx.v3.ListTestCasesRequest.TestCase" + + "View\"C\n\014TestCaseView\022\036\n\032TEST_CASE_VIEW_U" + + "NSPECIFIED\020\000\022\t\n\005BASIC\020\001\022\010\n\004FULL\020\002\"m\n\025Lis" + + "tTestCasesResponse\022;\n\ntest_cases\030\001 \003(\0132\'" + + ".google.cloud.dialogflow.cx.v3.TestCase\022" + + "\027\n\017next_page_token\030\002 \001(\t\"\224\001\n\033BatchDelete" + + "TestCasesRequest\022:\n\006parent\030\001 \001(\tB*\340A\002\372A$" + + "\022\"dialogflow.googleapis.com/TestCase\0229\n\005" + + "names\030\003 \003(\tB*\340A\002\372A$\n\"dialogflow.googleap" + + "is.com/TestCase\"\224\001\n\025CreateTestCaseReques" + + "t\022:\n\006parent\030\001 \001(\tB*\340A\002\372A$\022\"dialogflow.go" + + "ogleapis.com/TestCase\022?\n\ttest_case\030\002 \001(\013" + + "2\'.google.cloud.dialogflow.cx.v3.TestCas" + + "eB\003\340A\002\"\216\001\n\025UpdateTestCaseRequest\022?\n\ttest" + + "_case\030\001 \001(\0132\'.google.cloud.dialogflow.cx" + + ".v3.TestCaseB\003\340A\002\0224\n\013update_mask\030\002 \001(\0132\032" + + ".google.protobuf.FieldMaskB\003\340A\002\"N\n\022GetTe" + + "stCaseRequest\0228\n\004name\030\001 \001(\tB*\340A\002\372A$\n\"dia" + + "logflow.googleapis.com/TestCase\"\222\001\n\022RunT" + + "estCaseRequest\0228\n\004name\030\001 \001(\tB*\340A\002\372A$\n\"di" + + "alogflow.googleapis.com/TestCase\022B\n\013envi" + + "ronment\030\002 \001(\tB-\340A\001\372A\'\n%dialogflow.google" + + "apis.com/Environment\"T\n\023RunTestCaseRespo" + + "nse\022=\n\006result\030\002 \001(\0132-.google.cloud.dialo" + + "gflow.cx.v3.TestCaseResult\"\025\n\023RunTestCas" + + "eMetadata\"\332\001\n\030BatchRunTestCasesRequest\022:" + + "\n\006parent\030\001 \001(\tB*\340A\002\372A$\022\"dialogflow.googl" + + "eapis.com/TestCase\022B\n\013environment\030\002 \001(\tB" + + "-\340A\001\372A\'\n%dialogflow.googleapis.com/Envir" + + "onment\022>\n\ntest_cases\030\003 \003(\tB*\340A\002\372A$\n\"dial" + + "ogflow.googleapis.com/TestCase\"[\n\031BatchR" + + "unTestCasesResponse\022>\n\007results\030\001 \003(\0132-.g" + + "oogle.cloud.dialogflow.cx.v3.TestCaseRes" + + "ult\"U\n\031BatchRunTestCasesMetadata\0228\n\006erro" + + "rs\030\001 \003(\0132(.google.cloud.dialogflow.cx.v3" + + ".TestError\"\232\001\n\tTestError\022:\n\ttest_case\030\001 " + + "\001(\tB\'\372A$\n\"dialogflow.googleapis.com/Test" + + "Case\022\"\n\006status\030\002 \001(\0132\022.google.rpc.Status" + + "\022-\n\ttest_time\030\003 \001(\0132\032.google.protobuf.Ti" + + "mestamp\"\204\001\n\026ImportTestCasesRequest\022:\n\006pa" + + "rent\030\001 \001(\tB*\340A\002\372A$\022\"dialogflow.googleapi" + + "s.com/TestCase\022\021\n\007gcs_uri\030\002 \001(\tH\000\022\021\n\007con" + + "tent\030\003 \001(\014H\000B\010\n\006source\"Q\n\027ImportTestCase" + + "sResponse\0226\n\005names\030\001 \003(\tB\'\372A$\n\"dialogflo" + + "w.googleapis.com/TestCase\"W\n\027ImportTestC" + + "asesMetadata\022<\n\006errors\030\001 \003(\0132,.google.cl" + + "oud.dialogflow.cx.v3.TestCaseError\"o\n\rTe" + + "stCaseError\022:\n\ttest_case\030\001 \001(\0132\'.google." + + "cloud.dialogflow.cx.v3.TestCase\022\"\n\006statu" + + "s\030\002 \001(\0132\022.google.rpc.Status\"\234\002\n\026ExportTe" + + "stCasesRequest\022:\n\006parent\030\001 \001(\tB*\340A\002\372A$\022\"" + + "dialogflow.googleapis.com/TestCase\022\021\n\007gc" + + "s_uri\030\002 \001(\tH\000\022U\n\013data_format\030\003 \001(\0162@.goo" + + "gle.cloud.dialogflow.cx.v3.ExportTestCas" + + "esRequest.DataFormat\022\016\n\006filter\030\004 \001(\t\"=\n\n" + + "DataFormat\022\033\n\027DATA_FORMAT_UNSPECIFIED\020\000\022" + + "\010\n\004BLOB\020\001\022\010\n\004JSON\020\002B\r\n\013destination\"N\n\027Ex" + + "portTestCasesResponse\022\021\n\007gcs_uri\030\001 \001(\tH\000" + + "\022\021\n\007content\030\002 \001(\014H\000B\r\n\013destination\"\031\n\027Ex" + + "portTestCasesMetadata\"\225\001\n\032ListTestCaseRe" + + "sultsRequest\022@\n\006parent\030\001 \001(\tB0\340A\002\372A*\022(di" + + "alogflow.googleapis.com/TestCaseResult\022\021" + + "\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\016\n" + + "\006filter\030\004 \001(\t\"\200\001\n\033ListTestCaseResultsRes" + + "ponse\022H\n\021test_case_results\030\001 \003(\0132-.googl" + + "e.cloud.dialogflow.cx.v3.TestCaseResult\022" + + "\027\n\017next_page_token\030\002 \001(\t*A\n\nTestResult\022\033" + + "\n\027TEST_RESULT_UNSPECIFIED\020\000\022\n\n\006PASSED\020\001\022" + + "\n\n\006FAILED\020\0022\301\023\n\tTestCases\022\303\001\n\rListTestCa" + + "ses\0223.google.cloud.dialogflow.cx.v3.List" + + "TestCasesRequest\0324.google.cloud.dialogfl" + + "ow.cx.v3.ListTestCasesResponse\"G\202\323\344\223\0028\0226" + + "/v3/{parent=projects/*/locations/*/agent" + + "s/*}/testCases\332A\006parent\022\302\001\n\024BatchDeleteT" + + "estCases\022:.google.cloud.dialogflow.cx.v3" + + ".BatchDeleteTestCasesRequest\032\026.google.pr" + + "otobuf.Empty\"V\202\323\344\223\002G\"B/v3/{parent=projec" + + "ts/*/locations/*/agents/*}/testCases:bat" + + "chDelete:\001*\332A\006parent\022\260\001\n\013GetTestCase\0221.g" + + "oogle.cloud.dialogflow.cx.v3.GetTestCase" + + "Request\032\'.google.cloud.dialogflow.cx.v3." + + "TestCase\"E\202\323\344\223\0028\0226/v3/{name=projects/*/l" + + "ocations/*/agents/*/testCases/*}\332A\004name\022" + + "\315\001\n\016CreateTestCase\0224.google.cloud.dialog" + + "flow.cx.v3.CreateTestCaseRequest\032\'.googl" + + "e.cloud.dialogflow.cx.v3.TestCase\"\\\202\323\344\223\002" + + "C\"6/v3/{parent=projects/*/locations/*/ag" + + "ents/*}/testCases:\ttest_case\332A\020parent,te" + + "st_case\022\334\001\n\016UpdateTestCase\0224.google.clou" + + "d.dialogflow.cx.v3.UpdateTestCaseRequest" + + "\032\'.google.cloud.dialogflow.cx.v3.TestCas" + + "e\"k\202\323\344\223\002M2@/v3/{test_case.name=projects/" + + "*/locations/*/agents/*/testCases/*}:\ttes" + + "t_case\332A\025test_case,update_mask\022\312\001\n\013RunTe" + + "stCase\0221.google.cloud.dialogflow.cx.v3.R" + + "unTestCaseRequest\032\035.google.longrunning.O" + + "peration\"i\202\323\344\223\0026\"1/v3/projects/*/locatio" + + "ns/*/agents/*/testCases:run:\001*\312A*\n\023RunTe" + + "stCaseResponse\022\023RunTestCaseMetadata\022\361\001\n\021" + + "BatchRunTestCases\0227.google.cloud.dialogf" + + "low.cx.v3.BatchRunTestCasesRequest\032\035.goo" + + "gle.longrunning.Operation\"\203\001\202\323\344\223\002D\"?/v3/" + + "{parent=projects/*/locations/*/agents/*}" + + "/testCases:batchRun:\001*\312A6\n\031BatchRunTestC" + + "asesResponse\022\031BatchRunTestCasesMetadata\022" + + "\327\001\n\021CalculateCoverage\0227.google.cloud.dia" + + "logflow.cx.v3.CalculateCoverageRequest\0328" + + ".google.cloud.dialogflow.cx.v3.Calculate" + + "CoverageResponse\"O\202\323\344\223\002I\022G/v3/{agent=pro" + + "jects/*/locations/*/agents/*}/testCases:" + + "calculateCoverage\022\346\001\n\017ImportTestCases\0225." + + "google.cloud.dialogflow.cx.v3.ImportTest" + + "CasesRequest\032\035.google.longrunning.Operat" + + "ion\"}\202\323\344\223\002B\"=/v3/{parent=projects/*/loca" + + "tions/*/agents/*}/testCases:import:\001*\312A2" + + "\n\027ImportTestCasesResponse\022\027ImportTestCas" + + "esMetadata\022\346\001\n\017ExportTestCases\0225.google." + + "cloud.dialogflow.cx.v3.ExportTestCasesRe" + + "quest\032\035.google.longrunning.Operation\"}\202\323" + + "\344\223\002B\"=/v3/{parent=projects/*/locations/*" + + "/agents/*}/testCases:export:\001*\312A2\n\027Expor" + + "tTestCasesResponse\022\027ExportTestCasesMetad" + + "ata\022\337\001\n\023ListTestCaseResults\0229.google.clo" + + "ud.dialogflow.cx.v3.ListTestCaseResultsR" + + "equest\032:.google.cloud.dialogflow.cx.v3.L" + + "istTestCaseResultsResponse\"Q\202\323\344\223\002B\022@/v3/" + + "{parent=projects/*/locations/*/agents/*/" + + "testCases/*}/results\332A\006parent\032x\312A\031dialog" + + "flow.googleapis.com\322AYhttps://www.google" + + "apis.com/auth/cloud-platform,https://www" + + ".googleapis.com/auth/dialogflowB\235\001\n!com." + + "google.cloud.dialogflow.cx.v3B\rTestCaseP" + + "rotoP\001Z?google.golang.org/genproto/googl" + + "eapis/cloud/dialogflow/cx/v3;cx\370\001\001\242\002\002DF\252" + + "\002\035Google.Cloud.Dialogflow.Cx.V3b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.dialogflow.cx.v3.FlowProto.getDescriptor(), + com.google.cloud.dialogflow.cx.v3.IntentProto.getDescriptor(), + com.google.cloud.dialogflow.cx.v3.PageProto.getDescriptor(), + com.google.cloud.dialogflow.cx.v3.ResponseMessageProto.getDescriptor(), + com.google.cloud.dialogflow.cx.v3.SessionProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.StructProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.rpc.StatusProto.getDescriptor(), + }); + internal_static_google_cloud_dialogflow_cx_v3_TestCase_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_dialogflow_cx_v3_TestCase_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_TestCase_descriptor, + new java.lang.String[] { + "Name", + "Tags", + "DisplayName", + "Notes", + "TestConfig", + "TestCaseConversationTurns", + "CreationTime", + "LastTestResult", + }); + internal_static_google_cloud_dialogflow_cx_v3_TestCaseResult_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_dialogflow_cx_v3_TestCaseResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_TestCaseResult_descriptor, + new java.lang.String[] { + "Name", "Environment", "ConversationTurns", "TestResult", "TestTime", + }); + internal_static_google_cloud_dialogflow_cx_v3_TestConfig_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_dialogflow_cx_v3_TestConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_TestConfig_descriptor, + new java.lang.String[] { + "TrackingParameters", "Flow", + }); + internal_static_google_cloud_dialogflow_cx_v3_ConversationTurn_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_dialogflow_cx_v3_ConversationTurn_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_ConversationTurn_descriptor, + new java.lang.String[] { + "UserInput", "VirtualAgentOutput", + }); + internal_static_google_cloud_dialogflow_cx_v3_ConversationTurn_UserInput_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_ConversationTurn_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_dialogflow_cx_v3_ConversationTurn_UserInput_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_ConversationTurn_UserInput_descriptor, + new java.lang.String[] { + "Input", "InjectedParameters", "IsWebhookEnabled", + }); + internal_static_google_cloud_dialogflow_cx_v3_ConversationTurn_VirtualAgentOutput_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_ConversationTurn_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_dialogflow_cx_v3_ConversationTurn_VirtualAgentOutput_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_ConversationTurn_VirtualAgentOutput_descriptor, + new java.lang.String[] { + "SessionParameters", + "Differences", + "DiagnosticInfo", + "TriggeredIntent", + "CurrentPage", + "TextResponses", + "Status", + }); + internal_static_google_cloud_dialogflow_cx_v3_TestRunDifference_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_dialogflow_cx_v3_TestRunDifference_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_TestRunDifference_descriptor, + new java.lang.String[] { + "Type", "Description", + }); + internal_static_google_cloud_dialogflow_cx_v3_TransitionCoverage_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_dialogflow_cx_v3_TransitionCoverage_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_TransitionCoverage_descriptor, + new java.lang.String[] { + "Transitions", "CoverageScore", + }); + internal_static_google_cloud_dialogflow_cx_v3_TransitionCoverage_TransitionNode_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_TransitionCoverage_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_dialogflow_cx_v3_TransitionCoverage_TransitionNode_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_TransitionCoverage_TransitionNode_descriptor, + new java.lang.String[] { + "Page", "Flow", "Kind", + }); + internal_static_google_cloud_dialogflow_cx_v3_TransitionCoverage_Transition_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_TransitionCoverage_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_dialogflow_cx_v3_TransitionCoverage_Transition_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_TransitionCoverage_Transition_descriptor, + new java.lang.String[] { + "Source", "Index", "Target", "Covered", "TransitionRoute", "EventHandler", "Detail", + }); + internal_static_google_cloud_dialogflow_cx_v3_IntentCoverage_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_dialogflow_cx_v3_IntentCoverage_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_IntentCoverage_descriptor, + new java.lang.String[] { + "Intents", "CoverageScore", + }); + internal_static_google_cloud_dialogflow_cx_v3_IntentCoverage_Intent_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_IntentCoverage_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_dialogflow_cx_v3_IntentCoverage_Intent_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_IntentCoverage_Intent_descriptor, + new java.lang.String[] { + "Intent", "Covered", + }); + internal_static_google_cloud_dialogflow_cx_v3_CalculateCoverageRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_dialogflow_cx_v3_CalculateCoverageRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_CalculateCoverageRequest_descriptor, + new java.lang.String[] { + "Agent", "Type", + }); + internal_static_google_cloud_dialogflow_cx_v3_CalculateCoverageResponse_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_dialogflow_cx_v3_CalculateCoverageResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_CalculateCoverageResponse_descriptor, + new java.lang.String[] { + "Agent", "IntentCoverage", "TransitionCoverage", "CoverageType", + }); + internal_static_google_cloud_dialogflow_cx_v3_ListTestCasesRequest_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_dialogflow_cx_v3_ListTestCasesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_ListTestCasesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "View", + }); + internal_static_google_cloud_dialogflow_cx_v3_ListTestCasesResponse_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_dialogflow_cx_v3_ListTestCasesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_ListTestCasesResponse_descriptor, + new java.lang.String[] { + "TestCases", "NextPageToken", + }); + internal_static_google_cloud_dialogflow_cx_v3_BatchDeleteTestCasesRequest_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_dialogflow_cx_v3_BatchDeleteTestCasesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_BatchDeleteTestCasesRequest_descriptor, + new java.lang.String[] { + "Parent", "Names", + }); + internal_static_google_cloud_dialogflow_cx_v3_CreateTestCaseRequest_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_dialogflow_cx_v3_CreateTestCaseRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_CreateTestCaseRequest_descriptor, + new java.lang.String[] { + "Parent", "TestCase", + }); + internal_static_google_cloud_dialogflow_cx_v3_UpdateTestCaseRequest_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_dialogflow_cx_v3_UpdateTestCaseRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_UpdateTestCaseRequest_descriptor, + new java.lang.String[] { + "TestCase", "UpdateMask", + }); + internal_static_google_cloud_dialogflow_cx_v3_GetTestCaseRequest_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_dialogflow_cx_v3_GetTestCaseRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_GetTestCaseRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_dialogflow_cx_v3_RunTestCaseRequest_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_dialogflow_cx_v3_RunTestCaseRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_RunTestCaseRequest_descriptor, + new java.lang.String[] { + "Name", "Environment", + }); + internal_static_google_cloud_dialogflow_cx_v3_RunTestCaseResponse_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_dialogflow_cx_v3_RunTestCaseResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_RunTestCaseResponse_descriptor, + new java.lang.String[] { + "Result", + }); + internal_static_google_cloud_dialogflow_cx_v3_RunTestCaseMetadata_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_cloud_dialogflow_cx_v3_RunTestCaseMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_RunTestCaseMetadata_descriptor, + new java.lang.String[] {}); + internal_static_google_cloud_dialogflow_cx_v3_BatchRunTestCasesRequest_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_google_cloud_dialogflow_cx_v3_BatchRunTestCasesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_BatchRunTestCasesRequest_descriptor, + new java.lang.String[] { + "Parent", "Environment", "TestCases", + }); + internal_static_google_cloud_dialogflow_cx_v3_BatchRunTestCasesResponse_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_google_cloud_dialogflow_cx_v3_BatchRunTestCasesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_BatchRunTestCasesResponse_descriptor, + new java.lang.String[] { + "Results", + }); + internal_static_google_cloud_dialogflow_cx_v3_BatchRunTestCasesMetadata_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_google_cloud_dialogflow_cx_v3_BatchRunTestCasesMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_BatchRunTestCasesMetadata_descriptor, + new java.lang.String[] { + "Errors", + }); + internal_static_google_cloud_dialogflow_cx_v3_TestError_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_google_cloud_dialogflow_cx_v3_TestError_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_TestError_descriptor, + new java.lang.String[] { + "TestCase", "Status", "TestTime", + }); + internal_static_google_cloud_dialogflow_cx_v3_ImportTestCasesRequest_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_google_cloud_dialogflow_cx_v3_ImportTestCasesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_ImportTestCasesRequest_descriptor, + new java.lang.String[] { + "Parent", "GcsUri", "Content", "Source", + }); + internal_static_google_cloud_dialogflow_cx_v3_ImportTestCasesResponse_descriptor = + getDescriptor().getMessageTypes().get(23); + internal_static_google_cloud_dialogflow_cx_v3_ImportTestCasesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_ImportTestCasesResponse_descriptor, + new java.lang.String[] { + "Names", + }); + internal_static_google_cloud_dialogflow_cx_v3_ImportTestCasesMetadata_descriptor = + getDescriptor().getMessageTypes().get(24); + internal_static_google_cloud_dialogflow_cx_v3_ImportTestCasesMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_ImportTestCasesMetadata_descriptor, + new java.lang.String[] { + "Errors", + }); + internal_static_google_cloud_dialogflow_cx_v3_TestCaseError_descriptor = + getDescriptor().getMessageTypes().get(25); + internal_static_google_cloud_dialogflow_cx_v3_TestCaseError_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_TestCaseError_descriptor, + new java.lang.String[] { + "TestCase", "Status", + }); + internal_static_google_cloud_dialogflow_cx_v3_ExportTestCasesRequest_descriptor = + getDescriptor().getMessageTypes().get(26); + internal_static_google_cloud_dialogflow_cx_v3_ExportTestCasesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_ExportTestCasesRequest_descriptor, + new java.lang.String[] { + "Parent", "GcsUri", "DataFormat", "Filter", "Destination", + }); + internal_static_google_cloud_dialogflow_cx_v3_ExportTestCasesResponse_descriptor = + getDescriptor().getMessageTypes().get(27); + internal_static_google_cloud_dialogflow_cx_v3_ExportTestCasesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_ExportTestCasesResponse_descriptor, + new java.lang.String[] { + "GcsUri", "Content", "Destination", + }); + internal_static_google_cloud_dialogflow_cx_v3_ExportTestCasesMetadata_descriptor = + getDescriptor().getMessageTypes().get(28); + internal_static_google_cloud_dialogflow_cx_v3_ExportTestCasesMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_ExportTestCasesMetadata_descriptor, + new java.lang.String[] {}); + internal_static_google_cloud_dialogflow_cx_v3_ListTestCaseResultsRequest_descriptor = + getDescriptor().getMessageTypes().get(29); + internal_static_google_cloud_dialogflow_cx_v3_ListTestCaseResultsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_ListTestCaseResultsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", + }); + internal_static_google_cloud_dialogflow_cx_v3_ListTestCaseResultsResponse_descriptor = + getDescriptor().getMessageTypes().get(30); + internal_static_google_cloud_dialogflow_cx_v3_ListTestCaseResultsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_ListTestCaseResultsResponse_descriptor, + new java.lang.String[] { + "TestCaseResults", "NextPageToken", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.dialogflow.cx.v3.FlowProto.getDescriptor(); + com.google.cloud.dialogflow.cx.v3.IntentProto.getDescriptor(); + com.google.cloud.dialogflow.cx.v3.PageProto.getDescriptor(); + com.google.cloud.dialogflow.cx.v3.ResponseMessageProto.getDescriptor(); + com.google.cloud.dialogflow.cx.v3.SessionProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.StructProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.rpc.StatusProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseResult.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseResult.java new file mode 100644 index 000000000..73d4c5eec --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseResult.java @@ -0,0 +1,1803 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/test_case.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * Represents a result from running a test case in an agent environment.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.TestCaseResult} + */ +public final class TestCaseResult extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.TestCaseResult) + TestCaseResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use TestCaseResult.newBuilder() to construct. + private TestCaseResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TestCaseResult() { + name_ = ""; + environment_ = ""; + conversationTurns_ = java.util.Collections.emptyList(); + testResult_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TestCaseResult(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TestCaseResult( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + environment_ = s; + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + conversationTurns_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + conversationTurns_.add( + input.readMessage( + com.google.cloud.dialogflow.cx.v3.ConversationTurn.parser(), + extensionRegistry)); + break; + } + case 32: + { + int rawValue = input.readEnum(); + + testResult_ = rawValue; + break; + } + case 42: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (testTime_ != null) { + subBuilder = testTime_.toBuilder(); + } + testTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(testTime_); + testTime_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + conversationTurns_ = java.util.Collections.unmodifiableList(conversationTurns_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_TestCaseResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_TestCaseResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.TestCaseResult.class, + com.google.cloud.dialogflow.cx.v3.TestCaseResult.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * The resource name for the test case result. Format:
+   * `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/testCases/
+   * <TestCase ID>/results/<TestCaseResult ID>`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * The resource name for the test case result. Format:
+   * `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/testCases/
+   * <TestCase ID>/results/<TestCaseResult ID>`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENVIRONMENT_FIELD_NUMBER = 2; + private volatile java.lang.Object environment_; + /** + * + * + *
+   * Optional. Environment where the test was run. If not set, it indicates the draft
+   * environment.
+   * 
+ * + * + * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The environment. + */ + @java.lang.Override + public java.lang.String getEnvironment() { + java.lang.Object ref = environment_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + environment_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Environment where the test was run. If not set, it indicates the draft
+   * environment.
+   * 
+ * + * + * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for environment. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEnvironmentBytes() { + java.lang.Object ref = environment_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + environment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONVERSATION_TURNS_FIELD_NUMBER = 3; + private java.util.List conversationTurns_; + /** + * + * + *
+   * The conversation turns uttered during the test case replay in chronological
+   * order.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn conversation_turns = 3; + */ + @java.lang.Override + public java.util.List + getConversationTurnsList() { + return conversationTurns_; + } + /** + * + * + *
+   * The conversation turns uttered during the test case replay in chronological
+   * order.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn conversation_turns = 3; + */ + @java.lang.Override + public java.util.List + getConversationTurnsOrBuilderList() { + return conversationTurns_; + } + /** + * + * + *
+   * The conversation turns uttered during the test case replay in chronological
+   * order.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn conversation_turns = 3; + */ + @java.lang.Override + public int getConversationTurnsCount() { + return conversationTurns_.size(); + } + /** + * + * + *
+   * The conversation turns uttered during the test case replay in chronological
+   * order.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn conversation_turns = 3; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ConversationTurn getConversationTurns(int index) { + return conversationTurns_.get(index); + } + /** + * + * + *
+   * The conversation turns uttered during the test case replay in chronological
+   * order.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn conversation_turns = 3; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ConversationTurnOrBuilder getConversationTurnsOrBuilder( + int index) { + return conversationTurns_.get(index); + } + + public static final int TEST_RESULT_FIELD_NUMBER = 4; + private int testResult_; + /** + * + * + *
+   * Whether the test case passed in the agent environment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.TestResult test_result = 4; + * + * @return The enum numeric value on the wire for testResult. + */ + @java.lang.Override + public int getTestResultValue() { + return testResult_; + } + /** + * + * + *
+   * Whether the test case passed in the agent environment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.TestResult test_result = 4; + * + * @return The testResult. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TestResult getTestResult() { + @SuppressWarnings("deprecation") + com.google.cloud.dialogflow.cx.v3.TestResult result = + com.google.cloud.dialogflow.cx.v3.TestResult.valueOf(testResult_); + return result == null ? com.google.cloud.dialogflow.cx.v3.TestResult.UNRECOGNIZED : result; + } + + public static final int TEST_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp testTime_; + /** + * + * + *
+   * The time that the test was run.
+   * 
+ * + * .google.protobuf.Timestamp test_time = 5; + * + * @return Whether the testTime field is set. + */ + @java.lang.Override + public boolean hasTestTime() { + return testTime_ != null; + } + /** + * + * + *
+   * The time that the test was run.
+   * 
+ * + * .google.protobuf.Timestamp test_time = 5; + * + * @return The testTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getTestTime() { + return testTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : testTime_; + } + /** + * + * + *
+   * The time that the test was run.
+   * 
+ * + * .google.protobuf.Timestamp test_time = 5; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getTestTimeOrBuilder() { + return getTestTime(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getEnvironmentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, environment_); + } + for (int i = 0; i < conversationTurns_.size(); i++) { + output.writeMessage(3, conversationTurns_.get(i)); + } + if (testResult_ + != com.google.cloud.dialogflow.cx.v3.TestResult.TEST_RESULT_UNSPECIFIED.getNumber()) { + output.writeEnum(4, testResult_); + } + if (testTime_ != null) { + output.writeMessage(5, getTestTime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getEnvironmentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, environment_); + } + for (int i = 0; i < conversationTurns_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(3, conversationTurns_.get(i)); + } + if (testResult_ + != com.google.cloud.dialogflow.cx.v3.TestResult.TEST_RESULT_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, testResult_); + } + if (testTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getTestTime()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.TestCaseResult)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.TestCaseResult other = + (com.google.cloud.dialogflow.cx.v3.TestCaseResult) obj; + + if (!getName().equals(other.getName())) return false; + if (!getEnvironment().equals(other.getEnvironment())) return false; + if (!getConversationTurnsList().equals(other.getConversationTurnsList())) return false; + if (testResult_ != other.testResult_) return false; + if (hasTestTime() != other.hasTestTime()) return false; + if (hasTestTime()) { + if (!getTestTime().equals(other.getTestTime())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER; + hash = (53 * hash) + getEnvironment().hashCode(); + if (getConversationTurnsCount() > 0) { + hash = (37 * hash) + CONVERSATION_TURNS_FIELD_NUMBER; + hash = (53 * hash) + getConversationTurnsList().hashCode(); + } + hash = (37 * hash) + TEST_RESULT_FIELD_NUMBER; + hash = (53 * hash) + testResult_; + if (hasTestTime()) { + hash = (37 * hash) + TEST_TIME_FIELD_NUMBER; + hash = (53 * hash) + getTestTime().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.TestCaseResult parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.TestCaseResult parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.TestCaseResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.TestCaseResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.TestCaseResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.TestCaseResult parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.TestCaseResult parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.TestCaseResult parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.TestCaseResult parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.TestCaseResult parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.TestCaseResult parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.TestCaseResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.dialogflow.cx.v3.TestCaseResult prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Represents a result from running a test case in an agent environment.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.TestCaseResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.TestCaseResult) + com.google.cloud.dialogflow.cx.v3.TestCaseResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_TestCaseResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_TestCaseResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.TestCaseResult.class, + com.google.cloud.dialogflow.cx.v3.TestCaseResult.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.TestCaseResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getConversationTurnsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + environment_ = ""; + + if (conversationTurnsBuilder_ == null) { + conversationTurns_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + conversationTurnsBuilder_.clear(); + } + testResult_ = 0; + + if (testTimeBuilder_ == null) { + testTime_ = null; + } else { + testTime_ = null; + testTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_TestCaseResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TestCaseResult getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.TestCaseResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TestCaseResult build() { + com.google.cloud.dialogflow.cx.v3.TestCaseResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TestCaseResult buildPartial() { + com.google.cloud.dialogflow.cx.v3.TestCaseResult result = + new com.google.cloud.dialogflow.cx.v3.TestCaseResult(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.environment_ = environment_; + if (conversationTurnsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + conversationTurns_ = java.util.Collections.unmodifiableList(conversationTurns_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.conversationTurns_ = conversationTurns_; + } else { + result.conversationTurns_ = conversationTurnsBuilder_.build(); + } + result.testResult_ = testResult_; + if (testTimeBuilder_ == null) { + result.testTime_ = testTime_; + } else { + result.testTime_ = testTimeBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.TestCaseResult) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.TestCaseResult) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.TestCaseResult other) { + if (other == com.google.cloud.dialogflow.cx.v3.TestCaseResult.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getEnvironment().isEmpty()) { + environment_ = other.environment_; + onChanged(); + } + if (conversationTurnsBuilder_ == null) { + if (!other.conversationTurns_.isEmpty()) { + if (conversationTurns_.isEmpty()) { + conversationTurns_ = other.conversationTurns_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureConversationTurnsIsMutable(); + conversationTurns_.addAll(other.conversationTurns_); + } + onChanged(); + } + } else { + if (!other.conversationTurns_.isEmpty()) { + if (conversationTurnsBuilder_.isEmpty()) { + conversationTurnsBuilder_.dispose(); + conversationTurnsBuilder_ = null; + conversationTurns_ = other.conversationTurns_; + bitField0_ = (bitField0_ & ~0x00000001); + conversationTurnsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getConversationTurnsFieldBuilder() + : null; + } else { + conversationTurnsBuilder_.addAllMessages(other.conversationTurns_); + } + } + } + if (other.testResult_ != 0) { + setTestResultValue(other.getTestResultValue()); + } + if (other.hasTestTime()) { + mergeTestTime(other.getTestTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.TestCaseResult parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.dialogflow.cx.v3.TestCaseResult) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The resource name for the test case result. Format:
+     * `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/testCases/
+     * <TestCase ID>/results/<TestCaseResult ID>`.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The resource name for the test case result. Format:
+     * `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/testCases/
+     * <TestCase ID>/results/<TestCaseResult ID>`.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The resource name for the test case result. Format:
+     * `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/testCases/
+     * <TestCase ID>/results/<TestCaseResult ID>`.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name for the test case result. Format:
+     * `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/testCases/
+     * <TestCase ID>/results/<TestCaseResult ID>`.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name for the test case result. Format:
+     * `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/testCases/
+     * <TestCase ID>/results/<TestCaseResult ID>`.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object environment_ = ""; + /** + * + * + *
+     * Optional. Environment where the test was run. If not set, it indicates the draft
+     * environment.
+     * 
+ * + * + * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The environment. + */ + public java.lang.String getEnvironment() { + java.lang.Object ref = environment_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + environment_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Environment where the test was run. If not set, it indicates the draft
+     * environment.
+     * 
+ * + * + * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for environment. + */ + public com.google.protobuf.ByteString getEnvironmentBytes() { + java.lang.Object ref = environment_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + environment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Environment where the test was run. If not set, it indicates the draft
+     * environment.
+     * 
+ * + * + * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The environment to set. + * @return This builder for chaining. + */ + public Builder setEnvironment(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + environment_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Environment where the test was run. If not set, it indicates the draft
+     * environment.
+     * 
+ * + * + * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearEnvironment() { + + environment_ = getDefaultInstance().getEnvironment(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Environment where the test was run. If not set, it indicates the draft
+     * environment.
+     * 
+ * + * + * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for environment to set. + * @return This builder for chaining. + */ + public Builder setEnvironmentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + environment_ = value; + onChanged(); + return this; + } + + private java.util.List conversationTurns_ = + java.util.Collections.emptyList(); + + private void ensureConversationTurnsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + conversationTurns_ = + new java.util.ArrayList( + conversationTurns_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ConversationTurn, + com.google.cloud.dialogflow.cx.v3.ConversationTurn.Builder, + com.google.cloud.dialogflow.cx.v3.ConversationTurnOrBuilder> + conversationTurnsBuilder_; + + /** + * + * + *
+     * The conversation turns uttered during the test case replay in chronological
+     * order.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn conversation_turns = 3; + */ + public java.util.List + getConversationTurnsList() { + if (conversationTurnsBuilder_ == null) { + return java.util.Collections.unmodifiableList(conversationTurns_); + } else { + return conversationTurnsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The conversation turns uttered during the test case replay in chronological
+     * order.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn conversation_turns = 3; + */ + public int getConversationTurnsCount() { + if (conversationTurnsBuilder_ == null) { + return conversationTurns_.size(); + } else { + return conversationTurnsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The conversation turns uttered during the test case replay in chronological
+     * order.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn conversation_turns = 3; + */ + public com.google.cloud.dialogflow.cx.v3.ConversationTurn getConversationTurns(int index) { + if (conversationTurnsBuilder_ == null) { + return conversationTurns_.get(index); + } else { + return conversationTurnsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The conversation turns uttered during the test case replay in chronological
+     * order.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn conversation_turns = 3; + */ + public Builder setConversationTurns( + int index, com.google.cloud.dialogflow.cx.v3.ConversationTurn value) { + if (conversationTurnsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConversationTurnsIsMutable(); + conversationTurns_.set(index, value); + onChanged(); + } else { + conversationTurnsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The conversation turns uttered during the test case replay in chronological
+     * order.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn conversation_turns = 3; + */ + public Builder setConversationTurns( + int index, com.google.cloud.dialogflow.cx.v3.ConversationTurn.Builder builderForValue) { + if (conversationTurnsBuilder_ == null) { + ensureConversationTurnsIsMutable(); + conversationTurns_.set(index, builderForValue.build()); + onChanged(); + } else { + conversationTurnsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The conversation turns uttered during the test case replay in chronological
+     * order.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn conversation_turns = 3; + */ + public Builder addConversationTurns(com.google.cloud.dialogflow.cx.v3.ConversationTurn value) { + if (conversationTurnsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConversationTurnsIsMutable(); + conversationTurns_.add(value); + onChanged(); + } else { + conversationTurnsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The conversation turns uttered during the test case replay in chronological
+     * order.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn conversation_turns = 3; + */ + public Builder addConversationTurns( + int index, com.google.cloud.dialogflow.cx.v3.ConversationTurn value) { + if (conversationTurnsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConversationTurnsIsMutable(); + conversationTurns_.add(index, value); + onChanged(); + } else { + conversationTurnsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The conversation turns uttered during the test case replay in chronological
+     * order.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn conversation_turns = 3; + */ + public Builder addConversationTurns( + com.google.cloud.dialogflow.cx.v3.ConversationTurn.Builder builderForValue) { + if (conversationTurnsBuilder_ == null) { + ensureConversationTurnsIsMutable(); + conversationTurns_.add(builderForValue.build()); + onChanged(); + } else { + conversationTurnsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The conversation turns uttered during the test case replay in chronological
+     * order.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn conversation_turns = 3; + */ + public Builder addConversationTurns( + int index, com.google.cloud.dialogflow.cx.v3.ConversationTurn.Builder builderForValue) { + if (conversationTurnsBuilder_ == null) { + ensureConversationTurnsIsMutable(); + conversationTurns_.add(index, builderForValue.build()); + onChanged(); + } else { + conversationTurnsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The conversation turns uttered during the test case replay in chronological
+     * order.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn conversation_turns = 3; + */ + public Builder addAllConversationTurns( + java.lang.Iterable values) { + if (conversationTurnsBuilder_ == null) { + ensureConversationTurnsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, conversationTurns_); + onChanged(); + } else { + conversationTurnsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The conversation turns uttered during the test case replay in chronological
+     * order.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn conversation_turns = 3; + */ + public Builder clearConversationTurns() { + if (conversationTurnsBuilder_ == null) { + conversationTurns_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + conversationTurnsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The conversation turns uttered during the test case replay in chronological
+     * order.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn conversation_turns = 3; + */ + public Builder removeConversationTurns(int index) { + if (conversationTurnsBuilder_ == null) { + ensureConversationTurnsIsMutable(); + conversationTurns_.remove(index); + onChanged(); + } else { + conversationTurnsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The conversation turns uttered during the test case replay in chronological
+     * order.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn conversation_turns = 3; + */ + public com.google.cloud.dialogflow.cx.v3.ConversationTurn.Builder getConversationTurnsBuilder( + int index) { + return getConversationTurnsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The conversation turns uttered during the test case replay in chronological
+     * order.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn conversation_turns = 3; + */ + public com.google.cloud.dialogflow.cx.v3.ConversationTurnOrBuilder + getConversationTurnsOrBuilder(int index) { + if (conversationTurnsBuilder_ == null) { + return conversationTurns_.get(index); + } else { + return conversationTurnsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The conversation turns uttered during the test case replay in chronological
+     * order.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn conversation_turns = 3; + */ + public java.util.List + getConversationTurnsOrBuilderList() { + if (conversationTurnsBuilder_ != null) { + return conversationTurnsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(conversationTurns_); + } + } + /** + * + * + *
+     * The conversation turns uttered during the test case replay in chronological
+     * order.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn conversation_turns = 3; + */ + public com.google.cloud.dialogflow.cx.v3.ConversationTurn.Builder + addConversationTurnsBuilder() { + return getConversationTurnsFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3.ConversationTurn.getDefaultInstance()); + } + /** + * + * + *
+     * The conversation turns uttered during the test case replay in chronological
+     * order.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn conversation_turns = 3; + */ + public com.google.cloud.dialogflow.cx.v3.ConversationTurn.Builder addConversationTurnsBuilder( + int index) { + return getConversationTurnsFieldBuilder() + .addBuilder( + index, com.google.cloud.dialogflow.cx.v3.ConversationTurn.getDefaultInstance()); + } + /** + * + * + *
+     * The conversation turns uttered during the test case replay in chronological
+     * order.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn conversation_turns = 3; + */ + public java.util.List + getConversationTurnsBuilderList() { + return getConversationTurnsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ConversationTurn, + com.google.cloud.dialogflow.cx.v3.ConversationTurn.Builder, + com.google.cloud.dialogflow.cx.v3.ConversationTurnOrBuilder> + getConversationTurnsFieldBuilder() { + if (conversationTurnsBuilder_ == null) { + conversationTurnsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ConversationTurn, + com.google.cloud.dialogflow.cx.v3.ConversationTurn.Builder, + com.google.cloud.dialogflow.cx.v3.ConversationTurnOrBuilder>( + conversationTurns_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + conversationTurns_ = null; + } + return conversationTurnsBuilder_; + } + + private int testResult_ = 0; + /** + * + * + *
+     * Whether the test case passed in the agent environment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TestResult test_result = 4; + * + * @return The enum numeric value on the wire for testResult. + */ + @java.lang.Override + public int getTestResultValue() { + return testResult_; + } + /** + * + * + *
+     * Whether the test case passed in the agent environment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TestResult test_result = 4; + * + * @param value The enum numeric value on the wire for testResult to set. + * @return This builder for chaining. + */ + public Builder setTestResultValue(int value) { + + testResult_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether the test case passed in the agent environment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TestResult test_result = 4; + * + * @return The testResult. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TestResult getTestResult() { + @SuppressWarnings("deprecation") + com.google.cloud.dialogflow.cx.v3.TestResult result = + com.google.cloud.dialogflow.cx.v3.TestResult.valueOf(testResult_); + return result == null ? com.google.cloud.dialogflow.cx.v3.TestResult.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Whether the test case passed in the agent environment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TestResult test_result = 4; + * + * @param value The testResult to set. + * @return This builder for chaining. + */ + public Builder setTestResult(com.google.cloud.dialogflow.cx.v3.TestResult value) { + if (value == null) { + throw new NullPointerException(); + } + + testResult_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Whether the test case passed in the agent environment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TestResult test_result = 4; + * + * @return This builder for chaining. + */ + public Builder clearTestResult() { + + testResult_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp testTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + testTimeBuilder_; + /** + * + * + *
+     * The time that the test was run.
+     * 
+ * + * .google.protobuf.Timestamp test_time = 5; + * + * @return Whether the testTime field is set. + */ + public boolean hasTestTime() { + return testTimeBuilder_ != null || testTime_ != null; + } + /** + * + * + *
+     * The time that the test was run.
+     * 
+ * + * .google.protobuf.Timestamp test_time = 5; + * + * @return The testTime. + */ + public com.google.protobuf.Timestamp getTestTime() { + if (testTimeBuilder_ == null) { + return testTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : testTime_; + } else { + return testTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The time that the test was run.
+     * 
+ * + * .google.protobuf.Timestamp test_time = 5; + */ + public Builder setTestTime(com.google.protobuf.Timestamp value) { + if (testTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + testTime_ = value; + onChanged(); + } else { + testTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The time that the test was run.
+     * 
+ * + * .google.protobuf.Timestamp test_time = 5; + */ + public Builder setTestTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (testTimeBuilder_ == null) { + testTime_ = builderForValue.build(); + onChanged(); + } else { + testTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The time that the test was run.
+     * 
+ * + * .google.protobuf.Timestamp test_time = 5; + */ + public Builder mergeTestTime(com.google.protobuf.Timestamp value) { + if (testTimeBuilder_ == null) { + if (testTime_ != null) { + testTime_ = + com.google.protobuf.Timestamp.newBuilder(testTime_).mergeFrom(value).buildPartial(); + } else { + testTime_ = value; + } + onChanged(); + } else { + testTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The time that the test was run.
+     * 
+ * + * .google.protobuf.Timestamp test_time = 5; + */ + public Builder clearTestTime() { + if (testTimeBuilder_ == null) { + testTime_ = null; + onChanged(); + } else { + testTime_ = null; + testTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The time that the test was run.
+     * 
+ * + * .google.protobuf.Timestamp test_time = 5; + */ + public com.google.protobuf.Timestamp.Builder getTestTimeBuilder() { + + onChanged(); + return getTestTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time that the test was run.
+     * 
+ * + * .google.protobuf.Timestamp test_time = 5; + */ + public com.google.protobuf.TimestampOrBuilder getTestTimeOrBuilder() { + if (testTimeBuilder_ != null) { + return testTimeBuilder_.getMessageOrBuilder(); + } else { + return testTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : testTime_; + } + } + /** + * + * + *
+     * The time that the test was run.
+     * 
+ * + * .google.protobuf.Timestamp test_time = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getTestTimeFieldBuilder() { + if (testTimeBuilder_ == null) { + testTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getTestTime(), getParentForChildren(), isClean()); + testTime_ = null; + } + return testTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.TestCaseResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.TestCaseResult) + private static final com.google.cloud.dialogflow.cx.v3.TestCaseResult DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.TestCaseResult(); + } + + public static com.google.cloud.dialogflow.cx.v3.TestCaseResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TestCaseResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TestCaseResult(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TestCaseResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentName.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseResultName.java similarity index 62% rename from proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentName.java rename to proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseResultName.java index 2f8bac421..73fa9cd3e 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentName.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseResultName.java @@ -28,32 +28,32 @@ // AUTO-GENERATED DOCUMENTATION AND CLASS. @Generated("by gapic-generator-java") -public class ExperimentName implements ResourceName { - private static final PathTemplate PROJECT_LOCATION_AGENT_ENVIRONMENT_EXPERIMENT = +public class TestCaseResultName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_AGENT_TEST_CASE_RESULT = PathTemplate.createWithoutUrlEncoding( - "projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}"); + "projects/{project}/locations/{location}/agents/{agent}/testCases/{test_case}/results/{result}"); private volatile Map fieldValuesMap; private final String project; private final String location; private final String agent; - private final String environment; - private final String experiment; + private final String testCase; + private final String result; @Deprecated - protected ExperimentName() { + protected TestCaseResultName() { project = null; location = null; agent = null; - environment = null; - experiment = null; + testCase = null; + result = null; } - private ExperimentName(Builder builder) { + private TestCaseResultName(Builder builder) { project = Preconditions.checkNotNull(builder.getProject()); location = Preconditions.checkNotNull(builder.getLocation()); agent = Preconditions.checkNotNull(builder.getAgent()); - environment = Preconditions.checkNotNull(builder.getEnvironment()); - experiment = Preconditions.checkNotNull(builder.getExperiment()); + testCase = Preconditions.checkNotNull(builder.getTestCase()); + result = Preconditions.checkNotNull(builder.getResult()); } public String getProject() { @@ -68,12 +68,12 @@ public String getAgent() { return agent; } - public String getEnvironment() { - return environment; + public String getTestCase() { + return testCase; } - public String getExperiment() { - return experiment; + public String getResult() { + return result; } public static Builder newBuilder() { @@ -84,55 +84,55 @@ public Builder toBuilder() { return new Builder(this); } - public static ExperimentName of( - String project, String location, String agent, String environment, String experiment) { + public static TestCaseResultName of( + String project, String location, String agent, String testCase, String result) { return newBuilder() .setProject(project) .setLocation(location) .setAgent(agent) - .setEnvironment(environment) - .setExperiment(experiment) + .setTestCase(testCase) + .setResult(result) .build(); } public static String format( - String project, String location, String agent, String environment, String experiment) { + String project, String location, String agent, String testCase, String result) { return newBuilder() .setProject(project) .setLocation(location) .setAgent(agent) - .setEnvironment(environment) - .setExperiment(experiment) + .setTestCase(testCase) + .setResult(result) .build() .toString(); } - public static ExperimentName parse(String formattedString) { + public static TestCaseResultName parse(String formattedString) { if (formattedString.isEmpty()) { return null; } Map matchMap = - PROJECT_LOCATION_AGENT_ENVIRONMENT_EXPERIMENT.validatedMatch( - formattedString, "ExperimentName.parse: formattedString not in valid format"); + PROJECT_LOCATION_AGENT_TEST_CASE_RESULT.validatedMatch( + formattedString, "TestCaseResultName.parse: formattedString not in valid format"); return of( matchMap.get("project"), matchMap.get("location"), matchMap.get("agent"), - matchMap.get("environment"), - matchMap.get("experiment")); + matchMap.get("test_case"), + matchMap.get("result")); } - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); for (String formattedString : formattedStrings) { list.add(parse(formattedString)); } return list; } - public static List toStringList(List values) { + public static List toStringList(List values) { List list = new ArrayList<>(values.size()); - for (ExperimentName value : values) { + for (TestCaseResultName value : values) { if (value == null) { list.add(""); } else { @@ -143,7 +143,7 @@ public static List toStringList(List values) { } public static boolean isParsableFrom(String formattedString) { - return PROJECT_LOCATION_AGENT_ENVIRONMENT_EXPERIMENT.matches(formattedString); + return PROJECT_LOCATION_AGENT_TEST_CASE_RESULT.matches(formattedString); } @Override @@ -161,11 +161,11 @@ public Map getFieldValuesMap() { if (agent != null) { fieldMapBuilder.put("agent", agent); } - if (environment != null) { - fieldMapBuilder.put("environment", environment); + if (testCase != null) { + fieldMapBuilder.put("test_case", testCase); } - if (experiment != null) { - fieldMapBuilder.put("experiment", experiment); + if (result != null) { + fieldMapBuilder.put("result", result); } fieldValuesMap = fieldMapBuilder.build(); } @@ -180,17 +180,17 @@ public String getFieldValue(String fieldName) { @Override public String toString() { - return PROJECT_LOCATION_AGENT_ENVIRONMENT_EXPERIMENT.instantiate( + return PROJECT_LOCATION_AGENT_TEST_CASE_RESULT.instantiate( "project", project, "location", location, "agent", agent, - "environment", - environment, - "experiment", - experiment); + "test_case", + testCase, + "result", + result); } @Override @@ -199,12 +199,12 @@ public boolean equals(Object o) { return true; } if (o != null || getClass() == o.getClass()) { - ExperimentName that = ((ExperimentName) o); + TestCaseResultName that = ((TestCaseResultName) o); return Objects.equals(this.project, that.project) && Objects.equals(this.location, that.location) && Objects.equals(this.agent, that.agent) - && Objects.equals(this.environment, that.environment) - && Objects.equals(this.experiment, that.experiment); + && Objects.equals(this.testCase, that.testCase) + && Objects.equals(this.result, that.result); } return false; } @@ -219,22 +219,22 @@ public int hashCode() { h *= 1000003; h ^= Objects.hashCode(agent); h *= 1000003; - h ^= Objects.hashCode(environment); + h ^= Objects.hashCode(testCase); h *= 1000003; - h ^= Objects.hashCode(experiment); + h ^= Objects.hashCode(result); return h; } /** * Builder for - * projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}. + * projects/{project}/locations/{location}/agents/{agent}/testCases/{test_case}/results/{result}. */ public static class Builder { private String project; private String location; private String agent; - private String environment; - private String experiment; + private String testCase; + private String result; protected Builder() {} @@ -250,12 +250,12 @@ public String getAgent() { return agent; } - public String getEnvironment() { - return environment; + public String getTestCase() { + return testCase; } - public String getExperiment() { - return experiment; + public String getResult() { + return result; } public Builder setProject(String project) { @@ -273,26 +273,26 @@ public Builder setAgent(String agent) { return this; } - public Builder setEnvironment(String environment) { - this.environment = environment; + public Builder setTestCase(String testCase) { + this.testCase = testCase; return this; } - public Builder setExperiment(String experiment) { - this.experiment = experiment; + public Builder setResult(String result) { + this.result = result; return this; } - private Builder(ExperimentName experimentName) { - project = experimentName.project; - location = experimentName.location; - agent = experimentName.agent; - environment = experimentName.environment; - experiment = experimentName.experiment; + private Builder(TestCaseResultName testCaseResultName) { + project = testCaseResultName.project; + location = testCaseResultName.location; + agent = testCaseResultName.agent; + testCase = testCaseResultName.testCase; + result = testCaseResultName.result; } - public ExperimentName build() { - return new ExperimentName(this); + public TestCaseResultName build() { + return new TestCaseResultName(this); } } } diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseResultOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseResultOrBuilder.java new file mode 100644 index 000000000..378c46ae4 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseResultOrBuilder.java @@ -0,0 +1,203 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/test_case.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface TestCaseResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.TestCaseResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The resource name for the test case result. Format:
+   * `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/testCases/
+   * <TestCase ID>/results/<TestCaseResult ID>`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The resource name for the test case result. Format:
+   * `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/testCases/
+   * <TestCase ID>/results/<TestCaseResult ID>`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. Environment where the test was run. If not set, it indicates the draft
+   * environment.
+   * 
+ * + * + * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The environment. + */ + java.lang.String getEnvironment(); + /** + * + * + *
+   * Optional. Environment where the test was run. If not set, it indicates the draft
+   * environment.
+   * 
+ * + * + * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for environment. + */ + com.google.protobuf.ByteString getEnvironmentBytes(); + + /** + * + * + *
+   * The conversation turns uttered during the test case replay in chronological
+   * order.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn conversation_turns = 3; + */ + java.util.List getConversationTurnsList(); + /** + * + * + *
+   * The conversation turns uttered during the test case replay in chronological
+   * order.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn conversation_turns = 3; + */ + com.google.cloud.dialogflow.cx.v3.ConversationTurn getConversationTurns(int index); + /** + * + * + *
+   * The conversation turns uttered during the test case replay in chronological
+   * order.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn conversation_turns = 3; + */ + int getConversationTurnsCount(); + /** + * + * + *
+   * The conversation turns uttered during the test case replay in chronological
+   * order.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn conversation_turns = 3; + */ + java.util.List + getConversationTurnsOrBuilderList(); + /** + * + * + *
+   * The conversation turns uttered during the test case replay in chronological
+   * order.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn conversation_turns = 3; + */ + com.google.cloud.dialogflow.cx.v3.ConversationTurnOrBuilder getConversationTurnsOrBuilder( + int index); + + /** + * + * + *
+   * Whether the test case passed in the agent environment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.TestResult test_result = 4; + * + * @return The enum numeric value on the wire for testResult. + */ + int getTestResultValue(); + /** + * + * + *
+   * Whether the test case passed in the agent environment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.TestResult test_result = 4; + * + * @return The testResult. + */ + com.google.cloud.dialogflow.cx.v3.TestResult getTestResult(); + + /** + * + * + *
+   * The time that the test was run.
+   * 
+ * + * .google.protobuf.Timestamp test_time = 5; + * + * @return Whether the testTime field is set. + */ + boolean hasTestTime(); + /** + * + * + *
+   * The time that the test was run.
+   * 
+ * + * .google.protobuf.Timestamp test_time = 5; + * + * @return The testTime. + */ + com.google.protobuf.Timestamp getTestTime(); + /** + * + * + *
+   * The time that the test was run.
+   * 
+ * + * .google.protobuf.Timestamp test_time = 5; + */ + com.google.protobuf.TimestampOrBuilder getTestTimeOrBuilder(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestConfig.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestConfig.java new file mode 100644 index 000000000..2473ace9d --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestConfig.java @@ -0,0 +1,928 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/test_case.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * Represents configurations for a test case.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.TestConfig} + */ +public final class TestConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.TestConfig) + TestConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use TestConfig.newBuilder() to construct. + private TestConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TestConfig() { + trackingParameters_ = com.google.protobuf.LazyStringArrayList.EMPTY; + flow_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TestConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TestConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + trackingParameters_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + trackingParameters_.add(s); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + flow_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + trackingParameters_ = trackingParameters_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_TestConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_TestConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.TestConfig.class, + com.google.cloud.dialogflow.cx.v3.TestConfig.Builder.class); + } + + public static final int TRACKING_PARAMETERS_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList trackingParameters_; + /** + * + * + *
+   * Session parameters to be compared when calculating differences.
+   * 
+ * + * repeated string tracking_parameters = 1; + * + * @return A list containing the trackingParameters. + */ + public com.google.protobuf.ProtocolStringList getTrackingParametersList() { + return trackingParameters_; + } + /** + * + * + *
+   * Session parameters to be compared when calculating differences.
+   * 
+ * + * repeated string tracking_parameters = 1; + * + * @return The count of trackingParameters. + */ + public int getTrackingParametersCount() { + return trackingParameters_.size(); + } + /** + * + * + *
+   * Session parameters to be compared when calculating differences.
+   * 
+ * + * repeated string tracking_parameters = 1; + * + * @param index The index of the element to return. + * @return The trackingParameters at the given index. + */ + public java.lang.String getTrackingParameters(int index) { + return trackingParameters_.get(index); + } + /** + * + * + *
+   * Session parameters to be compared when calculating differences.
+   * 
+ * + * repeated string tracking_parameters = 1; + * + * @param index The index of the value to return. + * @return The bytes of the trackingParameters at the given index. + */ + public com.google.protobuf.ByteString getTrackingParametersBytes(int index) { + return trackingParameters_.getByteString(index); + } + + public static final int FLOW_FIELD_NUMBER = 2; + private volatile java.lang.Object flow_; + /** + * + * + *
+   * Flow name. If not set, default start flow is assumed.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>`.
+   * 
+ * + * string flow = 2 [(.google.api.resource_reference) = { ... } + * + * @return The flow. + */ + @java.lang.Override + public java.lang.String getFlow() { + java.lang.Object ref = flow_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + flow_ = s; + return s; + } + } + /** + * + * + *
+   * Flow name. If not set, default start flow is assumed.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>`.
+   * 
+ * + * string flow = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for flow. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFlowBytes() { + java.lang.Object ref = flow_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + flow_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < trackingParameters_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, trackingParameters_.getRaw(i)); + } + if (!getFlowBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, flow_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < trackingParameters_.size(); i++) { + dataSize += computeStringSizeNoTag(trackingParameters_.getRaw(i)); + } + size += dataSize; + size += 1 * getTrackingParametersList().size(); + } + if (!getFlowBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, flow_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.TestConfig)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.TestConfig other = + (com.google.cloud.dialogflow.cx.v3.TestConfig) obj; + + if (!getTrackingParametersList().equals(other.getTrackingParametersList())) return false; + if (!getFlow().equals(other.getFlow())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getTrackingParametersCount() > 0) { + hash = (37 * hash) + TRACKING_PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + getTrackingParametersList().hashCode(); + } + hash = (37 * hash) + FLOW_FIELD_NUMBER; + hash = (53 * hash) + getFlow().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.TestConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.TestConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.TestConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.TestConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.TestConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.TestConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.TestConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.TestConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.TestConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.TestConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.TestConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.TestConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.dialogflow.cx.v3.TestConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Represents configurations for a test case.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.TestConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.TestConfig) + com.google.cloud.dialogflow.cx.v3.TestConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_TestConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_TestConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.TestConfig.class, + com.google.cloud.dialogflow.cx.v3.TestConfig.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.TestConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + trackingParameters_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + flow_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_TestConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TestConfig getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.TestConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TestConfig build() { + com.google.cloud.dialogflow.cx.v3.TestConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TestConfig buildPartial() { + com.google.cloud.dialogflow.cx.v3.TestConfig result = + new com.google.cloud.dialogflow.cx.v3.TestConfig(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + trackingParameters_ = trackingParameters_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.trackingParameters_ = trackingParameters_; + result.flow_ = flow_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.TestConfig) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.TestConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.TestConfig other) { + if (other == com.google.cloud.dialogflow.cx.v3.TestConfig.getDefaultInstance()) return this; + if (!other.trackingParameters_.isEmpty()) { + if (trackingParameters_.isEmpty()) { + trackingParameters_ = other.trackingParameters_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTrackingParametersIsMutable(); + trackingParameters_.addAll(other.trackingParameters_); + } + onChanged(); + } + if (!other.getFlow().isEmpty()) { + flow_ = other.flow_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.TestConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.dialogflow.cx.v3.TestConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringList trackingParameters_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureTrackingParametersIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + trackingParameters_ = new com.google.protobuf.LazyStringArrayList(trackingParameters_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Session parameters to be compared when calculating differences.
+     * 
+ * + * repeated string tracking_parameters = 1; + * + * @return A list containing the trackingParameters. + */ + public com.google.protobuf.ProtocolStringList getTrackingParametersList() { + return trackingParameters_.getUnmodifiableView(); + } + /** + * + * + *
+     * Session parameters to be compared when calculating differences.
+     * 
+ * + * repeated string tracking_parameters = 1; + * + * @return The count of trackingParameters. + */ + public int getTrackingParametersCount() { + return trackingParameters_.size(); + } + /** + * + * + *
+     * Session parameters to be compared when calculating differences.
+     * 
+ * + * repeated string tracking_parameters = 1; + * + * @param index The index of the element to return. + * @return The trackingParameters at the given index. + */ + public java.lang.String getTrackingParameters(int index) { + return trackingParameters_.get(index); + } + /** + * + * + *
+     * Session parameters to be compared when calculating differences.
+     * 
+ * + * repeated string tracking_parameters = 1; + * + * @param index The index of the value to return. + * @return The bytes of the trackingParameters at the given index. + */ + public com.google.protobuf.ByteString getTrackingParametersBytes(int index) { + return trackingParameters_.getByteString(index); + } + /** + * + * + *
+     * Session parameters to be compared when calculating differences.
+     * 
+ * + * repeated string tracking_parameters = 1; + * + * @param index The index to set the value at. + * @param value The trackingParameters to set. + * @return This builder for chaining. + */ + public Builder setTrackingParameters(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTrackingParametersIsMutable(); + trackingParameters_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Session parameters to be compared when calculating differences.
+     * 
+ * + * repeated string tracking_parameters = 1; + * + * @param value The trackingParameters to add. + * @return This builder for chaining. + */ + public Builder addTrackingParameters(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTrackingParametersIsMutable(); + trackingParameters_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Session parameters to be compared when calculating differences.
+     * 
+ * + * repeated string tracking_parameters = 1; + * + * @param values The trackingParameters to add. + * @return This builder for chaining. + */ + public Builder addAllTrackingParameters(java.lang.Iterable values) { + ensureTrackingParametersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, trackingParameters_); + onChanged(); + return this; + } + /** + * + * + *
+     * Session parameters to be compared when calculating differences.
+     * 
+ * + * repeated string tracking_parameters = 1; + * + * @return This builder for chaining. + */ + public Builder clearTrackingParameters() { + trackingParameters_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Session parameters to be compared when calculating differences.
+     * 
+ * + * repeated string tracking_parameters = 1; + * + * @param value The bytes of the trackingParameters to add. + * @return This builder for chaining. + */ + public Builder addTrackingParametersBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureTrackingParametersIsMutable(); + trackingParameters_.add(value); + onChanged(); + return this; + } + + private java.lang.Object flow_ = ""; + /** + * + * + *
+     * Flow name. If not set, default start flow is assumed.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>`.
+     * 
+ * + * string flow = 2 [(.google.api.resource_reference) = { ... } + * + * @return The flow. + */ + public java.lang.String getFlow() { + java.lang.Object ref = flow_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + flow_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Flow name. If not set, default start flow is assumed.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>`.
+     * 
+ * + * string flow = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for flow. + */ + public com.google.protobuf.ByteString getFlowBytes() { + java.lang.Object ref = flow_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + flow_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Flow name. If not set, default start flow is assumed.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>`.
+     * 
+ * + * string flow = 2 [(.google.api.resource_reference) = { ... } + * + * @param value The flow to set. + * @return This builder for chaining. + */ + public Builder setFlow(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + flow_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Flow name. If not set, default start flow is assumed.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>`.
+     * 
+ * + * string flow = 2 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearFlow() { + + flow_ = getDefaultInstance().getFlow(); + onChanged(); + return this; + } + /** + * + * + *
+     * Flow name. If not set, default start flow is assumed.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>`.
+     * 
+ * + * string flow = 2 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for flow to set. + * @return This builder for chaining. + */ + public Builder setFlowBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + flow_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.TestConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.TestConfig) + private static final com.google.cloud.dialogflow.cx.v3.TestConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.TestConfig(); + } + + public static com.google.cloud.dialogflow.cx.v3.TestConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TestConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TestConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TestConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestConfigOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestConfigOrBuilder.java new file mode 100644 index 000000000..82c9cc5c3 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestConfigOrBuilder.java @@ -0,0 +1,105 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/test_case.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface TestConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.TestConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Session parameters to be compared when calculating differences.
+   * 
+ * + * repeated string tracking_parameters = 1; + * + * @return A list containing the trackingParameters. + */ + java.util.List getTrackingParametersList(); + /** + * + * + *
+   * Session parameters to be compared when calculating differences.
+   * 
+ * + * repeated string tracking_parameters = 1; + * + * @return The count of trackingParameters. + */ + int getTrackingParametersCount(); + /** + * + * + *
+   * Session parameters to be compared when calculating differences.
+   * 
+ * + * repeated string tracking_parameters = 1; + * + * @param index The index of the element to return. + * @return The trackingParameters at the given index. + */ + java.lang.String getTrackingParameters(int index); + /** + * + * + *
+   * Session parameters to be compared when calculating differences.
+   * 
+ * + * repeated string tracking_parameters = 1; + * + * @param index The index of the value to return. + * @return The bytes of the trackingParameters at the given index. + */ + com.google.protobuf.ByteString getTrackingParametersBytes(int index); + + /** + * + * + *
+   * Flow name. If not set, default start flow is assumed.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>`.
+   * 
+ * + * string flow = 2 [(.google.api.resource_reference) = { ... } + * + * @return The flow. + */ + java.lang.String getFlow(); + /** + * + * + *
+   * Flow name. If not set, default start flow is assumed.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>`.
+   * 
+ * + * string flow = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for flow. + */ + com.google.protobuf.ByteString getFlowBytes(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestError.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestError.java new file mode 100644 index 000000000..dda279013 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestError.java @@ -0,0 +1,1163 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/test_case.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * Error info for running a test.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.TestError} + */ +public final class TestError extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.TestError) + TestErrorOrBuilder { + private static final long serialVersionUID = 0L; + // Use TestError.newBuilder() to construct. + private TestError(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TestError() { + testCase_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TestError(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TestError( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + testCase_ = s; + break; + } + case 18: + { + com.google.rpc.Status.Builder subBuilder = null; + if (status_ != null) { + subBuilder = status_.toBuilder(); + } + status_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(status_); + status_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (testTime_ != null) { + subBuilder = testTime_.toBuilder(); + } + testTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(testTime_); + testTime_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_TestError_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_TestError_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.TestError.class, + com.google.cloud.dialogflow.cx.v3.TestError.Builder.class); + } + + public static final int TEST_CASE_FIELD_NUMBER = 1; + private volatile java.lang.Object testCase_; + /** + * + * + *
+   * The test case resource name.
+   * 
+ * + * string test_case = 1 [(.google.api.resource_reference) = { ... } + * + * @return The testCase. + */ + @java.lang.Override + public java.lang.String getTestCase() { + java.lang.Object ref = testCase_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + testCase_ = s; + return s; + } + } + /** + * + * + *
+   * The test case resource name.
+   * 
+ * + * string test_case = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for testCase. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTestCaseBytes() { + java.lang.Object ref = testCase_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + testCase_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATUS_FIELD_NUMBER = 2; + private com.google.rpc.Status status_; + /** + * + * + *
+   * The status associated with the test.
+   * 
+ * + * .google.rpc.Status status = 2; + * + * @return Whether the status field is set. + */ + @java.lang.Override + public boolean hasStatus() { + return status_ != null; + } + /** + * + * + *
+   * The status associated with the test.
+   * 
+ * + * .google.rpc.Status status = 2; + * + * @return The status. + */ + @java.lang.Override + public com.google.rpc.Status getStatus() { + return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; + } + /** + * + * + *
+   * The status associated with the test.
+   * 
+ * + * .google.rpc.Status status = 2; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { + return getStatus(); + } + + public static final int TEST_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp testTime_; + /** + * + * + *
+   * The timestamp when the test was completed.
+   * 
+ * + * .google.protobuf.Timestamp test_time = 3; + * + * @return Whether the testTime field is set. + */ + @java.lang.Override + public boolean hasTestTime() { + return testTime_ != null; + } + /** + * + * + *
+   * The timestamp when the test was completed.
+   * 
+ * + * .google.protobuf.Timestamp test_time = 3; + * + * @return The testTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getTestTime() { + return testTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : testTime_; + } + /** + * + * + *
+   * The timestamp when the test was completed.
+   * 
+ * + * .google.protobuf.Timestamp test_time = 3; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getTestTimeOrBuilder() { + return getTestTime(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getTestCaseBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, testCase_); + } + if (status_ != null) { + output.writeMessage(2, getStatus()); + } + if (testTime_ != null) { + output.writeMessage(3, getTestTime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getTestCaseBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, testCase_); + } + if (status_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStatus()); + } + if (testTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getTestTime()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.TestError)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.TestError other = + (com.google.cloud.dialogflow.cx.v3.TestError) obj; + + if (!getTestCase().equals(other.getTestCase())) return false; + if (hasStatus() != other.hasStatus()) return false; + if (hasStatus()) { + if (!getStatus().equals(other.getStatus())) return false; + } + if (hasTestTime() != other.hasTestTime()) return false; + if (hasTestTime()) { + if (!getTestTime().equals(other.getTestTime())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TEST_CASE_FIELD_NUMBER; + hash = (53 * hash) + getTestCase().hashCode(); + if (hasStatus()) { + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + getStatus().hashCode(); + } + if (hasTestTime()) { + hash = (37 * hash) + TEST_TIME_FIELD_NUMBER; + hash = (53 * hash) + getTestTime().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.TestError parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.TestError parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.TestError parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.TestError parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.TestError parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.TestError parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.TestError parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.TestError parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.TestError parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.TestError parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.TestError parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.TestError parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.dialogflow.cx.v3.TestError prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Error info for running a test.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.TestError} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.TestError) + com.google.cloud.dialogflow.cx.v3.TestErrorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_TestError_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_TestError_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.TestError.class, + com.google.cloud.dialogflow.cx.v3.TestError.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.TestError.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + testCase_ = ""; + + if (statusBuilder_ == null) { + status_ = null; + } else { + status_ = null; + statusBuilder_ = null; + } + if (testTimeBuilder_ == null) { + testTime_ = null; + } else { + testTime_ = null; + testTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_TestError_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TestError getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.TestError.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TestError build() { + com.google.cloud.dialogflow.cx.v3.TestError result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TestError buildPartial() { + com.google.cloud.dialogflow.cx.v3.TestError result = + new com.google.cloud.dialogflow.cx.v3.TestError(this); + result.testCase_ = testCase_; + if (statusBuilder_ == null) { + result.status_ = status_; + } else { + result.status_ = statusBuilder_.build(); + } + if (testTimeBuilder_ == null) { + result.testTime_ = testTime_; + } else { + result.testTime_ = testTimeBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.TestError) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.TestError) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.TestError other) { + if (other == com.google.cloud.dialogflow.cx.v3.TestError.getDefaultInstance()) return this; + if (!other.getTestCase().isEmpty()) { + testCase_ = other.testCase_; + onChanged(); + } + if (other.hasStatus()) { + mergeStatus(other.getStatus()); + } + if (other.hasTestTime()) { + mergeTestTime(other.getTestTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.TestError parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.dialogflow.cx.v3.TestError) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object testCase_ = ""; + /** + * + * + *
+     * The test case resource name.
+     * 
+ * + * string test_case = 1 [(.google.api.resource_reference) = { ... } + * + * @return The testCase. + */ + public java.lang.String getTestCase() { + java.lang.Object ref = testCase_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + testCase_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The test case resource name.
+     * 
+ * + * string test_case = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for testCase. + */ + public com.google.protobuf.ByteString getTestCaseBytes() { + java.lang.Object ref = testCase_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + testCase_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The test case resource name.
+     * 
+ * + * string test_case = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The testCase to set. + * @return This builder for chaining. + */ + public Builder setTestCase(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + testCase_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The test case resource name.
+     * 
+ * + * string test_case = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearTestCase() { + + testCase_ = getDefaultInstance().getTestCase(); + onChanged(); + return this; + } + /** + * + * + *
+     * The test case resource name.
+     * 
+ * + * string test_case = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for testCase to set. + * @return This builder for chaining. + */ + public Builder setTestCaseBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + testCase_ = value; + onChanged(); + return this; + } + + private com.google.rpc.Status status_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + statusBuilder_; + /** + * + * + *
+     * The status associated with the test.
+     * 
+ * + * .google.rpc.Status status = 2; + * + * @return Whether the status field is set. + */ + public boolean hasStatus() { + return statusBuilder_ != null || status_ != null; + } + /** + * + * + *
+     * The status associated with the test.
+     * 
+ * + * .google.rpc.Status status = 2; + * + * @return The status. + */ + public com.google.rpc.Status getStatus() { + if (statusBuilder_ == null) { + return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; + } else { + return statusBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The status associated with the test.
+     * 
+ * + * .google.rpc.Status status = 2; + */ + public Builder setStatus(com.google.rpc.Status value) { + if (statusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + status_ = value; + onChanged(); + } else { + statusBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The status associated with the test.
+     * 
+ * + * .google.rpc.Status status = 2; + */ + public Builder setStatus(com.google.rpc.Status.Builder builderForValue) { + if (statusBuilder_ == null) { + status_ = builderForValue.build(); + onChanged(); + } else { + statusBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The status associated with the test.
+     * 
+ * + * .google.rpc.Status status = 2; + */ + public Builder mergeStatus(com.google.rpc.Status value) { + if (statusBuilder_ == null) { + if (status_ != null) { + status_ = com.google.rpc.Status.newBuilder(status_).mergeFrom(value).buildPartial(); + } else { + status_ = value; + } + onChanged(); + } else { + statusBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The status associated with the test.
+     * 
+ * + * .google.rpc.Status status = 2; + */ + public Builder clearStatus() { + if (statusBuilder_ == null) { + status_ = null; + onChanged(); + } else { + status_ = null; + statusBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The status associated with the test.
+     * 
+ * + * .google.rpc.Status status = 2; + */ + public com.google.rpc.Status.Builder getStatusBuilder() { + + onChanged(); + return getStatusFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The status associated with the test.
+     * 
+ * + * .google.rpc.Status status = 2; + */ + public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { + if (statusBuilder_ != null) { + return statusBuilder_.getMessageOrBuilder(); + } else { + return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; + } + } + /** + * + * + *
+     * The status associated with the test.
+     * 
+ * + * .google.rpc.Status status = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getStatusFieldBuilder() { + if (statusBuilder_ == null) { + statusBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>(getStatus(), getParentForChildren(), isClean()); + status_ = null; + } + return statusBuilder_; + } + + private com.google.protobuf.Timestamp testTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + testTimeBuilder_; + /** + * + * + *
+     * The timestamp when the test was completed.
+     * 
+ * + * .google.protobuf.Timestamp test_time = 3; + * + * @return Whether the testTime field is set. + */ + public boolean hasTestTime() { + return testTimeBuilder_ != null || testTime_ != null; + } + /** + * + * + *
+     * The timestamp when the test was completed.
+     * 
+ * + * .google.protobuf.Timestamp test_time = 3; + * + * @return The testTime. + */ + public com.google.protobuf.Timestamp getTestTime() { + if (testTimeBuilder_ == null) { + return testTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : testTime_; + } else { + return testTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The timestamp when the test was completed.
+     * 
+ * + * .google.protobuf.Timestamp test_time = 3; + */ + public Builder setTestTime(com.google.protobuf.Timestamp value) { + if (testTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + testTime_ = value; + onChanged(); + } else { + testTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The timestamp when the test was completed.
+     * 
+ * + * .google.protobuf.Timestamp test_time = 3; + */ + public Builder setTestTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (testTimeBuilder_ == null) { + testTime_ = builderForValue.build(); + onChanged(); + } else { + testTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The timestamp when the test was completed.
+     * 
+ * + * .google.protobuf.Timestamp test_time = 3; + */ + public Builder mergeTestTime(com.google.protobuf.Timestamp value) { + if (testTimeBuilder_ == null) { + if (testTime_ != null) { + testTime_ = + com.google.protobuf.Timestamp.newBuilder(testTime_).mergeFrom(value).buildPartial(); + } else { + testTime_ = value; + } + onChanged(); + } else { + testTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The timestamp when the test was completed.
+     * 
+ * + * .google.protobuf.Timestamp test_time = 3; + */ + public Builder clearTestTime() { + if (testTimeBuilder_ == null) { + testTime_ = null; + onChanged(); + } else { + testTime_ = null; + testTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The timestamp when the test was completed.
+     * 
+ * + * .google.protobuf.Timestamp test_time = 3; + */ + public com.google.protobuf.Timestamp.Builder getTestTimeBuilder() { + + onChanged(); + return getTestTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The timestamp when the test was completed.
+     * 
+ * + * .google.protobuf.Timestamp test_time = 3; + */ + public com.google.protobuf.TimestampOrBuilder getTestTimeOrBuilder() { + if (testTimeBuilder_ != null) { + return testTimeBuilder_.getMessageOrBuilder(); + } else { + return testTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : testTime_; + } + } + /** + * + * + *
+     * The timestamp when the test was completed.
+     * 
+ * + * .google.protobuf.Timestamp test_time = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getTestTimeFieldBuilder() { + if (testTimeBuilder_ == null) { + testTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getTestTime(), getParentForChildren(), isClean()); + testTime_ = null; + } + return testTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.TestError) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.TestError) + private static final com.google.cloud.dialogflow.cx.v3.TestError DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.TestError(); + } + + public static com.google.cloud.dialogflow.cx.v3.TestError getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TestError parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TestError(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TestError getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestErrorOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestErrorOrBuilder.java new file mode 100644 index 000000000..1a0c9f147 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestErrorOrBuilder.java @@ -0,0 +1,120 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/test_case.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface TestErrorOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.TestError) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The test case resource name.
+   * 
+ * + * string test_case = 1 [(.google.api.resource_reference) = { ... } + * + * @return The testCase. + */ + java.lang.String getTestCase(); + /** + * + * + *
+   * The test case resource name.
+   * 
+ * + * string test_case = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for testCase. + */ + com.google.protobuf.ByteString getTestCaseBytes(); + + /** + * + * + *
+   * The status associated with the test.
+   * 
+ * + * .google.rpc.Status status = 2; + * + * @return Whether the status field is set. + */ + boolean hasStatus(); + /** + * + * + *
+   * The status associated with the test.
+   * 
+ * + * .google.rpc.Status status = 2; + * + * @return The status. + */ + com.google.rpc.Status getStatus(); + /** + * + * + *
+   * The status associated with the test.
+   * 
+ * + * .google.rpc.Status status = 2; + */ + com.google.rpc.StatusOrBuilder getStatusOrBuilder(); + + /** + * + * + *
+   * The timestamp when the test was completed.
+   * 
+ * + * .google.protobuf.Timestamp test_time = 3; + * + * @return Whether the testTime field is set. + */ + boolean hasTestTime(); + /** + * + * + *
+   * The timestamp when the test was completed.
+   * 
+ * + * .google.protobuf.Timestamp test_time = 3; + * + * @return The testTime. + */ + com.google.protobuf.Timestamp getTestTime(); + /** + * + * + *
+   * The timestamp when the test was completed.
+   * 
+ * + * .google.protobuf.Timestamp test_time = 3; + */ + com.google.protobuf.TimestampOrBuilder getTestTimeOrBuilder(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestResult.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestResult.java new file mode 100644 index 000000000..4bbcbc2a5 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestResult.java @@ -0,0 +1,176 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/test_case.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The test result for a test case and an agent environment.
+ * 
+ * + * Protobuf enum {@code google.cloud.dialogflow.cx.v3.TestResult} + */ +public enum TestResult implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Not specified. Should never be used.
+   * 
+ * + * TEST_RESULT_UNSPECIFIED = 0; + */ + TEST_RESULT_UNSPECIFIED(0), + /** + * + * + *
+   * The test passed.
+   * 
+ * + * PASSED = 1; + */ + PASSED(1), + /** + * + * + *
+   * The test did not pass.
+   * 
+ * + * FAILED = 2; + */ + FAILED(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Not specified. Should never be used.
+   * 
+ * + * TEST_RESULT_UNSPECIFIED = 0; + */ + public static final int TEST_RESULT_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * The test passed.
+   * 
+ * + * PASSED = 1; + */ + public static final int PASSED_VALUE = 1; + /** + * + * + *
+   * The test did not pass.
+   * 
+ * + * FAILED = 2; + */ + public static final int FAILED_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TestResult valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static TestResult forNumber(int value) { + switch (value) { + case 0: + return TEST_RESULT_UNSPECIFIED; + case 1: + return PASSED; + case 2: + return FAILED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public TestResult findValueByNumber(int number) { + return TestResult.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto.getDescriptor().getEnumTypes().get(0); + } + + private static final TestResult[] VALUES = values(); + + public static TestResult valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private TestResult(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3.TestResult) +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestRunDifference.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestRunDifference.java new file mode 100644 index 000000000..7c937156e --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestRunDifference.java @@ -0,0 +1,997 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/test_case.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The description of differences between original and replayed agent output.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.TestRunDifference} + */ +public final class TestRunDifference extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.TestRunDifference) + TestRunDifferenceOrBuilder { + private static final long serialVersionUID = 0L; + // Use TestRunDifference.newBuilder() to construct. + private TestRunDifference(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TestRunDifference() { + type_ = 0; + description_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TestRunDifference(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TestRunDifference( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_TestRunDifference_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_TestRunDifference_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.TestRunDifference.class, + com.google.cloud.dialogflow.cx.v3.TestRunDifference.Builder.class); + } + + /** + * + * + *
+   * What part of the message replay differs from the test case.
+   * 
+ * + * Protobuf enum {@code google.cloud.dialogflow.cx.v3.TestRunDifference.DiffType} + */ + public enum DiffType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Should never be used.
+     * 
+ * + * DIFF_TYPE_UNSPECIFIED = 0; + */ + DIFF_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * The intent.
+     * 
+ * + * INTENT = 1; + */ + INTENT(1), + /** + * + * + *
+     * The page.
+     * 
+ * + * PAGE = 2; + */ + PAGE(2), + /** + * + * + *
+     * The parameters.
+     * 
+ * + * PARAMETERS = 3; + */ + PARAMETERS(3), + /** + * + * + *
+     * The message utterance.
+     * 
+ * + * UTTERANCE = 4; + */ + UTTERANCE(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Should never be used.
+     * 
+ * + * DIFF_TYPE_UNSPECIFIED = 0; + */ + public static final int DIFF_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The intent.
+     * 
+ * + * INTENT = 1; + */ + public static final int INTENT_VALUE = 1; + /** + * + * + *
+     * The page.
+     * 
+ * + * PAGE = 2; + */ + public static final int PAGE_VALUE = 2; + /** + * + * + *
+     * The parameters.
+     * 
+ * + * PARAMETERS = 3; + */ + public static final int PARAMETERS_VALUE = 3; + /** + * + * + *
+     * The message utterance.
+     * 
+ * + * UTTERANCE = 4; + */ + public static final int UTTERANCE_VALUE = 4; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DiffType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static DiffType forNumber(int value) { + switch (value) { + case 0: + return DIFF_TYPE_UNSPECIFIED; + case 1: + return INTENT; + case 2: + return PAGE; + case 3: + return PARAMETERS; + case 4: + return UTTERANCE; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public DiffType findValueByNumber(int number) { + return DiffType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestRunDifference.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final DiffType[] VALUES = values(); + + public static DiffType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private DiffType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3.TestRunDifference.DiffType) + } + + public static final int TYPE_FIELD_NUMBER = 1; + private int type_; + /** + * + * + *
+   * The type of diff.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.TestRunDifference.DiffType type = 1; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+   * The type of diff.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.TestRunDifference.DiffType type = 1; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TestRunDifference.DiffType getType() { + @SuppressWarnings("deprecation") + com.google.cloud.dialogflow.cx.v3.TestRunDifference.DiffType result = + com.google.cloud.dialogflow.cx.v3.TestRunDifference.DiffType.valueOf(type_); + return result == null + ? com.google.cloud.dialogflow.cx.v3.TestRunDifference.DiffType.UNRECOGNIZED + : result; + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + private volatile java.lang.Object description_; + /** + * + * + *
+   * A description of the diff, showing the actual output vs expected output.
+   * 
+ * + * string description = 2; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * A description of the diff, showing the actual output vs expected output.
+   * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (type_ + != com.google.cloud.dialogflow.cx.v3.TestRunDifference.DiffType.DIFF_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, type_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (type_ + != com.google.cloud.dialogflow.cx.v3.TestRunDifference.DiffType.DIFF_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, type_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.TestRunDifference)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.TestRunDifference other = + (com.google.cloud.dialogflow.cx.v3.TestRunDifference) obj; + + if (type_ != other.type_) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.TestRunDifference parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.TestRunDifference parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.TestRunDifference parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.TestRunDifference parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.TestRunDifference parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.TestRunDifference parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.TestRunDifference parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.TestRunDifference parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.TestRunDifference parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.TestRunDifference parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.TestRunDifference parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.TestRunDifference parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.dialogflow.cx.v3.TestRunDifference prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The description of differences between original and replayed agent output.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.TestRunDifference} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.TestRunDifference) + com.google.cloud.dialogflow.cx.v3.TestRunDifferenceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_TestRunDifference_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_TestRunDifference_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.TestRunDifference.class, + com.google.cloud.dialogflow.cx.v3.TestRunDifference.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.TestRunDifference.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + type_ = 0; + + description_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_TestRunDifference_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TestRunDifference getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.TestRunDifference.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TestRunDifference build() { + com.google.cloud.dialogflow.cx.v3.TestRunDifference result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TestRunDifference buildPartial() { + com.google.cloud.dialogflow.cx.v3.TestRunDifference result = + new com.google.cloud.dialogflow.cx.v3.TestRunDifference(this); + result.type_ = type_; + result.description_ = description_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.TestRunDifference) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.TestRunDifference) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.TestRunDifference other) { + if (other == com.google.cloud.dialogflow.cx.v3.TestRunDifference.getDefaultInstance()) + return this; + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.TestRunDifference parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.TestRunDifference) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int type_ = 0; + /** + * + * + *
+     * The type of diff.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TestRunDifference.DiffType type = 1; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+     * The type of diff.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TestRunDifference.DiffType type = 1; + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + + type_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The type of diff.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TestRunDifference.DiffType type = 1; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TestRunDifference.DiffType getType() { + @SuppressWarnings("deprecation") + com.google.cloud.dialogflow.cx.v3.TestRunDifference.DiffType result = + com.google.cloud.dialogflow.cx.v3.TestRunDifference.DiffType.valueOf(type_); + return result == null + ? com.google.cloud.dialogflow.cx.v3.TestRunDifference.DiffType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The type of diff.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TestRunDifference.DiffType type = 1; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.dialogflow.cx.v3.TestRunDifference.DiffType value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The type of diff.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TestRunDifference.DiffType type = 1; + * + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * A description of the diff, showing the actual output vs expected output.
+     * 
+ * + * string description = 2; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A description of the diff, showing the actual output vs expected output.
+     * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A description of the diff, showing the actual output vs expected output.
+     * 
+ * + * string description = 2; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A description of the diff, showing the actual output vs expected output.
+     * 
+ * + * string description = 2; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+     * A description of the diff, showing the actual output vs expected output.
+     * 
+ * + * string description = 2; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.TestRunDifference) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.TestRunDifference) + private static final com.google.cloud.dialogflow.cx.v3.TestRunDifference DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.TestRunDifference(); + } + + public static com.google.cloud.dialogflow.cx.v3.TestRunDifference getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TestRunDifference parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TestRunDifference(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TestRunDifference getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestRunDifferenceOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestRunDifferenceOrBuilder.java new file mode 100644 index 000000000..d03d72ce3 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestRunDifferenceOrBuilder.java @@ -0,0 +1,75 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/test_case.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface TestRunDifferenceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.TestRunDifference) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The type of diff.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.TestRunDifference.DiffType type = 1; + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
+   * The type of diff.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.TestRunDifference.DiffType type = 1; + * + * @return The type. + */ + com.google.cloud.dialogflow.cx.v3.TestRunDifference.DiffType getType(); + + /** + * + * + *
+   * A description of the diff, showing the actual output vs expected output.
+   * 
+ * + * string description = 2; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * A description of the diff, showing the actual output vs expected output.
+   * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionCoverage.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionCoverage.java new file mode 100644 index 000000000..cfd9ee2be --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionCoverage.java @@ -0,0 +1,4421 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/test_case.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * Transition coverage represents the percentage of all possible transitions
+ * present within any of a parent's test cases.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.TransitionCoverage} + */ +public final class TransitionCoverage extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.TransitionCoverage) + TransitionCoverageOrBuilder { + private static final long serialVersionUID = 0L; + // Use TransitionCoverage.newBuilder() to construct. + private TransitionCoverage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TransitionCoverage() { + transitions_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TransitionCoverage(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TransitionCoverage( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + transitions_ = + new java.util.ArrayList< + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition>(); + mutable_bitField0_ |= 0x00000001; + } + transitions_.add( + input.readMessage( + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition.parser(), + extensionRegistry)); + break; + } + case 21: + { + coverageScore_ = input.readFloat(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + transitions_ = java.util.Collections.unmodifiableList(transitions_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_TransitionCoverage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_TransitionCoverage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.class, + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Builder.class); + } + + public interface TransitionNodeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Indicates a transition to a [Page][google.cloud.dialogflow.cx.v3.Page]. Only some fields such as name and
+     * displayname will be set.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Page page = 1; + * + * @return Whether the page field is set. + */ + boolean hasPage(); + /** + * + * + *
+     * Indicates a transition to a [Page][google.cloud.dialogflow.cx.v3.Page]. Only some fields such as name and
+     * displayname will be set.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Page page = 1; + * + * @return The page. + */ + com.google.cloud.dialogflow.cx.v3.Page getPage(); + /** + * + * + *
+     * Indicates a transition to a [Page][google.cloud.dialogflow.cx.v3.Page]. Only some fields such as name and
+     * displayname will be set.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Page page = 1; + */ + com.google.cloud.dialogflow.cx.v3.PageOrBuilder getPageOrBuilder(); + + /** + * + * + *
+     * Indicates a transition to a [Flow][google.cloud.dialogflow.cx.v3.Flow]. Only some fields such as name and
+     * displayname will be set.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Flow flow = 2; + * + * @return Whether the flow field is set. + */ + boolean hasFlow(); + /** + * + * + *
+     * Indicates a transition to a [Flow][google.cloud.dialogflow.cx.v3.Flow]. Only some fields such as name and
+     * displayname will be set.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Flow flow = 2; + * + * @return The flow. + */ + com.google.cloud.dialogflow.cx.v3.Flow getFlow(); + /** + * + * + *
+     * Indicates a transition to a [Flow][google.cloud.dialogflow.cx.v3.Flow]. Only some fields such as name and
+     * displayname will be set.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Flow flow = 2; + */ + com.google.cloud.dialogflow.cx.v3.FlowOrBuilder getFlowOrBuilder(); + + public com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode.KindCase + getKindCase(); + } + /** + * + * + *
+   * The source or target of a transition.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode} + */ + public static final class TransitionNode extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode) + TransitionNodeOrBuilder { + private static final long serialVersionUID = 0L; + // Use TransitionNode.newBuilder() to construct. + private TransitionNode(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TransitionNode() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TransitionNode(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TransitionNode( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.dialogflow.cx.v3.Page.Builder subBuilder = null; + if (kindCase_ == 1) { + subBuilder = ((com.google.cloud.dialogflow.cx.v3.Page) kind_).toBuilder(); + } + kind_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.Page.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.dialogflow.cx.v3.Page) kind_); + kind_ = subBuilder.buildPartial(); + } + kindCase_ = 1; + break; + } + case 18: + { + com.google.cloud.dialogflow.cx.v3.Flow.Builder subBuilder = null; + if (kindCase_ == 2) { + subBuilder = ((com.google.cloud.dialogflow.cx.v3.Flow) kind_).toBuilder(); + } + kind_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.Flow.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.dialogflow.cx.v3.Flow) kind_); + kind_ = subBuilder.buildPartial(); + } + kindCase_ = 2; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_TransitionCoverage_TransitionNode_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_TransitionCoverage_TransitionNode_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode.class, + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode.Builder.class); + } + + private int kindCase_ = 0; + private java.lang.Object kind_; + + public enum KindCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + PAGE(1), + FLOW(2), + KIND_NOT_SET(0); + private final int value; + + private KindCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static KindCase valueOf(int value) { + return forNumber(value); + } + + public static KindCase forNumber(int value) { + switch (value) { + case 1: + return PAGE; + case 2: + return FLOW; + case 0: + return KIND_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public KindCase getKindCase() { + return KindCase.forNumber(kindCase_); + } + + public static final int PAGE_FIELD_NUMBER = 1; + /** + * + * + *
+     * Indicates a transition to a [Page][google.cloud.dialogflow.cx.v3.Page]. Only some fields such as name and
+     * displayname will be set.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Page page = 1; + * + * @return Whether the page field is set. + */ + @java.lang.Override + public boolean hasPage() { + return kindCase_ == 1; + } + /** + * + * + *
+     * Indicates a transition to a [Page][google.cloud.dialogflow.cx.v3.Page]. Only some fields such as name and
+     * displayname will be set.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Page page = 1; + * + * @return The page. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Page getPage() { + if (kindCase_ == 1) { + return (com.google.cloud.dialogflow.cx.v3.Page) kind_; + } + return com.google.cloud.dialogflow.cx.v3.Page.getDefaultInstance(); + } + /** + * + * + *
+     * Indicates a transition to a [Page][google.cloud.dialogflow.cx.v3.Page]. Only some fields such as name and
+     * displayname will be set.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Page page = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.PageOrBuilder getPageOrBuilder() { + if (kindCase_ == 1) { + return (com.google.cloud.dialogflow.cx.v3.Page) kind_; + } + return com.google.cloud.dialogflow.cx.v3.Page.getDefaultInstance(); + } + + public static final int FLOW_FIELD_NUMBER = 2; + /** + * + * + *
+     * Indicates a transition to a [Flow][google.cloud.dialogflow.cx.v3.Flow]. Only some fields such as name and
+     * displayname will be set.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Flow flow = 2; + * + * @return Whether the flow field is set. + */ + @java.lang.Override + public boolean hasFlow() { + return kindCase_ == 2; + } + /** + * + * + *
+     * Indicates a transition to a [Flow][google.cloud.dialogflow.cx.v3.Flow]. Only some fields such as name and
+     * displayname will be set.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Flow flow = 2; + * + * @return The flow. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Flow getFlow() { + if (kindCase_ == 2) { + return (com.google.cloud.dialogflow.cx.v3.Flow) kind_; + } + return com.google.cloud.dialogflow.cx.v3.Flow.getDefaultInstance(); + } + /** + * + * + *
+     * Indicates a transition to a [Flow][google.cloud.dialogflow.cx.v3.Flow]. Only some fields such as name and
+     * displayname will be set.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Flow flow = 2; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.FlowOrBuilder getFlowOrBuilder() { + if (kindCase_ == 2) { + return (com.google.cloud.dialogflow.cx.v3.Flow) kind_; + } + return com.google.cloud.dialogflow.cx.v3.Flow.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (kindCase_ == 1) { + output.writeMessage(1, (com.google.cloud.dialogflow.cx.v3.Page) kind_); + } + if (kindCase_ == 2) { + output.writeMessage(2, (com.google.cloud.dialogflow.cx.v3.Flow) kind_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (kindCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.dialogflow.cx.v3.Page) kind_); + } + if (kindCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.dialogflow.cx.v3.Flow) kind_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode other = + (com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode) obj; + + if (!getKindCase().equals(other.getKindCase())) return false; + switch (kindCase_) { + case 1: + if (!getPage().equals(other.getPage())) return false; + break; + case 2: + if (!getFlow().equals(other.getFlow())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (kindCase_) { + case 1: + hash = (37 * hash) + PAGE_FIELD_NUMBER; + hash = (53 * hash) + getPage().hashCode(); + break; + case 2: + hash = (37 * hash) + FLOW_FIELD_NUMBER; + hash = (53 * hash) + getFlow().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * The source or target of a transition.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode) + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNodeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_TransitionCoverage_TransitionNode_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_TransitionCoverage_TransitionNode_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode.class, + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode.Builder.class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + kindCase_ = 0; + kind_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_TransitionCoverage_TransitionNode_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode build() { + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode buildPartial() { + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode result = + new com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode(this); + if (kindCase_ == 1) { + if (pageBuilder_ == null) { + result.kind_ = kind_; + } else { + result.kind_ = pageBuilder_.build(); + } + } + if (kindCase_ == 2) { + if (flowBuilder_ == null) { + result.kind_ = kind_; + } else { + result.kind_ = flowBuilder_.build(); + } + } + result.kindCase_ = kindCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode other) { + if (other + == com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode + .getDefaultInstance()) return this; + switch (other.getKindCase()) { + case PAGE: + { + mergePage(other.getPage()); + break; + } + case FLOW: + { + mergeFlow(other.getFlow()); + break; + } + case KIND_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int kindCase_ = 0; + private java.lang.Object kind_; + + public KindCase getKindCase() { + return KindCase.forNumber(kindCase_); + } + + public Builder clearKind() { + kindCase_ = 0; + kind_ = null; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Page, + com.google.cloud.dialogflow.cx.v3.Page.Builder, + com.google.cloud.dialogflow.cx.v3.PageOrBuilder> + pageBuilder_; + /** + * + * + *
+       * Indicates a transition to a [Page][google.cloud.dialogflow.cx.v3.Page]. Only some fields such as name and
+       * displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Page page = 1; + * + * @return Whether the page field is set. + */ + @java.lang.Override + public boolean hasPage() { + return kindCase_ == 1; + } + /** + * + * + *
+       * Indicates a transition to a [Page][google.cloud.dialogflow.cx.v3.Page]. Only some fields such as name and
+       * displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Page page = 1; + * + * @return The page. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Page getPage() { + if (pageBuilder_ == null) { + if (kindCase_ == 1) { + return (com.google.cloud.dialogflow.cx.v3.Page) kind_; + } + return com.google.cloud.dialogflow.cx.v3.Page.getDefaultInstance(); + } else { + if (kindCase_ == 1) { + return pageBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3.Page.getDefaultInstance(); + } + } + /** + * + * + *
+       * Indicates a transition to a [Page][google.cloud.dialogflow.cx.v3.Page]. Only some fields such as name and
+       * displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Page page = 1; + */ + public Builder setPage(com.google.cloud.dialogflow.cx.v3.Page value) { + if (pageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + pageBuilder_.setMessage(value); + } + kindCase_ = 1; + return this; + } + /** + * + * + *
+       * Indicates a transition to a [Page][google.cloud.dialogflow.cx.v3.Page]. Only some fields such as name and
+       * displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Page page = 1; + */ + public Builder setPage(com.google.cloud.dialogflow.cx.v3.Page.Builder builderForValue) { + if (pageBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + pageBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 1; + return this; + } + /** + * + * + *
+       * Indicates a transition to a [Page][google.cloud.dialogflow.cx.v3.Page]. Only some fields such as name and
+       * displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Page page = 1; + */ + public Builder mergePage(com.google.cloud.dialogflow.cx.v3.Page value) { + if (pageBuilder_ == null) { + if (kindCase_ == 1 + && kind_ != com.google.cloud.dialogflow.cx.v3.Page.getDefaultInstance()) { + kind_ = + com.google.cloud.dialogflow.cx.v3.Page.newBuilder( + (com.google.cloud.dialogflow.cx.v3.Page) kind_) + .mergeFrom(value) + .buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 1) { + pageBuilder_.mergeFrom(value); + } + pageBuilder_.setMessage(value); + } + kindCase_ = 1; + return this; + } + /** + * + * + *
+       * Indicates a transition to a [Page][google.cloud.dialogflow.cx.v3.Page]. Only some fields such as name and
+       * displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Page page = 1; + */ + public Builder clearPage() { + if (pageBuilder_ == null) { + if (kindCase_ == 1) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 1) { + kindCase_ = 0; + kind_ = null; + } + pageBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Indicates a transition to a [Page][google.cloud.dialogflow.cx.v3.Page]. Only some fields such as name and
+       * displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Page page = 1; + */ + public com.google.cloud.dialogflow.cx.v3.Page.Builder getPageBuilder() { + return getPageFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Indicates a transition to a [Page][google.cloud.dialogflow.cx.v3.Page]. Only some fields such as name and
+       * displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Page page = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.PageOrBuilder getPageOrBuilder() { + if ((kindCase_ == 1) && (pageBuilder_ != null)) { + return pageBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 1) { + return (com.google.cloud.dialogflow.cx.v3.Page) kind_; + } + return com.google.cloud.dialogflow.cx.v3.Page.getDefaultInstance(); + } + } + /** + * + * + *
+       * Indicates a transition to a [Page][google.cloud.dialogflow.cx.v3.Page]. Only some fields such as name and
+       * displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Page page = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Page, + com.google.cloud.dialogflow.cx.v3.Page.Builder, + com.google.cloud.dialogflow.cx.v3.PageOrBuilder> + getPageFieldBuilder() { + if (pageBuilder_ == null) { + if (!(kindCase_ == 1)) { + kind_ = com.google.cloud.dialogflow.cx.v3.Page.getDefaultInstance(); + } + pageBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Page, + com.google.cloud.dialogflow.cx.v3.Page.Builder, + com.google.cloud.dialogflow.cx.v3.PageOrBuilder>( + (com.google.cloud.dialogflow.cx.v3.Page) kind_, + getParentForChildren(), + isClean()); + kind_ = null; + } + kindCase_ = 1; + onChanged(); + ; + return pageBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Flow, + com.google.cloud.dialogflow.cx.v3.Flow.Builder, + com.google.cloud.dialogflow.cx.v3.FlowOrBuilder> + flowBuilder_; + /** + * + * + *
+       * Indicates a transition to a [Flow][google.cloud.dialogflow.cx.v3.Flow]. Only some fields such as name and
+       * displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Flow flow = 2; + * + * @return Whether the flow field is set. + */ + @java.lang.Override + public boolean hasFlow() { + return kindCase_ == 2; + } + /** + * + * + *
+       * Indicates a transition to a [Flow][google.cloud.dialogflow.cx.v3.Flow]. Only some fields such as name and
+       * displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Flow flow = 2; + * + * @return The flow. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Flow getFlow() { + if (flowBuilder_ == null) { + if (kindCase_ == 2) { + return (com.google.cloud.dialogflow.cx.v3.Flow) kind_; + } + return com.google.cloud.dialogflow.cx.v3.Flow.getDefaultInstance(); + } else { + if (kindCase_ == 2) { + return flowBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3.Flow.getDefaultInstance(); + } + } + /** + * + * + *
+       * Indicates a transition to a [Flow][google.cloud.dialogflow.cx.v3.Flow]. Only some fields such as name and
+       * displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Flow flow = 2; + */ + public Builder setFlow(com.google.cloud.dialogflow.cx.v3.Flow value) { + if (flowBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + flowBuilder_.setMessage(value); + } + kindCase_ = 2; + 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.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Flow flow = 2; + */ + public Builder setFlow(com.google.cloud.dialogflow.cx.v3.Flow.Builder builderForValue) { + if (flowBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + flowBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 2; + 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.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Flow flow = 2; + */ + public Builder mergeFlow(com.google.cloud.dialogflow.cx.v3.Flow value) { + if (flowBuilder_ == null) { + if (kindCase_ == 2 + && kind_ != com.google.cloud.dialogflow.cx.v3.Flow.getDefaultInstance()) { + kind_ = + com.google.cloud.dialogflow.cx.v3.Flow.newBuilder( + (com.google.cloud.dialogflow.cx.v3.Flow) kind_) + .mergeFrom(value) + .buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 2) { + flowBuilder_.mergeFrom(value); + } + flowBuilder_.setMessage(value); + } + kindCase_ = 2; + 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.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Flow flow = 2; + */ + public Builder clearFlow() { + if (flowBuilder_ == null) { + if (kindCase_ == 2) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 2) { + kindCase_ = 0; + kind_ = null; + } + flowBuilder_.clear(); + } + 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.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Flow flow = 2; + */ + public com.google.cloud.dialogflow.cx.v3.Flow.Builder getFlowBuilder() { + return getFlowFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Indicates a transition to a [Flow][google.cloud.dialogflow.cx.v3.Flow]. Only some fields such as name and
+       * displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Flow flow = 2; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.FlowOrBuilder getFlowOrBuilder() { + if ((kindCase_ == 2) && (flowBuilder_ != null)) { + return flowBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 2) { + return (com.google.cloud.dialogflow.cx.v3.Flow) kind_; + } + return com.google.cloud.dialogflow.cx.v3.Flow.getDefaultInstance(); + } + } + /** + * + * + *
+       * Indicates a transition to a [Flow][google.cloud.dialogflow.cx.v3.Flow]. Only some fields such as name and
+       * displayname will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Flow flow = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Flow, + com.google.cloud.dialogflow.cx.v3.Flow.Builder, + com.google.cloud.dialogflow.cx.v3.FlowOrBuilder> + getFlowFieldBuilder() { + if (flowBuilder_ == null) { + if (!(kindCase_ == 2)) { + kind_ = com.google.cloud.dialogflow.cx.v3.Flow.getDefaultInstance(); + } + flowBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Flow, + com.google.cloud.dialogflow.cx.v3.Flow.Builder, + com.google.cloud.dialogflow.cx.v3.FlowOrBuilder>( + (com.google.cloud.dialogflow.cx.v3.Flow) kind_, + getParentForChildren(), + isClean()); + kind_ = null; + } + kindCase_ = 2; + onChanged(); + ; + return flowBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode) + private static final com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode(); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TransitionNode parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TransitionNode(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface TransitionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The start node of a transition.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode source = 1; + * + * @return Whether the source field is set. + */ + boolean hasSource(); + /** + * + * + *
+     * The start node of a transition.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode source = 1; + * + * @return The source. + */ + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode getSource(); + /** + * + * + *
+     * The start node of a transition.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode source = 1; + */ + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNodeOrBuilder + getSourceOrBuilder(); + + /** + * + * + *
+     * The index of a transition in the transition list. Starting from 0.
+     * 
+ * + * int32 index = 4; + * + * @return The index. + */ + int getIndex(); + + /** + * + * + *
+     * The end node of a transition.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode target = 2; + * + * @return Whether the target field is set. + */ + boolean hasTarget(); + /** + * + * + *
+     * The end node of a transition.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode target = 2; + * + * @return The target. + */ + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode getTarget(); + /** + * + * + *
+     * The end node of a transition.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode target = 2; + */ + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNodeOrBuilder + getTargetOrBuilder(); + + /** + * + * + *
+     * Whether or not the transition is covered by at least one of the
+     * agent's test cases.
+     * 
+ * + * bool covered = 3; + * + * @return The covered. + */ + boolean getCovered(); + + /** + * + * + *
+     * Intent route or condition route.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionRoute transition_route = 5; + * + * @return Whether the transitionRoute field is set. + */ + boolean hasTransitionRoute(); + /** + * + * + *
+     * Intent route or condition route.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionRoute transition_route = 5; + * + * @return The transitionRoute. + */ + com.google.cloud.dialogflow.cx.v3.TransitionRoute getTransitionRoute(); + /** + * + * + *
+     * Intent route or condition route.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionRoute transition_route = 5; + */ + com.google.cloud.dialogflow.cx.v3.TransitionRouteOrBuilder getTransitionRouteOrBuilder(); + + /** + * + * + *
+     * Event handler.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.EventHandler event_handler = 6; + * + * @return Whether the eventHandler field is set. + */ + boolean hasEventHandler(); + /** + * + * + *
+     * Event handler.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.EventHandler event_handler = 6; + * + * @return The eventHandler. + */ + com.google.cloud.dialogflow.cx.v3.EventHandler getEventHandler(); + /** + * + * + *
+     * Event handler.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.EventHandler event_handler = 6; + */ + com.google.cloud.dialogflow.cx.v3.EventHandlerOrBuilder getEventHandlerOrBuilder(); + + public com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition.DetailCase + getDetailCase(); + } + /** + * + * + *
+   * A transition in the agent's graph.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition} + */ + public static final class Transition extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition) + TransitionOrBuilder { + private static final long serialVersionUID = 0L; + // Use Transition.newBuilder() to construct. + private Transition(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Transition() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Transition(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Transition( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode.Builder + subBuilder = null; + if (source_ != null) { + subBuilder = source_.toBuilder(); + } + source_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(source_); + source_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode.Builder + subBuilder = null; + if (target_ != null) { + subBuilder = target_.toBuilder(); + } + target_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(target_); + target_ = subBuilder.buildPartial(); + } + + break; + } + case 24: + { + covered_ = input.readBool(); + break; + } + case 32: + { + index_ = input.readInt32(); + break; + } + case 42: + { + com.google.cloud.dialogflow.cx.v3.TransitionRoute.Builder subBuilder = null; + if (detailCase_ == 5) { + subBuilder = + ((com.google.cloud.dialogflow.cx.v3.TransitionRoute) detail_).toBuilder(); + } + detail_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.TransitionRoute.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.dialogflow.cx.v3.TransitionRoute) detail_); + detail_ = subBuilder.buildPartial(); + } + detailCase_ = 5; + break; + } + case 50: + { + com.google.cloud.dialogflow.cx.v3.EventHandler.Builder subBuilder = null; + if (detailCase_ == 6) { + subBuilder = + ((com.google.cloud.dialogflow.cx.v3.EventHandler) detail_).toBuilder(); + } + detail_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.EventHandler.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.dialogflow.cx.v3.EventHandler) detail_); + detail_ = subBuilder.buildPartial(); + } + detailCase_ = 6; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_TransitionCoverage_Transition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_TransitionCoverage_Transition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition.class, + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition.Builder.class); + } + + private int detailCase_ = 0; + private java.lang.Object detail_; + + public enum DetailCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + TRANSITION_ROUTE(5), + EVENT_HANDLER(6), + DETAIL_NOT_SET(0); + private final int value; + + private DetailCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DetailCase valueOf(int value) { + return forNumber(value); + } + + public static DetailCase forNumber(int value) { + switch (value) { + case 5: + return TRANSITION_ROUTE; + case 6: + return EVENT_HANDLER; + case 0: + return DETAIL_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public DetailCase getDetailCase() { + return DetailCase.forNumber(detailCase_); + } + + public static final int SOURCE_FIELD_NUMBER = 1; + private com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode source_; + /** + * + * + *
+     * The start node of a transition.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode source = 1; + * + * @return Whether the source field is set. + */ + @java.lang.Override + public boolean hasSource() { + return source_ != null; + } + /** + * + * + *
+     * The start node of a transition.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode source = 1; + * + * @return The source. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode getSource() { + return source_ == null + ? com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode.getDefaultInstance() + : source_; + } + /** + * + * + *
+     * The start node of a transition.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode source = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNodeOrBuilder + getSourceOrBuilder() { + return getSource(); + } + + public static final int INDEX_FIELD_NUMBER = 4; + private int index_; + /** + * + * + *
+     * The index of a transition in the transition list. Starting from 0.
+     * 
+ * + * int32 index = 4; + * + * @return The index. + */ + @java.lang.Override + public int getIndex() { + return index_; + } + + public static final int TARGET_FIELD_NUMBER = 2; + private com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode target_; + /** + * + * + *
+     * The end node of a transition.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode target = 2; + * + * @return Whether the target field is set. + */ + @java.lang.Override + public boolean hasTarget() { + return target_ != null; + } + /** + * + * + *
+     * The end node of a transition.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode target = 2; + * + * @return The target. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode getTarget() { + return target_ == null + ? com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode.getDefaultInstance() + : target_; + } + /** + * + * + *
+     * The end node of a transition.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode target = 2; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNodeOrBuilder + getTargetOrBuilder() { + return getTarget(); + } + + public static final int COVERED_FIELD_NUMBER = 3; + private boolean covered_; + /** + * + * + *
+     * Whether or not the transition is covered by at least one of the
+     * agent's test cases.
+     * 
+ * + * bool covered = 3; + * + * @return The covered. + */ + @java.lang.Override + public boolean getCovered() { + return covered_; + } + + public static final int TRANSITION_ROUTE_FIELD_NUMBER = 5; + /** + * + * + *
+     * Intent route or condition route.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionRoute transition_route = 5; + * + * @return Whether the transitionRoute field is set. + */ + @java.lang.Override + public boolean hasTransitionRoute() { + return detailCase_ == 5; + } + /** + * + * + *
+     * Intent route or condition route.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionRoute transition_route = 5; + * + * @return The transitionRoute. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TransitionRoute getTransitionRoute() { + if (detailCase_ == 5) { + return (com.google.cloud.dialogflow.cx.v3.TransitionRoute) detail_; + } + return com.google.cloud.dialogflow.cx.v3.TransitionRoute.getDefaultInstance(); + } + /** + * + * + *
+     * Intent route or condition route.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionRoute transition_route = 5; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TransitionRouteOrBuilder + getTransitionRouteOrBuilder() { + if (detailCase_ == 5) { + return (com.google.cloud.dialogflow.cx.v3.TransitionRoute) detail_; + } + return com.google.cloud.dialogflow.cx.v3.TransitionRoute.getDefaultInstance(); + } + + public static final int EVENT_HANDLER_FIELD_NUMBER = 6; + /** + * + * + *
+     * Event handler.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.EventHandler event_handler = 6; + * + * @return Whether the eventHandler field is set. + */ + @java.lang.Override + public boolean hasEventHandler() { + return detailCase_ == 6; + } + /** + * + * + *
+     * Event handler.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.EventHandler event_handler = 6; + * + * @return The eventHandler. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.EventHandler getEventHandler() { + if (detailCase_ == 6) { + return (com.google.cloud.dialogflow.cx.v3.EventHandler) detail_; + } + return com.google.cloud.dialogflow.cx.v3.EventHandler.getDefaultInstance(); + } + /** + * + * + *
+     * Event handler.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.EventHandler event_handler = 6; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.EventHandlerOrBuilder getEventHandlerOrBuilder() { + if (detailCase_ == 6) { + return (com.google.cloud.dialogflow.cx.v3.EventHandler) detail_; + } + return com.google.cloud.dialogflow.cx.v3.EventHandler.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (source_ != null) { + output.writeMessage(1, getSource()); + } + if (target_ != null) { + output.writeMessage(2, getTarget()); + } + if (covered_ != false) { + output.writeBool(3, covered_); + } + if (index_ != 0) { + output.writeInt32(4, index_); + } + if (detailCase_ == 5) { + output.writeMessage(5, (com.google.cloud.dialogflow.cx.v3.TransitionRoute) detail_); + } + if (detailCase_ == 6) { + output.writeMessage(6, (com.google.cloud.dialogflow.cx.v3.EventHandler) detail_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (source_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getSource()); + } + if (target_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTarget()); + } + if (covered_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, covered_); + } + if (index_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, index_); + } + if (detailCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.cloud.dialogflow.cx.v3.TransitionRoute) detail_); + } + if (detailCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.cloud.dialogflow.cx.v3.EventHandler) detail_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition other = + (com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition) obj; + + if (hasSource() != other.hasSource()) return false; + if (hasSource()) { + if (!getSource().equals(other.getSource())) return false; + } + if (getIndex() != other.getIndex()) return false; + if (hasTarget() != other.hasTarget()) return false; + if (hasTarget()) { + if (!getTarget().equals(other.getTarget())) return false; + } + if (getCovered() != other.getCovered()) return false; + if (!getDetailCase().equals(other.getDetailCase())) return false; + switch (detailCase_) { + case 5: + if (!getTransitionRoute().equals(other.getTransitionRoute())) return false; + break; + case 6: + if (!getEventHandler().equals(other.getEventHandler())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasSource()) { + hash = (37 * hash) + SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getSource().hashCode(); + } + hash = (37 * hash) + INDEX_FIELD_NUMBER; + hash = (53 * hash) + getIndex(); + if (hasTarget()) { + hash = (37 * hash) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + getTarget().hashCode(); + } + hash = (37 * hash) + COVERED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getCovered()); + switch (detailCase_) { + case 5: + hash = (37 * hash) + TRANSITION_ROUTE_FIELD_NUMBER; + hash = (53 * hash) + getTransitionRoute().hashCode(); + break; + case 6: + hash = (37 * hash) + EVENT_HANDLER_FIELD_NUMBER; + hash = (53 * hash) + getEventHandler().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * A transition in the agent's graph.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition) + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_TransitionCoverage_Transition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_TransitionCoverage_Transition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition.class, + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition.Builder.class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (sourceBuilder_ == null) { + source_ = null; + } else { + source_ = null; + sourceBuilder_ = null; + } + index_ = 0; + + if (targetBuilder_ == null) { + target_ = null; + } else { + target_ = null; + targetBuilder_ = null; + } + covered_ = false; + + detailCase_ = 0; + detail_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_TransitionCoverage_Transition_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition build() { + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition buildPartial() { + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition result = + new com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition(this); + if (sourceBuilder_ == null) { + result.source_ = source_; + } else { + result.source_ = sourceBuilder_.build(); + } + result.index_ = index_; + if (targetBuilder_ == null) { + result.target_ = target_; + } else { + result.target_ = targetBuilder_.build(); + } + result.covered_ = covered_; + if (detailCase_ == 5) { + if (transitionRouteBuilder_ == null) { + result.detail_ = detail_; + } else { + result.detail_ = transitionRouteBuilder_.build(); + } + } + if (detailCase_ == 6) { + if (eventHandlerBuilder_ == null) { + result.detail_ = detail_; + } else { + result.detail_ = eventHandlerBuilder_.build(); + } + } + result.detailCase_ = detailCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition other) { + if (other + == com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition.getDefaultInstance()) + return this; + if (other.hasSource()) { + mergeSource(other.getSource()); + } + if (other.getIndex() != 0) { + setIndex(other.getIndex()); + } + if (other.hasTarget()) { + mergeTarget(other.getTarget()); + } + if (other.getCovered() != false) { + setCovered(other.getCovered()); + } + switch (other.getDetailCase()) { + case TRANSITION_ROUTE: + { + mergeTransitionRoute(other.getTransitionRoute()); + break; + } + case EVENT_HANDLER: + { + mergeEventHandler(other.getEventHandler()); + break; + } + case DETAIL_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int detailCase_ = 0; + private java.lang.Object detail_; + + public DetailCase getDetailCase() { + return DetailCase.forNumber(detailCase_); + } + + public Builder clearDetail() { + detailCase_ = 0; + detail_ = null; + onChanged(); + return this; + } + + private com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode source_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode, + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode.Builder, + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNodeOrBuilder> + sourceBuilder_; + /** + * + * + *
+       * The start node of a transition.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode source = 1; + * + * @return Whether the source field is set. + */ + public boolean hasSource() { + return sourceBuilder_ != null || source_ != null; + } + /** + * + * + *
+       * The start node of a transition.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode source = 1; + * + * @return The source. + */ + public com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode getSource() { + if (sourceBuilder_ == null) { + return source_ == null + ? com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode + .getDefaultInstance() + : source_; + } else { + return sourceBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The start node of a transition.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode source = 1; + */ + public Builder setSource( + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode value) { + if (sourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + sourceBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * The start node of a transition.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode source = 1; + */ + public Builder setSource( + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode.Builder + builderForValue) { + if (sourceBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + sourceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * The start node of a transition.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode source = 1; + */ + public Builder mergeSource( + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode value) { + if (sourceBuilder_ == null) { + if (source_ != null) { + source_ = + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode.newBuilder( + source_) + .mergeFrom(value) + .buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + sourceBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * The start node of a transition.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode source = 1; + */ + public Builder clearSource() { + if (sourceBuilder_ == null) { + source_ = null; + onChanged(); + } else { + source_ = null; + sourceBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * The start node of a transition.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode source = 1; + */ + public com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode.Builder + getSourceBuilder() { + + onChanged(); + return getSourceFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The start node of a transition.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode source = 1; + */ + public com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNodeOrBuilder + getSourceOrBuilder() { + if (sourceBuilder_ != null) { + return sourceBuilder_.getMessageOrBuilder(); + } else { + return source_ == null + ? com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode + .getDefaultInstance() + : source_; + } + } + /** + * + * + *
+       * The start node of a transition.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode source = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode, + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode.Builder, + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNodeOrBuilder> + getSourceFieldBuilder() { + if (sourceBuilder_ == null) { + sourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode, + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode.Builder, + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNodeOrBuilder>( + getSource(), getParentForChildren(), isClean()); + source_ = null; + } + return sourceBuilder_; + } + + private int index_; + /** + * + * + *
+       * The index of a transition in the transition list. Starting from 0.
+       * 
+ * + * int32 index = 4; + * + * @return The index. + */ + @java.lang.Override + public int getIndex() { + return index_; + } + /** + * + * + *
+       * The index of a transition in the transition list. Starting from 0.
+       * 
+ * + * int32 index = 4; + * + * @param value The index to set. + * @return This builder for chaining. + */ + public Builder setIndex(int value) { + + index_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The index of a transition in the transition list. Starting from 0.
+       * 
+ * + * int32 index = 4; + * + * @return This builder for chaining. + */ + public Builder clearIndex() { + + index_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode target_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode, + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode.Builder, + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNodeOrBuilder> + targetBuilder_; + /** + * + * + *
+       * The end node of a transition.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode target = 2; + * + * @return Whether the target field is set. + */ + public boolean hasTarget() { + return targetBuilder_ != null || target_ != null; + } + /** + * + * + *
+       * The end node of a transition.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode target = 2; + * + * @return The target. + */ + public com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode getTarget() { + if (targetBuilder_ == null) { + return target_ == null + ? com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode + .getDefaultInstance() + : target_; + } else { + return targetBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The end node of a transition.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode target = 2; + */ + public Builder setTarget( + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode value) { + if (targetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + target_ = value; + onChanged(); + } else { + targetBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * The end node of a transition.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode target = 2; + */ + public Builder setTarget( + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode.Builder + builderForValue) { + if (targetBuilder_ == null) { + target_ = builderForValue.build(); + onChanged(); + } else { + targetBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * The end node of a transition.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode target = 2; + */ + public Builder mergeTarget( + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode value) { + if (targetBuilder_ == null) { + if (target_ != null) { + target_ = + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode.newBuilder( + target_) + .mergeFrom(value) + .buildPartial(); + } else { + target_ = value; + } + onChanged(); + } else { + targetBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * The end node of a transition.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode target = 2; + */ + public Builder clearTarget() { + if (targetBuilder_ == null) { + target_ = null; + onChanged(); + } else { + target_ = null; + targetBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * The end node of a transition.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode target = 2; + */ + public com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode.Builder + getTargetBuilder() { + + onChanged(); + return getTargetFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The end node of a transition.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode target = 2; + */ + public com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNodeOrBuilder + getTargetOrBuilder() { + if (targetBuilder_ != null) { + return targetBuilder_.getMessageOrBuilder(); + } else { + return target_ == null + ? com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode + .getDefaultInstance() + : target_; + } + } + /** + * + * + *
+       * The end node of a transition.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode target = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode, + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode.Builder, + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNodeOrBuilder> + getTargetFieldBuilder() { + if (targetBuilder_ == null) { + targetBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode, + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode.Builder, + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNodeOrBuilder>( + getTarget(), getParentForChildren(), isClean()); + target_ = null; + } + return targetBuilder_; + } + + private boolean covered_; + /** + * + * + *
+       * Whether or not the transition is covered by at least one of the
+       * agent's test cases.
+       * 
+ * + * bool covered = 3; + * + * @return The covered. + */ + @java.lang.Override + public boolean getCovered() { + return covered_; + } + /** + * + * + *
+       * Whether or not the transition is covered by at least one of the
+       * agent's test cases.
+       * 
+ * + * bool covered = 3; + * + * @param value The covered to set. + * @return This builder for chaining. + */ + public Builder setCovered(boolean value) { + + covered_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Whether or not the transition is covered by at least one of the
+       * agent's test cases.
+       * 
+ * + * bool covered = 3; + * + * @return This builder for chaining. + */ + public Builder clearCovered() { + + covered_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TransitionRoute, + com.google.cloud.dialogflow.cx.v3.TransitionRoute.Builder, + com.google.cloud.dialogflow.cx.v3.TransitionRouteOrBuilder> + transitionRouteBuilder_; + /** + * + * + *
+       * Intent route or condition route.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionRoute transition_route = 5; + * + * @return Whether the transitionRoute field is set. + */ + @java.lang.Override + public boolean hasTransitionRoute() { + return detailCase_ == 5; + } + /** + * + * + *
+       * Intent route or condition route.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionRoute transition_route = 5; + * + * @return The transitionRoute. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TransitionRoute getTransitionRoute() { + if (transitionRouteBuilder_ == null) { + if (detailCase_ == 5) { + return (com.google.cloud.dialogflow.cx.v3.TransitionRoute) detail_; + } + return com.google.cloud.dialogflow.cx.v3.TransitionRoute.getDefaultInstance(); + } else { + if (detailCase_ == 5) { + return transitionRouteBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3.TransitionRoute.getDefaultInstance(); + } + } + /** + * + * + *
+       * Intent route or condition route.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionRoute transition_route = 5; + */ + public Builder setTransitionRoute(com.google.cloud.dialogflow.cx.v3.TransitionRoute value) { + if (transitionRouteBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + detail_ = value; + onChanged(); + } else { + transitionRouteBuilder_.setMessage(value); + } + detailCase_ = 5; + return this; + } + /** + * + * + *
+       * Intent route or condition route.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionRoute transition_route = 5; + */ + public Builder setTransitionRoute( + com.google.cloud.dialogflow.cx.v3.TransitionRoute.Builder builderForValue) { + if (transitionRouteBuilder_ == null) { + detail_ = builderForValue.build(); + onChanged(); + } else { + transitionRouteBuilder_.setMessage(builderForValue.build()); + } + detailCase_ = 5; + return this; + } + /** + * + * + *
+       * Intent route or condition route.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionRoute transition_route = 5; + */ + public Builder mergeTransitionRoute(com.google.cloud.dialogflow.cx.v3.TransitionRoute value) { + if (transitionRouteBuilder_ == null) { + if (detailCase_ == 5 + && detail_ + != com.google.cloud.dialogflow.cx.v3.TransitionRoute.getDefaultInstance()) { + detail_ = + com.google.cloud.dialogflow.cx.v3.TransitionRoute.newBuilder( + (com.google.cloud.dialogflow.cx.v3.TransitionRoute) detail_) + .mergeFrom(value) + .buildPartial(); + } else { + detail_ = value; + } + onChanged(); + } else { + if (detailCase_ == 5) { + transitionRouteBuilder_.mergeFrom(value); + } + transitionRouteBuilder_.setMessage(value); + } + detailCase_ = 5; + return this; + } + /** + * + * + *
+       * Intent route or condition route.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionRoute transition_route = 5; + */ + public Builder clearTransitionRoute() { + if (transitionRouteBuilder_ == null) { + if (detailCase_ == 5) { + detailCase_ = 0; + detail_ = null; + onChanged(); + } + } else { + if (detailCase_ == 5) { + detailCase_ = 0; + detail_ = null; + } + transitionRouteBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Intent route or condition route.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionRoute transition_route = 5; + */ + public com.google.cloud.dialogflow.cx.v3.TransitionRoute.Builder getTransitionRouteBuilder() { + return getTransitionRouteFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Intent route or condition route.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionRoute transition_route = 5; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TransitionRouteOrBuilder + getTransitionRouteOrBuilder() { + if ((detailCase_ == 5) && (transitionRouteBuilder_ != null)) { + return transitionRouteBuilder_.getMessageOrBuilder(); + } else { + if (detailCase_ == 5) { + return (com.google.cloud.dialogflow.cx.v3.TransitionRoute) detail_; + } + return com.google.cloud.dialogflow.cx.v3.TransitionRoute.getDefaultInstance(); + } + } + /** + * + * + *
+       * Intent route or condition route.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionRoute transition_route = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TransitionRoute, + com.google.cloud.dialogflow.cx.v3.TransitionRoute.Builder, + com.google.cloud.dialogflow.cx.v3.TransitionRouteOrBuilder> + getTransitionRouteFieldBuilder() { + if (transitionRouteBuilder_ == null) { + if (!(detailCase_ == 5)) { + detail_ = com.google.cloud.dialogflow.cx.v3.TransitionRoute.getDefaultInstance(); + } + transitionRouteBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TransitionRoute, + com.google.cloud.dialogflow.cx.v3.TransitionRoute.Builder, + com.google.cloud.dialogflow.cx.v3.TransitionRouteOrBuilder>( + (com.google.cloud.dialogflow.cx.v3.TransitionRoute) detail_, + getParentForChildren(), + isClean()); + detail_ = null; + } + detailCase_ = 5; + onChanged(); + ; + return transitionRouteBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.EventHandler, + com.google.cloud.dialogflow.cx.v3.EventHandler.Builder, + com.google.cloud.dialogflow.cx.v3.EventHandlerOrBuilder> + eventHandlerBuilder_; + /** + * + * + *
+       * Event handler.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.EventHandler event_handler = 6; + * + * @return Whether the eventHandler field is set. + */ + @java.lang.Override + public boolean hasEventHandler() { + return detailCase_ == 6; + } + /** + * + * + *
+       * Event handler.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.EventHandler event_handler = 6; + * + * @return The eventHandler. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.EventHandler getEventHandler() { + if (eventHandlerBuilder_ == null) { + if (detailCase_ == 6) { + return (com.google.cloud.dialogflow.cx.v3.EventHandler) detail_; + } + return com.google.cloud.dialogflow.cx.v3.EventHandler.getDefaultInstance(); + } else { + if (detailCase_ == 6) { + return eventHandlerBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3.EventHandler.getDefaultInstance(); + } + } + /** + * + * + *
+       * Event handler.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.EventHandler event_handler = 6; + */ + public Builder setEventHandler(com.google.cloud.dialogflow.cx.v3.EventHandler value) { + if (eventHandlerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + detail_ = value; + onChanged(); + } else { + eventHandlerBuilder_.setMessage(value); + } + detailCase_ = 6; + return this; + } + /** + * + * + *
+       * Event handler.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.EventHandler event_handler = 6; + */ + public Builder setEventHandler( + com.google.cloud.dialogflow.cx.v3.EventHandler.Builder builderForValue) { + if (eventHandlerBuilder_ == null) { + detail_ = builderForValue.build(); + onChanged(); + } else { + eventHandlerBuilder_.setMessage(builderForValue.build()); + } + detailCase_ = 6; + return this; + } + /** + * + * + *
+       * Event handler.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.EventHandler event_handler = 6; + */ + public Builder mergeEventHandler(com.google.cloud.dialogflow.cx.v3.EventHandler value) { + if (eventHandlerBuilder_ == null) { + if (detailCase_ == 6 + && detail_ != com.google.cloud.dialogflow.cx.v3.EventHandler.getDefaultInstance()) { + detail_ = + com.google.cloud.dialogflow.cx.v3.EventHandler.newBuilder( + (com.google.cloud.dialogflow.cx.v3.EventHandler) detail_) + .mergeFrom(value) + .buildPartial(); + } else { + detail_ = value; + } + onChanged(); + } else { + if (detailCase_ == 6) { + eventHandlerBuilder_.mergeFrom(value); + } + eventHandlerBuilder_.setMessage(value); + } + detailCase_ = 6; + return this; + } + /** + * + * + *
+       * Event handler.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.EventHandler event_handler = 6; + */ + public Builder clearEventHandler() { + if (eventHandlerBuilder_ == null) { + if (detailCase_ == 6) { + detailCase_ = 0; + detail_ = null; + onChanged(); + } + } else { + if (detailCase_ == 6) { + detailCase_ = 0; + detail_ = null; + } + eventHandlerBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Event handler.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.EventHandler event_handler = 6; + */ + public com.google.cloud.dialogflow.cx.v3.EventHandler.Builder getEventHandlerBuilder() { + return getEventHandlerFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Event handler.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.EventHandler event_handler = 6; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.EventHandlerOrBuilder getEventHandlerOrBuilder() { + if ((detailCase_ == 6) && (eventHandlerBuilder_ != null)) { + return eventHandlerBuilder_.getMessageOrBuilder(); + } else { + if (detailCase_ == 6) { + return (com.google.cloud.dialogflow.cx.v3.EventHandler) detail_; + } + return com.google.cloud.dialogflow.cx.v3.EventHandler.getDefaultInstance(); + } + } + /** + * + * + *
+       * Event handler.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.EventHandler event_handler = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.EventHandler, + com.google.cloud.dialogflow.cx.v3.EventHandler.Builder, + com.google.cloud.dialogflow.cx.v3.EventHandlerOrBuilder> + getEventHandlerFieldBuilder() { + if (eventHandlerBuilder_ == null) { + if (!(detailCase_ == 6)) { + detail_ = com.google.cloud.dialogflow.cx.v3.EventHandler.getDefaultInstance(); + } + eventHandlerBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.EventHandler, + com.google.cloud.dialogflow.cx.v3.EventHandler.Builder, + com.google.cloud.dialogflow.cx.v3.EventHandlerOrBuilder>( + (com.google.cloud.dialogflow.cx.v3.EventHandler) detail_, + getParentForChildren(), + isClean()); + detail_ = null; + } + detailCase_ = 6; + onChanged(); + ; + return eventHandlerBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition) + private static final com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition(); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Transition parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Transition(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int TRANSITIONS_FIELD_NUMBER = 1; + private java.util.List + transitions_; + /** + * + * + *
+   * The list of Transitions present in the agent.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition transitions = 1; + * + */ + @java.lang.Override + public java.util.List + getTransitionsList() { + return transitions_; + } + /** + * + * + *
+   * The list of Transitions present in the agent.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition transitions = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionOrBuilder> + getTransitionsOrBuilderList() { + return transitions_; + } + /** + * + * + *
+   * The list of Transitions present in the agent.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition transitions = 1; + * + */ + @java.lang.Override + public int getTransitionsCount() { + return transitions_.size(); + } + /** + * + * + *
+   * The list of Transitions present in the agent.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition transitions = 1; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition getTransitions(int index) { + return transitions_.get(index); + } + /** + * + * + *
+   * The list of Transitions present in the agent.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition transitions = 1; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionOrBuilder + getTransitionsOrBuilder(int index) { + return transitions_.get(index); + } + + public static final int COVERAGE_SCORE_FIELD_NUMBER = 2; + private float coverageScore_; + /** + * + * + *
+   * The percent of transitions in the agent that are covered.
+   * 
+ * + * float coverage_score = 2; + * + * @return The coverageScore. + */ + @java.lang.Override + public float getCoverageScore() { + return coverageScore_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < transitions_.size(); i++) { + output.writeMessage(1, transitions_.get(i)); + } + if (coverageScore_ != 0F) { + output.writeFloat(2, coverageScore_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < transitions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, transitions_.get(i)); + } + if (coverageScore_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, coverageScore_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.TransitionCoverage)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.TransitionCoverage other = + (com.google.cloud.dialogflow.cx.v3.TransitionCoverage) obj; + + if (!getTransitionsList().equals(other.getTransitionsList())) return false; + if (java.lang.Float.floatToIntBits(getCoverageScore()) + != java.lang.Float.floatToIntBits(other.getCoverageScore())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getTransitionsCount() > 0) { + hash = (37 * hash) + TRANSITIONS_FIELD_NUMBER; + hash = (53 * hash) + getTransitionsList().hashCode(); + } + hash = (37 * hash) + COVERAGE_SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getCoverageScore()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionCoverage parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionCoverage parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionCoverage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionCoverage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionCoverage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionCoverage parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionCoverage parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionCoverage parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionCoverage parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionCoverage parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionCoverage parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionCoverage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.dialogflow.cx.v3.TransitionCoverage prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Transition coverage represents the percentage of all possible transitions
+   * present within any of a parent's test cases.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.TransitionCoverage} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.TransitionCoverage) + com.google.cloud.dialogflow.cx.v3.TransitionCoverageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_TransitionCoverage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_TransitionCoverage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.class, + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.TransitionCoverage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getTransitionsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (transitionsBuilder_ == null) { + transitions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + transitionsBuilder_.clear(); + } + coverageScore_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_TransitionCoverage_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TransitionCoverage getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.TransitionCoverage.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TransitionCoverage build() { + com.google.cloud.dialogflow.cx.v3.TransitionCoverage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TransitionCoverage buildPartial() { + com.google.cloud.dialogflow.cx.v3.TransitionCoverage result = + new com.google.cloud.dialogflow.cx.v3.TransitionCoverage(this); + int from_bitField0_ = bitField0_; + if (transitionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + transitions_ = java.util.Collections.unmodifiableList(transitions_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.transitions_ = transitions_; + } else { + result.transitions_ = transitionsBuilder_.build(); + } + result.coverageScore_ = coverageScore_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.TransitionCoverage) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.TransitionCoverage) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.TransitionCoverage other) { + if (other == com.google.cloud.dialogflow.cx.v3.TransitionCoverage.getDefaultInstance()) + return this; + if (transitionsBuilder_ == null) { + if (!other.transitions_.isEmpty()) { + if (transitions_.isEmpty()) { + transitions_ = other.transitions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTransitionsIsMutable(); + transitions_.addAll(other.transitions_); + } + onChanged(); + } + } else { + if (!other.transitions_.isEmpty()) { + if (transitionsBuilder_.isEmpty()) { + transitionsBuilder_.dispose(); + transitionsBuilder_ = null; + transitions_ = other.transitions_; + bitField0_ = (bitField0_ & ~0x00000001); + transitionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTransitionsFieldBuilder() + : null; + } else { + transitionsBuilder_.addAllMessages(other.transitions_); + } + } + } + if (other.getCoverageScore() != 0F) { + setCoverageScore(other.getCoverageScore()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.TransitionCoverage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.TransitionCoverage) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List + transitions_ = java.util.Collections.emptyList(); + + private void ensureTransitionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + transitions_ = + new java.util.ArrayList< + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition>(transitions_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition, + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition.Builder, + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionOrBuilder> + transitionsBuilder_; + + /** + * + * + *
+     * The list of Transitions present in the agent.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition transitions = 1; + * + */ + public java.util.List + getTransitionsList() { + if (transitionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(transitions_); + } else { + return transitionsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of Transitions present in the agent.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition transitions = 1; + * + */ + public int getTransitionsCount() { + if (transitionsBuilder_ == null) { + return transitions_.size(); + } else { + return transitionsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of Transitions present in the agent.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition transitions = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition getTransitions( + int index) { + if (transitionsBuilder_ == null) { + return transitions_.get(index); + } else { + return transitionsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of Transitions present in the agent.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition transitions = 1; + * + */ + public Builder setTransitions( + int index, com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition value) { + if (transitionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTransitionsIsMutable(); + transitions_.set(index, value); + onChanged(); + } else { + transitionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of Transitions present in the agent.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition transitions = 1; + * + */ + public Builder setTransitions( + int index, + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition.Builder builderForValue) { + if (transitionsBuilder_ == null) { + ensureTransitionsIsMutable(); + transitions_.set(index, builderForValue.build()); + onChanged(); + } else { + transitionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Transitions present in the agent.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition transitions = 1; + * + */ + public Builder addTransitions( + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition value) { + if (transitionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTransitionsIsMutable(); + transitions_.add(value); + onChanged(); + } else { + transitionsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of Transitions present in the agent.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition transitions = 1; + * + */ + public Builder addTransitions( + int index, com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition value) { + if (transitionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTransitionsIsMutable(); + transitions_.add(index, value); + onChanged(); + } else { + transitionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of Transitions present in the agent.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition transitions = 1; + * + */ + public Builder addTransitions( + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition.Builder builderForValue) { + if (transitionsBuilder_ == null) { + ensureTransitionsIsMutable(); + transitions_.add(builderForValue.build()); + onChanged(); + } else { + transitionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Transitions present in the agent.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition transitions = 1; + * + */ + public Builder addTransitions( + int index, + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition.Builder builderForValue) { + if (transitionsBuilder_ == null) { + ensureTransitionsIsMutable(); + transitions_.add(index, builderForValue.build()); + onChanged(); + } else { + transitionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Transitions present in the agent.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition transitions = 1; + * + */ + public Builder addAllTransitions( + java.lang.Iterable< + ? extends com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition> + values) { + if (transitionsBuilder_ == null) { + ensureTransitionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, transitions_); + onChanged(); + } else { + transitionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of Transitions present in the agent.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition transitions = 1; + * + */ + public Builder clearTransitions() { + if (transitionsBuilder_ == null) { + transitions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + transitionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of Transitions present in the agent.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition transitions = 1; + * + */ + public Builder removeTransitions(int index) { + if (transitionsBuilder_ == null) { + ensureTransitionsIsMutable(); + transitions_.remove(index); + onChanged(); + } else { + transitionsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of Transitions present in the agent.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition transitions = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition.Builder + getTransitionsBuilder(int index) { + return getTransitionsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of Transitions present in the agent.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition transitions = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionOrBuilder + getTransitionsOrBuilder(int index) { + if (transitionsBuilder_ == null) { + return transitions_.get(index); + } else { + return transitionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of Transitions present in the agent.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition transitions = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionOrBuilder> + getTransitionsOrBuilderList() { + if (transitionsBuilder_ != null) { + return transitionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(transitions_); + } + } + /** + * + * + *
+     * The list of Transitions present in the agent.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition transitions = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition.Builder + addTransitionsBuilder() { + return getTransitionsFieldBuilder() + .addBuilder( + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition.getDefaultInstance()); + } + /** + * + * + *
+     * The list of Transitions present in the agent.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition transitions = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition.Builder + addTransitionsBuilder(int index) { + return getTransitionsFieldBuilder() + .addBuilder( + index, + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition.getDefaultInstance()); + } + /** + * + * + *
+     * The list of Transitions present in the agent.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition transitions = 1; + * + */ + public java.util.List + getTransitionsBuilderList() { + return getTransitionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition, + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition.Builder, + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionOrBuilder> + getTransitionsFieldBuilder() { + if (transitionsBuilder_ == null) { + transitionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition, + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition.Builder, + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionOrBuilder>( + transitions_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + transitions_ = null; + } + return transitionsBuilder_; + } + + private float coverageScore_; + /** + * + * + *
+     * The percent of transitions in the agent that are covered.
+     * 
+ * + * float coverage_score = 2; + * + * @return The coverageScore. + */ + @java.lang.Override + public float getCoverageScore() { + return coverageScore_; + } + /** + * + * + *
+     * The percent of transitions in the agent that are covered.
+     * 
+ * + * float coverage_score = 2; + * + * @param value The coverageScore to set. + * @return This builder for chaining. + */ + public Builder setCoverageScore(float value) { + + coverageScore_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The percent of transitions in the agent that are covered.
+     * 
+ * + * float coverage_score = 2; + * + * @return This builder for chaining. + */ + public Builder clearCoverageScore() { + + coverageScore_ = 0F; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.TransitionCoverage) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.TransitionCoverage) + private static final com.google.cloud.dialogflow.cx.v3.TransitionCoverage DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.TransitionCoverage(); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionCoverage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TransitionCoverage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TransitionCoverage(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TransitionCoverage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionCoverageOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionCoverageOrBuilder.java new file mode 100644 index 000000000..07d42e46e --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionCoverageOrBuilder.java @@ -0,0 +1,97 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/test_case.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface TransitionCoverageOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.TransitionCoverage) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of Transitions present in the agent.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition transitions = 1; + * + */ + java.util.List + getTransitionsList(); + /** + * + * + *
+   * The list of Transitions present in the agent.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition transitions = 1; + * + */ + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition getTransitions(int index); + /** + * + * + *
+   * The list of Transitions present in the agent.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition transitions = 1; + * + */ + int getTransitionsCount(); + /** + * + * + *
+   * The list of Transitions present in the agent.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition transitions = 1; + * + */ + java.util.List + getTransitionsOrBuilderList(); + /** + * + * + *
+   * The list of Transitions present in the agent.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition transitions = 1; + * + */ + com.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionOrBuilder getTransitionsOrBuilder( + int index); + + /** + * + * + *
+   * The percent of transitions in the agent that are covered.
+   * 
+ * + * float coverage_score = 2; + * + * @return The coverageScore. + */ + float getCoverageScore(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroup.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroup.java index d2d4d4a16..e84672647 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroup.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroup.java @@ -253,10 +253,6 @@ public com.google.protobuf.ByteString getDisplayNameBytes() { * *
    * Transition routes associated with the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup].
-   * Duplicate transition routes (i.e. using the same
-   * [`intent`][google.cloud.dialogflow.cx.v3.TransitionRoute.intent]) are not allowed.
-   * Note that the [`name`][google.cloud.dialogflow.cx.v3.TransitionRoute.name] field is not used in the
-   * transition route group scope.
    * 
* * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 5; @@ -271,10 +267,6 @@ public com.google.protobuf.ByteString getDisplayNameBytes() { * *
    * Transition routes associated with the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup].
-   * Duplicate transition routes (i.e. using the same
-   * [`intent`][google.cloud.dialogflow.cx.v3.TransitionRoute.intent]) are not allowed.
-   * Note that the [`name`][google.cloud.dialogflow.cx.v3.TransitionRoute.name] field is not used in the
-   * transition route group scope.
    * 
* * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 5; @@ -289,10 +281,6 @@ public com.google.protobuf.ByteString getDisplayNameBytes() { * *
    * Transition routes associated with the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup].
-   * Duplicate transition routes (i.e. using the same
-   * [`intent`][google.cloud.dialogflow.cx.v3.TransitionRoute.intent]) are not allowed.
-   * Note that the [`name`][google.cloud.dialogflow.cx.v3.TransitionRoute.name] field is not used in the
-   * transition route group scope.
    * 
* * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 5; @@ -306,10 +294,6 @@ public int getTransitionRoutesCount() { * *
    * Transition routes associated with the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup].
-   * Duplicate transition routes (i.e. using the same
-   * [`intent`][google.cloud.dialogflow.cx.v3.TransitionRoute.intent]) are not allowed.
-   * Note that the [`name`][google.cloud.dialogflow.cx.v3.TransitionRoute.name] field is not used in the
-   * transition route group scope.
    * 
* * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 5; @@ -323,10 +307,6 @@ public com.google.cloud.dialogflow.cx.v3.TransitionRoute getTransitionRoutes(int * *
    * Transition routes associated with the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup].
-   * Duplicate transition routes (i.e. using the same
-   * [`intent`][google.cloud.dialogflow.cx.v3.TransitionRoute.intent]) are not allowed.
-   * Note that the [`name`][google.cloud.dialogflow.cx.v3.TransitionRoute.name] field is not used in the
-   * transition route group scope.
    * 
* * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 5; @@ -991,10 +971,6 @@ private void ensureTransitionRoutesIsMutable() { * *
      * Transition routes associated with the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup].
-     * Duplicate transition routes (i.e. using the same
-     * [`intent`][google.cloud.dialogflow.cx.v3.TransitionRoute.intent]) are not allowed.
-     * Note that the [`name`][google.cloud.dialogflow.cx.v3.TransitionRoute.name] field is not used in the
-     * transition route group scope.
      * 
* * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 5; @@ -1012,10 +988,6 @@ private void ensureTransitionRoutesIsMutable() { * *
      * Transition routes associated with the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup].
-     * Duplicate transition routes (i.e. using the same
-     * [`intent`][google.cloud.dialogflow.cx.v3.TransitionRoute.intent]) are not allowed.
-     * Note that the [`name`][google.cloud.dialogflow.cx.v3.TransitionRoute.name] field is not used in the
-     * transition route group scope.
      * 
* * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 5; @@ -1032,10 +1004,6 @@ public int getTransitionRoutesCount() { * *
      * Transition routes associated with the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup].
-     * Duplicate transition routes (i.e. using the same
-     * [`intent`][google.cloud.dialogflow.cx.v3.TransitionRoute.intent]) are not allowed.
-     * Note that the [`name`][google.cloud.dialogflow.cx.v3.TransitionRoute.name] field is not used in the
-     * transition route group scope.
      * 
* * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 5; @@ -1052,10 +1020,6 @@ public com.google.cloud.dialogflow.cx.v3.TransitionRoute getTransitionRoutes(int * *
      * Transition routes associated with the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup].
-     * Duplicate transition routes (i.e. using the same
-     * [`intent`][google.cloud.dialogflow.cx.v3.TransitionRoute.intent]) are not allowed.
-     * Note that the [`name`][google.cloud.dialogflow.cx.v3.TransitionRoute.name] field is not used in the
-     * transition route group scope.
      * 
* * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 5; @@ -1079,10 +1043,6 @@ public Builder setTransitionRoutes( * *
      * Transition routes associated with the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup].
-     * Duplicate transition routes (i.e. using the same
-     * [`intent`][google.cloud.dialogflow.cx.v3.TransitionRoute.intent]) are not allowed.
-     * Note that the [`name`][google.cloud.dialogflow.cx.v3.TransitionRoute.name] field is not used in the
-     * transition route group scope.
      * 
* * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 5; @@ -1103,10 +1063,6 @@ public Builder setTransitionRoutes( * *
      * Transition routes associated with the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup].
-     * Duplicate transition routes (i.e. using the same
-     * [`intent`][google.cloud.dialogflow.cx.v3.TransitionRoute.intent]) are not allowed.
-     * Note that the [`name`][google.cloud.dialogflow.cx.v3.TransitionRoute.name] field is not used in the
-     * transition route group scope.
      * 
* * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 5; @@ -1129,10 +1085,6 @@ public Builder addTransitionRoutes(com.google.cloud.dialogflow.cx.v3.TransitionR * *
      * Transition routes associated with the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup].
-     * Duplicate transition routes (i.e. using the same
-     * [`intent`][google.cloud.dialogflow.cx.v3.TransitionRoute.intent]) are not allowed.
-     * Note that the [`name`][google.cloud.dialogflow.cx.v3.TransitionRoute.name] field is not used in the
-     * transition route group scope.
      * 
* * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 5; @@ -1156,10 +1108,6 @@ public Builder addTransitionRoutes( * *
      * Transition routes associated with the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup].
-     * Duplicate transition routes (i.e. using the same
-     * [`intent`][google.cloud.dialogflow.cx.v3.TransitionRoute.intent]) are not allowed.
-     * Note that the [`name`][google.cloud.dialogflow.cx.v3.TransitionRoute.name] field is not used in the
-     * transition route group scope.
      * 
* * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 5; @@ -1180,10 +1128,6 @@ public Builder addTransitionRoutes( * *
      * Transition routes associated with the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup].
-     * Duplicate transition routes (i.e. using the same
-     * [`intent`][google.cloud.dialogflow.cx.v3.TransitionRoute.intent]) are not allowed.
-     * Note that the [`name`][google.cloud.dialogflow.cx.v3.TransitionRoute.name] field is not used in the
-     * transition route group scope.
      * 
* * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 5; @@ -1204,10 +1148,6 @@ public Builder addTransitionRoutes( * *
      * Transition routes associated with the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup].
-     * Duplicate transition routes (i.e. using the same
-     * [`intent`][google.cloud.dialogflow.cx.v3.TransitionRoute.intent]) are not allowed.
-     * Note that the [`name`][google.cloud.dialogflow.cx.v3.TransitionRoute.name] field is not used in the
-     * transition route group scope.
      * 
* * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 5; @@ -1228,10 +1168,6 @@ public Builder addAllTransitionRoutes( * *
      * Transition routes associated with the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup].
-     * Duplicate transition routes (i.e. using the same
-     * [`intent`][google.cloud.dialogflow.cx.v3.TransitionRoute.intent]) are not allowed.
-     * Note that the [`name`][google.cloud.dialogflow.cx.v3.TransitionRoute.name] field is not used in the
-     * transition route group scope.
      * 
* * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 5; @@ -1251,10 +1187,6 @@ public Builder clearTransitionRoutes() { * *
      * Transition routes associated with the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup].
-     * Duplicate transition routes (i.e. using the same
-     * [`intent`][google.cloud.dialogflow.cx.v3.TransitionRoute.intent]) are not allowed.
-     * Note that the [`name`][google.cloud.dialogflow.cx.v3.TransitionRoute.name] field is not used in the
-     * transition route group scope.
      * 
* * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 5; @@ -1274,10 +1206,6 @@ public Builder removeTransitionRoutes(int index) { * *
      * Transition routes associated with the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup].
-     * Duplicate transition routes (i.e. using the same
-     * [`intent`][google.cloud.dialogflow.cx.v3.TransitionRoute.intent]) are not allowed.
-     * Note that the [`name`][google.cloud.dialogflow.cx.v3.TransitionRoute.name] field is not used in the
-     * transition route group scope.
      * 
* * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 5; @@ -1291,10 +1219,6 @@ public com.google.cloud.dialogflow.cx.v3.TransitionRoute.Builder getTransitionRo * *
      * Transition routes associated with the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup].
-     * Duplicate transition routes (i.e. using the same
-     * [`intent`][google.cloud.dialogflow.cx.v3.TransitionRoute.intent]) are not allowed.
-     * Note that the [`name`][google.cloud.dialogflow.cx.v3.TransitionRoute.name] field is not used in the
-     * transition route group scope.
      * 
* * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 5; @@ -1312,10 +1236,6 @@ public com.google.cloud.dialogflow.cx.v3.TransitionRouteOrBuilder getTransitionR * *
      * Transition routes associated with the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup].
-     * Duplicate transition routes (i.e. using the same
-     * [`intent`][google.cloud.dialogflow.cx.v3.TransitionRoute.intent]) are not allowed.
-     * Note that the [`name`][google.cloud.dialogflow.cx.v3.TransitionRoute.name] field is not used in the
-     * transition route group scope.
      * 
* * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 5; @@ -1333,10 +1253,6 @@ public com.google.cloud.dialogflow.cx.v3.TransitionRouteOrBuilder getTransitionR * *
      * Transition routes associated with the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup].
-     * Duplicate transition routes (i.e. using the same
-     * [`intent`][google.cloud.dialogflow.cx.v3.TransitionRoute.intent]) are not allowed.
-     * Note that the [`name`][google.cloud.dialogflow.cx.v3.TransitionRoute.name] field is not used in the
-     * transition route group scope.
      * 
* * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 5; @@ -1350,10 +1266,6 @@ public com.google.cloud.dialogflow.cx.v3.TransitionRoute.Builder addTransitionRo * *
      * Transition routes associated with the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup].
-     * Duplicate transition routes (i.e. using the same
-     * [`intent`][google.cloud.dialogflow.cx.v3.TransitionRoute.intent]) are not allowed.
-     * Note that the [`name`][google.cloud.dialogflow.cx.v3.TransitionRoute.name] field is not used in the
-     * transition route group scope.
      * 
* * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 5; @@ -1369,10 +1281,6 @@ public com.google.cloud.dialogflow.cx.v3.TransitionRoute.Builder addTransitionRo * *
      * Transition routes associated with the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup].
-     * Duplicate transition routes (i.e. using the same
-     * [`intent`][google.cloud.dialogflow.cx.v3.TransitionRoute.intent]) are not allowed.
-     * Note that the [`name`][google.cloud.dialogflow.cx.v3.TransitionRoute.name] field is not used in the
-     * transition route group scope.
      * 
* * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 5; diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupOrBuilder.java index 931624216..844c8b31d 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupOrBuilder.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupOrBuilder.java @@ -88,10 +88,6 @@ public interface TransitionRouteGroupOrBuilder * *
    * Transition routes associated with the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup].
-   * Duplicate transition routes (i.e. using the same
-   * [`intent`][google.cloud.dialogflow.cx.v3.TransitionRoute.intent]) are not allowed.
-   * Note that the [`name`][google.cloud.dialogflow.cx.v3.TransitionRoute.name] field is not used in the
-   * transition route group scope.
    * 
* * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 5; @@ -102,10 +98,6 @@ public interface TransitionRouteGroupOrBuilder * *
    * Transition routes associated with the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup].
-   * Duplicate transition routes (i.e. using the same
-   * [`intent`][google.cloud.dialogflow.cx.v3.TransitionRoute.intent]) are not allowed.
-   * Note that the [`name`][google.cloud.dialogflow.cx.v3.TransitionRoute.name] field is not used in the
-   * transition route group scope.
    * 
* * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 5; @@ -116,10 +108,6 @@ public interface TransitionRouteGroupOrBuilder * *
    * Transition routes associated with the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup].
-   * Duplicate transition routes (i.e. using the same
-   * [`intent`][google.cloud.dialogflow.cx.v3.TransitionRoute.intent]) are not allowed.
-   * Note that the [`name`][google.cloud.dialogflow.cx.v3.TransitionRoute.name] field is not used in the
-   * transition route group scope.
    * 
* * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 5; @@ -130,10 +118,6 @@ public interface TransitionRouteGroupOrBuilder * *
    * Transition routes associated with the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup].
-   * Duplicate transition routes (i.e. using the same
-   * [`intent`][google.cloud.dialogflow.cx.v3.TransitionRoute.intent]) are not allowed.
-   * Note that the [`name`][google.cloud.dialogflow.cx.v3.TransitionRoute.name] field is not used in the
-   * transition route group scope.
    * 
* * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 5; @@ -145,10 +129,6 @@ public interface TransitionRouteGroupOrBuilder * *
    * Transition routes associated with the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup].
-   * Duplicate transition routes (i.e. using the same
-   * [`intent`][google.cloud.dialogflow.cx.v3.TransitionRoute.intent]) are not allowed.
-   * Note that the [`name`][google.cloud.dialogflow.cx.v3.TransitionRoute.name] field is not used in the
-   * transition route group scope.
    * 
* * repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 5; diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateExperimentRequest.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateTestCaseRequest.java similarity index 60% rename from proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateExperimentRequest.java rename to proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateTestCaseRequest.java index 659984826..db993cb61 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateExperimentRequest.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateTestCaseRequest.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dialogflow/cx/v3/experiment.proto +// source: google/cloud/dialogflow/cx/v3/test_case.proto package com.google.cloud.dialogflow.cx.v3; @@ -22,27 +22,27 @@ * * *
- * The request message for [Experiments.UpdateExperiment][google.cloud.dialogflow.cx.v3.Experiments.UpdateExperiment].
+ * The request message for [TestCases.UpdateTestCase][google.cloud.dialogflow.cx.v3.TestCases.UpdateTestCase].
  * 
* - * Protobuf type {@code google.cloud.dialogflow.cx.v3.UpdateExperimentRequest} + * Protobuf type {@code google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest} */ -public final class UpdateExperimentRequest extends com.google.protobuf.GeneratedMessageV3 +public final class UpdateTestCaseRequest extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.UpdateExperimentRequest) - UpdateExperimentRequestOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest) + UpdateTestCaseRequestOrBuilder { private static final long serialVersionUID = 0L; - // Use UpdateExperimentRequest.newBuilder() to construct. - private UpdateExperimentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use UpdateTestCaseRequest.newBuilder() to construct. + private UpdateTestCaseRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private UpdateExperimentRequest() {} + private UpdateTestCaseRequest() {} @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UpdateExperimentRequest(); + return new UpdateTestCaseRequest(); } @java.lang.Override @@ -50,7 +50,7 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateExperimentRequest( + private UpdateTestCaseRequest( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -70,16 +70,16 @@ private UpdateExperimentRequest( break; case 10: { - com.google.cloud.dialogflow.cx.v3.Experiment.Builder subBuilder = null; - if (experiment_ != null) { - subBuilder = experiment_.toBuilder(); + com.google.cloud.dialogflow.cx.v3.TestCase.Builder subBuilder = null; + if (testCase_ != null) { + subBuilder = testCase_.toBuilder(); } - experiment_ = + testCase_ = input.readMessage( - com.google.cloud.dialogflow.cx.v3.Experiment.parser(), extensionRegistry); + com.google.cloud.dialogflow.cx.v3.TestCase.parser(), extensionRegistry); if (subBuilder != null) { - subBuilder.mergeFrom(experiment_); - experiment_ = subBuilder.buildPartial(); + subBuilder.mergeFrom(testCase_); + testCase_ = subBuilder.buildPartial(); } break; @@ -119,72 +119,72 @@ private UpdateExperimentRequest( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_UpdateExperimentRequest_descriptor; + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_UpdateTestCaseRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_UpdateExperimentRequest_fieldAccessorTable + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_UpdateTestCaseRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest.class, - com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest.Builder.class); + com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest.class, + com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest.Builder.class); } - public static final int EXPERIMENT_FIELD_NUMBER = 1; - private com.google.cloud.dialogflow.cx.v3.Experiment experiment_; + public static final int TEST_CASE_FIELD_NUMBER = 1; + private com.google.cloud.dialogflow.cx.v3.TestCase testCase_; /** * * *
-   * Required. The experiment to update.
+   * Required. The test case to update.
    * 
* * - * .google.cloud.dialogflow.cx.v3.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; * * - * @return Whether the experiment field is set. + * @return Whether the testCase field is set. */ @java.lang.Override - public boolean hasExperiment() { - return experiment_ != null; + public boolean hasTestCase() { + return testCase_ != null; } /** * * *
-   * Required. The experiment to update.
+   * Required. The test case to update.
    * 
* * - * .google.cloud.dialogflow.cx.v3.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; * * - * @return The experiment. + * @return The testCase. */ @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.Experiment getExperiment() { - return experiment_ == null - ? com.google.cloud.dialogflow.cx.v3.Experiment.getDefaultInstance() - : experiment_; + public com.google.cloud.dialogflow.cx.v3.TestCase getTestCase() { + return testCase_ == null + ? com.google.cloud.dialogflow.cx.v3.TestCase.getDefaultInstance() + : testCase_; } /** * * *
-   * Required. The experiment to update.
+   * Required. The test case to update.
    * 
* * - * .google.cloud.dialogflow.cx.v3.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; * */ @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.ExperimentOrBuilder getExperimentOrBuilder() { - return getExperiment(); + public com.google.cloud.dialogflow.cx.v3.TestCaseOrBuilder getTestCaseOrBuilder() { + return getTestCase(); } public static final int UPDATE_MASK_FIELD_NUMBER = 2; @@ -193,7 +193,9 @@ public com.google.cloud.dialogflow.cx.v3.ExperimentOrBuilder getExperimentOrBuil * * *
-   * Required. The mask to control which fields get updated.
+   * Required. The mask to specify which fields should be updated. Only a test case's
+   * metadata and replayed_conversation_turns may be updated. The original
+   * test_case_conversation_turns may not be updated.
    * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -209,7 +211,9 @@ public boolean hasUpdateMask() { * * *
-   * Required. The mask to control which fields get updated.
+   * Required. The mask to specify which fields should be updated. Only a test case's
+   * metadata and replayed_conversation_turns may be updated. The original
+   * test_case_conversation_turns may not be updated.
    * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -225,7 +229,9 @@ public com.google.protobuf.FieldMask getUpdateMask() { * * *
-   * Required. The mask to control which fields get updated.
+   * Required. The mask to specify which fields should be updated. Only a test case's
+   * metadata and replayed_conversation_turns may be updated. The original
+   * test_case_conversation_turns may not be updated.
    * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -250,8 +256,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (experiment_ != null) { - output.writeMessage(1, getExperiment()); + if (testCase_ != null) { + output.writeMessage(1, getTestCase()); } if (updateMask_ != null) { output.writeMessage(2, getUpdateMask()); @@ -265,8 +271,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (experiment_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getExperiment()); + if (testCase_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTestCase()); } if (updateMask_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); @@ -281,15 +287,15 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest)) { + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest)) { return super.equals(obj); } - com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest other = - (com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest) obj; + com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest other = + (com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest) obj; - if (hasExperiment() != other.hasExperiment()) return false; - if (hasExperiment()) { - if (!getExperiment().equals(other.getExperiment())) return false; + if (hasTestCase() != other.hasTestCase()) return false; + if (hasTestCase()) { + if (!getTestCase().equals(other.getTestCase())) return false; } if (hasUpdateMask() != other.hasUpdateMask()) return false; if (hasUpdateMask()) { @@ -306,9 +312,9 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (hasExperiment()) { - hash = (37 * hash) + EXPERIMENT_FIELD_NUMBER; - hash = (53 * hash) + getExperiment().hashCode(); + if (hasTestCase()) { + hash = (37 * hash) + TEST_CASE_FIELD_NUMBER; + hash = (53 * hash) + getTestCase().hashCode(); } if (hasUpdateMask()) { hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; @@ -319,71 +325,71 @@ public int hashCode() { return hash; } - public static com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest parseFrom(byte[] data) + public static com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest parseDelimitedFrom( + public static com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest parseDelimitedFrom( + public static com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -401,7 +407,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest prototype) { + com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -419,31 +425,31 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The request message for [Experiments.UpdateExperiment][google.cloud.dialogflow.cx.v3.Experiments.UpdateExperiment].
+   * The request message for [TestCases.UpdateTestCase][google.cloud.dialogflow.cx.v3.TestCases.UpdateTestCase].
    * 
* - * Protobuf type {@code google.cloud.dialogflow.cx.v3.UpdateExperimentRequest} + * Protobuf type {@code google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.UpdateExperimentRequest) - com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequestOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest) + com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_UpdateExperimentRequest_descriptor; + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_UpdateTestCaseRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_UpdateExperimentRequest_fieldAccessorTable + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_UpdateTestCaseRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest.class, - com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest.Builder.class); + com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest.class, + com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest.Builder.class); } - // Construct using com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest.newBuilder() + // Construct using com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -460,11 +466,11 @@ private void maybeForceBuilderInitialization() { @java.lang.Override public Builder clear() { super.clear(); - if (experimentBuilder_ == null) { - experiment_ = null; + if (testCaseBuilder_ == null) { + testCase_ = null; } else { - experiment_ = null; - experimentBuilder_ = null; + testCase_ = null; + testCaseBuilder_ = null; } if (updateMaskBuilder_ == null) { updateMask_ = null; @@ -477,18 +483,18 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_UpdateExperimentRequest_descriptor; + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_UpdateTestCaseRequest_descriptor; } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest getDefaultInstanceForType() { - return com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest.getDefaultInstance(); + public com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest.getDefaultInstance(); } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest build() { - com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest result = buildPartial(); + public com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest build() { + com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -496,13 +502,13 @@ public com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest build() { } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest buildPartial() { - com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest result = - new com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest(this); - if (experimentBuilder_ == null) { - result.experiment_ = experiment_; + public com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest result = + new com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest(this); + if (testCaseBuilder_ == null) { + result.testCase_ = testCase_; } else { - result.experiment_ = experimentBuilder_.build(); + result.testCase_ = testCaseBuilder_.build(); } if (updateMaskBuilder_ == null) { result.updateMask_ = updateMask_; @@ -548,19 +554,19 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest) { - return mergeFrom((com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest) other); + if (other instanceof com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest other) { - if (other == com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest.getDefaultInstance()) + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest.getDefaultInstance()) return this; - if (other.hasExperiment()) { - mergeExperiment(other.getExperiment()); + if (other.hasTestCase()) { + mergeTestCase(other.getTestCase()); } if (other.hasUpdateMask()) { mergeUpdateMask(other.getUpdateMask()); @@ -580,12 +586,12 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest parsedMessage = null; + com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = - (com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest) e.getUnfinishedMessage(); + (com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -595,70 +601,70 @@ public Builder mergeFrom( return this; } - private com.google.cloud.dialogflow.cx.v3.Experiment experiment_; + private com.google.cloud.dialogflow.cx.v3.TestCase testCase_; private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3.Experiment, - com.google.cloud.dialogflow.cx.v3.Experiment.Builder, - com.google.cloud.dialogflow.cx.v3.ExperimentOrBuilder> - experimentBuilder_; + com.google.cloud.dialogflow.cx.v3.TestCase, + com.google.cloud.dialogflow.cx.v3.TestCase.Builder, + com.google.cloud.dialogflow.cx.v3.TestCaseOrBuilder> + testCaseBuilder_; /** * * *
-     * Required. The experiment to update.
+     * Required. The test case to update.
      * 
* * - * .google.cloud.dialogflow.cx.v3.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; * * - * @return Whether the experiment field is set. + * @return Whether the testCase field is set. */ - public boolean hasExperiment() { - return experimentBuilder_ != null || experiment_ != null; + public boolean hasTestCase() { + return testCaseBuilder_ != null || testCase_ != null; } /** * * *
-     * Required. The experiment to update.
+     * Required. The test case to update.
      * 
* * - * .google.cloud.dialogflow.cx.v3.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; * * - * @return The experiment. + * @return The testCase. */ - public com.google.cloud.dialogflow.cx.v3.Experiment getExperiment() { - if (experimentBuilder_ == null) { - return experiment_ == null - ? com.google.cloud.dialogflow.cx.v3.Experiment.getDefaultInstance() - : experiment_; + public com.google.cloud.dialogflow.cx.v3.TestCase getTestCase() { + if (testCaseBuilder_ == null) { + return testCase_ == null + ? com.google.cloud.dialogflow.cx.v3.TestCase.getDefaultInstance() + : testCase_; } else { - return experimentBuilder_.getMessage(); + return testCaseBuilder_.getMessage(); } } /** * * *
-     * Required. The experiment to update.
+     * Required. The test case to update.
      * 
* * - * .google.cloud.dialogflow.cx.v3.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; * */ - public Builder setExperiment(com.google.cloud.dialogflow.cx.v3.Experiment value) { - if (experimentBuilder_ == null) { + public Builder setTestCase(com.google.cloud.dialogflow.cx.v3.TestCase value) { + if (testCaseBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - experiment_ = value; + testCase_ = value; onChanged(); } else { - experimentBuilder_.setMessage(value); + testCaseBuilder_.setMessage(value); } return this; @@ -667,20 +673,19 @@ public Builder setExperiment(com.google.cloud.dialogflow.cx.v3.Experiment value) * * *
-     * Required. The experiment to update.
+     * Required. The test case to update.
      * 
* * - * .google.cloud.dialogflow.cx.v3.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; * */ - public Builder setExperiment( - com.google.cloud.dialogflow.cx.v3.Experiment.Builder builderForValue) { - if (experimentBuilder_ == null) { - experiment_ = builderForValue.build(); + public Builder setTestCase(com.google.cloud.dialogflow.cx.v3.TestCase.Builder builderForValue) { + if (testCaseBuilder_ == null) { + testCase_ = builderForValue.build(); onChanged(); } else { - experimentBuilder_.setMessage(builderForValue.build()); + testCaseBuilder_.setMessage(builderForValue.build()); } return this; @@ -689,26 +694,26 @@ public Builder setExperiment( * * *
-     * Required. The experiment to update.
+     * Required. The test case to update.
      * 
* * - * .google.cloud.dialogflow.cx.v3.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; * */ - public Builder mergeExperiment(com.google.cloud.dialogflow.cx.v3.Experiment value) { - if (experimentBuilder_ == null) { - if (experiment_ != null) { - experiment_ = - com.google.cloud.dialogflow.cx.v3.Experiment.newBuilder(experiment_) + public Builder mergeTestCase(com.google.cloud.dialogflow.cx.v3.TestCase value) { + if (testCaseBuilder_ == null) { + if (testCase_ != null) { + testCase_ = + com.google.cloud.dialogflow.cx.v3.TestCase.newBuilder(testCase_) .mergeFrom(value) .buildPartial(); } else { - experiment_ = value; + testCase_ = value; } onChanged(); } else { - experimentBuilder_.mergeFrom(value); + testCaseBuilder_.mergeFrom(value); } return this; @@ -717,20 +722,20 @@ public Builder mergeExperiment(com.google.cloud.dialogflow.cx.v3.Experiment valu * * *
-     * Required. The experiment to update.
+     * Required. The test case to update.
      * 
* * - * .google.cloud.dialogflow.cx.v3.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; * */ - public Builder clearExperiment() { - if (experimentBuilder_ == null) { - experiment_ = null; + public Builder clearTestCase() { + if (testCaseBuilder_ == null) { + testCase_ = null; onChanged(); } else { - experiment_ = null; - experimentBuilder_ = null; + testCase_ = null; + testCaseBuilder_ = null; } return this; @@ -739,64 +744,64 @@ public Builder clearExperiment() { * * *
-     * Required. The experiment to update.
+     * Required. The test case to update.
      * 
* * - * .google.cloud.dialogflow.cx.v3.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; * */ - public com.google.cloud.dialogflow.cx.v3.Experiment.Builder getExperimentBuilder() { + public com.google.cloud.dialogflow.cx.v3.TestCase.Builder getTestCaseBuilder() { onChanged(); - return getExperimentFieldBuilder().getBuilder(); + return getTestCaseFieldBuilder().getBuilder(); } /** * * *
-     * Required. The experiment to update.
+     * Required. The test case to update.
      * 
* * - * .google.cloud.dialogflow.cx.v3.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; * */ - public com.google.cloud.dialogflow.cx.v3.ExperimentOrBuilder getExperimentOrBuilder() { - if (experimentBuilder_ != null) { - return experimentBuilder_.getMessageOrBuilder(); + public com.google.cloud.dialogflow.cx.v3.TestCaseOrBuilder getTestCaseOrBuilder() { + if (testCaseBuilder_ != null) { + return testCaseBuilder_.getMessageOrBuilder(); } else { - return experiment_ == null - ? com.google.cloud.dialogflow.cx.v3.Experiment.getDefaultInstance() - : experiment_; + return testCase_ == null + ? com.google.cloud.dialogflow.cx.v3.TestCase.getDefaultInstance() + : testCase_; } } /** * * *
-     * Required. The experiment to update.
+     * Required. The test case to update.
      * 
* * - * .google.cloud.dialogflow.cx.v3.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; * */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3.Experiment, - com.google.cloud.dialogflow.cx.v3.Experiment.Builder, - com.google.cloud.dialogflow.cx.v3.ExperimentOrBuilder> - getExperimentFieldBuilder() { - if (experimentBuilder_ == null) { - experimentBuilder_ = + com.google.cloud.dialogflow.cx.v3.TestCase, + com.google.cloud.dialogflow.cx.v3.TestCase.Builder, + com.google.cloud.dialogflow.cx.v3.TestCaseOrBuilder> + getTestCaseFieldBuilder() { + if (testCaseBuilder_ == null) { + testCaseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3.Experiment, - com.google.cloud.dialogflow.cx.v3.Experiment.Builder, - com.google.cloud.dialogflow.cx.v3.ExperimentOrBuilder>( - getExperiment(), getParentForChildren(), isClean()); - experiment_ = null; + com.google.cloud.dialogflow.cx.v3.TestCase, + com.google.cloud.dialogflow.cx.v3.TestCase.Builder, + com.google.cloud.dialogflow.cx.v3.TestCaseOrBuilder>( + getTestCase(), getParentForChildren(), isClean()); + testCase_ = null; } - return experimentBuilder_; + return testCaseBuilder_; } private com.google.protobuf.FieldMask updateMask_; @@ -809,7 +814,9 @@ public com.google.cloud.dialogflow.cx.v3.ExperimentOrBuilder getExperimentOrBuil * * *
-     * Required. The mask to control which fields get updated.
+     * Required. The mask to specify which fields should be updated. Only a test case's
+     * metadata and replayed_conversation_turns may be updated. The original
+     * test_case_conversation_turns may not be updated.
      * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -824,7 +831,9 @@ public boolean hasUpdateMask() { * * *
-     * Required. The mask to control which fields get updated.
+     * Required. The mask to specify which fields should be updated. Only a test case's
+     * metadata and replayed_conversation_turns may be updated. The original
+     * test_case_conversation_turns may not be updated.
      * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -845,7 +854,9 @@ public com.google.protobuf.FieldMask getUpdateMask() { * * *
-     * Required. The mask to control which fields get updated.
+     * Required. The mask to specify which fields should be updated. Only a test case's
+     * metadata and replayed_conversation_turns may be updated. The original
+     * test_case_conversation_turns may not be updated.
      * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -868,7 +879,9 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask value) { * * *
-     * Required. The mask to control which fields get updated.
+     * Required. The mask to specify which fields should be updated. Only a test case's
+     * metadata and replayed_conversation_turns may be updated. The original
+     * test_case_conversation_turns may not be updated.
      * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -888,7 +901,9 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForVal * * *
-     * Required. The mask to control which fields get updated.
+     * Required. The mask to specify which fields should be updated. Only a test case's
+     * metadata and replayed_conversation_turns may be updated. The original
+     * test_case_conversation_turns may not be updated.
      * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -913,7 +928,9 @@ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { * * *
-     * Required. The mask to control which fields get updated.
+     * Required. The mask to specify which fields should be updated. Only a test case's
+     * metadata and replayed_conversation_turns may be updated. The original
+     * test_case_conversation_turns may not be updated.
      * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -934,7 +951,9 @@ public Builder clearUpdateMask() { * * *
-     * Required. The mask to control which fields get updated.
+     * Required. The mask to specify which fields should be updated. Only a test case's
+     * metadata and replayed_conversation_turns may be updated. The original
+     * test_case_conversation_turns may not be updated.
      * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -949,7 +968,9 @@ public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { * * *
-     * Required. The mask to control which fields get updated.
+     * Required. The mask to specify which fields should be updated. Only a test case's
+     * metadata and replayed_conversation_turns may be updated. The original
+     * test_case_conversation_turns may not be updated.
      * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -968,7 +989,9 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { * * *
-     * Required. The mask to control which fields get updated.
+     * Required. The mask to specify which fields should be updated. Only a test case's
+     * metadata and replayed_conversation_turns may be updated. The original
+     * test_case_conversation_turns may not be updated.
      * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -1002,42 +1025,42 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.UpdateExperimentRequest) + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest) } - // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.UpdateExperimentRequest) - private static final com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest) + private static final com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest(); + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest(); } - public static com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest getDefaultInstance() { + public static com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public UpdateExperimentRequest parsePartialFrom( + public UpdateTestCaseRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateExperimentRequest(input, extensionRegistry); + return new UpdateTestCaseRequest(input, extensionRegistry); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest getDefaultInstanceForType() { + public com.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateExperimentRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateTestCaseRequestOrBuilder.java similarity index 54% rename from proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateExperimentRequestOrBuilder.java rename to proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateTestCaseRequestOrBuilder.java index 0cc72b00a..e02c71a99 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateExperimentRequestOrBuilder.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateTestCaseRequestOrBuilder.java @@ -14,61 +14,63 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dialogflow/cx/v3/experiment.proto +// source: google/cloud/dialogflow/cx/v3/test_case.proto package com.google.cloud.dialogflow.cx.v3; -public interface UpdateExperimentRequestOrBuilder +public interface UpdateTestCaseRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.UpdateExperimentRequest) + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest) com.google.protobuf.MessageOrBuilder { /** * * *
-   * Required. The experiment to update.
+   * Required. The test case to update.
    * 
* * - * .google.cloud.dialogflow.cx.v3.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; * * - * @return Whether the experiment field is set. + * @return Whether the testCase field is set. */ - boolean hasExperiment(); + boolean hasTestCase(); /** * * *
-   * Required. The experiment to update.
+   * Required. The test case to update.
    * 
* * - * .google.cloud.dialogflow.cx.v3.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; * * - * @return The experiment. + * @return The testCase. */ - com.google.cloud.dialogflow.cx.v3.Experiment getExperiment(); + com.google.cloud.dialogflow.cx.v3.TestCase getTestCase(); /** * * *
-   * Required. The experiment to update.
+   * Required. The test case to update.
    * 
* * - * .google.cloud.dialogflow.cx.v3.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.dialogflow.cx.v3.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; * */ - com.google.cloud.dialogflow.cx.v3.ExperimentOrBuilder getExperimentOrBuilder(); + com.google.cloud.dialogflow.cx.v3.TestCaseOrBuilder getTestCaseOrBuilder(); /** * * *
-   * Required. The mask to control which fields get updated.
+   * Required. The mask to specify which fields should be updated. Only a test case's
+   * metadata and replayed_conversation_turns may be updated. The original
+   * test_case_conversation_turns may not be updated.
    * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -81,7 +83,9 @@ public interface UpdateExperimentRequestOrBuilder * * *
-   * Required. The mask to control which fields get updated.
+   * Required. The mask to specify which fields should be updated. Only a test case's
+   * metadata and replayed_conversation_turns may be updated. The original
+   * test_case_conversation_turns may not be updated.
    * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -94,7 +98,9 @@ public interface UpdateExperimentRequestOrBuilder * * *
-   * Required. The mask to control which fields get updated.
+   * Required. The mask to specify which fields should be updated. Only a test case's
+   * metadata and replayed_conversation_turns may be updated. The original
+   * test_case_conversation_turns may not be updated.
    * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StartExperimentRequest.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidateAgentRequest.java similarity index 60% rename from proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StartExperimentRequest.java rename to proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidateAgentRequest.java index 9239e124f..9898950ee 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StartExperimentRequest.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidateAgentRequest.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dialogflow/cx/v3/experiment.proto +// source: google/cloud/dialogflow/cx/v3/agent.proto package com.google.cloud.dialogflow.cx.v3; @@ -22,29 +22,30 @@ * * *
- * The request message for [Experiments.StartExperiment][google.cloud.dialogflow.cx.v3.Experiments.StartExperiment].
+ * The request message for [Agents.ValidateAgent][google.cloud.dialogflow.cx.v3.Agents.ValidateAgent].
  * 
* - * Protobuf type {@code google.cloud.dialogflow.cx.v3.StartExperimentRequest} + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ValidateAgentRequest} */ -public final class StartExperimentRequest extends com.google.protobuf.GeneratedMessageV3 +public final class ValidateAgentRequest extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.StartExperimentRequest) - StartExperimentRequestOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ValidateAgentRequest) + ValidateAgentRequestOrBuilder { private static final long serialVersionUID = 0L; - // Use StartExperimentRequest.newBuilder() to construct. - private StartExperimentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use ValidateAgentRequest.newBuilder() to construct. + private ValidateAgentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private StartExperimentRequest() { + private ValidateAgentRequest() { name_ = ""; + languageCode_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new StartExperimentRequest(); + return new ValidateAgentRequest(); } @java.lang.Override @@ -52,7 +53,7 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private StartExperimentRequest( + private ValidateAgentRequest( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -77,6 +78,13 @@ private StartExperimentRequest( name_ = s; break; } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + languageCode_ = s; + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -97,18 +105,18 @@ private StartExperimentRequest( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_StartExperimentRequest_descriptor; + return com.google.cloud.dialogflow.cx.v3.AgentProto + .internal_static_google_cloud_dialogflow_cx_v3_ValidateAgentRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_StartExperimentRequest_fieldAccessorTable + return com.google.cloud.dialogflow.cx.v3.AgentProto + .internal_static_google_cloud_dialogflow_cx_v3_ValidateAgentRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3.StartExperimentRequest.class, - com.google.cloud.dialogflow.cx.v3.StartExperimentRequest.Builder.class); + com.google.cloud.dialogflow.cx.v3.ValidateAgentRequest.class, + com.google.cloud.dialogflow.cx.v3.ValidateAgentRequest.Builder.class); } public static final int NAME_FIELD_NUMBER = 1; @@ -117,9 +125,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. Resource name of the experiment to start.
-   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * Required. The agent to validate.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
    * 
* * @@ -144,9 +151,8 @@ public java.lang.String getName() { * * *
-   * Required. Resource name of the experiment to start.
-   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * Required. The agent to validate.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
    * 
* * @@ -168,6 +174,55 @@ public com.google.protobuf.ByteString getNameBytes() { } } + public static final int LANGUAGE_CODE_FIELD_NUMBER = 2; + private volatile java.lang.Object languageCode_; + /** + * + * + *
+   * If not specified, the agent's default language is used.
+   * 
+ * + * string language_code = 2; + * + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } + } + /** + * + * + *
+   * If not specified, the agent's default language is used.
+   * 
+ * + * string language_code = 2; + * + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -185,6 +240,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!getNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } + if (!getLanguageCodeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, languageCode_); + } unknownFields.writeTo(output); } @@ -197,6 +255,9 @@ public int getSerializedSize() { if (!getNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } + if (!getLanguageCodeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, languageCode_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -207,13 +268,14 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.StartExperimentRequest)) { + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.ValidateAgentRequest)) { return super.equals(obj); } - com.google.cloud.dialogflow.cx.v3.StartExperimentRequest other = - (com.google.cloud.dialogflow.cx.v3.StartExperimentRequest) obj; + com.google.cloud.dialogflow.cx.v3.ValidateAgentRequest other = + (com.google.cloud.dialogflow.cx.v3.ValidateAgentRequest) obj; if (!getName().equals(other.getName())) return false; + if (!getLanguageCode().equals(other.getLanguageCode())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -227,76 +289,78 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.cloud.dialogflow.cx.v3.StartExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ValidateAgentRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3.StartExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ValidateAgentRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.StartExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ValidateAgentRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3.StartExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ValidateAgentRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.StartExperimentRequest parseFrom(byte[] data) + public static com.google.cloud.dialogflow.cx.v3.ValidateAgentRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3.StartExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ValidateAgentRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.StartExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ValidateAgentRequest parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3.StartExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ValidateAgentRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.StartExperimentRequest parseDelimitedFrom( + public static com.google.cloud.dialogflow.cx.v3.ValidateAgentRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3.StartExperimentRequest parseDelimitedFrom( + public static com.google.cloud.dialogflow.cx.v3.ValidateAgentRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.StartExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ValidateAgentRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3.StartExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ValidateAgentRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -314,7 +378,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.dialogflow.cx.v3.StartExperimentRequest prototype) { + com.google.cloud.dialogflow.cx.v3.ValidateAgentRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -332,31 +396,31 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The request message for [Experiments.StartExperiment][google.cloud.dialogflow.cx.v3.Experiments.StartExperiment].
+   * The request message for [Agents.ValidateAgent][google.cloud.dialogflow.cx.v3.Agents.ValidateAgent].
    * 
* - * Protobuf type {@code google.cloud.dialogflow.cx.v3.StartExperimentRequest} + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ValidateAgentRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.StartExperimentRequest) - com.google.cloud.dialogflow.cx.v3.StartExperimentRequestOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ValidateAgentRequest) + com.google.cloud.dialogflow.cx.v3.ValidateAgentRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_StartExperimentRequest_descriptor; + return com.google.cloud.dialogflow.cx.v3.AgentProto + .internal_static_google_cloud_dialogflow_cx_v3_ValidateAgentRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_StartExperimentRequest_fieldAccessorTable + return com.google.cloud.dialogflow.cx.v3.AgentProto + .internal_static_google_cloud_dialogflow_cx_v3_ValidateAgentRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3.StartExperimentRequest.class, - com.google.cloud.dialogflow.cx.v3.StartExperimentRequest.Builder.class); + com.google.cloud.dialogflow.cx.v3.ValidateAgentRequest.class, + com.google.cloud.dialogflow.cx.v3.ValidateAgentRequest.Builder.class); } - // Construct using com.google.cloud.dialogflow.cx.v3.StartExperimentRequest.newBuilder() + // Construct using com.google.cloud.dialogflow.cx.v3.ValidateAgentRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -375,23 +439,25 @@ public Builder clear() { super.clear(); name_ = ""; + languageCode_ = ""; + return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_StartExperimentRequest_descriptor; + return com.google.cloud.dialogflow.cx.v3.AgentProto + .internal_static_google_cloud_dialogflow_cx_v3_ValidateAgentRequest_descriptor; } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.StartExperimentRequest getDefaultInstanceForType() { - return com.google.cloud.dialogflow.cx.v3.StartExperimentRequest.getDefaultInstance(); + public com.google.cloud.dialogflow.cx.v3.ValidateAgentRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.ValidateAgentRequest.getDefaultInstance(); } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.StartExperimentRequest build() { - com.google.cloud.dialogflow.cx.v3.StartExperimentRequest result = buildPartial(); + public com.google.cloud.dialogflow.cx.v3.ValidateAgentRequest build() { + com.google.cloud.dialogflow.cx.v3.ValidateAgentRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -399,10 +465,11 @@ public com.google.cloud.dialogflow.cx.v3.StartExperimentRequest build() { } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.StartExperimentRequest buildPartial() { - com.google.cloud.dialogflow.cx.v3.StartExperimentRequest result = - new com.google.cloud.dialogflow.cx.v3.StartExperimentRequest(this); + public com.google.cloud.dialogflow.cx.v3.ValidateAgentRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3.ValidateAgentRequest result = + new com.google.cloud.dialogflow.cx.v3.ValidateAgentRequest(this); result.name_ = name_; + result.languageCode_ = languageCode_; onBuilt(); return result; } @@ -442,21 +509,25 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.dialogflow.cx.v3.StartExperimentRequest) { - return mergeFrom((com.google.cloud.dialogflow.cx.v3.StartExperimentRequest) other); + if (other instanceof com.google.cloud.dialogflow.cx.v3.ValidateAgentRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.ValidateAgentRequest) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.StartExperimentRequest other) { - if (other == com.google.cloud.dialogflow.cx.v3.StartExperimentRequest.getDefaultInstance()) + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ValidateAgentRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3.ValidateAgentRequest.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + onChanged(); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -472,12 +543,12 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dialogflow.cx.v3.StartExperimentRequest parsedMessage = null; + com.google.cloud.dialogflow.cx.v3.ValidateAgentRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = - (com.google.cloud.dialogflow.cx.v3.StartExperimentRequest) e.getUnfinishedMessage(); + (com.google.cloud.dialogflow.cx.v3.ValidateAgentRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -492,9 +563,8 @@ public Builder mergeFrom( * * *
-     * Required. Resource name of the experiment to start.
-     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * Required. The agent to validate.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
      * 
* * @@ -518,9 +588,8 @@ public java.lang.String getName() { * * *
-     * Required. Resource name of the experiment to start.
-     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * Required. The agent to validate.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
      * 
* * @@ -544,9 +613,8 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-     * Required. Resource name of the experiment to start.
-     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * Required. The agent to validate.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
      * 
* * @@ -569,9 +637,8 @@ public Builder setName(java.lang.String value) { * * *
-     * Required. Resource name of the experiment to start.
-     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * Required. The agent to validate.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
      * 
* * @@ -590,9 +657,8 @@ public Builder clearName() { * * *
-     * Required. Resource name of the experiment to start.
-     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * Required. The agent to validate.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
      * 
* * @@ -613,6 +679,112 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object languageCode_ = ""; + /** + * + * + *
+     * If not specified, the agent's default language is used.
+     * 
+ * + * string language_code = 2; + * + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * If not specified, the agent's default language is used.
+     * 
+ * + * string language_code = 2; + * + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * If not specified, the agent's default language is used.
+     * 
+ * + * string language_code = 2; + * + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + languageCode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If not specified, the agent's default language is used.
+     * 
+ * + * string language_code = 2; + * + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + + languageCode_ = getDefaultInstance().getLanguageCode(); + onChanged(); + return this; + } + /** + * + * + *
+     * If not specified, the agent's default language is used.
+     * 
+ * + * string language_code = 2; + * + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + languageCode_ = value; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); @@ -624,42 +796,42 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.StartExperimentRequest) + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.ValidateAgentRequest) } - // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.StartExperimentRequest) - private static final com.google.cloud.dialogflow.cx.v3.StartExperimentRequest DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ValidateAgentRequest) + private static final com.google.cloud.dialogflow.cx.v3.ValidateAgentRequest DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.StartExperimentRequest(); + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ValidateAgentRequest(); } - public static com.google.cloud.dialogflow.cx.v3.StartExperimentRequest getDefaultInstance() { + public static com.google.cloud.dialogflow.cx.v3.ValidateAgentRequest getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public StartExperimentRequest parsePartialFrom( + public ValidateAgentRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new StartExperimentRequest(input, extensionRegistry); + return new ValidateAgentRequest(input, extensionRegistry); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.StartExperimentRequest getDefaultInstanceForType() { + public com.google.cloud.dialogflow.cx.v3.ValidateAgentRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeleteExperimentRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidateAgentRequestOrBuilder.java similarity index 65% rename from proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeleteExperimentRequestOrBuilder.java rename to proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidateAgentRequestOrBuilder.java index e4f3d2f3a..bb983843f 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeleteExperimentRequestOrBuilder.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidateAgentRequestOrBuilder.java @@ -14,22 +14,21 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dialogflow/cx/v3/experiment.proto +// source: google/cloud/dialogflow/cx/v3/agent.proto package com.google.cloud.dialogflow.cx.v3; -public interface DeleteExperimentRequestOrBuilder +public interface ValidateAgentRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.DeleteExperimentRequest) + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ValidateAgentRequest) com.google.protobuf.MessageOrBuilder { /** * * *
-   * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment] to delete.
-   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * Required. The agent to validate.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
    * 
* * @@ -43,9 +42,8 @@ public interface DeleteExperimentRequestOrBuilder * * *
-   * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment] to delete.
-   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * Required. The agent to validate.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
    * 
* * @@ -55,4 +53,29 @@ public interface DeleteExperimentRequestOrBuilder * @return The bytes for name. */ com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * If not specified, the agent's default language is used.
+   * 
+ * + * string language_code = 2; + * + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + /** + * + * + *
+   * If not specified, the agent's default language is used.
+   * 
+ * + * string language_code = 2; + * + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString getLanguageCodeBytes(); } diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StopExperimentRequest.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidateFlowRequest.java similarity index 60% rename from proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StopExperimentRequest.java rename to proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidateFlowRequest.java index bca0d3e01..f4d637ea0 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StopExperimentRequest.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidateFlowRequest.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dialogflow/cx/v3/experiment.proto +// source: google/cloud/dialogflow/cx/v3/flow.proto package com.google.cloud.dialogflow.cx.v3; @@ -22,29 +22,30 @@ * * *
- * The request message for [Experiments.StopExperiment][google.cloud.dialogflow.cx.v3.Experiments.StopExperiment].
+ * The request message for [Flows.ValidateFlow][google.cloud.dialogflow.cx.v3.Flows.ValidateFlow].
  * 
* - * Protobuf type {@code google.cloud.dialogflow.cx.v3.StopExperimentRequest} + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ValidateFlowRequest} */ -public final class StopExperimentRequest extends com.google.protobuf.GeneratedMessageV3 +public final class ValidateFlowRequest extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.StopExperimentRequest) - StopExperimentRequestOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ValidateFlowRequest) + ValidateFlowRequestOrBuilder { private static final long serialVersionUID = 0L; - // Use StopExperimentRequest.newBuilder() to construct. - private StopExperimentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use ValidateFlowRequest.newBuilder() to construct. + private ValidateFlowRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private StopExperimentRequest() { + private ValidateFlowRequest() { name_ = ""; + languageCode_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new StopExperimentRequest(); + return new ValidateFlowRequest(); } @java.lang.Override @@ -52,7 +53,7 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private StopExperimentRequest( + private ValidateFlowRequest( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -77,6 +78,13 @@ private StopExperimentRequest( name_ = s; break; } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + languageCode_ = s; + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -97,18 +105,18 @@ private StopExperimentRequest( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_StopExperimentRequest_descriptor; + return com.google.cloud.dialogflow.cx.v3.FlowProto + .internal_static_google_cloud_dialogflow_cx_v3_ValidateFlowRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_StopExperimentRequest_fieldAccessorTable + return com.google.cloud.dialogflow.cx.v3.FlowProto + .internal_static_google_cloud_dialogflow_cx_v3_ValidateFlowRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3.StopExperimentRequest.class, - com.google.cloud.dialogflow.cx.v3.StopExperimentRequest.Builder.class); + com.google.cloud.dialogflow.cx.v3.ValidateFlowRequest.class, + com.google.cloud.dialogflow.cx.v3.ValidateFlowRequest.Builder.class); } public static final int NAME_FIELD_NUMBER = 1; @@ -117,9 +125,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. Resource name of the experiment to stop.
+   * Required. The flow to validate.
    * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * ID>/flows/<Flow ID>`.
    * 
* * @@ -144,9 +152,9 @@ public java.lang.String getName() { * * *
-   * Required. Resource name of the experiment to stop.
+   * Required. The flow to validate.
    * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * ID>/flows/<Flow ID>`.
    * 
* * @@ -168,6 +176,55 @@ public com.google.protobuf.ByteString getNameBytes() { } } + public static final int LANGUAGE_CODE_FIELD_NUMBER = 2; + private volatile java.lang.Object languageCode_; + /** + * + * + *
+   * If not specified, the agent's default language is used.
+   * 
+ * + * string language_code = 2; + * + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } + } + /** + * + * + *
+   * If not specified, the agent's default language is used.
+   * 
+ * + * string language_code = 2; + * + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -185,6 +242,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!getNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } + if (!getLanguageCodeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, languageCode_); + } unknownFields.writeTo(output); } @@ -197,6 +257,9 @@ public int getSerializedSize() { if (!getNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } + if (!getLanguageCodeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, languageCode_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -207,13 +270,14 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.StopExperimentRequest)) { + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.ValidateFlowRequest)) { return super.equals(obj); } - com.google.cloud.dialogflow.cx.v3.StopExperimentRequest other = - (com.google.cloud.dialogflow.cx.v3.StopExperimentRequest) obj; + com.google.cloud.dialogflow.cx.v3.ValidateFlowRequest other = + (com.google.cloud.dialogflow.cx.v3.ValidateFlowRequest) obj; if (!getName().equals(other.getName())) return false; + if (!getLanguageCode().equals(other.getLanguageCode())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -227,76 +291,78 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.cloud.dialogflow.cx.v3.StopExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ValidateFlowRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3.StopExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ValidateFlowRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.StopExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ValidateFlowRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3.StopExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ValidateFlowRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.StopExperimentRequest parseFrom(byte[] data) + public static com.google.cloud.dialogflow.cx.v3.ValidateFlowRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3.StopExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ValidateFlowRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.StopExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ValidateFlowRequest parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3.StopExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ValidateFlowRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.StopExperimentRequest parseDelimitedFrom( + public static com.google.cloud.dialogflow.cx.v3.ValidateFlowRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3.StopExperimentRequest parseDelimitedFrom( + public static com.google.cloud.dialogflow.cx.v3.ValidateFlowRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.StopExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ValidateFlowRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3.StopExperimentRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ValidateFlowRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -314,7 +380,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.dialogflow.cx.v3.StopExperimentRequest prototype) { + com.google.cloud.dialogflow.cx.v3.ValidateFlowRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -332,31 +398,31 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The request message for [Experiments.StopExperiment][google.cloud.dialogflow.cx.v3.Experiments.StopExperiment].
+   * The request message for [Flows.ValidateFlow][google.cloud.dialogflow.cx.v3.Flows.ValidateFlow].
    * 
* - * Protobuf type {@code google.cloud.dialogflow.cx.v3.StopExperimentRequest} + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ValidateFlowRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.StopExperimentRequest) - com.google.cloud.dialogflow.cx.v3.StopExperimentRequestOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ValidateFlowRequest) + com.google.cloud.dialogflow.cx.v3.ValidateFlowRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_StopExperimentRequest_descriptor; + return com.google.cloud.dialogflow.cx.v3.FlowProto + .internal_static_google_cloud_dialogflow_cx_v3_ValidateFlowRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_StopExperimentRequest_fieldAccessorTable + return com.google.cloud.dialogflow.cx.v3.FlowProto + .internal_static_google_cloud_dialogflow_cx_v3_ValidateFlowRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3.StopExperimentRequest.class, - com.google.cloud.dialogflow.cx.v3.StopExperimentRequest.Builder.class); + com.google.cloud.dialogflow.cx.v3.ValidateFlowRequest.class, + com.google.cloud.dialogflow.cx.v3.ValidateFlowRequest.Builder.class); } - // Construct using com.google.cloud.dialogflow.cx.v3.StopExperimentRequest.newBuilder() + // Construct using com.google.cloud.dialogflow.cx.v3.ValidateFlowRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -375,23 +441,25 @@ public Builder clear() { super.clear(); name_ = ""; + languageCode_ = ""; + return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_StopExperimentRequest_descriptor; + return com.google.cloud.dialogflow.cx.v3.FlowProto + .internal_static_google_cloud_dialogflow_cx_v3_ValidateFlowRequest_descriptor; } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.StopExperimentRequest getDefaultInstanceForType() { - return com.google.cloud.dialogflow.cx.v3.StopExperimentRequest.getDefaultInstance(); + public com.google.cloud.dialogflow.cx.v3.ValidateFlowRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.ValidateFlowRequest.getDefaultInstance(); } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.StopExperimentRequest build() { - com.google.cloud.dialogflow.cx.v3.StopExperimentRequest result = buildPartial(); + public com.google.cloud.dialogflow.cx.v3.ValidateFlowRequest build() { + com.google.cloud.dialogflow.cx.v3.ValidateFlowRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -399,10 +467,11 @@ public com.google.cloud.dialogflow.cx.v3.StopExperimentRequest build() { } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.StopExperimentRequest buildPartial() { - com.google.cloud.dialogflow.cx.v3.StopExperimentRequest result = - new com.google.cloud.dialogflow.cx.v3.StopExperimentRequest(this); + public com.google.cloud.dialogflow.cx.v3.ValidateFlowRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3.ValidateFlowRequest result = + new com.google.cloud.dialogflow.cx.v3.ValidateFlowRequest(this); result.name_ = name_; + result.languageCode_ = languageCode_; onBuilt(); return result; } @@ -442,21 +511,25 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.dialogflow.cx.v3.StopExperimentRequest) { - return mergeFrom((com.google.cloud.dialogflow.cx.v3.StopExperimentRequest) other); + if (other instanceof com.google.cloud.dialogflow.cx.v3.ValidateFlowRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.ValidateFlowRequest) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.StopExperimentRequest other) { - if (other == com.google.cloud.dialogflow.cx.v3.StopExperimentRequest.getDefaultInstance()) + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ValidateFlowRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3.ValidateFlowRequest.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + onChanged(); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -472,12 +545,12 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dialogflow.cx.v3.StopExperimentRequest parsedMessage = null; + com.google.cloud.dialogflow.cx.v3.ValidateFlowRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = - (com.google.cloud.dialogflow.cx.v3.StopExperimentRequest) e.getUnfinishedMessage(); + (com.google.cloud.dialogflow.cx.v3.ValidateFlowRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -492,9 +565,9 @@ public Builder mergeFrom( * * *
-     * Required. Resource name of the experiment to stop.
+     * Required. The flow to validate.
      * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * ID>/flows/<Flow ID>`.
      * 
* * @@ -518,9 +591,9 @@ public java.lang.String getName() { * * *
-     * Required. Resource name of the experiment to stop.
+     * Required. The flow to validate.
      * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * ID>/flows/<Flow ID>`.
      * 
* * @@ -544,9 +617,9 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-     * Required. Resource name of the experiment to stop.
+     * Required. The flow to validate.
      * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * ID>/flows/<Flow ID>`.
      * 
* * @@ -569,9 +642,9 @@ public Builder setName(java.lang.String value) { * * *
-     * Required. Resource name of the experiment to stop.
+     * Required. The flow to validate.
      * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * ID>/flows/<Flow ID>`.
      * 
* * @@ -590,9 +663,9 @@ public Builder clearName() { * * *
-     * Required. Resource name of the experiment to stop.
+     * Required. The flow to validate.
      * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * ID>/flows/<Flow ID>`.
      * 
* * @@ -613,6 +686,112 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object languageCode_ = ""; + /** + * + * + *
+     * If not specified, the agent's default language is used.
+     * 
+ * + * string language_code = 2; + * + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * If not specified, the agent's default language is used.
+     * 
+ * + * string language_code = 2; + * + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * If not specified, the agent's default language is used.
+     * 
+ * + * string language_code = 2; + * + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + languageCode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If not specified, the agent's default language is used.
+     * 
+ * + * string language_code = 2; + * + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + + languageCode_ = getDefaultInstance().getLanguageCode(); + onChanged(); + return this; + } + /** + * + * + *
+     * If not specified, the agent's default language is used.
+     * 
+ * + * string language_code = 2; + * + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + languageCode_ = value; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); @@ -624,42 +803,42 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.StopExperimentRequest) + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.ValidateFlowRequest) } - // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.StopExperimentRequest) - private static final com.google.cloud.dialogflow.cx.v3.StopExperimentRequest DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ValidateFlowRequest) + private static final com.google.cloud.dialogflow.cx.v3.ValidateFlowRequest DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.StopExperimentRequest(); + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ValidateFlowRequest(); } - public static com.google.cloud.dialogflow.cx.v3.StopExperimentRequest getDefaultInstance() { + public static com.google.cloud.dialogflow.cx.v3.ValidateFlowRequest getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public StopExperimentRequest parsePartialFrom( + public ValidateFlowRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new StopExperimentRequest(input, extensionRegistry); + return new ValidateFlowRequest(input, extensionRegistry); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.StopExperimentRequest getDefaultInstanceForType() { + public com.google.cloud.dialogflow.cx.v3.ValidateFlowRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StartExperimentRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidateFlowRequestOrBuilder.java similarity index 66% rename from proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StartExperimentRequestOrBuilder.java rename to proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidateFlowRequestOrBuilder.java index 543e2dd5f..41aaa4a91 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StartExperimentRequestOrBuilder.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidateFlowRequestOrBuilder.java @@ -14,22 +14,22 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dialogflow/cx/v3/experiment.proto +// source: google/cloud/dialogflow/cx/v3/flow.proto package com.google.cloud.dialogflow.cx.v3; -public interface StartExperimentRequestOrBuilder +public interface ValidateFlowRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.StartExperimentRequest) + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ValidateFlowRequest) com.google.protobuf.MessageOrBuilder { /** * * *
-   * Required. Resource name of the experiment to start.
+   * Required. The flow to validate.
    * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * ID>/flows/<Flow ID>`.
    * 
* * @@ -43,9 +43,9 @@ public interface StartExperimentRequestOrBuilder * * *
-   * Required. Resource name of the experiment to start.
+   * Required. The flow to validate.
    * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
-   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * ID>/flows/<Flow ID>`.
    * 
* * @@ -55,4 +55,29 @@ public interface StartExperimentRequestOrBuilder * @return The bytes for name. */ com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * If not specified, the agent's default language is used.
+   * 
+ * + * string language_code = 2; + * + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + /** + * + * + *
+   * If not specified, the agent's default language is used.
+   * 
+ * + * string language_code = 2; + * + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString getLanguageCodeBytes(); } diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidationMessage.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidationMessage.java new file mode 100644 index 000000000..ff6e1e159 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidationMessage.java @@ -0,0 +1,2330 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/validation_message.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * Agent/flow validation message.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ValidationMessage} + */ +public final class ValidationMessage extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ValidationMessage) + ValidationMessageOrBuilder { + private static final long serialVersionUID = 0L; + // Use ValidationMessage.newBuilder() to construct. + private ValidationMessage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ValidationMessage() { + resourceType_ = 0; + resources_ = com.google.protobuf.LazyStringArrayList.EMPTY; + resourceNames_ = java.util.Collections.emptyList(); + severity_ = 0; + detail_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ValidationMessage(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ValidationMessage( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + resourceType_ = rawValue; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + resources_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + resources_.add(s); + break; + } + case 24: + { + int rawValue = input.readEnum(); + + severity_ = rawValue; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + detail_ = s; + break; + } + case 50: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + resourceNames_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + resourceNames_.add( + input.readMessage( + com.google.cloud.dialogflow.cx.v3.ResourceName.parser(), extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + resources_ = resources_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + resourceNames_ = java.util.Collections.unmodifiableList(resourceNames_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ValidationMessageProto + .internal_static_google_cloud_dialogflow_cx_v3_ValidationMessage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ValidationMessageProto + .internal_static_google_cloud_dialogflow_cx_v3_ValidationMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ValidationMessage.class, + com.google.cloud.dialogflow.cx.v3.ValidationMessage.Builder.class); + } + + /** + * + * + *
+   * Resource types.
+   * 
+ * + * Protobuf enum {@code google.cloud.dialogflow.cx.v3.ValidationMessage.ResourceType} + */ + public enum ResourceType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified.
+     * 
+ * + * RESOURCE_TYPE_UNSPECIFIED = 0; + */ + RESOURCE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Agent.
+     * 
+ * + * AGENT = 1; + */ + AGENT(1), + /** + * + * + *
+     * Intent.
+     * 
+ * + * INTENT = 2; + */ + INTENT(2), + /** + * + * + *
+     * Intent training phrase.
+     * 
+ * + * INTENT_TRAINING_PHRASE = 8; + */ + INTENT_TRAINING_PHRASE(8), + /** + * + * + *
+     * Intent parameter.
+     * 
+ * + * INTENT_PARAMETER = 9; + */ + INTENT_PARAMETER(9), + /** + * + * + *
+     * Multiple intents.
+     * 
+ * + * INTENTS = 10; + */ + INTENTS(10), + /** + * + * + *
+     * Multiple training phrases.
+     * 
+ * + * INTENT_TRAINING_PHRASES = 11; + */ + INTENT_TRAINING_PHRASES(11), + /** + * + * + *
+     * Entity type.
+     * 
+ * + * ENTITY_TYPE = 3; + */ + ENTITY_TYPE(3), + /** + * + * + *
+     * Multiple entity types.
+     * 
+ * + * ENTITY_TYPES = 12; + */ + ENTITY_TYPES(12), + /** + * + * + *
+     * Webhook.
+     * 
+ * + * WEBHOOK = 4; + */ + WEBHOOK(4), + /** + * + * + *
+     * Flow.
+     * 
+ * + * FLOW = 5; + */ + FLOW(5), + /** + * + * + *
+     * Page.
+     * 
+ * + * PAGE = 6; + */ + PAGE(6), + /** + * + * + *
+     * Multiple pages.
+     * 
+ * + * PAGES = 13; + */ + PAGES(13), + /** + * + * + *
+     * Transition route group.
+     * 
+ * + * TRANSITION_ROUTE_GROUP = 7; + */ + TRANSITION_ROUTE_GROUP(7), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified.
+     * 
+ * + * RESOURCE_TYPE_UNSPECIFIED = 0; + */ + public static final int RESOURCE_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Agent.
+     * 
+ * + * AGENT = 1; + */ + public static final int AGENT_VALUE = 1; + /** + * + * + *
+     * Intent.
+     * 
+ * + * INTENT = 2; + */ + public static final int INTENT_VALUE = 2; + /** + * + * + *
+     * Intent training phrase.
+     * 
+ * + * INTENT_TRAINING_PHRASE = 8; + */ + public static final int INTENT_TRAINING_PHRASE_VALUE = 8; + /** + * + * + *
+     * Intent parameter.
+     * 
+ * + * INTENT_PARAMETER = 9; + */ + public static final int INTENT_PARAMETER_VALUE = 9; + /** + * + * + *
+     * Multiple intents.
+     * 
+ * + * INTENTS = 10; + */ + public static final int INTENTS_VALUE = 10; + /** + * + * + *
+     * Multiple training phrases.
+     * 
+ * + * INTENT_TRAINING_PHRASES = 11; + */ + public static final int INTENT_TRAINING_PHRASES_VALUE = 11; + /** + * + * + *
+     * Entity type.
+     * 
+ * + * ENTITY_TYPE = 3; + */ + public static final int ENTITY_TYPE_VALUE = 3; + /** + * + * + *
+     * Multiple entity types.
+     * 
+ * + * ENTITY_TYPES = 12; + */ + public static final int ENTITY_TYPES_VALUE = 12; + /** + * + * + *
+     * Webhook.
+     * 
+ * + * WEBHOOK = 4; + */ + public static final int WEBHOOK_VALUE = 4; + /** + * + * + *
+     * Flow.
+     * 
+ * + * FLOW = 5; + */ + public static final int FLOW_VALUE = 5; + /** + * + * + *
+     * Page.
+     * 
+ * + * PAGE = 6; + */ + public static final int PAGE_VALUE = 6; + /** + * + * + *
+     * Multiple pages.
+     * 
+ * + * PAGES = 13; + */ + public static final int PAGES_VALUE = 13; + /** + * + * + *
+     * Transition route group.
+     * 
+ * + * TRANSITION_ROUTE_GROUP = 7; + */ + public static final int TRANSITION_ROUTE_GROUP_VALUE = 7; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ResourceType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ResourceType forNumber(int value) { + switch (value) { + case 0: + return RESOURCE_TYPE_UNSPECIFIED; + case 1: + return AGENT; + case 2: + return INTENT; + case 8: + return INTENT_TRAINING_PHRASE; + case 9: + return INTENT_PARAMETER; + case 10: + return INTENTS; + case 11: + return INTENT_TRAINING_PHRASES; + case 3: + return ENTITY_TYPE; + case 12: + return ENTITY_TYPES; + case 4: + return WEBHOOK; + case 5: + return FLOW; + case 6: + return PAGE; + case 13: + return PAGES; + case 7: + return TRANSITION_ROUTE_GROUP; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ResourceType findValueByNumber(int number) { + return ResourceType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ValidationMessage.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final ResourceType[] VALUES = values(); + + public static ResourceType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ResourceType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3.ValidationMessage.ResourceType) + } + + /** + * + * + *
+   * Severity level.
+   * 
+ * + * Protobuf enum {@code google.cloud.dialogflow.cx.v3.ValidationMessage.Severity} + */ + public enum Severity implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified.
+     * 
+ * + * SEVERITY_UNSPECIFIED = 0; + */ + SEVERITY_UNSPECIFIED(0), + /** + * + * + *
+     * The agent doesn't follow Dialogflow best practices.
+     * 
+ * + * INFO = 1; + */ + INFO(1), + /** + * + * + *
+     * The agent may not behave as expected.
+     * 
+ * + * WARNING = 2; + */ + WARNING(2), + /** + * + * + *
+     * The agent may experience failures.
+     * 
+ * + * ERROR = 3; + */ + ERROR(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified.
+     * 
+ * + * SEVERITY_UNSPECIFIED = 0; + */ + public static final int SEVERITY_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The agent doesn't follow Dialogflow best practices.
+     * 
+ * + * INFO = 1; + */ + public static final int INFO_VALUE = 1; + /** + * + * + *
+     * The agent may not behave as expected.
+     * 
+ * + * WARNING = 2; + */ + public static final int WARNING_VALUE = 2; + /** + * + * + *
+     * The agent may experience failures.
+     * 
+ * + * ERROR = 3; + */ + public static final int ERROR_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Severity valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Severity forNumber(int value) { + switch (value) { + case 0: + return SEVERITY_UNSPECIFIED; + case 1: + return INFO; + case 2: + return WARNING; + case 3: + return ERROR; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Severity findValueByNumber(int number) { + return Severity.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ValidationMessage.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final Severity[] VALUES = values(); + + public static Severity valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Severity(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3.ValidationMessage.Severity) + } + + public static final int RESOURCE_TYPE_FIELD_NUMBER = 1; + private int resourceType_; + /** + * + * + *
+   * The type of the resources where the message is found.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.ValidationMessage.ResourceType resource_type = 1; + * + * @return The enum numeric value on the wire for resourceType. + */ + @java.lang.Override + public int getResourceTypeValue() { + return resourceType_; + } + /** + * + * + *
+   * The type of the resources where the message is found.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.ValidationMessage.ResourceType resource_type = 1; + * + * @return The resourceType. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ValidationMessage.ResourceType getResourceType() { + @SuppressWarnings("deprecation") + com.google.cloud.dialogflow.cx.v3.ValidationMessage.ResourceType result = + com.google.cloud.dialogflow.cx.v3.ValidationMessage.ResourceType.valueOf(resourceType_); + return result == null + ? com.google.cloud.dialogflow.cx.v3.ValidationMessage.ResourceType.UNRECOGNIZED + : result; + } + + public static final int RESOURCES_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList resources_; + /** + * + * + *
+   * The names of the resources where the message is found.
+   * 
+ * + * repeated string resources = 2 [deprecated = true]; + * + * @return A list containing the resources. + */ + @java.lang.Deprecated + public com.google.protobuf.ProtocolStringList getResourcesList() { + return resources_; + } + /** + * + * + *
+   * The names of the resources where the message is found.
+   * 
+ * + * repeated string resources = 2 [deprecated = true]; + * + * @return The count of resources. + */ + @java.lang.Deprecated + public int getResourcesCount() { + return resources_.size(); + } + /** + * + * + *
+   * The names of the resources where the message is found.
+   * 
+ * + * repeated string resources = 2 [deprecated = true]; + * + * @param index The index of the element to return. + * @return The resources at the given index. + */ + @java.lang.Deprecated + public java.lang.String getResources(int index) { + return resources_.get(index); + } + /** + * + * + *
+   * The names of the resources where the message is found.
+   * 
+ * + * repeated string resources = 2 [deprecated = true]; + * + * @param index The index of the value to return. + * @return The bytes of the resources at the given index. + */ + @java.lang.Deprecated + public com.google.protobuf.ByteString getResourcesBytes(int index) { + return resources_.getByteString(index); + } + + public static final int RESOURCE_NAMES_FIELD_NUMBER = 6; + private java.util.List resourceNames_; + /** + * + * + *
+   * The resource names of the resources where the message is found.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ResourceName resource_names = 6; + */ + @java.lang.Override + public java.util.List getResourceNamesList() { + return resourceNames_; + } + /** + * + * + *
+   * The resource names of the resources where the message is found.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ResourceName resource_names = 6; + */ + @java.lang.Override + public java.util.List + getResourceNamesOrBuilderList() { + return resourceNames_; + } + /** + * + * + *
+   * The resource names of the resources where the message is found.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ResourceName resource_names = 6; + */ + @java.lang.Override + public int getResourceNamesCount() { + return resourceNames_.size(); + } + /** + * + * + *
+   * The resource names of the resources where the message is found.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ResourceName resource_names = 6; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ResourceName getResourceNames(int index) { + return resourceNames_.get(index); + } + /** + * + * + *
+   * The resource names of the resources where the message is found.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ResourceName resource_names = 6; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ResourceNameOrBuilder getResourceNamesOrBuilder( + int index) { + return resourceNames_.get(index); + } + + public static final int SEVERITY_FIELD_NUMBER = 3; + private int severity_; + /** + * + * + *
+   * Indicates the severity of the message.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.ValidationMessage.Severity severity = 3; + * + * @return The enum numeric value on the wire for severity. + */ + @java.lang.Override + public int getSeverityValue() { + return severity_; + } + /** + * + * + *
+   * Indicates the severity of the message.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.ValidationMessage.Severity severity = 3; + * + * @return The severity. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ValidationMessage.Severity getSeverity() { + @SuppressWarnings("deprecation") + com.google.cloud.dialogflow.cx.v3.ValidationMessage.Severity result = + com.google.cloud.dialogflow.cx.v3.ValidationMessage.Severity.valueOf(severity_); + return result == null + ? com.google.cloud.dialogflow.cx.v3.ValidationMessage.Severity.UNRECOGNIZED + : result; + } + + public static final int DETAIL_FIELD_NUMBER = 4; + private volatile java.lang.Object detail_; + /** + * + * + *
+   * The message detail.
+   * 
+ * + * string detail = 4; + * + * @return The detail. + */ + @java.lang.Override + public java.lang.String getDetail() { + java.lang.Object ref = detail_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + detail_ = s; + return s; + } + } + /** + * + * + *
+   * The message detail.
+   * 
+ * + * string detail = 4; + * + * @return The bytes for detail. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDetailBytes() { + java.lang.Object ref = detail_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + detail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (resourceType_ + != com.google.cloud.dialogflow.cx.v3.ValidationMessage.ResourceType + .RESOURCE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, resourceType_); + } + for (int i = 0; i < resources_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, resources_.getRaw(i)); + } + if (severity_ + != com.google.cloud.dialogflow.cx.v3.ValidationMessage.Severity.SEVERITY_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, severity_); + } + if (!getDetailBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, detail_); + } + for (int i = 0; i < resourceNames_.size(); i++) { + output.writeMessage(6, resourceNames_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (resourceType_ + != com.google.cloud.dialogflow.cx.v3.ValidationMessage.ResourceType + .RESOURCE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, resourceType_); + } + { + int dataSize = 0; + for (int i = 0; i < resources_.size(); i++) { + dataSize += computeStringSizeNoTag(resources_.getRaw(i)); + } + size += dataSize; + size += 1 * getResourcesList().size(); + } + if (severity_ + != com.google.cloud.dialogflow.cx.v3.ValidationMessage.Severity.SEVERITY_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, severity_); + } + if (!getDetailBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, detail_); + } + for (int i = 0; i < resourceNames_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, resourceNames_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.ValidationMessage)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.ValidationMessage other = + (com.google.cloud.dialogflow.cx.v3.ValidationMessage) obj; + + if (resourceType_ != other.resourceType_) return false; + if (!getResourcesList().equals(other.getResourcesList())) return false; + if (!getResourceNamesList().equals(other.getResourceNamesList())) return false; + if (severity_ != other.severity_) return false; + if (!getDetail().equals(other.getDetail())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + RESOURCE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + resourceType_; + if (getResourcesCount() > 0) { + hash = (37 * hash) + RESOURCES_FIELD_NUMBER; + hash = (53 * hash) + getResourcesList().hashCode(); + } + if (getResourceNamesCount() > 0) { + hash = (37 * hash) + RESOURCE_NAMES_FIELD_NUMBER; + hash = (53 * hash) + getResourceNamesList().hashCode(); + } + hash = (37 * hash) + SEVERITY_FIELD_NUMBER; + hash = (53 * hash) + severity_; + hash = (37 * hash) + DETAIL_FIELD_NUMBER; + hash = (53 * hash) + getDetail().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.ValidationMessage parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ValidationMessage parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ValidationMessage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ValidationMessage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ValidationMessage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ValidationMessage parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ValidationMessage parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ValidationMessage parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ValidationMessage parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ValidationMessage parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ValidationMessage parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ValidationMessage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.dialogflow.cx.v3.ValidationMessage prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Agent/flow validation message.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ValidationMessage} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ValidationMessage) + com.google.cloud.dialogflow.cx.v3.ValidationMessageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ValidationMessageProto + .internal_static_google_cloud_dialogflow_cx_v3_ValidationMessage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ValidationMessageProto + .internal_static_google_cloud_dialogflow_cx_v3_ValidationMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ValidationMessage.class, + com.google.cloud.dialogflow.cx.v3.ValidationMessage.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.ValidationMessage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getResourceNamesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + resourceType_ = 0; + + resources_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + if (resourceNamesBuilder_ == null) { + resourceNames_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + resourceNamesBuilder_.clear(); + } + severity_ = 0; + + detail_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ValidationMessageProto + .internal_static_google_cloud_dialogflow_cx_v3_ValidationMessage_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ValidationMessage getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.ValidationMessage.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ValidationMessage build() { + com.google.cloud.dialogflow.cx.v3.ValidationMessage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ValidationMessage buildPartial() { + com.google.cloud.dialogflow.cx.v3.ValidationMessage result = + new com.google.cloud.dialogflow.cx.v3.ValidationMessage(this); + int from_bitField0_ = bitField0_; + result.resourceType_ = resourceType_; + if (((bitField0_ & 0x00000001) != 0)) { + resources_ = resources_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.resources_ = resources_; + if (resourceNamesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + resourceNames_ = java.util.Collections.unmodifiableList(resourceNames_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.resourceNames_ = resourceNames_; + } else { + result.resourceNames_ = resourceNamesBuilder_.build(); + } + result.severity_ = severity_; + result.detail_ = detail_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.ValidationMessage) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.ValidationMessage) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ValidationMessage other) { + if (other == com.google.cloud.dialogflow.cx.v3.ValidationMessage.getDefaultInstance()) + return this; + if (other.resourceType_ != 0) { + setResourceTypeValue(other.getResourceTypeValue()); + } + if (!other.resources_.isEmpty()) { + if (resources_.isEmpty()) { + resources_ = other.resources_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureResourcesIsMutable(); + resources_.addAll(other.resources_); + } + onChanged(); + } + if (resourceNamesBuilder_ == null) { + if (!other.resourceNames_.isEmpty()) { + if (resourceNames_.isEmpty()) { + resourceNames_ = other.resourceNames_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureResourceNamesIsMutable(); + resourceNames_.addAll(other.resourceNames_); + } + onChanged(); + } + } else { + if (!other.resourceNames_.isEmpty()) { + if (resourceNamesBuilder_.isEmpty()) { + resourceNamesBuilder_.dispose(); + resourceNamesBuilder_ = null; + resourceNames_ = other.resourceNames_; + bitField0_ = (bitField0_ & ~0x00000002); + resourceNamesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getResourceNamesFieldBuilder() + : null; + } else { + resourceNamesBuilder_.addAllMessages(other.resourceNames_); + } + } + } + if (other.severity_ != 0) { + setSeverityValue(other.getSeverityValue()); + } + if (!other.getDetail().isEmpty()) { + detail_ = other.detail_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.ValidationMessage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.ValidationMessage) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private int resourceType_ = 0; + /** + * + * + *
+     * The type of the resources where the message is found.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ValidationMessage.ResourceType resource_type = 1; + * + * @return The enum numeric value on the wire for resourceType. + */ + @java.lang.Override + public int getResourceTypeValue() { + return resourceType_; + } + /** + * + * + *
+     * The type of the resources where the message is found.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ValidationMessage.ResourceType resource_type = 1; + * + * @param value The enum numeric value on the wire for resourceType to set. + * @return This builder for chaining. + */ + public Builder setResourceTypeValue(int value) { + + resourceType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The type of the resources where the message is found.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ValidationMessage.ResourceType resource_type = 1; + * + * @return The resourceType. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ValidationMessage.ResourceType getResourceType() { + @SuppressWarnings("deprecation") + com.google.cloud.dialogflow.cx.v3.ValidationMessage.ResourceType result = + com.google.cloud.dialogflow.cx.v3.ValidationMessage.ResourceType.valueOf(resourceType_); + return result == null + ? com.google.cloud.dialogflow.cx.v3.ValidationMessage.ResourceType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The type of the resources where the message is found.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ValidationMessage.ResourceType resource_type = 1; + * + * @param value The resourceType to set. + * @return This builder for chaining. + */ + public Builder setResourceType( + com.google.cloud.dialogflow.cx.v3.ValidationMessage.ResourceType value) { + if (value == null) { + throw new NullPointerException(); + } + + resourceType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The type of the resources where the message is found.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ValidationMessage.ResourceType resource_type = 1; + * + * @return This builder for chaining. + */ + public Builder clearResourceType() { + + resourceType_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList resources_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureResourcesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + resources_ = new com.google.protobuf.LazyStringArrayList(resources_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * The names of the resources where the message is found.
+     * 
+ * + * repeated string resources = 2 [deprecated = true]; + * + * @return A list containing the resources. + */ + @java.lang.Deprecated + public com.google.protobuf.ProtocolStringList getResourcesList() { + return resources_.getUnmodifiableView(); + } + /** + * + * + *
+     * The names of the resources where the message is found.
+     * 
+ * + * repeated string resources = 2 [deprecated = true]; + * + * @return The count of resources. + */ + @java.lang.Deprecated + public int getResourcesCount() { + return resources_.size(); + } + /** + * + * + *
+     * The names of the resources where the message is found.
+     * 
+ * + * repeated string resources = 2 [deprecated = true]; + * + * @param index The index of the element to return. + * @return The resources at the given index. + */ + @java.lang.Deprecated + public java.lang.String getResources(int index) { + return resources_.get(index); + } + /** + * + * + *
+     * The names of the resources where the message is found.
+     * 
+ * + * repeated string resources = 2 [deprecated = true]; + * + * @param index The index of the value to return. + * @return The bytes of the resources at the given index. + */ + @java.lang.Deprecated + public com.google.protobuf.ByteString getResourcesBytes(int index) { + return resources_.getByteString(index); + } + /** + * + * + *
+     * The names of the resources where the message is found.
+     * 
+ * + * repeated string resources = 2 [deprecated = true]; + * + * @param index The index to set the value at. + * @param value The resources to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setResources(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourcesIsMutable(); + resources_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * The names of the resources where the message is found.
+     * 
+ * + * repeated string resources = 2 [deprecated = true]; + * + * @param value The resources to add. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder addResources(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourcesIsMutable(); + resources_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * The names of the resources where the message is found.
+     * 
+ * + * repeated string resources = 2 [deprecated = true]; + * + * @param values The resources to add. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder addAllResources(java.lang.Iterable values) { + ensureResourcesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, resources_); + onChanged(); + return this; + } + /** + * + * + *
+     * The names of the resources where the message is found.
+     * 
+ * + * repeated string resources = 2 [deprecated = true]; + * + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder clearResources() { + resources_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The names of the resources where the message is found.
+     * 
+ * + * repeated string resources = 2 [deprecated = true]; + * + * @param value The bytes of the resources to add. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder addResourcesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureResourcesIsMutable(); + resources_.add(value); + onChanged(); + return this; + } + + private java.util.List resourceNames_ = + java.util.Collections.emptyList(); + + private void ensureResourceNamesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + resourceNames_ = + new java.util.ArrayList(resourceNames_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ResourceName, + com.google.cloud.dialogflow.cx.v3.ResourceName.Builder, + com.google.cloud.dialogflow.cx.v3.ResourceNameOrBuilder> + resourceNamesBuilder_; + + /** + * + * + *
+     * The resource names of the resources where the message is found.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ResourceName resource_names = 6; + */ + public java.util.List getResourceNamesList() { + if (resourceNamesBuilder_ == null) { + return java.util.Collections.unmodifiableList(resourceNames_); + } else { + return resourceNamesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The resource names of the resources where the message is found.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ResourceName resource_names = 6; + */ + public int getResourceNamesCount() { + if (resourceNamesBuilder_ == null) { + return resourceNames_.size(); + } else { + return resourceNamesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The resource names of the resources where the message is found.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ResourceName resource_names = 6; + */ + public com.google.cloud.dialogflow.cx.v3.ResourceName getResourceNames(int index) { + if (resourceNamesBuilder_ == null) { + return resourceNames_.get(index); + } else { + return resourceNamesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The resource names of the resources where the message is found.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ResourceName resource_names = 6; + */ + public Builder setResourceNames( + int index, com.google.cloud.dialogflow.cx.v3.ResourceName value) { + if (resourceNamesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourceNamesIsMutable(); + resourceNames_.set(index, value); + onChanged(); + } else { + resourceNamesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The resource names of the resources where the message is found.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ResourceName resource_names = 6; + */ + public Builder setResourceNames( + int index, com.google.cloud.dialogflow.cx.v3.ResourceName.Builder builderForValue) { + if (resourceNamesBuilder_ == null) { + ensureResourceNamesIsMutable(); + resourceNames_.set(index, builderForValue.build()); + onChanged(); + } else { + resourceNamesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The resource names of the resources where the message is found.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ResourceName resource_names = 6; + */ + public Builder addResourceNames(com.google.cloud.dialogflow.cx.v3.ResourceName value) { + if (resourceNamesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourceNamesIsMutable(); + resourceNames_.add(value); + onChanged(); + } else { + resourceNamesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The resource names of the resources where the message is found.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ResourceName resource_names = 6; + */ + public Builder addResourceNames( + int index, com.google.cloud.dialogflow.cx.v3.ResourceName value) { + if (resourceNamesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourceNamesIsMutable(); + resourceNames_.add(index, value); + onChanged(); + } else { + resourceNamesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The resource names of the resources where the message is found.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ResourceName resource_names = 6; + */ + public Builder addResourceNames( + com.google.cloud.dialogflow.cx.v3.ResourceName.Builder builderForValue) { + if (resourceNamesBuilder_ == null) { + ensureResourceNamesIsMutable(); + resourceNames_.add(builderForValue.build()); + onChanged(); + } else { + resourceNamesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The resource names of the resources where the message is found.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ResourceName resource_names = 6; + */ + public Builder addResourceNames( + int index, com.google.cloud.dialogflow.cx.v3.ResourceName.Builder builderForValue) { + if (resourceNamesBuilder_ == null) { + ensureResourceNamesIsMutable(); + resourceNames_.add(index, builderForValue.build()); + onChanged(); + } else { + resourceNamesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The resource names of the resources where the message is found.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ResourceName resource_names = 6; + */ + public Builder addAllResourceNames( + java.lang.Iterable values) { + if (resourceNamesBuilder_ == null) { + ensureResourceNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, resourceNames_); + onChanged(); + } else { + resourceNamesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The resource names of the resources where the message is found.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ResourceName resource_names = 6; + */ + public Builder clearResourceNames() { + if (resourceNamesBuilder_ == null) { + resourceNames_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + resourceNamesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The resource names of the resources where the message is found.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ResourceName resource_names = 6; + */ + public Builder removeResourceNames(int index) { + if (resourceNamesBuilder_ == null) { + ensureResourceNamesIsMutable(); + resourceNames_.remove(index); + onChanged(); + } else { + resourceNamesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The resource names of the resources where the message is found.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ResourceName resource_names = 6; + */ + public com.google.cloud.dialogflow.cx.v3.ResourceName.Builder getResourceNamesBuilder( + int index) { + return getResourceNamesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The resource names of the resources where the message is found.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ResourceName resource_names = 6; + */ + public com.google.cloud.dialogflow.cx.v3.ResourceNameOrBuilder getResourceNamesOrBuilder( + int index) { + if (resourceNamesBuilder_ == null) { + return resourceNames_.get(index); + } else { + return resourceNamesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The resource names of the resources where the message is found.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ResourceName resource_names = 6; + */ + public java.util.List + getResourceNamesOrBuilderList() { + if (resourceNamesBuilder_ != null) { + return resourceNamesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(resourceNames_); + } + } + /** + * + * + *
+     * The resource names of the resources where the message is found.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ResourceName resource_names = 6; + */ + public com.google.cloud.dialogflow.cx.v3.ResourceName.Builder addResourceNamesBuilder() { + return getResourceNamesFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3.ResourceName.getDefaultInstance()); + } + /** + * + * + *
+     * The resource names of the resources where the message is found.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ResourceName resource_names = 6; + */ + public com.google.cloud.dialogflow.cx.v3.ResourceName.Builder addResourceNamesBuilder( + int index) { + return getResourceNamesFieldBuilder() + .addBuilder(index, com.google.cloud.dialogflow.cx.v3.ResourceName.getDefaultInstance()); + } + /** + * + * + *
+     * The resource names of the resources where the message is found.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ResourceName resource_names = 6; + */ + public java.util.List + getResourceNamesBuilderList() { + return getResourceNamesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ResourceName, + com.google.cloud.dialogflow.cx.v3.ResourceName.Builder, + com.google.cloud.dialogflow.cx.v3.ResourceNameOrBuilder> + getResourceNamesFieldBuilder() { + if (resourceNamesBuilder_ == null) { + resourceNamesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ResourceName, + com.google.cloud.dialogflow.cx.v3.ResourceName.Builder, + com.google.cloud.dialogflow.cx.v3.ResourceNameOrBuilder>( + resourceNames_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + resourceNames_ = null; + } + return resourceNamesBuilder_; + } + + private int severity_ = 0; + /** + * + * + *
+     * Indicates the severity of the message.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ValidationMessage.Severity severity = 3; + * + * @return The enum numeric value on the wire for severity. + */ + @java.lang.Override + public int getSeverityValue() { + return severity_; + } + /** + * + * + *
+     * Indicates the severity of the message.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ValidationMessage.Severity severity = 3; + * + * @param value The enum numeric value on the wire for severity to set. + * @return This builder for chaining. + */ + public Builder setSeverityValue(int value) { + + severity_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates the severity of the message.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ValidationMessage.Severity severity = 3; + * + * @return The severity. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ValidationMessage.Severity getSeverity() { + @SuppressWarnings("deprecation") + com.google.cloud.dialogflow.cx.v3.ValidationMessage.Severity result = + com.google.cloud.dialogflow.cx.v3.ValidationMessage.Severity.valueOf(severity_); + return result == null + ? com.google.cloud.dialogflow.cx.v3.ValidationMessage.Severity.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Indicates the severity of the message.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ValidationMessage.Severity severity = 3; + * + * @param value The severity to set. + * @return This builder for chaining. + */ + public Builder setSeverity(com.google.cloud.dialogflow.cx.v3.ValidationMessage.Severity value) { + if (value == null) { + throw new NullPointerException(); + } + + severity_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates the severity of the message.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ValidationMessage.Severity severity = 3; + * + * @return This builder for chaining. + */ + public Builder clearSeverity() { + + severity_ = 0; + onChanged(); + return this; + } + + private java.lang.Object detail_ = ""; + /** + * + * + *
+     * The message detail.
+     * 
+ * + * string detail = 4; + * + * @return The detail. + */ + public java.lang.String getDetail() { + java.lang.Object ref = detail_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + detail_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The message detail.
+     * 
+ * + * string detail = 4; + * + * @return The bytes for detail. + */ + public com.google.protobuf.ByteString getDetailBytes() { + java.lang.Object ref = detail_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + detail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The message detail.
+     * 
+ * + * string detail = 4; + * + * @param value The detail to set. + * @return This builder for chaining. + */ + public Builder setDetail(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + detail_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The message detail.
+     * 
+ * + * string detail = 4; + * + * @return This builder for chaining. + */ + public Builder clearDetail() { + + detail_ = getDefaultInstance().getDetail(); + onChanged(); + return this; + } + /** + * + * + *
+     * The message detail.
+     * 
+ * + * string detail = 4; + * + * @param value The bytes for detail to set. + * @return This builder for chaining. + */ + public Builder setDetailBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + detail_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.ValidationMessage) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ValidationMessage) + private static final com.google.cloud.dialogflow.cx.v3.ValidationMessage DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ValidationMessage(); + } + + public static com.google.cloud.dialogflow.cx.v3.ValidationMessage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ValidationMessage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ValidationMessage(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ValidationMessage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidationMessageOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidationMessageOrBuilder.java new file mode 100644 index 000000000..dd4500650 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidationMessageOrBuilder.java @@ -0,0 +1,207 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/validation_message.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface ValidationMessageOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ValidationMessage) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The type of the resources where the message is found.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.ValidationMessage.ResourceType resource_type = 1; + * + * @return The enum numeric value on the wire for resourceType. + */ + int getResourceTypeValue(); + /** + * + * + *
+   * The type of the resources where the message is found.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.ValidationMessage.ResourceType resource_type = 1; + * + * @return The resourceType. + */ + com.google.cloud.dialogflow.cx.v3.ValidationMessage.ResourceType getResourceType(); + + /** + * + * + *
+   * The names of the resources where the message is found.
+   * 
+ * + * repeated string resources = 2 [deprecated = true]; + * + * @return A list containing the resources. + */ + @java.lang.Deprecated + java.util.List getResourcesList(); + /** + * + * + *
+   * The names of the resources where the message is found.
+   * 
+ * + * repeated string resources = 2 [deprecated = true]; + * + * @return The count of resources. + */ + @java.lang.Deprecated + int getResourcesCount(); + /** + * + * + *
+   * The names of the resources where the message is found.
+   * 
+ * + * repeated string resources = 2 [deprecated = true]; + * + * @param index The index of the element to return. + * @return The resources at the given index. + */ + @java.lang.Deprecated + java.lang.String getResources(int index); + /** + * + * + *
+   * The names of the resources where the message is found.
+   * 
+ * + * repeated string resources = 2 [deprecated = true]; + * + * @param index The index of the value to return. + * @return The bytes of the resources at the given index. + */ + @java.lang.Deprecated + com.google.protobuf.ByteString getResourcesBytes(int index); + + /** + * + * + *
+   * The resource names of the resources where the message is found.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ResourceName resource_names = 6; + */ + java.util.List getResourceNamesList(); + /** + * + * + *
+   * The resource names of the resources where the message is found.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ResourceName resource_names = 6; + */ + com.google.cloud.dialogflow.cx.v3.ResourceName getResourceNames(int index); + /** + * + * + *
+   * The resource names of the resources where the message is found.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ResourceName resource_names = 6; + */ + int getResourceNamesCount(); + /** + * + * + *
+   * The resource names of the resources where the message is found.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ResourceName resource_names = 6; + */ + java.util.List + getResourceNamesOrBuilderList(); + /** + * + * + *
+   * The resource names of the resources where the message is found.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ResourceName resource_names = 6; + */ + com.google.cloud.dialogflow.cx.v3.ResourceNameOrBuilder getResourceNamesOrBuilder(int index); + + /** + * + * + *
+   * Indicates the severity of the message.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.ValidationMessage.Severity severity = 3; + * + * @return The enum numeric value on the wire for severity. + */ + int getSeverityValue(); + /** + * + * + *
+   * Indicates the severity of the message.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.ValidationMessage.Severity severity = 3; + * + * @return The severity. + */ + com.google.cloud.dialogflow.cx.v3.ValidationMessage.Severity getSeverity(); + + /** + * + * + *
+   * The message detail.
+   * 
+ * + * string detail = 4; + * + * @return The detail. + */ + java.lang.String getDetail(); + /** + * + * + *
+   * The message detail.
+   * 
+ * + * string detail = 4; + * + * @return The bytes for detail. + */ + com.google.protobuf.ByteString getDetailBytes(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidationMessageProto.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidationMessageProto.java new file mode 100644 index 000000000..cdbea10b2 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidationMessageProto.java @@ -0,0 +1,102 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/validation_message.proto + +package com.google.cloud.dialogflow.cx.v3; + +public final class ValidationMessageProto { + private ValidationMessageProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_ValidationMessage_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_ValidationMessage_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_ResourceName_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_ResourceName_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n6google/cloud/dialogflow/cx/v3/validati" + + "on_message.proto\022\035google.cloud.dialogflo" + + "w.cx.v3\032\034google/protobuf/struct.proto\032\034g" + + "oogle/api/annotations.proto\"\370\004\n\021Validati" + + "onMessage\022T\n\rresource_type\030\001 \001(\0162=.googl" + + "e.cloud.dialogflow.cx.v3.ValidationMessa" + + "ge.ResourceType\022\025\n\tresources\030\002 \003(\tB\002\030\001\022C" + + "\n\016resource_names\030\006 \003(\0132+.google.cloud.di" + + "alogflow.cx.v3.ResourceName\022K\n\010severity\030" + + "\003 \001(\01629.google.cloud.dialogflow.cx.v3.Va" + + "lidationMessage.Severity\022\016\n\006detail\030\004 \001(\t" + + "\"\213\002\n\014ResourceType\022\035\n\031RESOURCE_TYPE_UNSPE" + + "CIFIED\020\000\022\t\n\005AGENT\020\001\022\n\n\006INTENT\020\002\022\032\n\026INTEN" + + "T_TRAINING_PHRASE\020\010\022\024\n\020INTENT_PARAMETER\020" + + "\t\022\013\n\007INTENTS\020\n\022\033\n\027INTENT_TRAINING_PHRASE" + + "S\020\013\022\017\n\013ENTITY_TYPE\020\003\022\020\n\014ENTITY_TYPES\020\014\022\013" + + "\n\007WEBHOOK\020\004\022\010\n\004FLOW\020\005\022\010\n\004PAGE\020\006\022\t\n\005PAGES" + + "\020\r\022\032\n\026TRANSITION_ROUTE_GROUP\020\007\"F\n\010Severi" + + "ty\022\030\n\024SEVERITY_UNSPECIFIED\020\000\022\010\n\004INFO\020\001\022\013" + + "\n\007WARNING\020\002\022\t\n\005ERROR\020\003\"2\n\014ResourceName\022\014" + + "\n\004name\030\001 \001(\t\022\024\n\014display_name\030\002 \001(\tB\246\001\n!c" + + "om.google.cloud.dialogflow.cx.v3B\026Valida" + + "tionMessageProtoP\001Z?google.golang.org/ge" + + "nproto/googleapis/cloud/dialogflow/cx/v3" + + ";cx\370\001\001\242\002\002DF\252\002\035Google.Cloud.Dialogflow.Cx" + + ".V3b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.StructProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_dialogflow_cx_v3_ValidationMessage_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_dialogflow_cx_v3_ValidationMessage_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_ValidationMessage_descriptor, + new java.lang.String[] { + "ResourceType", "Resources", "ResourceNames", "Severity", "Detail", + }); + internal_static_google_cloud_dialogflow_cx_v3_ResourceName_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_dialogflow_cx_v3_ResourceName_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_ResourceName_descriptor, + new java.lang.String[] { + "Name", "DisplayName", + }); + com.google.protobuf.StructProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VariantsHistory.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VariantsHistory.java deleted file mode 100644 index db5e15059..000000000 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VariantsHistory.java +++ /dev/null @@ -1,1111 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dialogflow/cx/v3/experiment.proto - -package com.google.cloud.dialogflow.cx.v3; - -/** - * - * - *
- * The history of variants update.
- * 
- * - * Protobuf type {@code google.cloud.dialogflow.cx.v3.VariantsHistory} - */ -public final class VariantsHistory extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.VariantsHistory) - VariantsHistoryOrBuilder { - private static final long serialVersionUID = 0L; - // Use VariantsHistory.newBuilder() to construct. - private VariantsHistory(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private VariantsHistory() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new VariantsHistory(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private VariantsHistory( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.dialogflow.cx.v3.VersionVariants.Builder subBuilder = null; - if (variantsCase_ == 1) { - subBuilder = - ((com.google.cloud.dialogflow.cx.v3.VersionVariants) variants_).toBuilder(); - } - variants_ = - input.readMessage( - com.google.cloud.dialogflow.cx.v3.VersionVariants.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.dialogflow.cx.v3.VersionVariants) variants_); - variants_ = subBuilder.buildPartial(); - } - variantsCase_ = 1; - break; - } - case 18: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (updateTime_ != null) { - subBuilder = updateTime_.toBuilder(); - } - updateTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateTime_); - updateTime_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_VariantsHistory_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_VariantsHistory_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3.VariantsHistory.class, - com.google.cloud.dialogflow.cx.v3.VariantsHistory.Builder.class); - } - - private int variantsCase_ = 0; - private java.lang.Object variants_; - - public enum VariantsCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - VERSION_VARIANTS(1), - VARIANTS_NOT_SET(0); - private final int value; - - private VariantsCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static VariantsCase valueOf(int value) { - return forNumber(value); - } - - public static VariantsCase forNumber(int value) { - switch (value) { - case 1: - return VERSION_VARIANTS; - case 0: - return VARIANTS_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public VariantsCase getVariantsCase() { - return VariantsCase.forNumber(variantsCase_); - } - - public static final int VERSION_VARIANTS_FIELD_NUMBER = 1; - /** - * - * - *
-   * The flow versions as the variants.
-   * 
- * - * .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 1; - * - * @return Whether the versionVariants field is set. - */ - @java.lang.Override - public boolean hasVersionVariants() { - return variantsCase_ == 1; - } - /** - * - * - *
-   * The flow versions as the variants.
-   * 
- * - * .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 1; - * - * @return The versionVariants. - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.VersionVariants getVersionVariants() { - if (variantsCase_ == 1) { - return (com.google.cloud.dialogflow.cx.v3.VersionVariants) variants_; - } - return com.google.cloud.dialogflow.cx.v3.VersionVariants.getDefaultInstance(); - } - /** - * - * - *
-   * The flow versions as the variants.
-   * 
- * - * .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 1; - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.VersionVariantsOrBuilder getVersionVariantsOrBuilder() { - if (variantsCase_ == 1) { - return (com.google.cloud.dialogflow.cx.v3.VersionVariants) variants_; - } - return com.google.cloud.dialogflow.cx.v3.VersionVariants.getDefaultInstance(); - } - - public static final int UPDATE_TIME_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp updateTime_; - /** - * - * - *
-   * Update time of the variants.
-   * 
- * - * .google.protobuf.Timestamp update_time = 2; - * - * @return Whether the updateTime field is set. - */ - @java.lang.Override - public boolean hasUpdateTime() { - return updateTime_ != null; - } - /** - * - * - *
-   * Update time of the variants.
-   * 
- * - * .google.protobuf.Timestamp update_time = 2; - * - * @return The updateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getUpdateTime() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - /** - * - * - *
-   * Update time of the variants.
-   * 
- * - * .google.protobuf.Timestamp update_time = 2; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - return getUpdateTime(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (variantsCase_ == 1) { - output.writeMessage(1, (com.google.cloud.dialogflow.cx.v3.VersionVariants) variants_); - } - if (updateTime_ != null) { - output.writeMessage(2, getUpdateTime()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (variantsCase_ == 1) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 1, (com.google.cloud.dialogflow.cx.v3.VersionVariants) variants_); - } - if (updateTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateTime()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.VariantsHistory)) { - return super.equals(obj); - } - com.google.cloud.dialogflow.cx.v3.VariantsHistory other = - (com.google.cloud.dialogflow.cx.v3.VariantsHistory) obj; - - if (hasUpdateTime() != other.hasUpdateTime()) return false; - if (hasUpdateTime()) { - if (!getUpdateTime().equals(other.getUpdateTime())) return false; - } - if (!getVariantsCase().equals(other.getVariantsCase())) return false; - switch (variantsCase_) { - case 1: - if (!getVersionVariants().equals(other.getVersionVariants())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasUpdateTime()) { - hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getUpdateTime().hashCode(); - } - switch (variantsCase_) { - case 1: - hash = (37 * hash) + VERSION_VARIANTS_FIELD_NUMBER; - hash = (53 * hash) + getVersionVariants().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dialogflow.cx.v3.VariantsHistory parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dialogflow.cx.v3.VariantsHistory parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3.VariantsHistory parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dialogflow.cx.v3.VariantsHistory parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3.VariantsHistory parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dialogflow.cx.v3.VariantsHistory parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3.VariantsHistory parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dialogflow.cx.v3.VariantsHistory parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3.VariantsHistory parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dialogflow.cx.v3.VariantsHistory parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3.VariantsHistory parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dialogflow.cx.v3.VariantsHistory parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.dialogflow.cx.v3.VariantsHistory prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * The history of variants update.
-   * 
- * - * Protobuf type {@code google.cloud.dialogflow.cx.v3.VariantsHistory} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.VariantsHistory) - com.google.cloud.dialogflow.cx.v3.VariantsHistoryOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_VariantsHistory_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_VariantsHistory_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3.VariantsHistory.class, - com.google.cloud.dialogflow.cx.v3.VariantsHistory.Builder.class); - } - - // Construct using com.google.cloud.dialogflow.cx.v3.VariantsHistory.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (updateTimeBuilder_ == null) { - updateTime_ = null; - } else { - updateTime_ = null; - updateTimeBuilder_ = null; - } - variantsCase_ = 0; - variants_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dialogflow.cx.v3.ExperimentProto - .internal_static_google_cloud_dialogflow_cx_v3_VariantsHistory_descriptor; - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.VariantsHistory getDefaultInstanceForType() { - return com.google.cloud.dialogflow.cx.v3.VariantsHistory.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.VariantsHistory build() { - com.google.cloud.dialogflow.cx.v3.VariantsHistory result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.VariantsHistory buildPartial() { - com.google.cloud.dialogflow.cx.v3.VariantsHistory result = - new com.google.cloud.dialogflow.cx.v3.VariantsHistory(this); - if (variantsCase_ == 1) { - if (versionVariantsBuilder_ == null) { - result.variants_ = variants_; - } else { - result.variants_ = versionVariantsBuilder_.build(); - } - } - if (updateTimeBuilder_ == null) { - result.updateTime_ = updateTime_; - } else { - result.updateTime_ = updateTimeBuilder_.build(); - } - result.variantsCase_ = variantsCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.dialogflow.cx.v3.VariantsHistory) { - return mergeFrom((com.google.cloud.dialogflow.cx.v3.VariantsHistory) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.VariantsHistory other) { - if (other == com.google.cloud.dialogflow.cx.v3.VariantsHistory.getDefaultInstance()) - return this; - if (other.hasUpdateTime()) { - mergeUpdateTime(other.getUpdateTime()); - } - switch (other.getVariantsCase()) { - case VERSION_VARIANTS: - { - mergeVersionVariants(other.getVersionVariants()); - break; - } - case VARIANTS_NOT_SET: - { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.dialogflow.cx.v3.VariantsHistory parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dialogflow.cx.v3.VariantsHistory) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int variantsCase_ = 0; - private java.lang.Object variants_; - - public VariantsCase getVariantsCase() { - return VariantsCase.forNumber(variantsCase_); - } - - public Builder clearVariants() { - variantsCase_ = 0; - variants_ = null; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3.VersionVariants, - com.google.cloud.dialogflow.cx.v3.VersionVariants.Builder, - com.google.cloud.dialogflow.cx.v3.VersionVariantsOrBuilder> - versionVariantsBuilder_; - /** - * - * - *
-     * The flow versions as the variants.
-     * 
- * - * .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 1; - * - * @return Whether the versionVariants field is set. - */ - @java.lang.Override - public boolean hasVersionVariants() { - return variantsCase_ == 1; - } - /** - * - * - *
-     * The flow versions as the variants.
-     * 
- * - * .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 1; - * - * @return The versionVariants. - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.VersionVariants getVersionVariants() { - if (versionVariantsBuilder_ == null) { - if (variantsCase_ == 1) { - return (com.google.cloud.dialogflow.cx.v3.VersionVariants) variants_; - } - return com.google.cloud.dialogflow.cx.v3.VersionVariants.getDefaultInstance(); - } else { - if (variantsCase_ == 1) { - return versionVariantsBuilder_.getMessage(); - } - return com.google.cloud.dialogflow.cx.v3.VersionVariants.getDefaultInstance(); - } - } - /** - * - * - *
-     * The flow versions as the variants.
-     * 
- * - * .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 1; - */ - public Builder setVersionVariants(com.google.cloud.dialogflow.cx.v3.VersionVariants value) { - if (versionVariantsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - variants_ = value; - onChanged(); - } else { - versionVariantsBuilder_.setMessage(value); - } - variantsCase_ = 1; - return this; - } - /** - * - * - *
-     * The flow versions as the variants.
-     * 
- * - * .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 1; - */ - public Builder setVersionVariants( - com.google.cloud.dialogflow.cx.v3.VersionVariants.Builder builderForValue) { - if (versionVariantsBuilder_ == null) { - variants_ = builderForValue.build(); - onChanged(); - } else { - versionVariantsBuilder_.setMessage(builderForValue.build()); - } - variantsCase_ = 1; - return this; - } - /** - * - * - *
-     * The flow versions as the variants.
-     * 
- * - * .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 1; - */ - public Builder mergeVersionVariants(com.google.cloud.dialogflow.cx.v3.VersionVariants value) { - if (versionVariantsBuilder_ == null) { - if (variantsCase_ == 1 - && variants_ - != com.google.cloud.dialogflow.cx.v3.VersionVariants.getDefaultInstance()) { - variants_ = - com.google.cloud.dialogflow.cx.v3.VersionVariants.newBuilder( - (com.google.cloud.dialogflow.cx.v3.VersionVariants) variants_) - .mergeFrom(value) - .buildPartial(); - } else { - variants_ = value; - } - onChanged(); - } else { - if (variantsCase_ == 1) { - versionVariantsBuilder_.mergeFrom(value); - } - versionVariantsBuilder_.setMessage(value); - } - variantsCase_ = 1; - return this; - } - /** - * - * - *
-     * The flow versions as the variants.
-     * 
- * - * .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 1; - */ - public Builder clearVersionVariants() { - if (versionVariantsBuilder_ == null) { - if (variantsCase_ == 1) { - variantsCase_ = 0; - variants_ = null; - onChanged(); - } - } else { - if (variantsCase_ == 1) { - variantsCase_ = 0; - variants_ = null; - } - versionVariantsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * The flow versions as the variants.
-     * 
- * - * .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 1; - */ - public com.google.cloud.dialogflow.cx.v3.VersionVariants.Builder getVersionVariantsBuilder() { - return getVersionVariantsFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The flow versions as the variants.
-     * 
- * - * .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 1; - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.VersionVariantsOrBuilder - getVersionVariantsOrBuilder() { - if ((variantsCase_ == 1) && (versionVariantsBuilder_ != null)) { - return versionVariantsBuilder_.getMessageOrBuilder(); - } else { - if (variantsCase_ == 1) { - return (com.google.cloud.dialogflow.cx.v3.VersionVariants) variants_; - } - return com.google.cloud.dialogflow.cx.v3.VersionVariants.getDefaultInstance(); - } - } - /** - * - * - *
-     * The flow versions as the variants.
-     * 
- * - * .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3.VersionVariants, - com.google.cloud.dialogflow.cx.v3.VersionVariants.Builder, - com.google.cloud.dialogflow.cx.v3.VersionVariantsOrBuilder> - getVersionVariantsFieldBuilder() { - if (versionVariantsBuilder_ == null) { - if (!(variantsCase_ == 1)) { - variants_ = com.google.cloud.dialogflow.cx.v3.VersionVariants.getDefaultInstance(); - } - versionVariantsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3.VersionVariants, - com.google.cloud.dialogflow.cx.v3.VersionVariants.Builder, - com.google.cloud.dialogflow.cx.v3.VersionVariantsOrBuilder>( - (com.google.cloud.dialogflow.cx.v3.VersionVariants) variants_, - getParentForChildren(), - isClean()); - variants_ = null; - } - variantsCase_ = 1; - onChanged(); - ; - return versionVariantsBuilder_; - } - - private com.google.protobuf.Timestamp updateTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - updateTimeBuilder_; - /** - * - * - *
-     * Update time of the variants.
-     * 
- * - * .google.protobuf.Timestamp update_time = 2; - * - * @return Whether the updateTime field is set. - */ - public boolean hasUpdateTime() { - return updateTimeBuilder_ != null || updateTime_ != null; - } - /** - * - * - *
-     * Update time of the variants.
-     * 
- * - * .google.protobuf.Timestamp update_time = 2; - * - * @return The updateTime. - */ - public com.google.protobuf.Timestamp getUpdateTime() { - if (updateTimeBuilder_ == null) { - return updateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : updateTime_; - } else { - return updateTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Update time of the variants.
-     * 
- * - * .google.protobuf.Timestamp update_time = 2; - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateTime_ = value; - onChanged(); - } else { - updateTimeBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Update time of the variants.
-     * 
- * - * .google.protobuf.Timestamp update_time = 2; - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (updateTimeBuilder_ == null) { - updateTime_ = builderForValue.build(); - onChanged(); - } else { - updateTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Update time of the variants.
-     * 
- * - * .google.protobuf.Timestamp update_time = 2; - */ - public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (updateTime_ != null) { - updateTime_ = - com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); - } else { - updateTime_ = value; - } - onChanged(); - } else { - updateTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Update time of the variants.
-     * 
- * - * .google.protobuf.Timestamp update_time = 2; - */ - public Builder clearUpdateTime() { - if (updateTimeBuilder_ == null) { - updateTime_ = null; - onChanged(); - } else { - updateTime_ = null; - updateTimeBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Update time of the variants.
-     * 
- * - * .google.protobuf.Timestamp update_time = 2; - */ - public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { - - onChanged(); - return getUpdateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Update time of the variants.
-     * 
- * - * .google.protobuf.Timestamp update_time = 2; - */ - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - if (updateTimeBuilder_ != null) { - return updateTimeBuilder_.getMessageOrBuilder(); - } else { - return updateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : updateTime_; - } - } - /** - * - * - *
-     * Update time of the variants.
-     * 
- * - * .google.protobuf.Timestamp update_time = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getUpdateTimeFieldBuilder() { - if (updateTimeBuilder_ == null) { - updateTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getUpdateTime(), getParentForChildren(), isClean()); - updateTime_ = null; - } - return updateTimeBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.VariantsHistory) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.VariantsHistory) - private static final com.google.cloud.dialogflow.cx.v3.VariantsHistory DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.VariantsHistory(); - } - - public static com.google.cloud.dialogflow.cx.v3.VariantsHistory getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public VariantsHistory parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new VariantsHistory(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.VariantsHistory getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VariantsHistoryOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VariantsHistoryOrBuilder.java deleted file mode 100644 index ef8cc5f7f..000000000 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VariantsHistoryOrBuilder.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dialogflow/cx/v3/experiment.proto - -package com.google.cloud.dialogflow.cx.v3; - -public interface VariantsHistoryOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.VariantsHistory) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The flow versions as the variants.
-   * 
- * - * .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 1; - * - * @return Whether the versionVariants field is set. - */ - boolean hasVersionVariants(); - /** - * - * - *
-   * The flow versions as the variants.
-   * 
- * - * .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 1; - * - * @return The versionVariants. - */ - com.google.cloud.dialogflow.cx.v3.VersionVariants getVersionVariants(); - /** - * - * - *
-   * The flow versions as the variants.
-   * 
- * - * .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 1; - */ - com.google.cloud.dialogflow.cx.v3.VersionVariantsOrBuilder getVersionVariantsOrBuilder(); - - /** - * - * - *
-   * Update time of the variants.
-   * 
- * - * .google.protobuf.Timestamp update_time = 2; - * - * @return Whether the updateTime field is set. - */ - boolean hasUpdateTime(); - /** - * - * - *
-   * Update time of the variants.
-   * 
- * - * .google.protobuf.Timestamp update_time = 2; - * - * @return The updateTime. - */ - com.google.protobuf.Timestamp getUpdateTime(); - /** - * - * - *
-   * Update time of the variants.
-   * 
- * - * .google.protobuf.Timestamp update_time = 2; - */ - com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); - - public com.google.cloud.dialogflow.cx.v3.VariantsHistory.VariantsCase getVariantsCase(); -} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VersionVariantsOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VersionVariantsOrBuilder.java deleted file mode 100644 index 11dfaea8f..000000000 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VersionVariantsOrBuilder.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dialogflow/cx/v3/experiment.proto - -package com.google.cloud.dialogflow.cx.v3; - -public interface VersionVariantsOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.VersionVariants) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * A list of flow version variants.
-   * 
- * - * repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; - */ - java.util.List getVariantsList(); - /** - * - * - *
-   * A list of flow version variants.
-   * 
- * - * repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; - */ - com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant getVariants(int index); - /** - * - * - *
-   * A list of flow version variants.
-   * 
- * - * repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; - */ - int getVariantsCount(); - /** - * - * - *
-   * A list of flow version variants.
-   * 
- * - * repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; - */ - java.util.List - getVariantsOrBuilderList(); - /** - * - * - *
-   * A list of flow version variants.
-   * 
- * - * repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; - */ - com.google.cloud.dialogflow.cx.v3.VersionVariants.VariantOrBuilder getVariantsOrBuilder( - int index); -} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VoiceSelectionParams.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VoiceSelectionParams.java index 67b5d086d..e6a230129 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VoiceSelectionParams.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VoiceSelectionParams.java @@ -128,6 +128,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * 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). * * * string name = 1; @@ -153,6 +155,8 @@ public java.lang.String getName() { * 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). * * * string name = 1; @@ -181,8 +185,9 @@ public com.google.protobuf.ByteString getNameBytes() { * 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 should - * substitute a voice with a different gender rather than failing the request. + * voice of the appropriate gender is not available, the synthesizer + * substitutes a voice with a different gender rather than failing the + * request. * * * .google.cloud.dialogflow.cx.v3.SsmlVoiceGender ssml_gender = 2; @@ -200,8 +205,9 @@ public int getSsmlGenderValue() { * 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 should - * substitute a voice with a different gender rather than failing the request. + * voice of the appropriate gender is not available, the synthesizer + * substitutes a voice with a different gender rather than failing the + * request. * * * .google.cloud.dialogflow.cx.v3.SsmlVoiceGender ssml_gender = 2; @@ -562,6 +568,8 @@ public Builder mergeFrom( * 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). * * * string name = 1; @@ -586,6 +594,8 @@ public java.lang.String getName() { * 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). * * * string name = 1; @@ -610,6 +620,8 @@ public com.google.protobuf.ByteString getNameBytes() { * 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). * * * string name = 1; @@ -633,6 +645,8 @@ public Builder setName(java.lang.String value) { * 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). * * * string name = 1; @@ -652,6 +666,8 @@ public Builder clearName() { * 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). * * * string name = 1; @@ -678,8 +694,9 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * 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 should - * substitute a voice with a different gender rather than failing the request. + * voice of the appropriate gender is not available, the synthesizer + * substitutes a voice with a different gender rather than failing the + * request. * * * .google.cloud.dialogflow.cx.v3.SsmlVoiceGender ssml_gender = 2; @@ -697,8 +714,9 @@ public int getSsmlGenderValue() { * 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 should - * substitute a voice with a different gender rather than failing the request. + * voice of the appropriate gender is not available, the synthesizer + * substitutes a voice with a different gender rather than failing the + * request. * * * .google.cloud.dialogflow.cx.v3.SsmlVoiceGender ssml_gender = 2; @@ -719,8 +737,9 @@ public Builder setSsmlGenderValue(int value) { * 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 should - * substitute a voice with a different gender rather than failing the request. + * voice of the appropriate gender is not available, the synthesizer + * substitutes a voice with a different gender rather than failing the + * request. * * * .google.cloud.dialogflow.cx.v3.SsmlVoiceGender ssml_gender = 2; @@ -743,8 +762,9 @@ public com.google.cloud.dialogflow.cx.v3.SsmlVoiceGender getSsmlGender() { * Optional. The preferred gender of the voice. If not set, the service will * choose a voice based on the other parameters such as language_code and * [name][google.cloud.dialogflow.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 should - * substitute a voice with a different gender rather than failing the request. + * voice of the appropriate gender is not available, the synthesizer + * substitutes a voice with a different gender rather than failing the + * request. * * * .google.cloud.dialogflow.cx.v3.SsmlVoiceGender ssml_gender = 2; @@ -768,8 +788,9 @@ public Builder setSsmlGender(com.google.cloud.dialogflow.cx.v3.SsmlVoiceGender v * 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 should - * substitute a voice with a different gender rather than failing the request. + * voice of the appropriate gender is not available, the synthesizer + * substitutes a voice with a different gender rather than failing the + * request. * * * .google.cloud.dialogflow.cx.v3.SsmlVoiceGender ssml_gender = 2; diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VoiceSelectionParamsOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VoiceSelectionParamsOrBuilder.java index 18b9fab18..a57b6464f 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VoiceSelectionParamsOrBuilder.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VoiceSelectionParamsOrBuilder.java @@ -30,6 +30,8 @@ public interface VoiceSelectionParamsOrBuilder * 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). * * * string name = 1; @@ -44,6 +46,8 @@ public interface VoiceSelectionParamsOrBuilder * 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). * * * string name = 1; @@ -59,8 +63,9 @@ public interface VoiceSelectionParamsOrBuilder * 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 should - * substitute a voice with a different gender rather than failing the request. + * voice of the appropriate gender is not available, the synthesizer + * substitutes a voice with a different gender rather than failing the + * request. * * * .google.cloud.dialogflow.cx.v3.SsmlVoiceGender ssml_gender = 2; @@ -75,8 +80,9 @@ public interface VoiceSelectionParamsOrBuilder * 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 should - * substitute a voice with a different gender rather than failing the request. + * voice of the appropriate gender is not available, the synthesizer + * substitutes a voice with a different gender rather than failing the + * request. * * * .google.cloud.dialogflow.cx.v3.SsmlVoiceGender ssml_gender = 2; diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/WebhookProto.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/WebhookProto.java index 7379ea21a..d00abd8f2 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/WebhookProto.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/WebhookProto.java @@ -246,11 +246,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "*/webhooks/*}\332A\004name\032x\312A\031dialogflow.goog" + "leapis.com\322AYhttps://www.googleapis.com/" + "auth/cloud-platform,https://www.googleap" - + "is.com/auth/dialogflowB\234\001\n!com.google.cl" + + "is.com/auth/dialogflowB\233\002\n!com.google.cl" + "oud.dialogflow.cx.v3B\014WebhookProtoP\001Z?go" + "ogle.golang.org/genproto/googleapis/clou" + "d/dialogflow/cx/v3;cx\370\001\001\242\002\002DF\252\002\035Google.C" - + "loud.Dialogflow.Cx.V3b\006proto3" + + "loud.Dialogflow.Cx.V3\352A|\n\'servicedirecto" + + "ry.googleapis.com/Service\022Qprojects/{pro" + + "ject}/locations/{location}/namespaces/{n" + + "amespace}/services/{service}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -470,6 +473,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { registry.add(com.google.api.ClientProto.methodSignature); registry.add(com.google.api.ClientProto.oauthScopes); registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceDefinition); registry.add(com.google.api.ResourceProto.resourceReference); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/agent.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/agent.proto index 9cc1ac66d..41c783e98 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/agent.proto +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/agent.proto @@ -108,6 +108,25 @@ service Agents { metadata_type: "google.protobuf.Struct" }; } + + // 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. + rpc ValidateAgent(ValidateAgentRequest) returns (AgentValidationResult) { + option (google.api.http) = { + post: "/v3/{name=projects/*/locations/*/agents/*}:validate" + body: "*" + }; + } + + // Gets the latest agent validation result. Agent validation is performed + // when ValidateAgent is called. + rpc GetAgentValidationResult(GetAgentValidationResultRequest) returns (AgentValidationResult) { + option (google.api.http) = { + get: "/v3/{name=projects/*/locations/*/agents/*/validationResult}" + }; + option (google.api.method_signature) = "name"; + } } // Settings related to speech recognition. @@ -176,6 +195,13 @@ message Agent { } ]; + // Name of the [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] reference for the agent. + // Format: `projects//locations//securitySettings/`. + string security_settings = 17 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/SecuritySettings" + }]; + // Indicates if stackdriver logging is enabled for the agent. bool enable_stackdriver_logging = 18; @@ -316,3 +342,50 @@ message RestoreAgentRequest { bytes agent_content = 3; } } + +// The request message for [Agents.ValidateAgent][google.cloud.dialogflow.cx.v3.Agents.ValidateAgent]. +message ValidateAgentRequest { + // Required. The agent to validate. + // Format: `projects//locations//agents/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Agent" + } + ]; + + // If not specified, the agent's default language is used. + string language_code = 2; +} + +// The request message for [Agents.GetAgentValidationResult][google.cloud.dialogflow.cx.v3.Agents.GetAgentValidationResult]. +message GetAgentValidationResultRequest { + // Required. The agent name. + // Format: `projects//locations//agents//validationResult`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/AgentValidationResult" + } + ]; + + // If not specified, the agent's default language is used. + string language_code = 2; +} + +// The response message for [Agents.GetAgentValidationResult][google.cloud.dialogflow.cx.v3.Agents.GetAgentValidationResult]. +message AgentValidationResult { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/AgentValidationResult" + pattern: "projects/{project}/locations/{location}/agents/{agent}/validationResult" + }; + + // The unique identifier of the agent validation result. + // Format: `projects//locations//agents//validationResult`. + string name = 1; + + // Contains all flow validation results. + repeated FlowValidationResult flow_validation_results = 2; +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/audio_config.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/audio_config.proto index d80b94f29..ff09fd67b 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/audio_config.proto +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/audio_config.proto @@ -29,31 +29,6 @@ option java_outer_classname = "AudioConfigProto"; option java_package = "com.google.cloud.dialogflow.cx.v3"; option objc_class_prefix = "DF"; -// Information for a word recognized by the speech recognizer. -message SpeechWordInfo { - // The word this info is for. - string word = 3; - - // 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. - google.protobuf.Duration start_offset = 1; - - // 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. - google.protobuf.Duration end_offset = 2; - - // 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. - float confidence = 4; -} - // Audio encoding of the audio content sent in the conversational query request. // Refer to the // [Cloud Speech API @@ -103,6 +78,31 @@ enum AudioEncoding { AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE = 7; } +// Information for a word recognized by the speech recognizer. +message SpeechWordInfo { + // The word this info is for. + string word = 3; + + // 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. + google.protobuf.Duration start_offset = 1; + + // 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. + google.protobuf.Duration end_offset = 2; + + // 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. + float confidence = 4; +} + // Instructs the speech recognizer on how to process the audio content. message InputAudioConfig { // Required. Audio encoding of the audio content to process. @@ -204,13 +204,17 @@ message VoiceSelectionParams { // 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). string name = 1; // 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 should - // substitute a voice with a different gender rather than failing the request. + // voice of the appropriate gender is not available, the synthesizer + // substitutes a voice with a different gender rather than failing the + // request. SsmlVoiceGender ssml_gender = 2; } diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/entity_type.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/entity_type.proto index 38526fab3..9ae35dfb0 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/entity_type.proto +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/entity_type.proto @@ -115,7 +115,6 @@ message EntityType { }; // An **entity entry** for an associated entity type. - // Next Id = 8 message Entity { // Required. The primary value associated with this entity entry. // For example, if the entity type is *vegetable*, the value could be diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/experiment.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/experiment.proto deleted file mode 100644 index 92f48189b..000000000 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/experiment.proto +++ /dev/null @@ -1,415 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.dialogflow.cx.v3; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3"; -option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3;cx"; -option java_multiple_files = true; -option java_outer_classname = "ExperimentProto"; -option java_package = "com.google.cloud.dialogflow.cx.v3"; -option objc_class_prefix = "DF"; - -// Service for managing [Experiments][google.cloud.dialogflow.cx.v3.Experiment]. -service Experiments { - option (google.api.default_host) = "dialogflow.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform," - "https://www.googleapis.com/auth/dialogflow"; - - // Returns the list of all experiments in the specified [Environment][google.cloud.dialogflow.cx.v3.Environment]. - rpc ListExperiments(ListExperimentsRequest) returns (ListExperimentsResponse) { - option (google.api.http) = { - get: "/v3/{parent=projects/*/locations/*/agents/*/environments/*}/experiments" - }; - option (google.api.method_signature) = "parent"; - } - - // Retrieves the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. - rpc GetExperiment(GetExperimentRequest) returns (Experiment) { - option (google.api.http) = { - get: "/v3/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates an [Experiment][google.cloud.dialogflow.cx.v3.Experiment] in the specified [Environment][google.cloud.dialogflow.cx.v3.Environment]. - rpc CreateExperiment(CreateExperimentRequest) returns (Experiment) { - option (google.api.http) = { - post: "/v3/{parent=projects/*/locations/*/agents/*/environments/*}/experiments" - body: "experiment" - }; - option (google.api.method_signature) = "parent,experiment"; - } - - // Updates the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. - rpc UpdateExperiment(UpdateExperimentRequest) returns (Experiment) { - option (google.api.http) = { - patch: "/v3/{experiment.name=projects/*/locations/*/agents/*/environments/*/experiments/*}" - body: "experiment" - }; - option (google.api.method_signature) = "experiment,update_mask"; - } - - // Deletes the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. - rpc DeleteExperiment(DeleteExperimentRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v3/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Starts the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. This rpc only changes the state of - // experiment from PENDING to RUNNING. - rpc StartExperiment(StartExperimentRequest) returns (Experiment) { - option (google.api.http) = { - post: "/v3/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}:start" - body: "*" - }; - option (google.api.method_signature) = "name"; - } - - // Stops the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. This rpc only changes the state of - // experiment from RUNNING to DONE. - rpc StopExperiment(StopExperimentRequest) returns (Experiment) { - option (google.api.http) = { - post: "/v3/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}:stop" - body: "*" - }; - option (google.api.method_signature) = "name"; - } -} - -// Represents an experiment in an environment. -// Next ID: 13 -message Experiment { - option (google.api.resource) = { - type: "dialogflow.googleapis.com/Experiment" - pattern: "projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}" - }; - - // Definition of the experiment. - // Next ID: 3 - message Definition { - // 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). - string condition = 1; - - // The variants of the experiment. We currently only support single variant - // experiment. - oneof variants { - // The flow versions as the variants of this experiment. - VersionVariants version_variants = 2; - } - } - - // The inference result which includes an objective metric to optimize and the - // confidence interval. - message Result { - // A confidence interval is a range of possible values for the experiment - // objective you are trying to measure. - message ConfidenceInterval { - // The confidence level used to construct the interval, i.e. there is X% - // chance that the true value is within this interval. - double confidence_level = 1; - - // The percent change between an experiment metric's value and the value - // for its control. - double ratio = 2; - - // Lower bound of the interval. - double lower_bound = 3; - - // Upper bound of the interval. - double upper_bound = 4; - } - - // Metric and corresponding confidence intervals. - message Metric { - // The type of the metric. - MetricType type = 1; - - // The actual value of the metric. - oneof value { - // Ratio value of a metric. - double ratio = 2; - } - - // The probability that the treatment is better than all other treatments - // in the experiment - ConfidenceInterval confidence_interval = 3; - } - - // Version variant and associated metrics. - message VersionMetrics { - // The name of the flow [Version][google.cloud.dialogflow.cx.v3.Version]. - // Format: `projects//locations//agents//flows//versions/`. - string version = 1 [(google.api.resource_reference) = { - type: "dialogflow.googleapis.com/Version" - }]; - - // The metrics and corresponding confidence intervals in the inference - // result. - repeated Metric metrics = 2; - - // Number of sessions that were allocated to this version. - int32 session_count = 3; - } - - // Types of metric for Dialogflow experiment. - enum MetricType { - // Metric unspecified. - METRIC_UNSPECIFIED = 0; - - // Percentage of contained sessions without user calling back in 24 hours. - CONTAINED_SESSION_NO_CALLBACK_RATE = 1; - - // Percentage of sessions that were handed to a human agent. - LIVE_AGENT_HANDOFF_RATE = 2; - - // Percentage of sessions with the same user calling back. - CALLBACK_SESSION_RATE = 3; - - // Percentage of sessions where user hung up. - ABANDONED_SESSION_RATE = 4; - - // Percentage of sessions reached Dialogflow 'END_PAGE' or - // 'END_SESSION'. - SESSION_END_RATE = 5; - } - - // Version variants and metrics. - repeated VersionMetrics version_metrics = 1; - - // The last time the experiment's stats data was updated. Will have default - // value if stats have never been computed for this experiment. - google.protobuf.Timestamp last_update_time = 2; - } - - // The state of the experiment. - enum State { - // State unspecified. - STATE_UNSPECIFIED = 0; - - // The experiment is created but not started yet. - DRAFT = 1; - - // The experiment is running. - RUNNING = 2; - - // The experiment is done. - DONE = 3; - } - - // The name of the experiment. - // Format: projects//locations//agents//environments//experiments/.. - string name = 1; - - // Required. The human-readable name of the experiment (unique in an environment). Limit - // of 64 characters. - string display_name = 2 [(google.api.field_behavior) = REQUIRED]; - - // The human-readable description of the experiment. - string description = 3; - - // The current state of the experiment. - // Transition triggered by Expriments.StartExperiment: PENDING->RUNNING. - // Transition triggered by Expriments.CancelExperiment: PENDING->CANCELLED or - // RUNNING->CANCELLED. - State state = 4; - - // The definition of the experiment. - Definition definition = 5; - - // Inference result of the experiment. - Result result = 6; - - // Creation time of this experiment. - google.protobuf.Timestamp create_time = 7; - - // Start time of this experiment. - google.protobuf.Timestamp start_time = 8; - - // End time of this experiment. - google.protobuf.Timestamp end_time = 9; - - // Last update time of this experiment. - google.protobuf.Timestamp last_update_time = 10; - - // Maximum number of days to run the experiment. - google.protobuf.Duration experiment_length = 11; - - // The history of updates to the experiment variants. - repeated VariantsHistory variants_history = 12; -} - -// A list of flow version variants. -message VersionVariants { - // A single flow version with specified traffic allocation. - message Variant { - // The name of the flow version. - // Format: `projects//locations//agents//flows//versions/`. - string version = 1; - - // 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. - float traffic_allocation = 2; - - // Whether the variant is for the control group. - bool is_control_group = 3; - } - - // A list of flow version variants. - repeated Variant variants = 1; -} - -// The history of variants update. -message VariantsHistory { - // The variants updated. We currently only support single variant - // experiment. - oneof variants { - // The flow versions as the variants. - VersionVariants version_variants = 1; - } - - // Update time of the variants. - google.protobuf.Timestamp update_time = 2; -} - -// The request message for [Experiments.ListExperiments][google.cloud.dialogflow.cx.v3.Experiments.ListExperiments]. -message ListExperimentsRequest { - // Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to list all environments for. - // Format: `projects//locations//agents//environments/`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/Experiment" - } - ]; - - // The maximum number of items to return in a single page. By default 20 and - // at most 100. - int32 page_size = 2; - - // The next_page_token value returned from a previous list request. - string page_token = 3; -} - -// The response message for [Experiments.ListExperiments][google.cloud.dialogflow.cx.v3.Experiments.ListExperiments]. -message ListExperimentsResponse { - // 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. - repeated Experiment experiments = 1; - - // Token to retrieve the next page of results, or empty if there are no more - // results in the list. - string next_page_token = 2; -} - -// The request message for [Experiments.GetExperiment][google.cloud.dialogflow.cx.v3.Experiments.GetExperiment]. -message GetExperimentRequest { - // Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment]. - // Format: `projects//locations//agents//environments//experiments/`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/Experiment" - } - ]; -} - -// The request message for [Experiments.CreateExperiment][google.cloud.dialogflow.cx.v3.Experiments.CreateExperiment]. -message CreateExperimentRequest { - // 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/`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/Experiment" - } - ]; - - // Required. The experiment to create. - Experiment experiment = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// The request message for [Experiments.UpdateExperiment][google.cloud.dialogflow.cx.v3.Experiments.UpdateExperiment]. -message UpdateExperimentRequest { - // Required. The experiment to update. - Experiment experiment = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The mask to control which fields get updated. - google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// The request message for [Experiments.DeleteExperiment][google.cloud.dialogflow.cx.v3.Experiments.DeleteExperiment]. -message DeleteExperimentRequest { - // Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment] to delete. - // Format: `projects//locations//agents//environments//experiments/`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/Experiment" - } - ]; -} - -// The request message for [Experiments.StartExperiment][google.cloud.dialogflow.cx.v3.Experiments.StartExperiment]. -message StartExperimentRequest { - // Required. Resource name of the experiment to start. - // Format: `projects//locations//agents//environments//experiments/`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/Experiment" - } - ]; -} - -// The request message for [Experiments.StopExperiment][google.cloud.dialogflow.cx.v3.Experiments.StopExperiment]. -message StopExperimentRequest { - // Required. Resource name of the experiment to stop. - // Format: `projects//locations//agents//environments//experiments/`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/Experiment" - } - ]; -} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/flow.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/flow.proto index 9a706d78e..46c987160 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/flow.proto +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/flow.proto @@ -21,6 +21,7 @@ import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/dialogflow/cx/v3/page.proto"; +import "google/cloud/dialogflow/cx/v3/validation_message.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; @@ -96,6 +97,25 @@ service Flows { metadata_type: "google.protobuf.Struct" }; } + + // 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. + rpc ValidateFlow(ValidateFlowRequest) returns (FlowValidationResult) { + option (google.api.http) = { + post: "/v3/{name=projects/*/locations/*/agents/*/flows/*}:validate" + body: "*" + }; + } + + // Gets the latest flow validation result. Flow validation is performed + // when ValidateFlow is called. + rpc GetFlowValidationResult(GetFlowValidationResultRequest) returns (FlowValidationResult) { + option (google.api.http) = { + get: "/v3/{name=projects/*/locations/*/agents/*/flows/*/validationResult}" + }; + option (google.api.method_signature) = "name"; + } } // Settings related to NLU. @@ -364,3 +384,54 @@ message TrainFlowRequest { } ]; } + +// The request message for [Flows.ValidateFlow][google.cloud.dialogflow.cx.v3.Flows.ValidateFlow]. +message ValidateFlowRequest { + // Required. The flow to validate. + // Format: `projects//locations//agents//flows/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Flow" + } + ]; + + // If not specified, the agent's default language is used. + string language_code = 2; +} + +// The request message for [Flows.GetFlowValidationResult][google.cloud.dialogflow.cx.v3.Flows.GetFlowValidationResult]. +message GetFlowValidationResultRequest { + // Required. The flow name. + // Format: `projects//locations//agents//flows//validationResult`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/FlowValidationResult" + } + ]; + + // If not specified, the agent's default language is used. + string language_code = 2; +} + +// The response message for [Flows.GetFlowValidationResult][google.cloud.dialogflow.cx.v3.Flows.GetFlowValidationResult]. +message FlowValidationResult { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/FlowValidationResult" + pattern: "projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/validationResult" + }; + + // The unique identifier of the flow validation result. + // Format: `projects//locations//agents//flows//validationResult`. + string name = 1; + + // Contains all validation messages. + repeated ValidationMessage validation_messages = 2; + + // Last time the flow was validated. + google.protobuf.Timestamp update_time = 3; +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/intent.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/intent.proto index 3b97d5e2c..73004154c 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/intent.proto +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/intent.proto @@ -155,9 +155,12 @@ message Intent { // Indicates whether the parameter represents a list of values. bool is_list = 3; - // Indicates whether the parameter content is logged in text and audio. If - // it is set to true, the parameter content will be replaced to parameter - // id in both request and response. The default value is false. + // Indicates whether the parameter content should be redacted in text and + // audio. If the flag is set to true, the parameter content will be replaced + // by parameter name in both request and response. + // 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. bool redact = 4; } diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/page.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/page.proto index c1b4759a0..42d2b741c 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/page.proto +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/page.proto @@ -147,9 +147,13 @@ message Page { // // * TransitionRoutes defined in the page with intent specified. // * TransitionRoutes defined in the - // [transition route groups][google.cloud.dialogflow.cx.v3.Page.transition_route_groups]. + // [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 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. repeated TransitionRoute transition_routes = 9; // Handlers associated with the page to handle events such as webhook errors, @@ -238,9 +242,12 @@ message Form { // the default value will be ignored. google.protobuf.Value default_value = 9; - // Indicates whether the parameter content is logged in text and audio. If - // it is set to true, the parameter content will be replaced to parameter - // name in both request and response. The default value is false. + // Indicates whether the parameter content should be redacted in text and + // audio. If the flag is set to true, the parameter content will be replaced + // by parameter name in both request and response. + // 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. bool redact = 11; } diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/response_message.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/response_message.proto index fb54ec9b6..4eab74f50 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/response_message.proto +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/response_message.proto @@ -120,18 +120,6 @@ message ResponseMessage { } - // Specifies an audio clip to be played by the client as part of the response. - message PlayAudio { - // Required. URI of the audio clip. Dialogflow does not impose any validation on this - // value. It is specific to the client that reads it. - string audio_uri = 1 [(google.api.field_behavior) = REQUIRED]; - - // 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. - bool allow_playback_interruption = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - } - // Represents an audio message that is composed of both segments // synthesized from the Dialogflow agent prompts and ones hosted externally // at the specified URIs. @@ -163,6 +151,18 @@ message ResponseMessage { repeated Segment segments = 1; } + // Specifies an audio clip to be played by the client as part of the response. + message PlayAudio { + // Required. URI of the audio clip. Dialogflow does not impose any validation on this + // value. It is specific to the client that reads it. + string audio_uri = 1 [(google.api.field_behavior) = REQUIRED]; + + // 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. + bool allow_playback_interruption = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + // Required. The rich response message. oneof message { // Returns a text response. diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/test_case.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/test_case.proto new file mode 100644 index 000000000..c83109ba2 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/test_case.proto @@ -0,0 +1,835 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dialogflow.cx.v3; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/dialogflow/cx/v3/flow.proto"; +import "google/cloud/dialogflow/cx/v3/intent.proto"; +import "google/cloud/dialogflow/cx/v3/page.proto"; +import "google/cloud/dialogflow/cx/v3/response_message.proto"; +import "google/cloud/dialogflow/cx/v3/session.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3"; +option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3;cx"; +option java_multiple_files = true; +option java_outer_classname = "TestCaseProto"; +option java_package = "com.google.cloud.dialogflow.cx.v3"; +option objc_class_prefix = "DF"; + +// Service for managing [Test Cases][google.cloud.dialogflow.cx.v3.TestCase] and +// [Test Case Results][google.cloud.dialogflow.cx.v3.TestCaseResult]. +service TestCases { + option (google.api.default_host) = "dialogflow.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/dialogflow"; + + // Fetches a list of test cases for a given agent. + rpc ListTestCases(ListTestCasesRequest) returns (ListTestCasesResponse) { + option (google.api.http) = { + get: "/v3/{parent=projects/*/locations/*/agents/*}/testCases" + }; + option (google.api.method_signature) = "parent"; + } + + // Batch deletes test cases. + rpc BatchDeleteTestCases(BatchDeleteTestCasesRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v3/{parent=projects/*/locations/*/agents/*}/testCases:batchDelete" + body: "*" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets a test case. + rpc GetTestCase(GetTestCaseRequest) returns (TestCase) { + option (google.api.http) = { + get: "/v3/{name=projects/*/locations/*/agents/*/testCases/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a test case for the given agent. + rpc CreateTestCase(CreateTestCaseRequest) returns (TestCase) { + option (google.api.http) = { + post: "/v3/{parent=projects/*/locations/*/agents/*}/testCases" + body: "test_case" + }; + option (google.api.method_signature) = "parent,test_case"; + } + + // Updates the specified test case. + rpc UpdateTestCase(UpdateTestCaseRequest) returns (TestCase) { + option (google.api.http) = { + patch: "/v3/{test_case.name=projects/*/locations/*/agents/*/testCases/*}" + body: "test_case" + }; + option (google.api.method_signature) = "test_case,update_mask"; + } + + // Kicks off a test case run. + rpc RunTestCase(RunTestCaseRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v3/projects/*/locations/*/agents/*/testCases:run" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "RunTestCaseResponse" + metadata_type: "RunTestCaseMetadata" + }; + } + + // Kicks off a batch run of test cases. + rpc BatchRunTestCases(BatchRunTestCasesRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v3/{parent=projects/*/locations/*/agents/*}/testCases:batchRun" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "BatchRunTestCasesResponse" + metadata_type: "BatchRunTestCasesMetadata" + }; + } + + // Calculates the test coverage for an agent. + rpc CalculateCoverage(CalculateCoverageRequest) returns (CalculateCoverageResponse) { + option (google.api.http) = { + get: "/v3/{agent=projects/*/locations/*/agents/*}/testCases:calculateCoverage" + }; + } + + // Imports the test cases from a Cloud Storage bucket or a local file. It + // always creates new test cases and won't overwite any existing ones. The + // provided ID in the imported test case is neglected. + rpc ImportTestCases(ImportTestCasesRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v3/{parent=projects/*/locations/*/agents/*}/testCases:import" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "ImportTestCasesResponse" + metadata_type: "ImportTestCasesMetadata" + }; + } + + // 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. + rpc ExportTestCases(ExportTestCasesRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v3/{parent=projects/*/locations/*/agents/*}/testCases:export" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "ExportTestCasesResponse" + metadata_type: "ExportTestCasesMetadata" + }; + } + + // Fetches a list of results for a given test case. + rpc ListTestCaseResults(ListTestCaseResultsRequest) returns (ListTestCaseResultsResponse) { + option (google.api.http) = { + get: "/v3/{parent=projects/*/locations/*/agents/*/testCases/*}/results" + }; + option (google.api.method_signature) = "parent"; + } +} + +// Represents a test case. +message TestCase { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/TestCase" + pattern: "projects/{project}/locations/{location}/agents/{agent}/testCases/{test_case}" + }; + + // 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/`. + string name = 1; + + // 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. + repeated string tags = 2; + + // Required. The human-readable name of the test case, unique within the agent. Limit of + // 200 characters. + string display_name = 3 [(google.api.field_behavior) = REQUIRED]; + + // Additional freeform notes about the test case. Limit of 400 characters. + string notes = 4; + + // Config for the test case. + TestConfig test_config = 13; + + // 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. + repeated ConversationTurn test_case_conversation_turns = 5; + + // Output only. When the test was created. + google.protobuf.Timestamp creation_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The latest test result. + TestCaseResult last_test_result = 12; +} + +// Represents a result from running a test case in an agent environment. +message TestCaseResult { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/TestCaseResult" + pattern: "projects/{project}/locations/{location}/agents/{agent}/testCases/{test_case}/results/{result}" + }; + + // The resource name for the test case result. Format: + // `projects//locations//agents//testCases/ + // /results/`. + string name = 1; + + // Optional. Environment where the test was run. If not set, it indicates the draft + // environment. + string environment = 2 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Environment" + } + ]; + + // The conversation turns uttered during the test case replay in chronological + // order. + repeated ConversationTurn conversation_turns = 3; + + // Whether the test case passed in the agent environment. + TestResult test_result = 4; + + // The time that the test was run. + google.protobuf.Timestamp test_time = 5; +} + +// Represents configurations for a test case. +message TestConfig { + // Session parameters to be compared when calculating differences. + repeated string tracking_parameters = 1; + + // Flow name. If not set, default start flow is assumed. + // Format: `projects//locations//agents//flows/`. + string flow = 2 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Flow" + }]; +} + +// One interaction between a human and virtual agent. The human provides some +// input and the virtual agent provides a response. +message ConversationTurn { + // The input from the human user. + message UserInput { + // 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. + QueryInput input = 5; + + // Parameters that need to be injected into the conversation during intent + // detection. + google.protobuf.Struct injected_parameters = 2; + + // If webhooks should be allowed to trigger in response to the user + // utterance. Often if parameters are injected, webhooks should not be + // enabled. + bool is_webhook_enabled = 3; + } + + // The output from the virtual agent. + message VirtualAgentOutput { + // The session parameters available to the bot at this point. + google.protobuf.Struct session_parameters = 4; + + // 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. + repeated TestRunDifference differences = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Input only. The diagnostic + // [info][Session.DetectIntentResponse.QueryResult.diagnostic_info] + // output for the turn. + google.protobuf.Struct diagnostic_info = 6 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = INPUT_ONLY + ]; + + // The [Intent][google.cloud.dialogflow.cx.v3.Intent] that triggered the response. Only some fields such as + // name and displayname will be set. + Intent triggered_intent = 7; + + // The [Page][google.cloud.dialogflow.cx.v3.Page] on which the utterance was spoken. Only some fields such as + // name and displayname will be set. + Page current_page = 8; + + // The [text][google.cloud.dialogflow.cx.v3.ResponseMessage.Text] responses from the agent for the turn. + repeated ResponseMessage.Text text_responses = 9; + + // Response error from the agent in the test result. If set, other output + // is empty. + google.rpc.Status status = 10; + } + + // The user input. + UserInput user_input = 1; + + // The virtual agent output. + VirtualAgentOutput virtual_agent_output = 2; +} + +// The description of differences between original and replayed agent output. +message TestRunDifference { + // What part of the message replay differs from the test case. + enum DiffType { + // Should never be used. + DIFF_TYPE_UNSPECIFIED = 0; + + // The intent. + INTENT = 1; + + // The page. + PAGE = 2; + + // The parameters. + PARAMETERS = 3; + + // The message utterance. + UTTERANCE = 4; + } + + // The type of diff. + DiffType type = 1; + + // A description of the diff, showing the actual output vs expected output. + string description = 2; +} + +// Transition coverage represents the percentage of all possible transitions +// present within any of a parent's test cases. +message TransitionCoverage { + // The source or target of a transition. + message TransitionNode { + // A TransitionNode can be either a page or a flow. + oneof kind { + // Indicates a transition to a [Page][google.cloud.dialogflow.cx.v3.Page]. Only some fields such as name and + // displayname will be set. + Page page = 1; + + // Indicates a transition to a [Flow][google.cloud.dialogflow.cx.v3.Flow]. Only some fields such as name and + // displayname will be set. + Flow flow = 2; + } + } + + // A transition in the agent's graph. + message Transition { + // The start node of a transition. + TransitionNode source = 1; + + // The index of a transition in the transition list. Starting from 0. + int32 index = 4; + + // The end node of a transition. + TransitionNode target = 2; + + // Whether or not the transition is covered by at least one of the + // agent's test cases. + bool covered = 3; + + // The detailed transition. + oneof detail { + // Intent route or condition route. + TransitionRoute transition_route = 5; + + // Event handler. + EventHandler event_handler = 6; + } + } + + // The list of Transitions present in the agent. + repeated Transition transitions = 1; + + // The percent of transitions in the agent that are covered. + float coverage_score = 2; +} + +// Intent coverage represents the percentage of all possible intents in the +// agent that are triggered in any of a parent's test cases. +message IntentCoverage { + // The agent's intent. + message Intent { + // The intent full resource name + string intent = 1 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Intent" + }]; + + // Whether or not the intent is covered by at least one of the agent's + // test cases. + bool covered = 2; + } + + // The list of Intents present in the agent + repeated Intent intents = 1; + + // The percent of intents in the agent that are covered. + float coverage_score = 2; +} + +// The request message for [TestCases.CalculateCoverage][google.cloud.dialogflow.cx.v3.TestCases.CalculateCoverage]. +message CalculateCoverageRequest { + // The type of coverage score requested. + enum CoverageType { + // Should never be used. + COVERAGE_TYPE_UNSPECIFIED = 0; + + // Intent coverage. + INTENT = 1; + + // Page transition coverage + PAGE_TRANSITION = 2; + } + + // Required. The agent to calculate coverage for. + // Format: `projects//locations//agents/`. + string agent = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Agent" + } + ]; + + // Required. The type of coverage requested. + CoverageType type = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The response message for [TestCases.CalculateCoverage][google.cloud.dialogflow.cx.v3.TestCases.CalculateCoverage]. +message CalculateCoverageResponse { + // The agent to calculate coverage for. + // Format: `projects//locations//agents/`. + string agent = 5 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Agent" + }]; + + // The type of coverage requested. + oneof coverage_type { + // Intent coverage. + IntentCoverage intent_coverage = 2; + + // Transition coverage. + TransitionCoverage transition_coverage = 4; + } +} + +// The request message for [TestCases.ListTestCases][google.cloud.dialogflow.cx.v3.TestCases.ListTestCases]. +message ListTestCasesRequest { + // Specifies how much test case information to include in the response. + enum TestCaseView { + // The default / unset value. + // The API will default to the BASIC view. + TEST_CASE_VIEW_UNSPECIFIED = 0; + + // Include basic metadata about the test case, but not the conversation + // turns. This is the default value. + BASIC = 1; + + // Include everything. + FULL = 2; + } + + // Required. The agent to list all pages for. + // Format: `projects//locations//agents/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/TestCase" + } + ]; + + // 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. + int32 page_size = 2; + + // The next_page_token value returned from a previous list request. + string page_token = 3; + + // Specifies whether response should include all fields or just the metadata. + TestCaseView view = 4; +} + +// The response message for [TestCases.ListTestCases][google.cloud.dialogflow.cx.v3.TestCases.ListTestCases]. +message ListTestCasesResponse { + // The list of test cases. There will be a maximum number of items returned + // based on the page_size field in the request. + repeated TestCase test_cases = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// The request message for [TestCases.BatchDeleteTestCases][google.cloud.dialogflow.cx.v3.TestCases.BatchDeleteTestCases]. +message BatchDeleteTestCasesRequest { + // Required. The agent to delete test cases from. + // Format: `projects//locations//agents/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/TestCase" + } + ]; + + // Required. Format of test case names: `projects//locations/ + // /agents//testCases/`. + repeated string names = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/TestCase" + } + ]; +} + +// The request message for [TestCases.CreateTestCase][google.cloud.dialogflow.cx.v3.TestCases.CreateTestCase]. +message CreateTestCaseRequest { + // Required. The agent to create the test case for. + // Format: `projects//locations//agents/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/TestCase" + } + ]; + + // Required. The test case to create. + TestCase test_case = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The request message for [TestCases.UpdateTestCase][google.cloud.dialogflow.cx.v3.TestCases.UpdateTestCase]. +message UpdateTestCaseRequest { + // Required. The test case to update. + TestCase test_case = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The mask to specify which fields should be updated. Only a test case's + // metadata and replayed_conversation_turns may be updated. The original + // test_case_conversation_turns may not be updated. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The request message for [TestCases.GetTestCase][google.cloud.dialogflow.cx.v3.TestCases.GetTestCase]. +message GetTestCaseRequest { + // Required. The name of the testcase. + // Format: `projects//locations//agents//testCases/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/TestCase" + } + ]; +} + +// The request message for [TestCases.RunTestCase][google.cloud.dialogflow.cx.v3.TestCases.RunTestCase]. +message RunTestCaseRequest { + // Required. Format of test case name to run: `projects//locations/ + // /agents//testCases/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/TestCase" + } + ]; + + // Optional. Environment name. If not set, draft environment is assumed. + // Format: `projects//locations//agents//environments/`. + string environment = 2 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Environment" + } + ]; +} + +// The response message for [TestCases.RunTestCase][google.cloud.dialogflow.cx.v3.TestCases.RunTestCase]. +message RunTestCaseResponse { + // The result. + TestCaseResult result = 2; +} + +// Metadata returned for the [TestCases.RunTestCase][google.cloud.dialogflow.cx.v3.TestCases.RunTestCase] long running operation. +message RunTestCaseMetadata { + +} + +// The request message for [TestCases.BatchRunTestCases][google.cloud.dialogflow.cx.v3.TestCases.BatchRunTestCases]. +message BatchRunTestCasesRequest { + // Required. Agent name. Format: `projects//locations//agents/ + // `. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/TestCase" + } + ]; + + // Optional. If not set, draft environment is assumed. Format: `projects//locations//agents//environments/`. + string environment = 2 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Environment" + } + ]; + + // Required. Format: `projects//locations//agents//testCases/`. + repeated string test_cases = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/TestCase" + } + ]; +} + +// The response message for [TestCases.BatchRunTestCases][google.cloud.dialogflow.cx.v3.TestCases.BatchRunTestCases]. +message BatchRunTestCasesResponse { + // The test case results. The detailed + // [conversation turns][google.cloud.dialogflow.cx.v3.TestCaseResult.conversation_turns] are empty in this + // response. + repeated TestCaseResult results = 1; +} + +// Metadata returned for the [TestCases.BatchRunTestCases][google.cloud.dialogflow.cx.v3.TestCases.BatchRunTestCases] long running +// operation. +message BatchRunTestCasesMetadata { + // The test errors. + repeated TestError errors = 1; +} + +// Error info for running a test. +message TestError { + // The test case resource name. + string test_case = 1 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/TestCase" + }]; + + // The status associated with the test. + google.rpc.Status status = 2; + + // The timestamp when the test was completed. + google.protobuf.Timestamp test_time = 3; +} + +// The request message for [TestCases.ImportTestCases][google.cloud.dialogflow.cx.v3.TestCases.ImportTestCases]. +message ImportTestCasesRequest { + // Required. The agent to import test cases to. + // Format: `projects//locations//agents/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/TestCase" + } + ]; + + // Required. The source to import. + oneof source { + // The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI + // to import test cases from. The format of this URI must be + // `gs:///`. + string gcs_uri = 2; + + // Uncompressed raw byte content for test cases. + bytes content = 3; + } +} + +// The response message for [TestCases.ImportTestCases][google.cloud.dialogflow.cx.v3.TestCases.ImportTestCases]. +message ImportTestCasesResponse { + // The unique identifiers of the new test cases. + // Format: `projects//locations//agents//testCases/`. + repeated string names = 1 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/TestCase" + }]; +} + +// Metadata returned for the [TestCases.ImportTestCases][google.cloud.dialogflow.cx.v3.TestCases.ImportTestCases] long running +// operation. +message ImportTestCasesMetadata { + // Errors for failed test cases. + repeated TestCaseError errors = 1; +} + +// Error info for importing a test. +message TestCaseError { + // The test case. + TestCase test_case = 1; + + // The status associated with the test case. + google.rpc.Status status = 2; +} + +// The request message for [TestCases.ExportTestCases][google.cloud.dialogflow.cx.v3.TestCases.ExportTestCases]. +message ExportTestCasesRequest { + // Data format of the exported test cases. + enum DataFormat { + // Unspecified format. + DATA_FORMAT_UNSPECIFIED = 0; + + // Raw bytes. + BLOB = 1; + + // JSON format. + JSON = 2; + } + + // Required. The agent where to export test cases from. + // Format: `projects//locations//agents/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/TestCase" + } + ]; + + // The destination to export. + oneof destination { + // 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. + string gcs_uri = 2; + } + + // The data format of the exported test cases. If not specified, `BLOB` is + // assumed. + DataFormat data_format = 3; + + // 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". + string filter = 4; +} + +// The response message for [TestCases.ExportTestCases][google.cloud.dialogflow.cx.v3.TestCases.ExportTestCases]. +message ExportTestCasesResponse { + // The exported test cases. + oneof destination { + // 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]. + string gcs_uri = 1; + + // Uncompressed raw byte content for test cases. + bytes content = 2; + } +} + +// Metadata returned for the [TestCases.ExportTestCases][google.cloud.dialogflow.cx.v3.TestCases.ExportTestCases] long running +// operation. +message ExportTestCasesMetadata { + +} + +// The request message for [TestCases.ListTestCaseResults][google.cloud.dialogflow.cx.v3.TestCases.ListTestCaseResults]. +message ListTestCaseResultsRequest { + // 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. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/TestCaseResult" + } + ]; + + // The maximum number of items to return in a single page. By default 100 and + // at most 1000. + int32 page_size = 2; + + // The next_page_token value returned from a previous list request. + string page_token = 3; + + // 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. + string filter = 4; +} + +// The response message for [TestCases.ListTestCaseResults][google.cloud.dialogflow.cx.v3.TestCases.ListTestCaseResults]. +message ListTestCaseResultsResponse { + // The list of test case results. + repeated TestCaseResult test_case_results = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// The test result for a test case and an agent environment. +enum TestResult { + // Not specified. Should never be used. + TEST_RESULT_UNSPECIFIED = 0; + + // The test passed. + PASSED = 1; + + // The test did not pass. + FAILED = 2; +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/transition_route_group.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/transition_route_group.proto index 2e9a9fdb2..8f1f9debd 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/transition_route_group.proto +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/transition_route_group.proto @@ -102,11 +102,6 @@ message TransitionRouteGroup { string display_name = 2 [(google.api.field_behavior) = REQUIRED]; // Transition routes associated with the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]. - // Duplicate transition routes (i.e. using the same - // [`intent`][google.cloud.dialogflow.cx.v3.TransitionRoute.intent]) are not allowed. - // - // Note that the [`name`][google.cloud.dialogflow.cx.v3.TransitionRoute.name] field is not used in the - // transition route group scope. repeated TransitionRoute transition_routes = 5; } diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/validation_message.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/validation_message.proto new file mode 100644 index 000000000..8f98efae3 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/validation_message.proto @@ -0,0 +1,115 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dialogflow.cx.v3; + +import "google/protobuf/struct.proto"; +import "google/api/annotations.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3"; +option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3;cx"; +option java_multiple_files = true; +option java_outer_classname = "ValidationMessageProto"; +option java_package = "com.google.cloud.dialogflow.cx.v3"; +option objc_class_prefix = "DF"; + +// Agent/flow validation message. +message ValidationMessage { + // Resource types. + enum ResourceType { + // Unspecified. + RESOURCE_TYPE_UNSPECIFIED = 0; + + // Agent. + AGENT = 1; + + // Intent. + INTENT = 2; + + // Intent training phrase. + INTENT_TRAINING_PHRASE = 8; + + // Intent parameter. + INTENT_PARAMETER = 9; + + // Multiple intents. + INTENTS = 10; + + // Multiple training phrases. + INTENT_TRAINING_PHRASES = 11; + + // Entity type. + ENTITY_TYPE = 3; + + // Multiple entity types. + ENTITY_TYPES = 12; + + // Webhook. + WEBHOOK = 4; + + // Flow. + FLOW = 5; + + // Page. + PAGE = 6; + + // Multiple pages. + PAGES = 13; + + // Transition route group. + TRANSITION_ROUTE_GROUP = 7; + } + + // Severity level. + enum Severity { + // Unspecified. + SEVERITY_UNSPECIFIED = 0; + + // The agent doesn't follow Dialogflow best practices. + INFO = 1; + + // The agent may not behave as expected. + WARNING = 2; + + // The agent may experience failures. + ERROR = 3; + } + + // The type of the resources where the message is found. + ResourceType resource_type = 1; + + // The names of the resources where the message is found. + repeated string resources = 2 [deprecated = true]; + + // The resource names of the resources where the message is found. + repeated ResourceName resource_names = 6; + + // Indicates the severity of the message. + Severity severity = 3; + + // The message detail. + string detail = 4; +} + +// Resource name and display name. +message ResourceName { + // Name. + string name = 1; + + // Display name. + string display_name = 2; +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/webhook.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/webhook.proto index 4c7af2bc5..b97bb72d3 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/webhook.proto +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/webhook.proto @@ -33,6 +33,10 @@ option java_multiple_files = true; option java_outer_classname = "WebhookProto"; option java_package = "com.google.cloud.dialogflow.cx.v3"; option objc_class_prefix = "DF"; +option (google.api.resource_definition) = { + type: "servicedirectory.googleapis.com/Service" + pattern: "projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}" +}; // Service for managing [Webhooks][google.cloud.dialogflow.cx.v3.Webhook]. service Webhooks { @@ -424,9 +428,11 @@ message PageInfo { message SessionInfo { // 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 user. + // field can be used by the webhook to identify a session. // Format: `projects//locations//agents//sessions/`. + // ID>/sessions/` or `projects//locations//agents//environments//sessions/` + // if environment is specified. string session = 1 [(google.api.resource_reference) = { type: "dialogflow.googleapis.com/Session" }]; diff --git a/synth.metadata b/synth.metadata index 2aa8f3741..0475bdf44 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,16 +11,16 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "f83715b48369c8d43548cc3cd84015e60be94cf2", - "internalRef": "352834280" + "sha": "cb932c5caa751435dfd0a9a15f655a0626d8a1cb", + "internalRef": "353075593" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "f83715b48369c8d43548cc3cd84015e60be94cf2", - "internalRef": "352834280" + "sha": "cb932c5caa751435dfd0a9a15f655a0626d8a1cb", + "internalRef": "353075593" } }, { @@ -124,8 +124,6 @@ "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityTypesSettings.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/EnvironmentsClient.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/EnvironmentsSettings.java", - "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentsClient.java", - "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentsSettings.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowsClient.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowsSettings.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/IntentsClient.java", @@ -138,6 +136,8 @@ "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionEntityTypesSettings.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionsClient.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionsSettings.java", + "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCasesClient.java", + "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCasesSettings.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupsClient.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupsSettings.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/VersionsClient.java", @@ -151,8 +151,6 @@ "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/EntityTypesStubSettings.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/EnvironmentsStub.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/EnvironmentsStubSettings.java", - "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/ExperimentsStub.java", - "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/ExperimentsStubSettings.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/FlowsStub.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/FlowsStubSettings.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcAgentsCallableFactory.java", @@ -161,8 +159,6 @@ "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcEntityTypesStub.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcEnvironmentsCallableFactory.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcEnvironmentsStub.java", - "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcExperimentsCallableFactory.java", - "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcExperimentsStub.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcFlowsCallableFactory.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcFlowsStub.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcIntentsCallableFactory.java", @@ -175,6 +171,8 @@ "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcSessionEntityTypesStub.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcSessionsCallableFactory.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcSessionsStub.java", + "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcTestCasesCallableFactory.java", + "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcTestCasesStub.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcTransitionRouteGroupsCallableFactory.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcTransitionRouteGroupsStub.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcVersionsCallableFactory.java", @@ -191,6 +189,8 @@ "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/SessionEntityTypesStubSettings.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/SessionsStub.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/SessionsStubSettings.java", + "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/TestCasesStub.java", + "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/TestCasesStubSettings.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/TransitionRouteGroupsStub.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/TransitionRouteGroupsStubSettings.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/VersionsStub.java", @@ -279,7 +279,6 @@ "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/AgentsClientTest.java", "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/EntityTypesClientTest.java", "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/EnvironmentsClientTest.java", - "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/ExperimentsClientTest.java", "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/FlowsClientTest.java", "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/IntentsClientTest.java", "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockAgents.java", @@ -288,8 +287,6 @@ "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockEntityTypesImpl.java", "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockEnvironments.java", "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockEnvironmentsImpl.java", - "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockExperiments.java", - "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockExperimentsImpl.java", "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockFlows.java", "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockFlowsImpl.java", "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockIntents.java", @@ -302,6 +299,8 @@ "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockSessionEntityTypesImpl.java", "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockSessions.java", "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockSessionsImpl.java", + "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockTestCases.java", + "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockTestCasesImpl.java", "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockTransitionRouteGroups.java", "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockTransitionRouteGroupsImpl.java", "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockVersions.java", @@ -312,6 +311,7 @@ "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/SecuritySettingsServiceClientTest.java", "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/SessionEntityTypesClientTest.java", "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/SessionsClientTest.java", + "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/TestCasesClientTest.java", "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupsClientTest.java", "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/VersionsClientTest.java", "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/WebhooksClientTest.java", @@ -357,13 +357,13 @@ "grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentsGrpc.java", "grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityTypesGrpc.java", "grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EnvironmentsGrpc.java", - "grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentsGrpc.java", "grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowsGrpc.java", "grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/IntentsGrpc.java", "grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PagesGrpc.java", "grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SecuritySettingsServiceGrpc.java", "grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionEntityTypesGrpc.java", "grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionsGrpc.java", + "grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCasesGrpc.java", "grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupsGrpc.java", "grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VersionsGrpc.java", "grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/WebhooksGrpc.java", @@ -386,18 +386,33 @@ "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentName.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentProto.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentValidationResult.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentValidationResultName.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentValidationResultOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AudioConfigProto.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AudioEncoding.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AudioInput.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AudioInputOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BatchDeleteTestCasesRequest.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BatchDeleteTestCasesRequestOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BatchRunTestCasesMetadata.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BatchRunTestCasesMetadataOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BatchRunTestCasesRequest.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BatchRunTestCasesRequestOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BatchRunTestCasesResponse.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/BatchRunTestCasesResponseOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CalculateCoverageRequest.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CalculateCoverageRequestOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CalculateCoverageResponse.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CalculateCoverageResponseOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ConversationTurn.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ConversationTurnOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateAgentRequest.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateAgentRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateEntityTypeRequest.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateEntityTypeRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateEnvironmentRequest.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateEnvironmentRequestOrBuilder.java", - "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateExperimentRequest.java", - "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateExperimentRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateFlowRequest.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateFlowRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateIntentRequest.java", @@ -408,6 +423,8 @@ "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateSecuritySettingsRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateSessionEntityTypeRequest.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateSessionEntityTypeRequestOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateTestCaseRequest.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateTestCaseRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateTransitionRouteGroupRequest.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateTransitionRouteGroupRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateVersionOperationMetadata.java", @@ -422,8 +439,6 @@ "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeleteEntityTypeRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeleteEnvironmentRequest.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeleteEnvironmentRequestOrBuilder.java", - "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeleteExperimentRequest.java", - "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeleteExperimentRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeleteFlowRequest.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeleteFlowRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeleteIntentRequest.java", @@ -458,18 +473,23 @@ "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EventHandlerOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EventInput.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EventInputOrBuilder.java", - "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Experiment.java", - "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentName.java", - "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentOrBuilder.java", - "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentProto.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportAgentRequest.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportAgentRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportAgentResponse.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportAgentResponseOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportTestCasesMetadata.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportTestCasesMetadataOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportTestCasesRequest.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportTestCasesRequestOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportTestCasesResponse.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportTestCasesResponseOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Flow.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowName.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowProto.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowValidationResult.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowValidationResultName.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowValidationResultOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Form.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FormOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FulfillIntentRequest.java", @@ -481,14 +501,16 @@ "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FulfillmentProto.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetAgentRequest.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetAgentRequestOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetAgentValidationResultRequest.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetAgentValidationResultRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetEntityTypeRequest.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetEntityTypeRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetEnvironmentRequest.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetEnvironmentRequestOrBuilder.java", - "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetExperimentRequest.java", - "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetExperimentRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetFlowRequest.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetFlowRequestOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetFlowValidationResultRequest.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetFlowValidationResultRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetIntentRequest.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetIntentRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetPageRequest.java", @@ -497,15 +519,25 @@ "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetSecuritySettingsRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetSessionEntityTypeRequest.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetSessionEntityTypeRequestOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetTestCaseRequest.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetTestCaseRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetTransitionRouteGroupRequest.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetTransitionRouteGroupRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetVersionRequest.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetVersionRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetWebhookRequest.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetWebhookRequestOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportTestCasesMetadata.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportTestCasesMetadataOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportTestCasesRequest.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportTestCasesRequestOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportTestCasesResponse.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportTestCasesResponseOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/InputAudioConfig.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/InputAudioConfigOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Intent.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/IntentCoverage.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/IntentCoverageOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/IntentInput.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/IntentInputOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/IntentName.java", @@ -524,10 +556,6 @@ "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListEnvironmentsRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListEnvironmentsResponse.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListEnvironmentsResponseOrBuilder.java", - "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListExperimentsRequest.java", - "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListExperimentsRequestOrBuilder.java", - "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListExperimentsResponse.java", - "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListExperimentsResponseOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListFlowsRequest.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListFlowsRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListFlowsResponse.java", @@ -548,6 +576,14 @@ "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListSessionEntityTypesRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListSessionEntityTypesResponse.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListSessionEntityTypesResponseOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListTestCaseResultsRequest.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListTestCaseResultsRequestOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListTestCaseResultsResponse.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListTestCaseResultsResponseOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListTestCasesRequest.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListTestCasesRequestOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListTestCasesResponse.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListTestCasesResponseOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListTransitionRouteGroupsRequest.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListTransitionRouteGroupsRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListTransitionRouteGroupsResponse.java", @@ -590,11 +626,19 @@ "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryParametersOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryResult.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryResultOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResourceName.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResourceNameOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessage.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessageOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessageProto.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RestoreAgentRequest.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RestoreAgentRequestOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RunTestCaseMetadata.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RunTestCaseMetadataOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RunTestCaseRequest.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RunTestCaseRequestOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RunTestCaseResponse.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RunTestCaseResponseOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SecuritySettings.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SecuritySettingsName.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SecuritySettingsOrBuilder.java", @@ -615,10 +659,6 @@ "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SpeechWordInfo.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SpeechWordInfoOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SsmlVoiceGender.java", - "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StartExperimentRequest.java", - "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StartExperimentRequestOrBuilder.java", - "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StopExperimentRequest.java", - "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StopExperimentRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StreamingDetectIntentRequest.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StreamingDetectIntentRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StreamingDetectIntentResponse.java", @@ -627,10 +667,28 @@ "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StreamingRecognitionResultOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SynthesizeSpeechConfig.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SynthesizeSpeechConfigOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCase.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseError.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseErrorOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseName.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseProto.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseResult.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseResultName.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseResultOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestConfig.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestConfigOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestError.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestErrorOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestResult.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestRunDifference.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestRunDifferenceOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TextInput.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TextInputOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TrainFlowRequest.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TrainFlowRequestOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionCoverage.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionCoverageOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRoute.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroup.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupName.java", @@ -643,8 +701,6 @@ "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateEntityTypeRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateEnvironmentRequest.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateEnvironmentRequestOrBuilder.java", - "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateExperimentRequest.java", - "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateExperimentRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateFlowRequest.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateFlowRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateIntentRequest.java", @@ -655,20 +711,25 @@ "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateSecuritySettingsRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateSessionEntityTypeRequest.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateSessionEntityTypeRequestOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateTestCaseRequest.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateTestCaseRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateTransitionRouteGroupRequest.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateTransitionRouteGroupRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateVersionRequest.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateVersionRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateWebhookRequest.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateWebhookRequestOrBuilder.java", - "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VariantsHistory.java", - "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VariantsHistoryOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidateAgentRequest.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidateAgentRequestOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidateFlowRequest.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidateFlowRequestOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidationMessage.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidationMessageOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidationMessageProto.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Version.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VersionName.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VersionOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VersionProto.java", - "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VersionVariants.java", - "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VersionVariantsOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VoiceSelectionParams.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VoiceSelectionParamsOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Webhook.java", @@ -683,7 +744,6 @@ "proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/audio_config.proto", "proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/entity_type.proto", "proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/environment.proto", - "proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/experiment.proto", "proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/flow.proto", "proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/fulfillment.proto", "proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/intent.proto", @@ -692,7 +752,9 @@ "proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/security_settings.proto", "proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/session.proto", "proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/session_entity_type.proto", + "proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/test_case.proto", "proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/transition_route_group.proto", + "proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/validation_message.proto", "proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/version.proto", "proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/webhook.proto", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Agent.java", From e2518ea7a06846ca07033e4d807880d96791cf4f Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Tue, 16 Feb 2021 18:56:39 -0800 Subject: [PATCH 03/12] docs: test cases doc update PiperOrigin-RevId: 353683381 Source-Author: Google APIs Source-Date: Mon Jan 25 10:57:35 2021 -0800 Source-Repo: googleapis/googleapis Source-Sha: 2e29020ce87808b810deb20e0925b7e26c5e72c1 Source-Link: https://github.com/googleapis/googleapis/commit/2e29020ce87808b810deb20e0925b7e26c5e72c1 --- .../dialogflow/cx/v3/TestCasesClient.java | 7 +- .../dialogflow/cx/v3/ResponseMessage.java | 4328 ++++++++--------- .../cx/v3/ResponseMessageProto.java | 46 +- .../cx/v3/UpdateTestCaseRequest.java | 72 +- .../cx/v3/UpdateTestCaseRequestOrBuilder.java | 18 +- .../cloud/dialogflow/cx/v3/audio_config.proto | 50 +- .../dialogflow/cx/v3/response_message.proto | 24 +- .../cloud/dialogflow/cx/v3/test_case.proto | 6 +- synth.metadata | 8 +- 9 files changed, 2280 insertions(+), 2279 deletions(-) diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCasesClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCasesClient.java index 673c2d90b..5ecd29656 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCasesClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCasesClient.java @@ -377,9 +377,10 @@ public final UnaryCallable createTestCaseCallab * Updates the specified test case. * * @param testCase Required. The test case to update. - * @param updateMask Required. The mask to specify which fields should be updated. Only a test - * case's metadata and replayed_conversation_turns may be updated. The original - * test_case_conversation_turns may not be updated. + * @param 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. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final TestCase updateTestCase(TestCase testCase, FieldMask updateMask) { diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessage.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessage.java index 9e8a68620..9e7fe3b1f 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessage.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessage.java @@ -4351,109 +4351,81 @@ public com.google.protobuf.Parser getParserForType() { } } - public interface MixedAudioOrBuilder + public interface PlayAudioOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio) + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) com.google.protobuf.MessageOrBuilder { /** * * *
-     * Segments this audio response is composed of.
+     * Required. URI of the audio clip. Dialogflow does not impose any validation on this
+     * value. It is specific to the client that reads it.
      * 
* - * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; - * - */ - java.util.List - getSegmentsList(); - /** - * - * - *
-     * Segments this audio response is composed of.
-     * 
+ * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; * - * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; - * + * @return The audioUri. */ - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment getSegments(int index); + java.lang.String getAudioUri(); /** * * *
-     * Segments this audio response is composed of.
+     * Required. URI of the audio clip. Dialogflow does not impose any validation on this
+     * value. It is specific to the client that reads it.
      * 
* - * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; - * - */ - int getSegmentsCount(); - /** - * - * - *
-     * Segments this audio response is composed of.
-     * 
+ * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; * - * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; - * + * @return The bytes for audioUri. */ - java.util.List< - ? extends com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.SegmentOrBuilder> - getSegmentsOrBuilderList(); + com.google.protobuf.ByteString getAudioUriBytes(); + /** * * *
-     * Segments this audio response is composed of.
+     * 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.
      * 
* - * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; + * bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * + * + * @return The allowPlaybackInterruption. */ - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.SegmentOrBuilder - getSegmentsOrBuilder(int index); + boolean getAllowPlaybackInterruption(); } /** * * *
-   * Represents an audio message that is composed of both segments
-   * synthesized from the Dialogflow agent prompts and ones hosted externally
-   * at the specified URIs.
-   * The external URIs are specified 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.
+   * Specifies an audio clip to be played by the client as part of the response.
    * 
* - * Protobuf type {@code google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio} + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio} */ - public static final class MixedAudio extends com.google.protobuf.GeneratedMessageV3 + public static final class PlayAudio extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio) - MixedAudioOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) + PlayAudioOrBuilder { private static final long serialVersionUID = 0L; - // Use MixedAudio.newBuilder() to construct. - private MixedAudio(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use PlayAudio.newBuilder() to construct. + private PlayAudio(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private MixedAudio() { - segments_ = java.util.Collections.emptyList(); + private PlayAudio() { + audioUri_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new MixedAudio(); + return new PlayAudio(); } @java.lang.Override @@ -4461,7 +4433,7 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private MixedAudio( + private PlayAudio( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -4469,7 +4441,6 @@ private MixedAudio( if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } - int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { @@ -4482,17 +4453,14 @@ private MixedAudio( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - segments_ = - new java.util.ArrayList< - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment>(); - mutable_bitField0_ |= 0x00000001; - } - segments_.add( - input.readMessage( - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment - .parser(), - extensionRegistry)); + java.lang.String s = input.readStringRequireUtf8(); + + audioUri_ = s; + break; + } + case 16: + { + allowPlaybackInterruption_ = input.readBool(); break; } default: @@ -4509,9 +4477,6 @@ private MixedAudio( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - segments_ = java.util.Collections.unmodifiableList(segments_); - } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } @@ -4519,2192 +4484,1953 @@ private MixedAudio( public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_descriptor; + .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_fieldAccessorTable + .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.class, - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Builder.class); + com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.class, + com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.Builder.class); } - public interface SegmentOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-       * Raw audio synthesized from the Dialogflow agent's response using
-       * the output config specified in the request.
-       * 
- * - * bytes audio = 1; - * - * @return The audio. - */ - com.google.protobuf.ByteString getAudio(); - - /** - * - * - *
-       * Client-specific URI that points to an audio clip accessible to the
-       * client. Dialogflow does not impose any validation on it.
-       * 
- * - * string uri = 2; - * - * @return The uri. - */ - java.lang.String getUri(); - /** - * - * - *
-       * Client-specific URI that points to an audio clip accessible to the
-       * client. Dialogflow does not impose any validation on it.
-       * 
- * - * string uri = 2; - * - * @return The bytes for uri. - */ - com.google.protobuf.ByteString getUriBytes(); - - /** - * - * - *
-       * 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.
-       * 
- * - * bool allow_playback_interruption = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The allowPlaybackInterruption. - */ - boolean getAllowPlaybackInterruption(); - - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.ContentCase - getContentCase(); - } + public static final int AUDIO_URI_FIELD_NUMBER = 1; + private volatile java.lang.Object audioUri_; /** * * *
-     * Represents one segment of audio.
+     * Required. URI of the audio clip. Dialogflow does not impose any validation on this
+     * value. It is specific to the client that reads it.
      * 
* - * Protobuf type {@code google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment} + * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The audioUri. */ - public static final class Segment extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment) - SegmentOrBuilder { - private static final long serialVersionUID = 0L; - // Use Segment.newBuilder() to construct. - private Segment(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Segment() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Segment(); + @java.lang.Override + public java.lang.String getAudioUri() { + java.lang.Object ref = audioUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + audioUri_ = s; + return s; } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; + } + /** + * + * + *
+     * Required. URI of the audio clip. Dialogflow does not impose any validation on this
+     * value. It is specific to the client that reads it.
+     * 
+ * + * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for audioUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAudioUriBytes() { + java.lang.Object ref = audioUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + audioUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } + } - private Segment( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - contentCase_ = 1; - content_ = input.readBytes(); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - contentCase_ = 2; - content_ = s; - break; - } - case 24: - { - allowPlaybackInterruption_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } + public static final int ALLOW_PLAYBACK_INTERRUPTION_FIELD_NUMBER = 2; + private boolean allowPlaybackInterruption_; + /** + * + * + *
+     * 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.
+     * 
+ * + * bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The allowPlaybackInterruption. + */ + @java.lang.Override + public boolean getAllowPlaybackInterruption() { + return allowPlaybackInterruption_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getAudioUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, audioUri_); } + if (allowPlaybackInterruption_ != false) { + output.writeBool(2, allowPlaybackInterruption_); + } + unknownFields.writeTo(output); + } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_Segment_descriptor; + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getAudioUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, audioUri_); + } + if (allowPlaybackInterruption_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(2, allowPlaybackInterruption_); } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_Segment_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.class, - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.Builder.class); + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio other = + (com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) obj; - private int contentCase_ = 0; - private java.lang.Object content_; + if (!getAudioUri().equals(other.getAudioUri())) return false; + if (getAllowPlaybackInterruption() != other.getAllowPlaybackInterruption()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } - public enum ContentCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - AUDIO(1), - URI(2), - CONTENT_NOT_SET(0); - private final int value; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + AUDIO_URI_FIELD_NUMBER; + hash = (53 * hash) + getAudioUri().hashCode(); + hash = (37 * hash) + ALLOW_PLAYBACK_INTERRUPTION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowPlaybackInterruption()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } - private ContentCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ContentCase valueOf(int value) { - return forNumber(value); - } + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static ContentCase forNumber(int value) { - switch (value) { - case 1: - return AUDIO; - case 2: - return URI; - case 0: - return CONTENT_NOT_SET; - default: - return null; - } - } + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public int getNumber() { - return this.value; - } - }; + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public ContentCase getContentCase() { - return ContentCase.forNumber(contentCase_); - } + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static final int AUDIO_FIELD_NUMBER = 1; - /** - * - * - *
-       * Raw audio synthesized from the Dialogflow agent's response using
-       * the output config specified in the request.
-       * 
- * - * bytes audio = 1; - * - * @return The audio. - */ - @java.lang.Override - public com.google.protobuf.ByteString getAudio() { - if (contentCase_ == 1) { - return (com.google.protobuf.ByteString) content_; - } - return com.google.protobuf.ByteString.EMPTY; - } + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static final int URI_FIELD_NUMBER = 2; - /** - * - * - *
-       * Client-specific URI that points to an audio clip accessible to the
-       * client. Dialogflow does not impose any validation on it.
-       * 
- * - * string uri = 2; - * - * @return The uri. - */ - public java.lang.String getUri() { - java.lang.Object ref = ""; - if (contentCase_ == 2) { - ref = content_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (contentCase_ == 2) { - content_ = s; - } - return s; - } - } - /** - * - * - *
-       * Client-specific URI that points to an audio clip accessible to the
-       * client. Dialogflow does not impose any validation on it.
-       * 
- * - * string uri = 2; - * - * @return The bytes for uri. - */ - public com.google.protobuf.ByteString getUriBytes() { - java.lang.Object ref = ""; - if (contentCase_ == 2) { - ref = content_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (contentCase_ == 2) { - content_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Specifies an audio clip to be played by the client as part of the response.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) + com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudioOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto + .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_descriptor; } - public static final int ALLOW_PLAYBACK_INTERRUPTION_FIELD_NUMBER = 3; - private boolean allowPlaybackInterruption_; - /** - * - * - *
-       * 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.
-       * 
- * - * bool allow_playback_interruption = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The allowPlaybackInterruption. - */ @java.lang.Override - public boolean getAllowPlaybackInterruption() { - return allowPlaybackInterruption_; + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto + .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.class, + com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.Builder.class); } - private byte memoizedIsInitialized = -1; + // Construct using com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public Builder clear() { + super.clear(); + audioUri_ = ""; - memoizedIsInitialized = 1; - return true; + allowPlaybackInterruption_ = false; + + return this; } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (contentCase_ == 1) { - output.writeBytes(1, (com.google.protobuf.ByteString) content_); - } - if (contentCase_ == 2) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, content_); - } - if (allowPlaybackInterruption_ != false) { - output.writeBool(3, allowPlaybackInterruption_); - } - unknownFields.writeTo(output); + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto + .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_descriptor; } @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.getDefaultInstance(); + } - size = 0; - if (contentCase_ == 1) { - size += - com.google.protobuf.CodedOutputStream.computeBytesSize( - 1, (com.google.protobuf.ByteString) content_); - } - if (contentCase_ == 2) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, content_); - } - if (allowPlaybackInterruption_ != false) { - size += - com.google.protobuf.CodedOutputStream.computeBoolSize(3, allowPlaybackInterruption_); + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio build() { + com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; + return result; } @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment)) { - return super.equals(obj); - } - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment other = - (com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment) obj; + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio buildPartial() { + com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio result = + new com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio(this); + result.audioUri_ = audioUri_; + result.allowPlaybackInterruption_ = allowPlaybackInterruption_; + onBuilt(); + return result; + } - if (getAllowPlaybackInterruption() != other.getAllowPlaybackInterruption()) return false; - if (!getContentCase().equals(other.getContentCase())) return false; - switch (contentCase_) { - case 1: - if (!getAudio().equals(other.getAudio())) return false; - break; - case 2: - if (!getUri().equals(other.getUri())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; + @java.lang.Override + public Builder clone() { + return super.clone(); } @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ALLOW_PLAYBACK_INTERRUPTION_FIELD_NUMBER; - hash = - (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowPlaybackInterruption()); - switch (contentCase_) { - case 1: - hash = (37 * hash) + AUDIO_FIELD_NUMBER; - hash = (53 * hash) + getAudio().hashCode(); - break; - case 2: - hash = (37 * hash) + URI_FIELD_NUMBER; - hash = (53 * hash) + getUri().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) other); + } else { + super.mergeFrom(other); + return this; + } } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment - parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio other) { + if (other + == com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.getDefaultInstance()) + return this; + if (!other.getAudioUri().isEmpty()) { + audioUri_ = other.audioUri_; + onChanged(); + } + if (other.getAllowPlaybackInterruption() != false) { + setAllowPlaybackInterruption(other.getAllowPlaybackInterruption()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + @java.lang.Override + public final boolean isInitialized() { + return true; } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment parseFrom( + @java.lang.Override + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); + com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); + private java.lang.Object audioUri_ = ""; + /** + * + * + *
+       * Required. URI of the audio clip. Dialogflow does not impose any validation on this
+       * value. It is specific to the client that reads it.
+       * 
+ * + * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The audioUri. + */ + public java.lang.String getAudioUri() { + java.lang.Object ref = audioUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + audioUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } } - - public static Builder newBuilder( - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + /** + * + * + *
+       * Required. URI of the audio clip. Dialogflow does not impose any validation on this
+       * value. It is specific to the client that reads it.
+       * 
+ * + * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for audioUri. + */ + public com.google.protobuf.ByteString getAudioUriBytes() { + java.lang.Object ref = audioUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + audioUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } + /** + * + * + *
+       * Required. URI of the audio clip. Dialogflow does not impose any validation on this
+       * value. It is specific to the client that reads it.
+       * 
+ * + * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The audioUri to set. + * @return This builder for chaining. + */ + public Builder setAudioUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + audioUri_ = value; + onChanged(); + return this; } + /** + * + * + *
+       * Required. URI of the audio clip. Dialogflow does not impose any validation on this
+       * value. It is specific to the client that reads it.
+       * 
+ * + * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearAudioUri() { - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; + audioUri_ = getDefaultInstance().getAudioUri(); + onChanged(); + return this; } /** * * *
-       * Represents one segment of audio.
+       * Required. URI of the audio clip. Dialogflow does not impose any validation on this
+       * value. It is specific to the client that reads it.
        * 
* - * Protobuf type {@code google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment} + * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for audioUri to set. + * @return This builder for chaining. */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment) - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.SegmentOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_Segment_descriptor; + public Builder setAudioUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } + checkByteStringIsUtf8(value); - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_Segment_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.class, - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.Builder - .class); - } - - // Construct using - // com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - allowPlaybackInterruption_ = false; + audioUri_ = value; + onChanged(); + return this; + } - contentCase_ = 0; - content_ = null; - return this; - } + private boolean allowPlaybackInterruption_; + /** + * + * + *
+       * 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.
+       * 
+ * + * bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The allowPlaybackInterruption. + */ + @java.lang.Override + public boolean getAllowPlaybackInterruption() { + return allowPlaybackInterruption_; + } + /** + * + * + *
+       * 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.
+       * 
+ * + * bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The allowPlaybackInterruption to set. + * @return This builder for chaining. + */ + public Builder setAllowPlaybackInterruption(boolean value) { - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_Segment_descriptor; - } + allowPlaybackInterruption_ = value; + onChanged(); + 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.
+       * 
+ * + * bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearAllowPlaybackInterruption() { - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment - getDefaultInstanceForType() { - return com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment - .getDefaultInstance(); - } + allowPlaybackInterruption_ = false; + onChanged(); + return this; + } - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment build() { - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment buildPartial() { - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment result = - new com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment(this); - if (contentCase_ == 1) { - result.content_ = content_; - } - if (contentCase_ == 2) { - result.content_ = content_; - } - result.allowPlaybackInterruption_ = allowPlaybackInterruption_; - result.contentCase_ = contentCase_; - onBuilt(); - return result; - } + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } - @java.lang.Override - public Builder clone() { - return super.clone(); - } + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) + } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) + private static final com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio + DEFAULT_INSTANCE; - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio(); + } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio getDefaultInstance() { + return DEFAULT_INSTANCE; + } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PlayAudio parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PlayAudio(input, extensionRegistry); + } + }; - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } + public static com.google.protobuf.Parser parser() { + return PARSER; + } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment) { - return mergeFrom( - (com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment) other); - } else { - super.mergeFrom(other); - return this; - } - } + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - public Builder mergeFrom( - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment other) { - if (other - == com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment - .getDefaultInstance()) return this; - if (other.getAllowPlaybackInterruption() != false) { - setAllowPlaybackInterruption(other.getAllowPlaybackInterruption()); - } - switch (other.getContentCase()) { - case AUDIO: - { - setAudio(other.getAudio()); - break; - } - case URI: - { - contentCase_ = 2; - content_ = other.content_; - onChanged(); - break; - } - case CONTENT_NOT_SET: - { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } - @java.lang.Override - public final boolean isInitialized() { - return true; - } + public interface MixedAudioOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio) + com.google.protobuf.MessageOrBuilder { - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } + /** + * + * + *
+     * Segments this audio response is composed of.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + java.util.List + getSegmentsList(); + /** + * + * + *
+     * Segments this audio response is composed of.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment getSegments(int index); + /** + * + * + *
+     * Segments this audio response is composed of.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + int getSegmentsCount(); + /** + * + * + *
+     * Segments this audio response is composed of.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + java.util.List< + ? extends com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.SegmentOrBuilder> + getSegmentsOrBuilderList(); + /** + * + * + *
+     * Segments this audio response is composed of.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.SegmentOrBuilder + getSegmentsOrBuilder(int index); + } + /** + * + * + *
+   * Represents an audio message that is composed of both segments
+   * synthesized from the Dialogflow agent prompts and ones hosted externally
+   * at the specified URIs.
+   * The external URIs are specified 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.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio} + */ + public static final class MixedAudio extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio) + MixedAudioOrBuilder { + private static final long serialVersionUID = 0L; + // Use MixedAudio.newBuilder() to construct. + private MixedAudio(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - private int contentCase_ = 0; - private java.lang.Object content_; + private MixedAudio() { + segments_ = java.util.Collections.emptyList(); + } - public ContentCase getContentCase() { - return ContentCase.forNumber(contentCase_); - } + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MixedAudio(); + } - public Builder clearContent() { - contentCase_ = 0; - content_ = null; - onChanged(); - return this; - } + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } - /** - * - * - *
-         * Raw audio synthesized from the Dialogflow agent's response using
-         * the output config specified in the request.
-         * 
- * - * bytes audio = 1; - * - * @return The audio. - */ - public com.google.protobuf.ByteString getAudio() { - if (contentCase_ == 1) { - return (com.google.protobuf.ByteString) content_; - } - return com.google.protobuf.ByteString.EMPTY; - } - /** - * - * - *
-         * Raw audio synthesized from the Dialogflow agent's response using
-         * the output config specified in the request.
-         * 
- * - * bytes audio = 1; - * - * @param value The audio to set. - * @return This builder for chaining. - */ - public Builder setAudio(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + private MixedAudio( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + segments_ = + new java.util.ArrayList< + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment>(); + mutable_bitField0_ |= 0x00000001; + } + segments_.add( + input.readMessage( + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment + .parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } } - contentCase_ = 1; - content_ = value; - onChanged(); - return this; } - /** - * - * - *
-         * Raw audio synthesized from the Dialogflow agent's response using
-         * the output config specified in the request.
-         * 
- * - * bytes audio = 1; - * - * @return This builder for chaining. - */ - public Builder clearAudio() { - if (contentCase_ == 1) { - contentCase_ = 0; - content_ = null; - onChanged(); - } - return this; + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + segments_ = java.util.Collections.unmodifiableList(segments_); } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } - /** - * - * - *
-         * Client-specific URI that points to an audio clip accessible to the
-         * client. Dialogflow does not impose any validation on it.
-         * 
- * - * string uri = 2; - * - * @return The uri. - */ - @java.lang.Override - public java.lang.String getUri() { - java.lang.Object ref = ""; - if (contentCase_ == 2) { - ref = content_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (contentCase_ == 2) { - content_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-         * Client-specific URI that points to an audio clip accessible to the
-         * client. Dialogflow does not impose any validation on it.
-         * 
- * - * string uri = 2; - * - * @return The bytes for uri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getUriBytes() { - java.lang.Object ref = ""; - if (contentCase_ == 2) { - ref = content_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (contentCase_ == 2) { - content_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-         * Client-specific URI that points to an audio clip accessible to the
-         * client. Dialogflow does not impose any validation on it.
-         * 
- * - * string uri = 2; - * - * @param value The uri to set. - * @return This builder for chaining. - */ - public Builder setUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - contentCase_ = 2; - content_ = value; - onChanged(); - return this; - } - /** - * - * - *
-         * Client-specific URI that points to an audio clip accessible to the
-         * client. Dialogflow does not impose any validation on it.
-         * 
- * - * string uri = 2; - * - * @return This builder for chaining. - */ - public Builder clearUri() { - if (contentCase_ == 2) { - contentCase_ = 0; - content_ = null; - onChanged(); - } - return this; - } - /** - * - * - *
-         * Client-specific URI that points to an audio clip accessible to the
-         * client. Dialogflow does not impose any validation on it.
-         * 
- * - * string uri = 2; - * - * @param value The bytes for uri to set. - * @return This builder for chaining. - */ - public Builder setUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - contentCase_ = 2; - content_ = value; - onChanged(); - return this; - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto + .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_descriptor; + } - private boolean allowPlaybackInterruption_; - /** - * - * - *
-         * 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.
-         * 
- * - * bool allow_playback_interruption = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The allowPlaybackInterruption. - */ - @java.lang.Override - public boolean getAllowPlaybackInterruption() { - return allowPlaybackInterruption_; - } - /** - * - * - *
-         * 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.
-         * 
- * - * bool allow_playback_interruption = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The allowPlaybackInterruption to set. - * @return This builder for chaining. - */ - public Builder setAllowPlaybackInterruption(boolean value) { + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto + .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.class, + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Builder.class); + } - allowPlaybackInterruption_ = value; - onChanged(); - 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.
-         * 
- * - * bool allow_playback_interruption = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearAllowPlaybackInterruption() { + public interface SegmentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment) + com.google.protobuf.MessageOrBuilder { - allowPlaybackInterruption_ = false; - onChanged(); - return this; - } + /** + * + * + *
+       * Raw audio synthesized from the Dialogflow agent's response using
+       * the output config specified in the request.
+       * 
+ * + * bytes audio = 1; + * + * @return The audio. + */ + com.google.protobuf.ByteString getAudio(); - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } + /** + * + * + *
+       * Client-specific URI that points to an audio clip accessible to the
+       * client. Dialogflow does not impose any validation on it.
+       * 
+ * + * string uri = 2; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+       * Client-specific URI that points to an audio clip accessible to the
+       * client. Dialogflow does not impose any validation on it.
+       * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } + /** + * + * + *
+       * 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.
+       * 
+ * + * bool allow_playback_interruption = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The allowPlaybackInterruption. + */ + boolean getAllowPlaybackInterruption(); - // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment) + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.ContentCase + getContentCase(); + } + /** + * + * + *
+     * Represents one segment of audio.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment} + */ + public static final class Segment extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment) + SegmentOrBuilder { + private static final long serialVersionUID = 0L; + // Use Segment.newBuilder() to construct. + private Segment(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); } - // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment) - private static final com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment - DEFAULT_INSTANCE; + private Segment() {} - static { - DEFAULT_INSTANCE = - new com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment(); + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Segment(); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment - getDefaultInstance() { - return DEFAULT_INSTANCE; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Segment parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Segment(input, extensionRegistry); + private Segment( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + contentCase_ = 1; + content_ = input.readBytes(); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + contentCase_ = 2; + content_ = s; + break; + } + case 24: + { + allowPlaybackInterruption_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto + .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_Segment_descriptor; } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto + .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_Segment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.class, + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.Builder.class); } - } - - public static final int SEGMENTS_FIELD_NUMBER = 1; - private java.util.List - segments_; - /** - * - * - *
-     * Segments this audio response is composed of.
-     * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; - * - */ - @java.lang.Override - public java.util.List - getSegmentsList() { - return segments_; - } - /** - * - * - *
-     * Segments this audio response is composed of.
-     * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; - * - */ - @java.lang.Override - public java.util.List< - ? extends com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.SegmentOrBuilder> - getSegmentsOrBuilderList() { - return segments_; - } - /** - * - * - *
-     * Segments this audio response is composed of.
-     * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; - * - */ - @java.lang.Override - public int getSegmentsCount() { - return segments_.size(); - } - /** - * - * - *
-     * Segments this audio response is composed of.
-     * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; - * - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment getSegments( - int index) { - return segments_.get(index); - } - /** - * - * - *
-     * Segments this audio response is composed of.
-     * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; - * - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.SegmentOrBuilder - getSegmentsOrBuilder(int index) { - return segments_.get(index); - } - private byte memoizedIsInitialized = -1; + private int contentCase_ = 0; + private java.lang.Object content_; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public enum ContentCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + AUDIO(1), + URI(2), + CONTENT_NOT_SET(0); + private final int value; - memoizedIsInitialized = 1; - return true; - } + private ContentCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ContentCase valueOf(int value) { + return forNumber(value); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < segments_.size(); i++) { - output.writeMessage(1, segments_.get(i)); - } - unknownFields.writeTo(output); - } + public static ContentCase forNumber(int value) { + switch (value) { + case 1: + return AUDIO; + case 2: + return URI; + case 0: + return CONTENT_NOT_SET; + default: + return null; + } + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + public int getNumber() { + return this.value; + } + }; - size = 0; - for (int i = 0; i < segments_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, segments_.get(i)); + public ContentCase getContentCase() { + return ContentCase.forNumber(contentCase_); } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio)) { - return super.equals(obj); - } - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio other = - (com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio) obj; - - if (!getSegmentsList().equals(other.getSegmentsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + public static final int AUDIO_FIELD_NUMBER = 1; + /** + * + * + *
+       * Raw audio synthesized from the Dialogflow agent's response using
+       * the output config specified in the request.
+       * 
+ * + * bytes audio = 1; + * + * @return The audio. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAudio() { + if (contentCase_ == 1) { + return (com.google.protobuf.ByteString) content_; + } + return com.google.protobuf.ByteString.EMPTY; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; + public static final int URI_FIELD_NUMBER = 2; + /** + * + * + *
+       * Client-specific URI that points to an audio clip accessible to the
+       * client. Dialogflow does not impose any validation on it.
+       * 
+ * + * string uri = 2; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = ""; + if (contentCase_ == 2) { + ref = content_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (contentCase_ == 2) { + content_ = s; + } + return s; + } } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getSegmentsCount() > 0) { - hash = (37 * hash) + SEGMENTS_FIELD_NUMBER; - hash = (53 * hash) + getSegmentsList().hashCode(); + /** + * + * + *
+       * Client-specific URI that points to an audio clip accessible to the
+       * client. Dialogflow does not impose any validation on it.
+       * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = ""; + if (contentCase_ == 2) { + ref = content_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (contentCase_ == 2) { + content_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + public static final int ALLOW_PLAYBACK_INTERRUPTION_FIELD_NUMBER = 3; + private boolean allowPlaybackInterruption_; + /** + * + * + *
+       * 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.
+       * 
+ * + * bool allow_playback_interruption = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The allowPlaybackInterruption. + */ + @java.lang.Override + public boolean getAllowPlaybackInterruption() { + return allowPlaybackInterruption_; + } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } + private byte memoizedIsInitialized = -1; - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } + memoizedIsInitialized = 1; + return true; + } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (contentCase_ == 1) { + output.writeBytes(1, (com.google.protobuf.ByteString) content_); + } + if (contentCase_ == 2) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, content_); + } + if (allowPlaybackInterruption_ != false) { + output.writeBool(3, allowPlaybackInterruption_); + } + unknownFields.writeTo(output); + } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } + size = 0; + if (contentCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeBytesSize( + 1, (com.google.protobuf.ByteString) content_); + } + if (contentCase_ == 2) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, content_); + } + if (allowPlaybackInterruption_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(3, allowPlaybackInterruption_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment other = + (com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment) obj; - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + if (getAllowPlaybackInterruption() != other.getAllowPlaybackInterruption()) return false; + if (!getContentCase().equals(other.getContentCase())) return false; + switch (contentCase_) { + case 1: + if (!getAudio().equals(other.getAudio())) return false; + break; + case 2: + if (!getUri().equals(other.getUri())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } - public static Builder newBuilder( - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ALLOW_PLAYBACK_INTERRUPTION_FIELD_NUMBER; + hash = + (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowPlaybackInterruption()); + switch (contentCase_) { + case 1: + hash = (37 * hash) + AUDIO_FIELD_NUMBER; + hash = (53 * hash) + getAudio().hashCode(); + break; + case 2: + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-     * Represents an audio message that is composed of both segments
-     * synthesized from the Dialogflow agent prompts and ones hosted externally
-     * at the specified URIs.
-     * The external URIs are specified 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.
-     * 
- * - * Protobuf type {@code google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio) - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudioOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_descriptor; + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.class, - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Builder.class); + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - // Construct using com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getSegmentsFieldBuilder(); - } + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - @java.lang.Override - public Builder clear() { - super.clear(); - if (segmentsBuilder_ == null) { - segments_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - segmentsBuilder_.clear(); - } - return this; + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_descriptor; + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); } - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio - getDefaultInstanceForType() { - return com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.getDefaultInstance(); + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio build() { - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); } - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio buildPartial() { - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio result = - new com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio(this); - int from_bitField0_ = bitField0_; - if (segmentsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - segments_ = java.util.Collections.unmodifiableList(segments_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.segments_ = segments_; - } else { - result.segments_ = segmentsBuilder_.build(); - } - onBuilt(); - return result; + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - @java.lang.Override - public Builder clone() { - return super.clone(); + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); } @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); + public Builder newBuilderForType() { + return newBuilder(); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; } + /** + * + * + *
+       * Represents one segment of audio.
+       * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment) + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.SegmentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto + .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_Segment_descriptor; + } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio) { - return mergeFrom((com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio) other); - } else { - super.mergeFrom(other); - return this; + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto + .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_Segment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.class, + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.Builder + .class); } - } - public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio other) { - if (other - == com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.getDefaultInstance()) - return this; - if (segmentsBuilder_ == null) { - if (!other.segments_.isEmpty()) { - if (segments_.isEmpty()) { - segments_ = other.segments_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureSegmentsIsMutable(); - segments_.addAll(other.segments_); - } - onChanged(); - } - } else { - if (!other.segments_.isEmpty()) { - if (segmentsBuilder_.isEmpty()) { - segmentsBuilder_.dispose(); - segmentsBuilder_ = null; - segments_ = other.segments_; - bitField0_ = (bitField0_ & ~0x00000001); - segmentsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getSegmentsFieldBuilder() - : null; - } else { - segmentsBuilder_.addAllMessages(other.segments_); - } - } + // Construct using + // com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - @java.lang.Override - public final boolean isInitialized() { - return true; - } + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + allowPlaybackInterruption_ = false; + + contentCase_ = 0; + content_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto + .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_Segment_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment build() { + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); } + return result; } - return this; - } - private int bitField0_; + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment buildPartial() { + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment result = + new com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment(this); + if (contentCase_ == 1) { + result.content_ = content_; + } + if (contentCase_ == 2) { + result.content_ = content_; + } + result.allowPlaybackInterruption_ = allowPlaybackInterruption_; + result.contentCase_ = contentCase_; + onBuilt(); + return result; + } - private java.util.List - segments_ = java.util.Collections.emptyList(); + @java.lang.Override + public Builder clone() { + return super.clone(); + } - private void ensureSegmentsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - segments_ = - new java.util.ArrayList< - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment>(segments_); - bitField0_ |= 0x00000001; + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); } - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment, - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.Builder, - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.SegmentOrBuilder> - segmentsBuilder_; + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } - /** - * - * - *
-       * Segments this audio response is composed of.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; - * - */ - public java.util.List - getSegmentsList() { - if (segmentsBuilder_ == null) { - return java.util.Collections.unmodifiableList(segments_); - } else { - return segmentsBuilder_.getMessageList(); + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); } - } - /** - * - * - *
-       * Segments this audio response is composed of.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; - * - */ - public int getSegmentsCount() { - if (segmentsBuilder_ == null) { - return segments_.size(); - } else { - return segmentsBuilder_.getCount(); + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); } - } - /** - * - * - *
-       * Segments this audio response is composed of.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; - * - */ - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment getSegments( - int index) { - if (segmentsBuilder_ == null) { - return segments_.get(index); - } else { - return segmentsBuilder_.getMessage(index); + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); } - } - /** - * - * - *
-       * Segments this audio response is composed of.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; - * - */ - public Builder setSegments( - int index, com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment value) { - if (segmentsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment) other); + } else { + super.mergeFrom(other); + return this; } - ensureSegmentsIsMutable(); - segments_.set(index, value); + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment other) { + if (other + == com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment + .getDefaultInstance()) return this; + if (other.getAllowPlaybackInterruption() != false) { + setAllowPlaybackInterruption(other.getAllowPlaybackInterruption()); + } + switch (other.getContentCase()) { + case AUDIO: + { + setAudio(other.getAudio()); + break; + } + case URI: + { + contentCase_ = 2; + content_ = other.content_; + onChanged(); + break; + } + case CONTENT_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); onChanged(); - } else { - segmentsBuilder_.setMessage(index, value); + return this; } - return this; - } - /** - * - * - *
-       * Segments this audio response is composed of.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; - * - */ - public Builder setSegments( - int index, - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.Builder - builderForValue) { - if (segmentsBuilder_ == null) { - ensureSegmentsIsMutable(); - segments_.set(index, builderForValue.build()); - onChanged(); - } else { - segmentsBuilder_.setMessage(index, builderForValue.build()); + + @java.lang.Override + public final boolean isInitialized() { + return true; } - return this; - } - /** - * - * - *
-       * Segments this audio response is composed of.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; - * - */ - public Builder addSegments( - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment value) { - if (segmentsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } } - ensureSegmentsIsMutable(); - segments_.add(value); + return this; + } + + private int contentCase_ = 0; + private java.lang.Object content_; + + public ContentCase getContentCase() { + return ContentCase.forNumber(contentCase_); + } + + public Builder clearContent() { + contentCase_ = 0; + content_ = null; onChanged(); - } else { - segmentsBuilder_.addMessage(value); + return this; } - return this; - } - /** - * - * - *
-       * Segments this audio response is composed of.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; - * - */ - public Builder addSegments( - int index, com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment value) { - if (segmentsBuilder_ == null) { + + /** + * + * + *
+         * Raw audio synthesized from the Dialogflow agent's response using
+         * the output config specified in the request.
+         * 
+ * + * bytes audio = 1; + * + * @return The audio. + */ + public com.google.protobuf.ByteString getAudio() { + if (contentCase_ == 1) { + return (com.google.protobuf.ByteString) content_; + } + return com.google.protobuf.ByteString.EMPTY; + } + /** + * + * + *
+         * Raw audio synthesized from the Dialogflow agent's response using
+         * the output config specified in the request.
+         * 
+ * + * bytes audio = 1; + * + * @param value The audio to set. + * @return This builder for chaining. + */ + public Builder setAudio(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } - ensureSegmentsIsMutable(); - segments_.add(index, value); - onChanged(); - } else { - segmentsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-       * Segments this audio response is composed of.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; - * - */ - public Builder addSegments( - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.Builder - builderForValue) { - if (segmentsBuilder_ == null) { - ensureSegmentsIsMutable(); - segments_.add(builderForValue.build()); + contentCase_ = 1; + content_ = value; onChanged(); - } else { - segmentsBuilder_.addMessage(builderForValue.build()); + return this; } - return this; - } - /** - * - * - *
-       * Segments this audio response is composed of.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; - * - */ - public Builder addSegments( - int index, - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.Builder - builderForValue) { - if (segmentsBuilder_ == null) { - ensureSegmentsIsMutable(); - segments_.add(index, builderForValue.build()); - onChanged(); - } else { - segmentsBuilder_.addMessage(index, builderForValue.build()); + /** + * + * + *
+         * Raw audio synthesized from the Dialogflow agent's response using
+         * the output config specified in the request.
+         * 
+ * + * bytes audio = 1; + * + * @return This builder for chaining. + */ + public Builder clearAudio() { + if (contentCase_ == 1) { + contentCase_ = 0; + content_ = null; + onChanged(); + } + return this; } - return this; - } - /** - * - * - *
-       * Segments this audio response is composed of.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; - * - */ - public Builder addAllSegments( - java.lang.Iterable< - ? extends com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment> - values) { - if (segmentsBuilder_ == null) { - ensureSegmentsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, segments_); - onChanged(); - } else { - segmentsBuilder_.addAllMessages(values); + + /** + * + * + *
+         * Client-specific URI that points to an audio clip accessible to the
+         * client. Dialogflow does not impose any validation on it.
+         * 
+ * + * string uri = 2; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = ""; + if (contentCase_ == 2) { + ref = content_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (contentCase_ == 2) { + content_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } } - return this; - } - /** - * - * - *
-       * Segments this audio response is composed of.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; - * - */ - public Builder clearSegments() { - if (segmentsBuilder_ == null) { - segments_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - segmentsBuilder_.clear(); + /** + * + * + *
+         * Client-specific URI that points to an audio clip accessible to the
+         * client. Dialogflow does not impose any validation on it.
+         * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = ""; + if (contentCase_ == 2) { + ref = content_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (contentCase_ == 2) { + content_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - return this; - } - /** - * - * - *
-       * Segments this audio response is composed of.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; - * - */ - public Builder removeSegments(int index) { - if (segmentsBuilder_ == null) { - ensureSegmentsIsMutable(); - segments_.remove(index); + /** + * + * + *
+         * Client-specific URI that points to an audio clip accessible to the
+         * client. Dialogflow does not impose any validation on it.
+         * 
+ * + * string uri = 2; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + contentCase_ = 2; + content_ = value; onChanged(); - } else { - segmentsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-       * Segments this audio response is composed of.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; - * - */ - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.Builder - getSegmentsBuilder(int index) { - return getSegmentsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-       * Segments this audio response is composed of.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; - * - */ - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.SegmentOrBuilder - getSegmentsOrBuilder(int index) { - if (segmentsBuilder_ == null) { - return segments_.get(index); - } else { - return segmentsBuilder_.getMessageOrBuilder(index); + return this; } - } - /** - * - * - *
-       * Segments this audio response is composed of.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; - * - */ - public java.util.List< - ? extends - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.SegmentOrBuilder> - getSegmentsOrBuilderList() { - if (segmentsBuilder_ != null) { - return segmentsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(segments_); + /** + * + * + *
+         * Client-specific URI that points to an audio clip accessible to the
+         * client. Dialogflow does not impose any validation on it.
+         * 
+ * + * string uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + if (contentCase_ == 2) { + contentCase_ = 0; + content_ = null; + onChanged(); + } + return this; } - } - /** - * - * - *
-       * Segments this audio response is composed of.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; - * - */ - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.Builder - addSegmentsBuilder() { - return getSegmentsFieldBuilder() - .addBuilder( - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment - .getDefaultInstance()); - } - /** - * - * - *
-       * Segments this audio response is composed of.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; - * - */ - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.Builder - addSegmentsBuilder(int index) { - return getSegmentsFieldBuilder() - .addBuilder( - index, - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment - .getDefaultInstance()); - } - /** - * - * - *
-       * Segments this audio response is composed of.
-       * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; - * - */ - public java.util.List< - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.Builder> - getSegmentsBuilderList() { - return getSegmentsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment, - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.Builder, - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.SegmentOrBuilder> - getSegmentsFieldBuilder() { - if (segmentsBuilder_ == null) { - segmentsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment, - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.Builder, - com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.SegmentOrBuilder>( - segments_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - segments_ = null; + /** + * + * + *
+         * Client-specific URI that points to an audio clip accessible to the
+         * client. Dialogflow does not impose any validation on it.
+         * 
+ * + * string uri = 2; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + contentCase_ = 2; + content_ = value; + onChanged(); + return this; } - return segmentsBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio) - private static final com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio(); - } - - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public MixedAudio parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new MixedAudio(input, extensionRegistry); - } - }; + private boolean allowPlaybackInterruption_; + /** + * + * + *
+         * 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.
+         * 
+ * + * bool allow_playback_interruption = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The allowPlaybackInterruption. + */ + @java.lang.Override + public boolean getAllowPlaybackInterruption() { + return allowPlaybackInterruption_; + } + /** + * + * + *
+         * 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.
+         * 
+ * + * bool allow_playback_interruption = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The allowPlaybackInterruption to set. + * @return This builder for chaining. + */ + public Builder setAllowPlaybackInterruption(boolean value) { - public static com.google.protobuf.Parser parser() { - return PARSER; - } + allowPlaybackInterruption_ = value; + onChanged(); + 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.
+         * 
+ * + * bool allow_playback_interruption = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearAllowPlaybackInterruption() { - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + allowPlaybackInterruption_ = false; + onChanged(); + return this; + } - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } - public interface PlayAudioOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) - com.google.protobuf.MessageOrBuilder { + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } - /** - * - * - *
-     * Required. URI of the audio clip. Dialogflow does not impose any validation on this
-     * value. It is specific to the client that reads it.
-     * 
- * - * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The audioUri. - */ - java.lang.String getAudioUri(); - /** - * - * - *
-     * Required. URI of the audio clip. Dialogflow does not impose any validation on this
-     * value. It is specific to the client that reads it.
-     * 
- * - * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for audioUri. - */ - com.google.protobuf.ByteString getAudioUriBytes(); + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment) + } - /** - * - * - *
-     * 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.
-     * 
- * - * bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The allowPlaybackInterruption. - */ - boolean getAllowPlaybackInterruption(); - } - /** - * - * - *
-   * Specifies an audio clip to be played by the client as part of the response.
-   * 
- * - * Protobuf type {@code google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio} - */ - public static final class PlayAudio extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) - PlayAudioOrBuilder { - private static final long serialVersionUID = 0L; - // Use PlayAudio.newBuilder() to construct. - private PlayAudio(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment) + private static final com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment + DEFAULT_INSTANCE; - private PlayAudio() { - audioUri_ = ""; - } + static { + DEFAULT_INSTANCE = + new com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment(); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new PlayAudio(); - } + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment + getDefaultInstance() { + return DEFAULT_INSTANCE; + } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Segment parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Segment(input, extensionRegistry); + } + }; - private PlayAudio( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); + public static com.google.protobuf.Parser parser() { + return PARSER; } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - audioUri_ = s; - break; - } - case 16: - { - allowPlaybackInterruption_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_descriptor; + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } + public static final int SEGMENTS_FIELD_NUMBER = 1; + private java.util.List + segments_; + /** + * + * + *
+     * Segments this audio response is composed of.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.class, - com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.Builder.class); + public java.util.List + getSegmentsList() { + return segments_; } - - public static final int AUDIO_URI_FIELD_NUMBER = 1; - private volatile java.lang.Object audioUri_; /** * * *
-     * Required. URI of the audio clip. Dialogflow does not impose any validation on this
-     * value. It is specific to the client that reads it.
+     * Segments this audio response is composed of.
      * 
* - * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The audioUri. + * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; + * */ @java.lang.Override - public java.lang.String getAudioUri() { - java.lang.Object ref = audioUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - audioUri_ = s; - return s; - } + public java.util.List< + ? extends com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.SegmentOrBuilder> + getSegmentsOrBuilderList() { + return segments_; } /** * * *
-     * Required. URI of the audio clip. Dialogflow does not impose any validation on this
-     * value. It is specific to the client that reads it.
+     * Segments this audio response is composed of.
      * 
* - * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for audioUri. + * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; + * */ @java.lang.Override - public com.google.protobuf.ByteString getAudioUriBytes() { - java.lang.Object ref = audioUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - audioUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public int getSegmentsCount() { + return segments_.size(); } - - public static final int ALLOW_PLAYBACK_INTERRUPTION_FIELD_NUMBER = 2; - private boolean allowPlaybackInterruption_; /** * * *
-     * 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.
+     * Segments this audio response is composed of.
      * 
* - * bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment getSegments( + int index) { + return segments_.get(index); + } + /** * - * @return The allowPlaybackInterruption. + * + *
+     * Segments this audio response is composed of.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; + * */ @java.lang.Override - public boolean getAllowPlaybackInterruption() { - return allowPlaybackInterruption_; + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.SegmentOrBuilder + getSegmentsOrBuilder(int index) { + return segments_.get(index); } private byte memoizedIsInitialized = -1; @@ -6721,11 +6447,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getAudioUriBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, audioUri_); - } - if (allowPlaybackInterruption_ != false) { - output.writeBool(2, allowPlaybackInterruption_); + for (int i = 0; i < segments_.size(); i++) { + output.writeMessage(1, segments_.get(i)); } unknownFields.writeTo(output); } @@ -6736,12 +6459,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getAudioUriBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, audioUri_); - } - if (allowPlaybackInterruption_ != false) { - size += - com.google.protobuf.CodedOutputStream.computeBoolSize(2, allowPlaybackInterruption_); + for (int i = 0; i < segments_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, segments_.get(i)); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -6753,14 +6472,13 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio)) { + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio)) { return super.equals(obj); } - com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio other = - (com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) obj; + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio other = + (com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio) obj; - if (!getAudioUri().equals(other.getAudioUri())) return false; - if (getAllowPlaybackInterruption() != other.getAllowPlaybackInterruption()) return false; + if (!getSegmentsList().equals(other.getSegmentsList())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -6772,80 +6490,80 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + AUDIO_URI_FIELD_NUMBER; - hash = (53 * hash) + getAudioUri().hashCode(); - hash = (37 * hash) + ALLOW_PLAYBACK_INTERRUPTION_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowPlaybackInterruption()); + if (getSegmentsCount() > 0) { + hash = (37 * hash) + SEGMENTS_FIELD_NUMBER; + hash = (53 * hash) + getSegmentsList().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseDelimitedFrom( + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseDelimitedFrom( + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -6863,7 +6581,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio prototype) { + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -6882,32 +6600,38 @@ protected Builder newBuilderForType( * * *
-     * Specifies an audio clip to be played by the client as part of the response.
+     * Represents an audio message that is composed of both segments
+     * synthesized from the Dialogflow agent prompts and ones hosted externally
+     * at the specified URIs.
+     * The external URIs are specified 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.
      * 
* - * Protobuf type {@code google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio} + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) - com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudioOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio) + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudioOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_descriptor; + .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_fieldAccessorTable + .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.class, - com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.Builder.class); + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.class, + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Builder.class); } - // Construct using com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.newBuilder() + // Construct using com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -6918,34 +6642,38 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getSegmentsFieldBuilder(); + } } @java.lang.Override public Builder clear() { super.clear(); - audioUri_ = ""; - - allowPlaybackInterruption_ = false; - + if (segmentsBuilder_ == null) { + segments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + segmentsBuilder_.clear(); + } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_descriptor; + .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_descriptor; } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio getDefaultInstanceForType() { - return com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.getDefaultInstance(); + return com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.getDefaultInstance(); } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio build() { - com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio result = buildPartial(); + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio build() { + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -6953,11 +6681,19 @@ public com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio build() { } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio buildPartial() { - com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio result = - new com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio(this); - result.audioUri_ = audioUri_; - result.allowPlaybackInterruption_ = allowPlaybackInterruption_; + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio buildPartial() { + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio result = + new com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio(this); + int from_bitField0_ = bitField0_; + if (segmentsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + segments_ = java.util.Collections.unmodifiableList(segments_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.segments_ = segments_; + } else { + result.segments_ = segmentsBuilder_.build(); + } onBuilt(); return result; } @@ -6999,24 +6735,44 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) { - return mergeFrom((com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) other); + if (other instanceof com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio other) { + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio other) { if (other - == com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.getDefaultInstance()) + == com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.getDefaultInstance()) return this; - if (!other.getAudioUri().isEmpty()) { - audioUri_ = other.audioUri_; - onChanged(); - } - if (other.getAllowPlaybackInterruption() != false) { - setAllowPlaybackInterruption(other.getAllowPlaybackInterruption()); + if (segmentsBuilder_ == null) { + if (!other.segments_.isEmpty()) { + if (segments_.isEmpty()) { + segments_ = other.segments_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSegmentsIsMutable(); + segments_.addAll(other.segments_); + } + onChanged(); + } + } else { + if (!other.segments_.isEmpty()) { + if (segmentsBuilder_.isEmpty()) { + segmentsBuilder_.dispose(); + segmentsBuilder_ = null; + segments_ = other.segments_; + bitField0_ = (bitField0_ & ~0x00000001); + segmentsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getSegmentsFieldBuilder() + : null; + } else { + segmentsBuilder_.addAllMessages(other.segments_); + } + } } this.mergeUnknownFields(other.unknownFields); onChanged(); @@ -7033,12 +6789,12 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parsedMessage = null; + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = - (com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) + (com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { @@ -7048,177 +6804,419 @@ public Builder mergeFrom( } return this; } - - private java.lang.Object audioUri_ = ""; + + private int bitField0_; + + private java.util.List + segments_ = java.util.Collections.emptyList(); + + private void ensureSegmentsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + segments_ = + new java.util.ArrayList< + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment>(segments_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment, + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.Builder, + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.SegmentOrBuilder> + segmentsBuilder_; + + /** + * + * + *
+       * Segments this audio response is composed of.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + public java.util.List + getSegmentsList() { + if (segmentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(segments_); + } else { + return segmentsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Segments this audio response is composed of.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + public int getSegmentsCount() { + if (segmentsBuilder_ == null) { + return segments_.size(); + } else { + return segmentsBuilder_.getCount(); + } + } + /** + * + * + *
+       * Segments this audio response is composed of.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment getSegments( + int index) { + if (segmentsBuilder_ == null) { + return segments_.get(index); + } else { + return segmentsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Segments this audio response is composed of.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + public Builder setSegments( + int index, com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment value) { + if (segmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSegmentsIsMutable(); + segments_.set(index, value); + onChanged(); + } else { + segmentsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Segments this audio response is composed of.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + public Builder setSegments( + int index, + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.Builder + builderForValue) { + if (segmentsBuilder_ == null) { + ensureSegmentsIsMutable(); + segments_.set(index, builderForValue.build()); + onChanged(); + } else { + segmentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Segments this audio response is composed of.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + public Builder addSegments( + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment value) { + if (segmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSegmentsIsMutable(); + segments_.add(value); + onChanged(); + } else { + segmentsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Segments this audio response is composed of.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + public Builder addSegments( + int index, com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment value) { + if (segmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSegmentsIsMutable(); + segments_.add(index, value); + onChanged(); + } else { + segmentsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Segments this audio response is composed of.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + public Builder addSegments( + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.Builder + builderForValue) { + if (segmentsBuilder_ == null) { + ensureSegmentsIsMutable(); + segments_.add(builderForValue.build()); + onChanged(); + } else { + segmentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Segments this audio response is composed of.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + public Builder addSegments( + int index, + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.Builder + builderForValue) { + if (segmentsBuilder_ == null) { + ensureSegmentsIsMutable(); + segments_.add(index, builderForValue.build()); + onChanged(); + } else { + segmentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } /** * * *
-       * Required. URI of the audio clip. Dialogflow does not impose any validation on this
-       * value. It is specific to the client that reads it.
+       * Segments this audio response is composed of.
        * 
* - * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The audioUri. + * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; + * */ - public java.lang.String getAudioUri() { - java.lang.Object ref = audioUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - audioUri_ = s; - return s; + public Builder addAllSegments( + java.lang.Iterable< + ? extends com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment> + values) { + if (segmentsBuilder_ == null) { + ensureSegmentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, segments_); + onChanged(); } else { - return (java.lang.String) ref; + segmentsBuilder_.addAllMessages(values); } + return this; } /** * * *
-       * Required. URI of the audio clip. Dialogflow does not impose any validation on this
-       * value. It is specific to the client that reads it.
+       * Segments this audio response is composed of.
        * 
* - * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for audioUri. + * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; + * */ - public com.google.protobuf.ByteString getAudioUriBytes() { - java.lang.Object ref = audioUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - audioUri_ = b; - return b; + public Builder clearSegments() { + if (segmentsBuilder_ == null) { + segments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); } else { - return (com.google.protobuf.ByteString) ref; + segmentsBuilder_.clear(); } + return this; } /** * * *
-       * Required. URI of the audio clip. Dialogflow does not impose any validation on this
-       * value. It is specific to the client that reads it.
+       * Segments this audio response is composed of.
        * 
* - * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The audioUri to set. - * @return This builder for chaining. + * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; + * */ - public Builder setAudioUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public Builder removeSegments(int index) { + if (segmentsBuilder_ == null) { + ensureSegmentsIsMutable(); + segments_.remove(index); + onChanged(); + } else { + segmentsBuilder_.remove(index); } - - audioUri_ = value; - onChanged(); return this; } /** * * *
-       * Required. URI of the audio clip. Dialogflow does not impose any validation on this
-       * value. It is specific to the client that reads it.
+       * Segments this audio response is composed of.
        * 
* - * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. + * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; + * */ - public Builder clearAudioUri() { - - audioUri_ = getDefaultInstance().getAudioUri(); - onChanged(); - return this; + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.Builder + getSegmentsBuilder(int index) { + return getSegmentsFieldBuilder().getBuilder(index); } /** * * *
-       * Required. URI of the audio clip. Dialogflow does not impose any validation on this
-       * value. It is specific to the client that reads it.
+       * Segments this audio response is composed of.
        * 
* - * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for audioUri to set. - * @return This builder for chaining. + * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; + * */ - public Builder setAudioUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.SegmentOrBuilder + getSegmentsOrBuilder(int index) { + if (segmentsBuilder_ == null) { + return segments_.get(index); + } else { + return segmentsBuilder_.getMessageOrBuilder(index); } - checkByteStringIsUtf8(value); - - audioUri_ = value; - onChanged(); - return this; } - - private boolean allowPlaybackInterruption_; /** * * *
-       * 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.
+       * Segments this audio response is composed of.
        * 
* - * bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; * - * - * @return The allowPlaybackInterruption. */ - @java.lang.Override - public boolean getAllowPlaybackInterruption() { - return allowPlaybackInterruption_; + public java.util.List< + ? extends + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.SegmentOrBuilder> + getSegmentsOrBuilderList() { + if (segmentsBuilder_ != null) { + return segmentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(segments_); + } } /** * * *
-       * 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.
+       * Segments this audio response is composed of.
        * 
* - * bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; * - * - * @param value The allowPlaybackInterruption to set. - * @return This builder for chaining. */ - public Builder setAllowPlaybackInterruption(boolean value) { - - allowPlaybackInterruption_ = value; - onChanged(); - return this; + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.Builder + addSegmentsBuilder() { + return getSegmentsFieldBuilder() + .addBuilder( + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment + .getDefaultInstance()); } /** * * *
-       * 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.
+       * Segments this audio response is composed of.
        * 
* - * bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; * + */ + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.Builder + addSegmentsBuilder(int index) { + return getSegmentsFieldBuilder() + .addBuilder( + index, + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment + .getDefaultInstance()); + } + /** * - * @return This builder for chaining. + * + *
+       * Segments this audio response is composed of.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; + * */ - public Builder clearAllowPlaybackInterruption() { + public java.util.List< + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.Builder> + getSegmentsBuilderList() { + return getSegmentsFieldBuilder().getBuilderList(); + } - allowPlaybackInterruption_ = false; - onChanged(); - return this; + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment, + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.Builder, + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.SegmentOrBuilder> + getSegmentsFieldBuilder() { + if (segmentsBuilder_ == null) { + segmentsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment, + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.Builder, + com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.SegmentOrBuilder>( + segments_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + segments_ = null; + } + return segmentsBuilder_; } @java.lang.Override @@ -7233,43 +7231,45 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio) } - // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) - private static final com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio) + private static final com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio(); + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio(); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio getDefaultInstance() { + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio + getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public PlayAudio parsePartialFrom( + public MixedAudio parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PlayAudio(input, extensionRegistry); + return new MixedAudio(input, extensionRegistry); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio getDefaultInstanceForType() { + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio + getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessageProto.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessageProto.java index 4f504d07d..64f09b7b1 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessageProto.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessageProto.java @@ -51,6 +51,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_EndInteraction_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_EndInteraction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -59,10 +63,6 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_Segment_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_Segment_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -101,14 +101,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "gle.protobuf.Struct\032e\n\017OutputAudioText\022\016" + "\n\004text\030\001 \001(\tH\000\022\016\n\004ssml\030\002 \001(\tH\000\022(\n\033allow_" + "playback_interruption\030\003 \001(\010B\003\340A\003B\010\n\006sour" - + "ce\032\020\n\016EndInteraction\032\301\001\n\nMixedAudio\022S\n\010s" - + "egments\030\001 \003(\0132A.google.cloud.dialogflow." - + "cx.v3.ResponseMessage.MixedAudio.Segment" - + "\032^\n\007Segment\022\017\n\005audio\030\001 \001(\014H\000\022\r\n\003uri\030\002 \001(" - + "\tH\000\022(\n\033allow_playback_interruption\030\003 \001(\010" - + "B\003\340A\003B\t\n\007content\032M\n\tPlayAudio\022\026\n\taudio_u" - + "ri\030\001 \001(\tB\003\340A\002\022(\n\033allow_playback_interrup" - + "tion\030\002 \001(\010B\003\340A\003B\t\n\007messageB\244\001\n!com.googl" + + "ce\032\020\n\016EndInteraction\032M\n\tPlayAudio\022\026\n\taud" + + "io_uri\030\001 \001(\tB\003\340A\002\022(\n\033allow_playback_inte" + + "rruption\030\002 \001(\010B\003\340A\003\032\301\001\n\nMixedAudio\022S\n\010se" + + "gments\030\001 \003(\0132A.google.cloud.dialogflow.c" + + "x.v3.ResponseMessage.MixedAudio.Segment\032" + + "^\n\007Segment\022\017\n\005audio\030\001 \001(\014H\000\022\r\n\003uri\030\002 \001(\t" + + "H\000\022(\n\033allow_playback_interruption\030\003 \001(\010B" + + "\003\340A\003B\t\n\007contentB\t\n\007messageB\244\001\n!com.googl" + "e.cloud.dialogflow.cx.v3B\024ResponseMessag" + "eProtoP\001Z?google.golang.org/genproto/goo" + "gleapis/cloud/dialogflow/cx/v3;cx\370\001\001\242\002\002D" @@ -187,10 +187,20 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_EndInteraction_descriptor, new java.lang.String[] {}); - internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_descriptor = internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_descriptor .getNestedTypes() .get(5); + internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_descriptor, + new java.lang.String[] { + "AudioUri", "AllowPlaybackInterruption", + }); + internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_descriptor + .getNestedTypes() + .get(6); internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_descriptor, @@ -207,16 +217,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Audio", "Uri", "AllowPlaybackInterruption", "Content", }); - internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_descriptor = - internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_descriptor - .getNestedTypes() - .get(6); - internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_descriptor, - new java.lang.String[] { - "AudioUri", "AllowPlaybackInterruption", - }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateTestCaseRequest.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateTestCaseRequest.java index db993cb61..3513b4ebc 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateTestCaseRequest.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateTestCaseRequest.java @@ -193,9 +193,9 @@ public com.google.cloud.dialogflow.cx.v3.TestCaseOrBuilder getTestCaseOrBuilder( * * *
-   * Required. The mask to specify which fields should be updated. Only a test case's
-   * metadata and replayed_conversation_turns may be updated. The original
-   * test_case_conversation_turns may not be updated.
+   * 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.
    * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -211,9 +211,9 @@ public boolean hasUpdateMask() { * * *
-   * Required. The mask to specify which fields should be updated. Only a test case's
-   * metadata and replayed_conversation_turns may be updated. The original
-   * test_case_conversation_turns may not be updated.
+   * 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.
    * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -229,9 +229,9 @@ public com.google.protobuf.FieldMask getUpdateMask() { * * *
-   * Required. The mask to specify which fields should be updated. Only a test case's
-   * metadata and replayed_conversation_turns may be updated. The original
-   * test_case_conversation_turns may not be updated.
+   * 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.
    * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -814,9 +814,9 @@ public com.google.cloud.dialogflow.cx.v3.TestCaseOrBuilder getTestCaseOrBuilder( * * *
-     * Required. The mask to specify which fields should be updated. Only a test case's
-     * metadata and replayed_conversation_turns may be updated. The original
-     * test_case_conversation_turns may not be updated.
+     * 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.
      * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -831,9 +831,9 @@ public boolean hasUpdateMask() { * * *
-     * Required. The mask to specify which fields should be updated. Only a test case's
-     * metadata and replayed_conversation_turns may be updated. The original
-     * test_case_conversation_turns may not be updated.
+     * 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.
      * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -854,9 +854,9 @@ public com.google.protobuf.FieldMask getUpdateMask() { * * *
-     * Required. The mask to specify which fields should be updated. Only a test case's
-     * metadata and replayed_conversation_turns may be updated. The original
-     * test_case_conversation_turns may not be updated.
+     * 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.
      * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -879,9 +879,9 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask value) { * * *
-     * Required. The mask to specify which fields should be updated. Only a test case's
-     * metadata and replayed_conversation_turns may be updated. The original
-     * test_case_conversation_turns may not be updated.
+     * 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.
      * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -901,9 +901,9 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForVal * * *
-     * Required. The mask to specify which fields should be updated. Only a test case's
-     * metadata and replayed_conversation_turns may be updated. The original
-     * test_case_conversation_turns may not be updated.
+     * 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.
      * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -928,9 +928,9 @@ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { * * *
-     * Required. The mask to specify which fields should be updated. Only a test case's
-     * metadata and replayed_conversation_turns may be updated. The original
-     * test_case_conversation_turns may not be updated.
+     * 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.
      * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -951,9 +951,9 @@ public Builder clearUpdateMask() { * * *
-     * Required. The mask to specify which fields should be updated. Only a test case's
-     * metadata and replayed_conversation_turns may be updated. The original
-     * test_case_conversation_turns may not be updated.
+     * 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.
      * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -968,9 +968,9 @@ public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { * * *
-     * Required. The mask to specify which fields should be updated. Only a test case's
-     * metadata and replayed_conversation_turns may be updated. The original
-     * test_case_conversation_turns may not be updated.
+     * 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.
      * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -989,9 +989,9 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { * * *
-     * Required. The mask to specify which fields should be updated. Only a test case's
-     * metadata and replayed_conversation_turns may be updated. The original
-     * test_case_conversation_turns may not be updated.
+     * 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.
      * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateTestCaseRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateTestCaseRequestOrBuilder.java index e02c71a99..41e758392 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateTestCaseRequestOrBuilder.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateTestCaseRequestOrBuilder.java @@ -68,9 +68,9 @@ public interface UpdateTestCaseRequestOrBuilder * * *
-   * Required. The mask to specify which fields should be updated. Only a test case's
-   * metadata and replayed_conversation_turns may be updated. The original
-   * test_case_conversation_turns may not be updated.
+   * 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.
    * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -83,9 +83,9 @@ public interface UpdateTestCaseRequestOrBuilder * * *
-   * Required. The mask to specify which fields should be updated. Only a test case's
-   * metadata and replayed_conversation_turns may be updated. The original
-   * test_case_conversation_turns may not be updated.
+   * 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.
    * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -98,9 +98,9 @@ public interface UpdateTestCaseRequestOrBuilder * * *
-   * Required. The mask to specify which fields should be updated. Only a test case's
-   * metadata and replayed_conversation_turns may be updated. The original
-   * test_case_conversation_turns may not be updated.
+   * 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.
    * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/audio_config.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/audio_config.proto index ff09fd67b..dd97ad933 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/audio_config.proto +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/audio_config.proto @@ -29,6 +29,31 @@ option java_outer_classname = "AudioConfigProto"; option java_package = "com.google.cloud.dialogflow.cx.v3"; option objc_class_prefix = "DF"; +// Information for a word recognized by the speech recognizer. +message SpeechWordInfo { + // The word this info is for. + string word = 3; + + // 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. + google.protobuf.Duration start_offset = 1; + + // 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. + google.protobuf.Duration end_offset = 2; + + // 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. + float confidence = 4; +} + // Audio encoding of the audio content sent in the conversational query request. // Refer to the // [Cloud Speech API @@ -78,31 +103,6 @@ enum AudioEncoding { AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE = 7; } -// Information for a word recognized by the speech recognizer. -message SpeechWordInfo { - // The word this info is for. - string word = 3; - - // 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. - google.protobuf.Duration start_offset = 1; - - // 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. - google.protobuf.Duration end_offset = 2; - - // 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. - float confidence = 4; -} - // Instructs the speech recognizer on how to process the audio content. message InputAudioConfig { // Required. Audio encoding of the audio content to process. diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/response_message.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/response_message.proto index 4eab74f50..fb54ec9b6 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/response_message.proto +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/response_message.proto @@ -120,6 +120,18 @@ message ResponseMessage { } + // Specifies an audio clip to be played by the client as part of the response. + message PlayAudio { + // Required. URI of the audio clip. Dialogflow does not impose any validation on this + // value. It is specific to the client that reads it. + string audio_uri = 1 [(google.api.field_behavior) = REQUIRED]; + + // 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. + bool allow_playback_interruption = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + // Represents an audio message that is composed of both segments // synthesized from the Dialogflow agent prompts and ones hosted externally // at the specified URIs. @@ -151,18 +163,6 @@ message ResponseMessage { repeated Segment segments = 1; } - // Specifies an audio clip to be played by the client as part of the response. - message PlayAudio { - // Required. URI of the audio clip. Dialogflow does not impose any validation on this - // value. It is specific to the client that reads it. - string audio_uri = 1 [(google.api.field_behavior) = REQUIRED]; - - // 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. - bool allow_playback_interruption = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - } - // Required. The rich response message. oneof message { // Returns a text response. diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/test_case.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/test_case.proto index c83109ba2..0f26e6de1 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/test_case.proto +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/test_case.proto @@ -535,9 +535,9 @@ message UpdateTestCaseRequest { // Required. The test case to update. TestCase test_case = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. The mask to specify which fields should be updated. Only a test case's - // metadata and replayed_conversation_turns may be updated. The original - // test_case_conversation_turns may not be updated. + // 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. google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; } diff --git a/synth.metadata b/synth.metadata index 0475bdf44..4e0678773 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,16 +11,16 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "cb932c5caa751435dfd0a9a15f655a0626d8a1cb", - "internalRef": "353075593" + "sha": "2e29020ce87808b810deb20e0925b7e26c5e72c1", + "internalRef": "353683381" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "cb932c5caa751435dfd0a9a15f655a0626d8a1cb", - "internalRef": "353075593" + "sha": "2e29020ce87808b810deb20e0925b7e26c5e72c1", + "internalRef": "353683381" } }, { From f37bc6c2835f28f9b484bcf50ec206631e7e7943 Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Tue, 16 Feb 2021 18:56:39 -0800 Subject: [PATCH 04/12] docs: test cases doc update PiperOrigin-RevId: 353783208 Source-Author: Google APIs Source-Date: Mon Jan 25 19:41:38 2021 -0800 Source-Repo: googleapis/googleapis Source-Sha: 6fa7194aba4d0c501592dea28c041890265079dc Source-Link: https://github.com/googleapis/googleapis/commit/6fa7194aba4d0c501592dea28c041890265079dc --- .../cx/v3beta1/TestCasesClient.java | 7 +- .../cx/v3beta1/UpdateTestCaseRequest.java | 72 +++++++++---------- .../UpdateTestCaseRequestOrBuilder.java | 18 ++--- .../dialogflow/cx/v3beta1/audio_config.proto | 50 ++++++------- .../dialogflow/cx/v3beta1/test_case.proto | 6 +- synth.metadata | 8 +-- 6 files changed, 81 insertions(+), 80 deletions(-) diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCasesClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCasesClient.java index 138b3a858..8c9ffc38e 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCasesClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCasesClient.java @@ -379,9 +379,10 @@ public final UnaryCallable createTestCaseCallab * Updates the specified test case. * * @param testCase Required. The test case to update. - * @param updateMask Required. The mask to specify which fields should be updated. Only a test - * case's metadata and replayed_conversation_turns may be updated. The original - * test_case_conversation_turns may not be updated. + * @param updateMask Required. The mask to specify which fields should be updated. The + * [`creationTime`][google.cloud.dialogflow.cx.v3beta1.TestCase.creation_time] and + * [`lastTestResult`][google.cloud.dialogflow.cx.v3beta1.TestCase.last_test_result] cannot be + * updated. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final TestCase updateTestCase(TestCase testCase, FieldMask updateMask) { diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateTestCaseRequest.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateTestCaseRequest.java index 2d89572f0..8e06eb85e 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateTestCaseRequest.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateTestCaseRequest.java @@ -193,9 +193,9 @@ public com.google.cloud.dialogflow.cx.v3beta1.TestCaseOrBuilder getTestCaseOrBui * * *
-   * Required. The mask to specify which fields should be updated. Only a test case's
-   * metadata and replayed_conversation_turns may be updated. The original
-   * test_case_conversation_turns may not be updated.
+   * Required. The mask to specify which fields should be updated. The
+   * [`creationTime`][google.cloud.dialogflow.cx.v3beta1.TestCase.creation_time] and
+   * [`lastTestResult`][google.cloud.dialogflow.cx.v3beta1.TestCase.last_test_result] cannot be updated.
    * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -211,9 +211,9 @@ public boolean hasUpdateMask() { * * *
-   * Required. The mask to specify which fields should be updated. Only a test case's
-   * metadata and replayed_conversation_turns may be updated. The original
-   * test_case_conversation_turns may not be updated.
+   * Required. The mask to specify which fields should be updated. The
+   * [`creationTime`][google.cloud.dialogflow.cx.v3beta1.TestCase.creation_time] and
+   * [`lastTestResult`][google.cloud.dialogflow.cx.v3beta1.TestCase.last_test_result] cannot be updated.
    * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -229,9 +229,9 @@ public com.google.protobuf.FieldMask getUpdateMask() { * * *
-   * Required. The mask to specify which fields should be updated. Only a test case's
-   * metadata and replayed_conversation_turns may be updated. The original
-   * test_case_conversation_turns may not be updated.
+   * Required. The mask to specify which fields should be updated. The
+   * [`creationTime`][google.cloud.dialogflow.cx.v3beta1.TestCase.creation_time] and
+   * [`lastTestResult`][google.cloud.dialogflow.cx.v3beta1.TestCase.last_test_result] cannot be updated.
    * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -817,9 +817,9 @@ public com.google.cloud.dialogflow.cx.v3beta1.TestCaseOrBuilder getTestCaseOrBui * * *
-     * Required. The mask to specify which fields should be updated. Only a test case's
-     * metadata and replayed_conversation_turns may be updated. The original
-     * test_case_conversation_turns may not be updated.
+     * Required. The mask to specify which fields should be updated. The
+     * [`creationTime`][google.cloud.dialogflow.cx.v3beta1.TestCase.creation_time] and
+     * [`lastTestResult`][google.cloud.dialogflow.cx.v3beta1.TestCase.last_test_result] cannot be updated.
      * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -834,9 +834,9 @@ public boolean hasUpdateMask() { * * *
-     * Required. The mask to specify which fields should be updated. Only a test case's
-     * metadata and replayed_conversation_turns may be updated. The original
-     * test_case_conversation_turns may not be updated.
+     * Required. The mask to specify which fields should be updated. The
+     * [`creationTime`][google.cloud.dialogflow.cx.v3beta1.TestCase.creation_time] and
+     * [`lastTestResult`][google.cloud.dialogflow.cx.v3beta1.TestCase.last_test_result] cannot be updated.
      * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -857,9 +857,9 @@ public com.google.protobuf.FieldMask getUpdateMask() { * * *
-     * Required. The mask to specify which fields should be updated. Only a test case's
-     * metadata and replayed_conversation_turns may be updated. The original
-     * test_case_conversation_turns may not be updated.
+     * Required. The mask to specify which fields should be updated. The
+     * [`creationTime`][google.cloud.dialogflow.cx.v3beta1.TestCase.creation_time] and
+     * [`lastTestResult`][google.cloud.dialogflow.cx.v3beta1.TestCase.last_test_result] cannot be updated.
      * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -882,9 +882,9 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask value) { * * *
-     * Required. The mask to specify which fields should be updated. Only a test case's
-     * metadata and replayed_conversation_turns may be updated. The original
-     * test_case_conversation_turns may not be updated.
+     * Required. The mask to specify which fields should be updated. The
+     * [`creationTime`][google.cloud.dialogflow.cx.v3beta1.TestCase.creation_time] and
+     * [`lastTestResult`][google.cloud.dialogflow.cx.v3beta1.TestCase.last_test_result] cannot be updated.
      * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -904,9 +904,9 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForVal * * *
-     * Required. The mask to specify which fields should be updated. Only a test case's
-     * metadata and replayed_conversation_turns may be updated. The original
-     * test_case_conversation_turns may not be updated.
+     * Required. The mask to specify which fields should be updated. The
+     * [`creationTime`][google.cloud.dialogflow.cx.v3beta1.TestCase.creation_time] and
+     * [`lastTestResult`][google.cloud.dialogflow.cx.v3beta1.TestCase.last_test_result] cannot be updated.
      * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -931,9 +931,9 @@ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { * * *
-     * Required. The mask to specify which fields should be updated. Only a test case's
-     * metadata and replayed_conversation_turns may be updated. The original
-     * test_case_conversation_turns may not be updated.
+     * Required. The mask to specify which fields should be updated. The
+     * [`creationTime`][google.cloud.dialogflow.cx.v3beta1.TestCase.creation_time] and
+     * [`lastTestResult`][google.cloud.dialogflow.cx.v3beta1.TestCase.last_test_result] cannot be updated.
      * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -954,9 +954,9 @@ public Builder clearUpdateMask() { * * *
-     * Required. The mask to specify which fields should be updated. Only a test case's
-     * metadata and replayed_conversation_turns may be updated. The original
-     * test_case_conversation_turns may not be updated.
+     * Required. The mask to specify which fields should be updated. The
+     * [`creationTime`][google.cloud.dialogflow.cx.v3beta1.TestCase.creation_time] and
+     * [`lastTestResult`][google.cloud.dialogflow.cx.v3beta1.TestCase.last_test_result] cannot be updated.
      * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -971,9 +971,9 @@ public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { * * *
-     * Required. The mask to specify which fields should be updated. Only a test case's
-     * metadata and replayed_conversation_turns may be updated. The original
-     * test_case_conversation_turns may not be updated.
+     * Required. The mask to specify which fields should be updated. The
+     * [`creationTime`][google.cloud.dialogflow.cx.v3beta1.TestCase.creation_time] and
+     * [`lastTestResult`][google.cloud.dialogflow.cx.v3beta1.TestCase.last_test_result] cannot be updated.
      * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -992,9 +992,9 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { * * *
-     * Required. The mask to specify which fields should be updated. Only a test case's
-     * metadata and replayed_conversation_turns may be updated. The original
-     * test_case_conversation_turns may not be updated.
+     * Required. The mask to specify which fields should be updated. The
+     * [`creationTime`][google.cloud.dialogflow.cx.v3beta1.TestCase.creation_time] and
+     * [`lastTestResult`][google.cloud.dialogflow.cx.v3beta1.TestCase.last_test_result] cannot be updated.
      * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateTestCaseRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateTestCaseRequestOrBuilder.java index 75ba88bd1..a052e6701 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateTestCaseRequestOrBuilder.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateTestCaseRequestOrBuilder.java @@ -68,9 +68,9 @@ public interface UpdateTestCaseRequestOrBuilder * * *
-   * Required. The mask to specify which fields should be updated. Only a test case's
-   * metadata and replayed_conversation_turns may be updated. The original
-   * test_case_conversation_turns may not be updated.
+   * Required. The mask to specify which fields should be updated. The
+   * [`creationTime`][google.cloud.dialogflow.cx.v3beta1.TestCase.creation_time] and
+   * [`lastTestResult`][google.cloud.dialogflow.cx.v3beta1.TestCase.last_test_result] cannot be updated.
    * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -83,9 +83,9 @@ public interface UpdateTestCaseRequestOrBuilder * * *
-   * Required. The mask to specify which fields should be updated. Only a test case's
-   * metadata and replayed_conversation_turns may be updated. The original
-   * test_case_conversation_turns may not be updated.
+   * Required. The mask to specify which fields should be updated. The
+   * [`creationTime`][google.cloud.dialogflow.cx.v3beta1.TestCase.creation_time] and
+   * [`lastTestResult`][google.cloud.dialogflow.cx.v3beta1.TestCase.last_test_result] cannot be updated.
    * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -98,9 +98,9 @@ public interface UpdateTestCaseRequestOrBuilder * * *
-   * Required. The mask to specify which fields should be updated. Only a test case's
-   * metadata and replayed_conversation_turns may be updated. The original
-   * test_case_conversation_turns may not be updated.
+   * Required. The mask to specify which fields should be updated. The
+   * [`creationTime`][google.cloud.dialogflow.cx.v3beta1.TestCase.creation_time] and
+   * [`lastTestResult`][google.cloud.dialogflow.cx.v3beta1.TestCase.last_test_result] cannot be updated.
    * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/audio_config.proto b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/audio_config.proto index 93234328b..c6a1b0201 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/audio_config.proto +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/audio_config.proto @@ -29,6 +29,31 @@ option java_outer_classname = "AudioConfigProto"; option java_package = "com.google.cloud.dialogflow.cx.v3beta1"; option objc_class_prefix = "DF"; +// Information for a word recognized by the speech recognizer. +message SpeechWordInfo { + // The word this info is for. + string word = 3; + + // 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. + google.protobuf.Duration start_offset = 1; + + // 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. + google.protobuf.Duration end_offset = 2; + + // 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. + float confidence = 4; +} + // Audio encoding of the audio content sent in the conversational query request. // Refer to the // [Cloud Speech API @@ -78,31 +103,6 @@ enum AudioEncoding { AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE = 7; } -// Information for a word recognized by the speech recognizer. -message SpeechWordInfo { - // The word this info is for. - string word = 3; - - // 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. - google.protobuf.Duration start_offset = 1; - - // 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. - google.protobuf.Duration end_offset = 2; - - // 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. - float confidence = 4; -} - // Instructs the speech recognizer on how to process the audio content. message InputAudioConfig { // Required. Audio encoding of the audio content to process. diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/test_case.proto b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/test_case.proto index c0c1eae6c..351a007a5 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/test_case.proto +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/test_case.proto @@ -535,9 +535,9 @@ message UpdateTestCaseRequest { // Required. The test case to update. TestCase test_case = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. The mask to specify which fields should be updated. Only a test case's - // metadata and replayed_conversation_turns may be updated. The original - // test_case_conversation_turns may not be updated. + // Required. The mask to specify which fields should be updated. The + // [`creationTime`][google.cloud.dialogflow.cx.v3beta1.TestCase.creation_time] and + // [`lastTestResult`][google.cloud.dialogflow.cx.v3beta1.TestCase.last_test_result] cannot be updated. google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; } diff --git a/synth.metadata b/synth.metadata index 4e0678773..b923b4fd5 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,16 +11,16 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "2e29020ce87808b810deb20e0925b7e26c5e72c1", - "internalRef": "353683381" + "sha": "6fa7194aba4d0c501592dea28c041890265079dc", + "internalRef": "353783208" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "2e29020ce87808b810deb20e0925b7e26c5e72c1", - "internalRef": "353683381" + "sha": "6fa7194aba4d0c501592dea28c041890265079dc", + "internalRef": "353783208" } }, { From e6183586d33c1553a83343eac55ca7725577f9cc Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Tue, 16 Feb 2021 19:01:47 -0800 Subject: [PATCH 05/12] feat: Add new Experiment service docs: minor doc update on redact field in intent.proto and page.proto PiperOrigin-RevId: 354550974 Source-Author: Google APIs Source-Date: Fri Jan 29 09:45:02 2021 -0800 Source-Repo: googleapis/googleapis Source-Sha: ed71e24d908d7064311bf3e63282e68d2f683f04 Source-Link: https://github.com/googleapis/googleapis/commit/ed71e24d908d7064311bf3e63282e68d2f683f04 --- .../cx/v3beta1/ExperimentsClient.java | 638 + .../cx/v3beta1/ExperimentsSettings.java | 251 + .../dialogflow/cx/v3beta1/package-info.java | 7 + .../cx/v3beta1/stub/ExperimentsStub.java | 81 + .../v3beta1/stub/ExperimentsStubSettings.java | 492 + .../stub/GrpcExperimentsCallableFactory.java | 115 + .../cx/v3beta1/stub/GrpcExperimentsStub.java | 370 + .../cx/v3beta1/EntityTypesClientTest.java | 5 + .../cx/v3beta1/ExperimentsClientTest.java | 721 ++ .../cx/v3beta1/MockExperiments.java | 59 + .../cx/v3beta1/MockExperimentsImpl.java | 166 + .../cx/v3beta1/ExperimentsGrpc.java | 1118 ++ .../cx/v3beta1/CreateExperimentRequest.java | 983 ++ .../CreateExperimentRequestOrBuilder.java | 101 + .../cx/v3beta1/DeleteExperimentRequest.java | 680 + .../DeleteExperimentRequestOrBuilder.java | 60 + .../dialogflow/cx/v3beta1/EntityType.java | 98 + .../cx/v3beta1/EntityTypeOrBuilder.java | 15 + .../cx/v3beta1/EntityTypeProto.java | 137 +- .../dialogflow/cx/v3beta1/Experiment.java | 10716 ++++++++++++++++ .../dialogflow/cx/v3beta1/ExperimentName.java | 298 + .../cx/v3beta1/ExperimentOrBuilder.java | 440 + .../cx/v3beta1/ExperimentProto.java | 442 + .../cloud/dialogflow/cx/v3beta1/Form.java | 30 +- .../cx/v3beta1/GetExperimentRequest.java | 674 + .../GetExperimentRequestOrBuilder.java | 60 + .../cloud/dialogflow/cx/v3beta1/Intent.java | 30 +- .../cx/v3beta1/ListExperimentsRequest.java | 951 ++ .../ListExperimentsRequestOrBuilder.java | 99 + .../cx/v3beta1/ListExperimentsResponse.java | 1225 ++ .../ListExperimentsResponseOrBuilder.java | 119 + .../cx/v3beta1/StartExperimentRequest.java | 671 + .../StartExperimentRequestOrBuilder.java | 58 + .../cx/v3beta1/StopExperimentRequest.java | 670 + .../StopExperimentRequestOrBuilder.java | 58 + .../dialogflow/cx/v3beta1/TestCaseProto.java | 434 +- .../dialogflow/cx/v3beta1/TestCaseResult.java | 42 +- .../cx/v3beta1/TestCaseResultOrBuilder.java | 12 +- .../cx/v3beta1/UpdateExperimentRequest.java | 1052 ++ .../UpdateExperimentRequestOrBuilder.java | 104 + .../cx/v3beta1/VariantsHistory.java | 1118 ++ .../cx/v3beta1/VariantsHistoryOrBuilder.java | 97 + .../cx/v3beta1/VersionVariants.java | 1882 +++ .../cx/v3beta1/VersionVariantsOrBuilder.java | 78 + .../dialogflow/cx/v3beta1/WebhookProto.java | 175 +- .../dialogflow/cx/v3beta1/WebhookRequest.java | 313 + .../dialogflow/cx/v3beta1/audio_config.proto | 50 +- .../dialogflow/cx/v3beta1/entity_type.proto | 5 + .../dialogflow/cx/v3beta1/experiment.proto | 461 + .../cloud/dialogflow/cx/v3beta1/intent.proto | 6 +- .../cloud/dialogflow/cx/v3beta1/page.proto | 6 +- .../dialogflow/cx/v3beta1/test_case.proto | 11 +- .../cloud/dialogflow/cx/v3beta1/webhook.proto | 7 + synth.metadata | 43 +- 54 files changed, 28054 insertions(+), 480 deletions(-) create mode 100644 google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsClient.java create mode 100644 google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsSettings.java create mode 100644 google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/ExperimentsStub.java create mode 100644 google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/ExperimentsStubSettings.java create mode 100644 google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcExperimentsCallableFactory.java create mode 100644 google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcExperimentsStub.java create mode 100644 google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsClientTest.java create mode 100644 google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockExperiments.java create mode 100644 google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockExperimentsImpl.java create mode 100644 grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsGrpc.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateExperimentRequest.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateExperimentRequestOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteExperimentRequest.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteExperimentRequestOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Experiment.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentName.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentProto.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetExperimentRequest.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetExperimentRequestOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExperimentsRequest.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExperimentsRequestOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExperimentsResponse.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExperimentsResponseOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/StartExperimentRequest.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/StartExperimentRequestOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/StopExperimentRequest.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/StopExperimentRequestOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateExperimentRequest.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateExperimentRequestOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VariantsHistory.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VariantsHistoryOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VersionVariants.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VersionVariantsOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/experiment.proto diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsClient.java new file mode 100644 index 000000000..d958df2f7 --- /dev/null +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsClient.java @@ -0,0 +1,638 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.cx.v3beta1; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dialogflow.cx.v3beta1.stub.ExperimentsStub; +import com.google.cloud.dialogflow.cx.v3beta1.stub.ExperimentsStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Service for managing + * [Experiments][google.cloud.dialogflow.cx.v3beta1.Experiment]. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

Note: close() needs to be called on the ExperimentsClient object to clean up resources such as + * threads. In the example above, try-with-resources is used, which automatically calls close(). + * + *

The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of ExperimentsSettings to + * create(). For example: + * + *

To customize credentials: + * + *

{@code
+ * ExperimentsSettings experimentsSettings =
+ *     ExperimentsSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * ExperimentsClient experimentsClient = ExperimentsClient.create(experimentsSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * ExperimentsSettings experimentsSettings =
+ *     ExperimentsSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * ExperimentsClient experimentsClient = ExperimentsClient.create(experimentsSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class ExperimentsClient implements BackgroundResource { + private final ExperimentsSettings settings; + private final ExperimentsStub stub; + + /** Constructs an instance of ExperimentsClient with default settings. */ + public static final ExperimentsClient create() throws IOException { + return create(ExperimentsSettings.newBuilder().build()); + } + + /** + * Constructs an instance of ExperimentsClient, using the given settings. The channels are created + * based on the settings passed in, or defaults for any settings that are not set. + */ + public static final ExperimentsClient create(ExperimentsSettings settings) throws IOException { + return new ExperimentsClient(settings); + } + + /** + * Constructs an instance of ExperimentsClient, using the given stub for making calls. This is for + * advanced usage - prefer using create(ExperimentsSettings). + */ + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public static final ExperimentsClient create(ExperimentsStub stub) { + return new ExperimentsClient(stub); + } + + /** + * Constructs an instance of ExperimentsClient, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected ExperimentsClient(ExperimentsSettings settings) throws IOException { + this.settings = settings; + this.stub = ((ExperimentsStubSettings) settings.getStubSettings()).createStub(); + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + protected ExperimentsClient(ExperimentsStub stub) { + this.settings = null; + this.stub = stub; + } + + public final ExperimentsSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public ExperimentsStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the list of all experiments in the specified + * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. + * + * @param parent Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to + * list all environments for. Format: `projects/<Project ID>/locations/<Location + * ID>/agents/<Agent ID>/environments/<Environment ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListExperimentsPagedResponse listExperiments(EnvironmentName parent) { + ListExperimentsRequest request = + ListExperimentsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listExperiments(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the list of all experiments in the specified + * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. + * + * @param parent Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to + * list all environments for. Format: `projects/<Project ID>/locations/<Location + * ID>/agents/<Agent ID>/environments/<Environment ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListExperimentsPagedResponse listExperiments(String parent) { + ListExperimentsRequest request = ListExperimentsRequest.newBuilder().setParent(parent).build(); + return listExperiments(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the list of all experiments in the specified + * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListExperimentsPagedResponse listExperiments(ListExperimentsRequest request) { + return listExperimentsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the list of all experiments in the specified + * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. + * + *

Sample code: + */ + public final UnaryCallable + listExperimentsPagedCallable() { + return stub.listExperimentsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the list of all experiments in the specified + * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. + * + *

Sample code: + */ + public final UnaryCallable + listExperimentsCallable() { + return stub.listExperimentsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. + * + * @param name Required. The name of the + * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. Format: + * `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/environments/<Environment ID>/experiments/<Experiment ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Experiment getExperiment(ExperimentName name) { + GetExperimentRequest request = + GetExperimentRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getExperiment(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. + * + * @param name Required. The name of the + * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. Format: + * `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/environments/<Environment ID>/experiments/<Experiment ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Experiment getExperiment(String name) { + GetExperimentRequest request = GetExperimentRequest.newBuilder().setName(name).build(); + return getExperiment(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Experiment getExperiment(GetExperimentRequest request) { + return getExperimentCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. + * + *

Sample code: + */ + public final UnaryCallable getExperimentCallable() { + return stub.getExperimentCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment] in the specified + * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. + * + * @param parent Required. The [Agent][google.cloud.dialogflow.cx.v3beta1.Agent] to create an + * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] for. Format: + * `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/environments/<Environment ID>`. + * @param experiment Required. The experiment to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Experiment createExperiment(EnvironmentName parent, Experiment experiment) { + CreateExperimentRequest request = + CreateExperimentRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setExperiment(experiment) + .build(); + return createExperiment(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment] in the specified + * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. + * + * @param parent Required. The [Agent][google.cloud.dialogflow.cx.v3beta1.Agent] to create an + * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] for. Format: + * `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/environments/<Environment ID>`. + * @param experiment Required. The experiment to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Experiment createExperiment(String parent, Experiment experiment) { + CreateExperimentRequest request = + CreateExperimentRequest.newBuilder().setParent(parent).setExperiment(experiment).build(); + return createExperiment(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment] in the specified + * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Experiment createExperiment(CreateExperimentRequest request) { + return createExperimentCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment] in the specified + * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. + * + *

Sample code: + */ + public final UnaryCallable createExperimentCallable() { + return stub.createExperimentCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. + * + * @param experiment Required. The experiment to update. + * @param updateMask Required. The mask to control which fields get updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Experiment updateExperiment(Experiment experiment, FieldMask updateMask) { + UpdateExperimentRequest request = + UpdateExperimentRequest.newBuilder() + .setExperiment(experiment) + .setUpdateMask(updateMask) + .build(); + return updateExperiment(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Experiment updateExperiment(UpdateExperimentRequest request) { + return updateExperimentCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. + * + *

Sample code: + */ + public final UnaryCallable updateExperimentCallable() { + return stub.updateExperimentCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. + * + * @param name Required. The name of the + * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to delete. Format: + * `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/environments/<Environment ID>/experiments/<Experiment ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteExperiment(ExperimentName name) { + DeleteExperimentRequest request = + DeleteExperimentRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteExperiment(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. + * + * @param name Required. The name of the + * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to delete. Format: + * `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/environments/<Environment ID>/experiments/<Experiment ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteExperiment(String name) { + DeleteExperimentRequest request = DeleteExperimentRequest.newBuilder().setName(name).build(); + deleteExperiment(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteExperiment(DeleteExperimentRequest request) { + deleteExperimentCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. + * + *

Sample code: + */ + public final UnaryCallable deleteExperimentCallable() { + return stub.deleteExperimentCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Starts the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only + * changes the state of experiment from PENDING to RUNNING. + * + * @param name Required. Resource name of the experiment to start. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment + * ID>/experiments/<Experiment ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Experiment startExperiment(ExperimentName name) { + StartExperimentRequest request = + StartExperimentRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return startExperiment(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Starts the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only + * changes the state of experiment from PENDING to RUNNING. + * + * @param name Required. Resource name of the experiment to start. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment + * ID>/experiments/<Experiment ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Experiment startExperiment(String name) { + StartExperimentRequest request = StartExperimentRequest.newBuilder().setName(name).build(); + return startExperiment(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Starts the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only + * changes the state of experiment from PENDING to RUNNING. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Experiment startExperiment(StartExperimentRequest request) { + return startExperimentCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Starts the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only + * changes the state of experiment from PENDING to RUNNING. + * + *

Sample code: + */ + public final UnaryCallable startExperimentCallable() { + return stub.startExperimentCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Stops the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only + * changes the state of experiment from RUNNING to DONE. + * + * @param name Required. Resource name of the experiment to stop. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment + * ID>/experiments/<Experiment ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Experiment stopExperiment(ExperimentName name) { + StopExperimentRequest request = + StopExperimentRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return stopExperiment(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Stops the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only + * changes the state of experiment from RUNNING to DONE. + * + * @param name Required. Resource name of the experiment to stop. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment + * ID>/experiments/<Experiment ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Experiment stopExperiment(String name) { + StopExperimentRequest request = StopExperimentRequest.newBuilder().setName(name).build(); + return stopExperiment(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Stops the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only + * changes the state of experiment from RUNNING to DONE. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Experiment stopExperiment(StopExperimentRequest request) { + return stopExperimentCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Stops the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only + * changes the state of experiment from RUNNING to DONE. + * + *

Sample code: + */ + public final UnaryCallable stopExperimentCallable() { + return stub.stopExperimentCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListExperimentsPagedResponse + extends AbstractPagedListResponse< + ListExperimentsRequest, + ListExperimentsResponse, + Experiment, + ListExperimentsPage, + ListExperimentsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListExperimentsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListExperimentsPagedResponse apply(ListExperimentsPage input) { + return new ListExperimentsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListExperimentsPagedResponse(ListExperimentsPage page) { + super(page, ListExperimentsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListExperimentsPage + extends AbstractPage< + ListExperimentsRequest, ListExperimentsResponse, Experiment, ListExperimentsPage> { + + private ListExperimentsPage( + PageContext context, + ListExperimentsResponse response) { + super(context, response); + } + + private static ListExperimentsPage createEmptyPage() { + return new ListExperimentsPage(null, null); + } + + @Override + protected ListExperimentsPage createPage( + PageContext context, + ListExperimentsResponse response) { + return new ListExperimentsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListExperimentsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListExperimentsRequest, + ListExperimentsResponse, + Experiment, + ListExperimentsPage, + ListExperimentsFixedSizeCollection> { + + private ListExperimentsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListExperimentsFixedSizeCollection createEmptyCollection() { + return new ListExperimentsFixedSizeCollection(null, 0); + } + + @Override + protected ListExperimentsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListExperimentsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsSettings.java new file mode 100644 index 000000000..3ec11eabb --- /dev/null +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsSettings.java @@ -0,0 +1,251 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.cx.v3beta1; + +import static com.google.cloud.dialogflow.cx.v3beta1.ExperimentsClient.ListExperimentsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.dialogflow.cx.v3beta1.stub.ExperimentsStubSettings; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link ExperimentsClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (dialogflow.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of getExperiment to 30 seconds: + * + *

{@code
+ * ExperimentsSettings.Builder experimentsSettingsBuilder = ExperimentsSettings.newBuilder();
+ * experimentsSettingsBuilder
+ *     .getExperimentSettings()
+ *     .setRetrySettings(
+ *         experimentsSettingsBuilder
+ *             .getExperimentSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * ExperimentsSettings experimentsSettings = experimentsSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class ExperimentsSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to listExperiments. */ + public PagedCallSettings< + ListExperimentsRequest, ListExperimentsResponse, ListExperimentsPagedResponse> + listExperimentsSettings() { + return ((ExperimentsStubSettings) getStubSettings()).listExperimentsSettings(); + } + + /** Returns the object with the settings used for calls to getExperiment. */ + public UnaryCallSettings getExperimentSettings() { + return ((ExperimentsStubSettings) getStubSettings()).getExperimentSettings(); + } + + /** Returns the object with the settings used for calls to createExperiment. */ + public UnaryCallSettings createExperimentSettings() { + return ((ExperimentsStubSettings) getStubSettings()).createExperimentSettings(); + } + + /** Returns the object with the settings used for calls to updateExperiment. */ + public UnaryCallSettings updateExperimentSettings() { + return ((ExperimentsStubSettings) getStubSettings()).updateExperimentSettings(); + } + + /** Returns the object with the settings used for calls to deleteExperiment. */ + public UnaryCallSettings deleteExperimentSettings() { + return ((ExperimentsStubSettings) getStubSettings()).deleteExperimentSettings(); + } + + /** Returns the object with the settings used for calls to startExperiment. */ + public UnaryCallSettings startExperimentSettings() { + return ((ExperimentsStubSettings) getStubSettings()).startExperimentSettings(); + } + + /** Returns the object with the settings used for calls to stopExperiment. */ + public UnaryCallSettings stopExperimentSettings() { + return ((ExperimentsStubSettings) getStubSettings()).stopExperimentSettings(); + } + + public static final ExperimentsSettings create(ExperimentsStubSettings stub) throws IOException { + return new ExperimentsSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return ExperimentsStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return ExperimentsStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return ExperimentsStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return ExperimentsStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return ExperimentsStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return ExperimentsStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ExperimentsStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected ExperimentsSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for ExperimentsSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(ExperimentsStubSettings.newBuilder(clientContext)); + } + + protected Builder(ExperimentsSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(ExperimentsStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(ExperimentsStubSettings.newBuilder()); + } + + public ExperimentsStubSettings.Builder getStubSettingsBuilder() { + return ((ExperimentsStubSettings.Builder) getStubSettings()); + } + + // NEXT_MAJOR_VER: remove 'throws Exception'. + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to listExperiments. */ + public PagedCallSettings.Builder< + ListExperimentsRequest, ListExperimentsResponse, ListExperimentsPagedResponse> + listExperimentsSettings() { + return getStubSettingsBuilder().listExperimentsSettings(); + } + + /** Returns the builder for the settings used for calls to getExperiment. */ + public UnaryCallSettings.Builder getExperimentSettings() { + return getStubSettingsBuilder().getExperimentSettings(); + } + + /** Returns the builder for the settings used for calls to createExperiment. */ + public UnaryCallSettings.Builder + createExperimentSettings() { + return getStubSettingsBuilder().createExperimentSettings(); + } + + /** Returns the builder for the settings used for calls to updateExperiment. */ + public UnaryCallSettings.Builder + updateExperimentSettings() { + return getStubSettingsBuilder().updateExperimentSettings(); + } + + /** Returns the builder for the settings used for calls to deleteExperiment. */ + public UnaryCallSettings.Builder deleteExperimentSettings() { + return getStubSettingsBuilder().deleteExperimentSettings(); + } + + /** Returns the builder for the settings used for calls to startExperiment. */ + public UnaryCallSettings.Builder startExperimentSettings() { + return getStubSettingsBuilder().startExperimentSettings(); + } + + /** Returns the builder for the settings used for calls to stopExperiment. */ + public UnaryCallSettings.Builder stopExperimentSettings() { + return getStubSettingsBuilder().stopExperimentSettings(); + } + + @Override + public ExperimentsSettings build() throws IOException { + return new ExperimentsSettings(this); + } + } +} diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/package-info.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/package-info.java index d8057754a..9a266d4b9 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/package-info.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/package-info.java @@ -37,6 +37,13 @@ * *

Sample for EnvironmentsClient: * + *

======================= ExperimentsClient ======================= + * + *

Service Description: Service for managing + * [Experiments][google.cloud.dialogflow.cx.v3beta1.Experiment]. + * + *

Sample for ExperimentsClient: + * *

======================= FlowsClient ======================= * *

Service Description: Service for managing [Flows][google.cloud.dialogflow.cx.v3beta1.Flow]. diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/ExperimentsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/ExperimentsStub.java new file mode 100644 index 000000000..ccc91afae --- /dev/null +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/ExperimentsStub.java @@ -0,0 +1,81 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.cx.v3beta1.stub; + +import static com.google.cloud.dialogflow.cx.v3beta1.ExperimentsClient.ListExperimentsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest; +import com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest; +import com.google.cloud.dialogflow.cx.v3beta1.Experiment; +import com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse; +import com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest; +import com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest; +import com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the Experiments service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class ExperimentsStub implements BackgroundResource { + + public UnaryCallable + listExperimentsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listExperimentsPagedCallable()"); + } + + public UnaryCallable listExperimentsCallable() { + throw new UnsupportedOperationException("Not implemented: listExperimentsCallable()"); + } + + public UnaryCallable getExperimentCallable() { + throw new UnsupportedOperationException("Not implemented: getExperimentCallable()"); + } + + public UnaryCallable createExperimentCallable() { + throw new UnsupportedOperationException("Not implemented: createExperimentCallable()"); + } + + public UnaryCallable updateExperimentCallable() { + throw new UnsupportedOperationException("Not implemented: updateExperimentCallable()"); + } + + public UnaryCallable deleteExperimentCallable() { + throw new UnsupportedOperationException("Not implemented: deleteExperimentCallable()"); + } + + public UnaryCallable startExperimentCallable() { + throw new UnsupportedOperationException("Not implemented: startExperimentCallable()"); + } + + public UnaryCallable stopExperimentCallable() { + throw new UnsupportedOperationException("Not implemented: stopExperimentCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/ExperimentsStubSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/ExperimentsStubSettings.java new file mode 100644 index 000000000..6d2948799 --- /dev/null +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/ExperimentsStubSettings.java @@ -0,0 +1,492 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.cx.v3beta1.stub; + +import static com.google.cloud.dialogflow.cx.v3beta1.ExperimentsClient.ListExperimentsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest; +import com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest; +import com.google.cloud.dialogflow.cx.v3beta1.Experiment; +import com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse; +import com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest; +import com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest; +import com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link ExperimentsStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (dialogflow.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of getExperiment to 30 seconds: + * + *

{@code
+ * ExperimentsStubSettings.Builder experimentsSettingsBuilder =
+ *     ExperimentsStubSettings.newBuilder();
+ * experimentsSettingsBuilder
+ *     .getExperimentSettings()
+ *     .setRetrySettings(
+ *         experimentsSettingsBuilder
+ *             .getExperimentSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * ExperimentsStubSettings experimentsSettings = experimentsSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class ExperimentsStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder() + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/dialogflow") + .build(); + + private final PagedCallSettings< + ListExperimentsRequest, ListExperimentsResponse, ListExperimentsPagedResponse> + listExperimentsSettings; + private final UnaryCallSettings getExperimentSettings; + private final UnaryCallSettings createExperimentSettings; + private final UnaryCallSettings updateExperimentSettings; + private final UnaryCallSettings deleteExperimentSettings; + private final UnaryCallSettings startExperimentSettings; + private final UnaryCallSettings stopExperimentSettings; + + private static final PagedListDescriptor< + ListExperimentsRequest, ListExperimentsResponse, Experiment> + LIST_EXPERIMENTS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListExperimentsRequest injectToken( + ListExperimentsRequest payload, String token) { + return ListExperimentsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListExperimentsRequest injectPageSize( + ListExperimentsRequest payload, int pageSize) { + return ListExperimentsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListExperimentsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListExperimentsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListExperimentsResponse payload) { + return payload.getExperimentsList() == null + ? ImmutableList.of() + : payload.getExperimentsList(); + } + }; + + private static final PagedListResponseFactory< + ListExperimentsRequest, ListExperimentsResponse, ListExperimentsPagedResponse> + LIST_EXPERIMENTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListExperimentsRequest, ListExperimentsResponse, ListExperimentsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListExperimentsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_EXPERIMENTS_PAGE_STR_DESC, request, context); + return ListExperimentsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to listExperiments. */ + public PagedCallSettings< + ListExperimentsRequest, ListExperimentsResponse, ListExperimentsPagedResponse> + listExperimentsSettings() { + return listExperimentsSettings; + } + + /** Returns the object with the settings used for calls to getExperiment. */ + public UnaryCallSettings getExperimentSettings() { + return getExperimentSettings; + } + + /** Returns the object with the settings used for calls to createExperiment. */ + public UnaryCallSettings createExperimentSettings() { + return createExperimentSettings; + } + + /** Returns the object with the settings used for calls to updateExperiment. */ + public UnaryCallSettings updateExperimentSettings() { + return updateExperimentSettings; + } + + /** Returns the object with the settings used for calls to deleteExperiment. */ + public UnaryCallSettings deleteExperimentSettings() { + return deleteExperimentSettings; + } + + /** Returns the object with the settings used for calls to startExperiment. */ + public UnaryCallSettings startExperimentSettings() { + return startExperimentSettings; + } + + /** Returns the object with the settings used for calls to stopExperiment. */ + public UnaryCallSettings stopExperimentSettings() { + return stopExperimentSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public ExperimentsStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcExperimentsStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "dialogflow.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(ExperimentsStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected ExperimentsStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listExperimentsSettings = settingsBuilder.listExperimentsSettings().build(); + getExperimentSettings = settingsBuilder.getExperimentSettings().build(); + createExperimentSettings = settingsBuilder.createExperimentSettings().build(); + updateExperimentSettings = settingsBuilder.updateExperimentSettings().build(); + deleteExperimentSettings = settingsBuilder.deleteExperimentSettings().build(); + startExperimentSettings = settingsBuilder.startExperimentSettings().build(); + stopExperimentSettings = settingsBuilder.stopExperimentSettings().build(); + } + + /** Builder for ExperimentsStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + ListExperimentsRequest, ListExperimentsResponse, ListExperimentsPagedResponse> + listExperimentsSettings; + private final UnaryCallSettings.Builder getExperimentSettings; + private final UnaryCallSettings.Builder + createExperimentSettings; + private final UnaryCallSettings.Builder + updateExperimentSettings; + private final UnaryCallSettings.Builder + deleteExperimentSettings; + private final UnaryCallSettings.Builder + startExperimentSettings; + private final UnaryCallSettings.Builder + stopExperimentSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + listExperimentsSettings = PagedCallSettings.newBuilder(LIST_EXPERIMENTS_PAGE_STR_FACT); + getExperimentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createExperimentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateExperimentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteExperimentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + startExperimentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + stopExperimentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listExperimentsSettings, + getExperimentSettings, + createExperimentSettings, + updateExperimentSettings, + deleteExperimentSettings, + startExperimentSettings, + stopExperimentSettings); + initDefaults(this); + } + + protected Builder(ExperimentsStubSettings settings) { + super(settings); + + listExperimentsSettings = settings.listExperimentsSettings.toBuilder(); + getExperimentSettings = settings.getExperimentSettings.toBuilder(); + createExperimentSettings = settings.createExperimentSettings.toBuilder(); + updateExperimentSettings = settings.updateExperimentSettings.toBuilder(); + deleteExperimentSettings = settings.deleteExperimentSettings.toBuilder(); + startExperimentSettings = settings.startExperimentSettings.toBuilder(); + stopExperimentSettings = settings.stopExperimentSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listExperimentsSettings, + getExperimentSettings, + createExperimentSettings, + updateExperimentSettings, + deleteExperimentSettings, + startExperimentSettings, + stopExperimentSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .listExperimentsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getExperimentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createExperimentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateExperimentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteExperimentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .startExperimentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .stopExperimentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + return builder; + } + + // NEXT_MAJOR_VER: remove 'throws Exception'. + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to listExperiments. */ + public PagedCallSettings.Builder< + ListExperimentsRequest, ListExperimentsResponse, ListExperimentsPagedResponse> + listExperimentsSettings() { + return listExperimentsSettings; + } + + /** Returns the builder for the settings used for calls to getExperiment. */ + public UnaryCallSettings.Builder getExperimentSettings() { + return getExperimentSettings; + } + + /** Returns the builder for the settings used for calls to createExperiment. */ + public UnaryCallSettings.Builder + createExperimentSettings() { + return createExperimentSettings; + } + + /** Returns the builder for the settings used for calls to updateExperiment. */ + public UnaryCallSettings.Builder + updateExperimentSettings() { + return updateExperimentSettings; + } + + /** Returns the builder for the settings used for calls to deleteExperiment. */ + public UnaryCallSettings.Builder deleteExperimentSettings() { + return deleteExperimentSettings; + } + + /** Returns the builder for the settings used for calls to startExperiment. */ + public UnaryCallSettings.Builder startExperimentSettings() { + return startExperimentSettings; + } + + /** Returns the builder for the settings used for calls to stopExperiment. */ + public UnaryCallSettings.Builder stopExperimentSettings() { + return stopExperimentSettings; + } + + @Override + public ExperimentsStubSettings build() throws IOException { + return new ExperimentsStubSettings(this); + } + } +} diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcExperimentsCallableFactory.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcExperimentsCallableFactory.java new file mode 100644 index 000000000..a084001bd --- /dev/null +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcExperimentsCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.cx.v3beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the Experiments service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcExperimentsCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcExperimentsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcExperimentsStub.java new file mode 100644 index 000000000..193b77840 --- /dev/null +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcExperimentsStub.java @@ -0,0 +1,370 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.cx.v3beta1.stub; + +import static com.google.cloud.dialogflow.cx.v3beta1.ExperimentsClient.ListExperimentsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsExtractor; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest; +import com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest; +import com.google.cloud.dialogflow.cx.v3beta1.Experiment; +import com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse; +import com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest; +import com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest; +import com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the Experiments service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcExperimentsStub extends ExperimentsStub { + private static final MethodDescriptor + listExperimentsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Experiments/ListExperiments") + .setRequestMarshaller( + ProtoUtils.marshaller(ListExperimentsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListExperimentsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getExperimentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Experiments/GetExperiment") + .setRequestMarshaller( + ProtoUtils.marshaller(GetExperimentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Experiment.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createExperimentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Experiments/CreateExperiment") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateExperimentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Experiment.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateExperimentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Experiments/UpdateExperiment") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateExperimentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Experiment.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteExperimentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Experiments/DeleteExperiment") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteExperimentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + startExperimentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Experiments/StartExperiment") + .setRequestMarshaller( + ProtoUtils.marshaller(StartExperimentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Experiment.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + stopExperimentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Experiments/StopExperiment") + .setRequestMarshaller( + ProtoUtils.marshaller(StopExperimentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Experiment.getDefaultInstance())) + .build(); + + private final UnaryCallable + listExperimentsCallable; + private final UnaryCallable + listExperimentsPagedCallable; + private final UnaryCallable getExperimentCallable; + private final UnaryCallable createExperimentCallable; + private final UnaryCallable updateExperimentCallable; + private final UnaryCallable deleteExperimentCallable; + private final UnaryCallable startExperimentCallable; + private final UnaryCallable stopExperimentCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcExperimentsStub create(ExperimentsStubSettings settings) + throws IOException { + return new GrpcExperimentsStub(settings, ClientContext.create(settings)); + } + + public static final GrpcExperimentsStub create(ClientContext clientContext) throws IOException { + return new GrpcExperimentsStub(ExperimentsStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcExperimentsStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcExperimentsStub( + ExperimentsStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcExperimentsStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcExperimentsStub(ExperimentsStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcExperimentsCallableFactory()); + } + + /** + * Constructs an instance of GrpcExperimentsStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcExperimentsStub( + ExperimentsStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + listExperimentsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listExperimentsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListExperimentsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings getExperimentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getExperimentMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetExperimentRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings createExperimentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createExperimentMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateExperimentRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings updateExperimentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateExperimentMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateExperimentRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "experiment.name", String.valueOf(request.getExperiment().getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings deleteExperimentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteExperimentMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteExperimentRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings startExperimentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(startExperimentMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(StartExperimentRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings stopExperimentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(stopExperimentMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(StopExperimentRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + + this.listExperimentsCallable = + callableFactory.createUnaryCallable( + listExperimentsTransportSettings, settings.listExperimentsSettings(), clientContext); + this.listExperimentsPagedCallable = + callableFactory.createPagedCallable( + listExperimentsTransportSettings, settings.listExperimentsSettings(), clientContext); + this.getExperimentCallable = + callableFactory.createUnaryCallable( + getExperimentTransportSettings, settings.getExperimentSettings(), clientContext); + this.createExperimentCallable = + callableFactory.createUnaryCallable( + createExperimentTransportSettings, settings.createExperimentSettings(), clientContext); + this.updateExperimentCallable = + callableFactory.createUnaryCallable( + updateExperimentTransportSettings, settings.updateExperimentSettings(), clientContext); + this.deleteExperimentCallable = + callableFactory.createUnaryCallable( + deleteExperimentTransportSettings, settings.deleteExperimentSettings(), clientContext); + this.startExperimentCallable = + callableFactory.createUnaryCallable( + startExperimentTransportSettings, settings.startExperimentSettings(), clientContext); + this.stopExperimentCallable = + callableFactory.createUnaryCallable( + stopExperimentTransportSettings, settings.stopExperimentSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + public UnaryCallable listExperimentsCallable() { + return listExperimentsCallable; + } + + public UnaryCallable + listExperimentsPagedCallable() { + return listExperimentsPagedCallable; + } + + public UnaryCallable getExperimentCallable() { + return getExperimentCallable; + } + + public UnaryCallable createExperimentCallable() { + return createExperimentCallable; + } + + public UnaryCallable updateExperimentCallable() { + return updateExperimentCallable; + } + + public UnaryCallable deleteExperimentCallable() { + return deleteExperimentCallable; + } + + public UnaryCallable startExperimentCallable() { + return startExperimentCallable; + } + + public UnaryCallable stopExperimentCallable() { + return stopExperimentCallable; + } + + @Override + public final void close() { + shutdown(); + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesClientTest.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesClientTest.java index 57c97ae89..20a87571f 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesClientTest.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesClientTest.java @@ -179,6 +179,7 @@ public void getEntityTypeTest() throws Exception { .addAllEntities(new ArrayList()) .addAllExcludedPhrases(new ArrayList()) .setEnableFuzzyExtraction(true) + .setRedact(true) .build(); mockEntityTypes.addResponse(expectedResponse); @@ -223,6 +224,7 @@ public void getEntityTypeTest2() throws Exception { .addAllEntities(new ArrayList()) .addAllExcludedPhrases(new ArrayList()) .setEnableFuzzyExtraction(true) + .setRedact(true) .build(); mockEntityTypes.addResponse(expectedResponse); @@ -266,6 +268,7 @@ public void createEntityTypeTest() throws Exception { .addAllEntities(new ArrayList()) .addAllExcludedPhrases(new ArrayList()) .setEnableFuzzyExtraction(true) + .setRedact(true) .build(); mockEntityTypes.addResponse(expectedResponse); @@ -312,6 +315,7 @@ public void createEntityTypeTest2() throws Exception { .addAllEntities(new ArrayList()) .addAllExcludedPhrases(new ArrayList()) .setEnableFuzzyExtraction(true) + .setRedact(true) .build(); mockEntityTypes.addResponse(expectedResponse); @@ -358,6 +362,7 @@ public void updateEntityTypeTest() throws Exception { .addAllEntities(new ArrayList()) .addAllExcludedPhrases(new ArrayList()) .setEnableFuzzyExtraction(true) + .setRedact(true) .build(); mockEntityTypes.addResponse(expectedResponse); diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsClientTest.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsClientTest.java new file mode 100644 index 000000000..ce993e9cc --- /dev/null +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsClientTest.java @@ -0,0 +1,721 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.cx.v3beta1; + +import static com.google.cloud.dialogflow.cx.v3beta1.ExperimentsClient.ListExperimentsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.common.collect.Lists; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Duration; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class ExperimentsClientTest { + private static MockExperiments mockExperiments; + private static MockServiceHelper mockServiceHelper; + private ExperimentsClient client; + private LocalChannelProvider channelProvider; + + @BeforeClass + public static void startStaticServer() { + mockExperiments = new MockExperiments(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockExperiments)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + ExperimentsSettings settings = + ExperimentsSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = ExperimentsClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void listExperimentsTest() throws Exception { + Experiment responsesElement = Experiment.newBuilder().build(); + ListExperimentsResponse expectedResponse = + ListExperimentsResponse.newBuilder() + .setNextPageToken("") + .addAllExperiments(Arrays.asList(responsesElement)) + .build(); + mockExperiments.addResponse(expectedResponse); + + EnvironmentName parent = + EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]"); + + ListExperimentsPagedResponse pagedListResponse = client.listExperiments(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getExperimentsList().get(0), resources.get(0)); + + List actualRequests = mockExperiments.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListExperimentsRequest actualRequest = ((ListExperimentsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listExperimentsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockExperiments.addException(exception); + + try { + EnvironmentName parent = + EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]"); + client.listExperiments(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listExperimentsTest2() throws Exception { + Experiment responsesElement = Experiment.newBuilder().build(); + ListExperimentsResponse expectedResponse = + ListExperimentsResponse.newBuilder() + .setNextPageToken("") + .addAllExperiments(Arrays.asList(responsesElement)) + .build(); + mockExperiments.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListExperimentsPagedResponse pagedListResponse = client.listExperiments(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getExperimentsList().get(0), resources.get(0)); + + List actualRequests = mockExperiments.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListExperimentsRequest actualRequest = ((ListExperimentsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listExperimentsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockExperiments.addException(exception); + + try { + String parent = "parent-995424086"; + client.listExperiments(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getExperimentTest() throws Exception { + Experiment expectedResponse = + Experiment.newBuilder() + .setName( + ExperimentName.of( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDefinition(Experiment.Definition.newBuilder().build()) + .setResult(Experiment.Result.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setLastUpdateTime(Timestamp.newBuilder().build()) + .setExperimentLength(Duration.newBuilder().build()) + .addAllVariantsHistory(new ArrayList()) + .build(); + mockExperiments.addResponse(expectedResponse); + + ExperimentName name = + ExperimentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]"); + + Experiment actualResponse = client.getExperiment(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockExperiments.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetExperimentRequest actualRequest = ((GetExperimentRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getExperimentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockExperiments.addException(exception); + + try { + ExperimentName name = + ExperimentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]"); + client.getExperiment(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getExperimentTest2() throws Exception { + Experiment expectedResponse = + Experiment.newBuilder() + .setName( + ExperimentName.of( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDefinition(Experiment.Definition.newBuilder().build()) + .setResult(Experiment.Result.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setLastUpdateTime(Timestamp.newBuilder().build()) + .setExperimentLength(Duration.newBuilder().build()) + .addAllVariantsHistory(new ArrayList()) + .build(); + mockExperiments.addResponse(expectedResponse); + + String name = "name3373707"; + + Experiment actualResponse = client.getExperiment(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockExperiments.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetExperimentRequest actualRequest = ((GetExperimentRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getExperimentExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockExperiments.addException(exception); + + try { + String name = "name3373707"; + client.getExperiment(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createExperimentTest() throws Exception { + Experiment expectedResponse = + Experiment.newBuilder() + .setName( + ExperimentName.of( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDefinition(Experiment.Definition.newBuilder().build()) + .setResult(Experiment.Result.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setLastUpdateTime(Timestamp.newBuilder().build()) + .setExperimentLength(Duration.newBuilder().build()) + .addAllVariantsHistory(new ArrayList()) + .build(); + mockExperiments.addResponse(expectedResponse); + + EnvironmentName parent = + EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]"); + Experiment experiment = Experiment.newBuilder().build(); + + Experiment actualResponse = client.createExperiment(parent, experiment); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockExperiments.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateExperimentRequest actualRequest = ((CreateExperimentRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(experiment, actualRequest.getExperiment()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createExperimentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockExperiments.addException(exception); + + try { + EnvironmentName parent = + EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]"); + Experiment experiment = Experiment.newBuilder().build(); + client.createExperiment(parent, experiment); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createExperimentTest2() throws Exception { + Experiment expectedResponse = + Experiment.newBuilder() + .setName( + ExperimentName.of( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDefinition(Experiment.Definition.newBuilder().build()) + .setResult(Experiment.Result.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setLastUpdateTime(Timestamp.newBuilder().build()) + .setExperimentLength(Duration.newBuilder().build()) + .addAllVariantsHistory(new ArrayList()) + .build(); + mockExperiments.addResponse(expectedResponse); + + String parent = "parent-995424086"; + Experiment experiment = Experiment.newBuilder().build(); + + Experiment actualResponse = client.createExperiment(parent, experiment); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockExperiments.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateExperimentRequest actualRequest = ((CreateExperimentRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(experiment, actualRequest.getExperiment()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createExperimentExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockExperiments.addException(exception); + + try { + String parent = "parent-995424086"; + Experiment experiment = Experiment.newBuilder().build(); + client.createExperiment(parent, experiment); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateExperimentTest() throws Exception { + Experiment expectedResponse = + Experiment.newBuilder() + .setName( + ExperimentName.of( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDefinition(Experiment.Definition.newBuilder().build()) + .setResult(Experiment.Result.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setLastUpdateTime(Timestamp.newBuilder().build()) + .setExperimentLength(Duration.newBuilder().build()) + .addAllVariantsHistory(new ArrayList()) + .build(); + mockExperiments.addResponse(expectedResponse); + + Experiment experiment = Experiment.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Experiment actualResponse = client.updateExperiment(experiment, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockExperiments.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateExperimentRequest actualRequest = ((UpdateExperimentRequest) actualRequests.get(0)); + + Assert.assertEquals(experiment, actualRequest.getExperiment()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateExperimentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockExperiments.addException(exception); + + try { + Experiment experiment = Experiment.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateExperiment(experiment, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteExperimentTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockExperiments.addResponse(expectedResponse); + + ExperimentName name = + ExperimentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]"); + + client.deleteExperiment(name); + + List actualRequests = mockExperiments.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteExperimentRequest actualRequest = ((DeleteExperimentRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteExperimentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockExperiments.addException(exception); + + try { + ExperimentName name = + ExperimentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]"); + client.deleteExperiment(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteExperimentTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockExperiments.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteExperiment(name); + + List actualRequests = mockExperiments.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteExperimentRequest actualRequest = ((DeleteExperimentRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteExperimentExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockExperiments.addException(exception); + + try { + String name = "name3373707"; + client.deleteExperiment(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void startExperimentTest() throws Exception { + Experiment expectedResponse = + Experiment.newBuilder() + .setName( + ExperimentName.of( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDefinition(Experiment.Definition.newBuilder().build()) + .setResult(Experiment.Result.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setLastUpdateTime(Timestamp.newBuilder().build()) + .setExperimentLength(Duration.newBuilder().build()) + .addAllVariantsHistory(new ArrayList()) + .build(); + mockExperiments.addResponse(expectedResponse); + + ExperimentName name = + ExperimentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]"); + + Experiment actualResponse = client.startExperiment(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockExperiments.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + StartExperimentRequest actualRequest = ((StartExperimentRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void startExperimentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockExperiments.addException(exception); + + try { + ExperimentName name = + ExperimentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]"); + client.startExperiment(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void startExperimentTest2() throws Exception { + Experiment expectedResponse = + Experiment.newBuilder() + .setName( + ExperimentName.of( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDefinition(Experiment.Definition.newBuilder().build()) + .setResult(Experiment.Result.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setLastUpdateTime(Timestamp.newBuilder().build()) + .setExperimentLength(Duration.newBuilder().build()) + .addAllVariantsHistory(new ArrayList()) + .build(); + mockExperiments.addResponse(expectedResponse); + + String name = "name3373707"; + + Experiment actualResponse = client.startExperiment(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockExperiments.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + StartExperimentRequest actualRequest = ((StartExperimentRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void startExperimentExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockExperiments.addException(exception); + + try { + String name = "name3373707"; + client.startExperiment(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void stopExperimentTest() throws Exception { + Experiment expectedResponse = + Experiment.newBuilder() + .setName( + ExperimentName.of( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDefinition(Experiment.Definition.newBuilder().build()) + .setResult(Experiment.Result.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setLastUpdateTime(Timestamp.newBuilder().build()) + .setExperimentLength(Duration.newBuilder().build()) + .addAllVariantsHistory(new ArrayList()) + .build(); + mockExperiments.addResponse(expectedResponse); + + ExperimentName name = + ExperimentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]"); + + Experiment actualResponse = client.stopExperiment(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockExperiments.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + StopExperimentRequest actualRequest = ((StopExperimentRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void stopExperimentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockExperiments.addException(exception); + + try { + ExperimentName name = + ExperimentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]"); + client.stopExperiment(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void stopExperimentTest2() throws Exception { + Experiment expectedResponse = + Experiment.newBuilder() + .setName( + ExperimentName.of( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDefinition(Experiment.Definition.newBuilder().build()) + .setResult(Experiment.Result.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setLastUpdateTime(Timestamp.newBuilder().build()) + .setExperimentLength(Duration.newBuilder().build()) + .addAllVariantsHistory(new ArrayList()) + .build(); + mockExperiments.addResponse(expectedResponse); + + String name = "name3373707"; + + Experiment actualResponse = client.stopExperiment(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockExperiments.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + StopExperimentRequest actualRequest = ((StopExperimentRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void stopExperimentExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockExperiments.addException(exception); + + try { + String name = "name3373707"; + client.stopExperiment(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockExperiments.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockExperiments.java new file mode 100644 index 000000000..6f017b132 --- /dev/null +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockExperiments.java @@ -0,0 +1,59 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.cx.v3beta1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockExperiments implements MockGrpcService { + private final MockExperimentsImpl serviceImpl; + + public MockExperiments() { + serviceImpl = new MockExperimentsImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockExperimentsImpl.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockExperimentsImpl.java new file mode 100644 index 000000000..dcb58f977 --- /dev/null +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockExperimentsImpl.java @@ -0,0 +1,166 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.cx.v3beta1; + +import com.google.api.core.BetaApi; +import com.google.cloud.dialogflow.cx.v3beta1.ExperimentsGrpc.ExperimentsImplBase; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Empty; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockExperimentsImpl extends ExperimentsImplBase { + private List requests; + private Queue responses; + + public MockExperimentsImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void listExperiments( + ListExperimentsRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListExperimentsResponse) { + requests.add(request); + responseObserver.onNext(((ListExperimentsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void getExperiment( + GetExperimentRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Experiment) { + requests.add(request); + responseObserver.onNext(((Experiment) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void createExperiment( + CreateExperimentRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Experiment) { + requests.add(request); + responseObserver.onNext(((Experiment) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void updateExperiment( + UpdateExperimentRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Experiment) { + requests.add(request); + responseObserver.onNext(((Experiment) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void deleteExperiment( + DeleteExperimentRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void startExperiment( + StartExperimentRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Experiment) { + requests.add(request); + responseObserver.onNext(((Experiment) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void stopExperiment( + StopExperimentRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Experiment) { + requests.add(request); + responseObserver.onNext(((Experiment) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } +} diff --git a/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsGrpc.java b/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsGrpc.java new file mode 100644 index 000000000..2bda56110 --- /dev/null +++ b/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsGrpc.java @@ -0,0 +1,1118 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.dialogflow.cx.v3beta1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; +import static io.grpc.stub.ClientCalls.asyncUnaryCall; +import static io.grpc.stub.ClientCalls.blockingUnaryCall; +import static io.grpc.stub.ClientCalls.futureUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; + +/** + * + * + *
+ * Service for managing
+ * [Experiments][google.cloud.dialogflow.cx.v3beta1.Experiment].
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/dialogflow/cx/v3beta1/experiment.proto") +public final class ExperimentsGrpc { + + private ExperimentsGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.dialogflow.cx.v3beta1.Experiments"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest, + com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse> + getListExperimentsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListExperiments", + requestType = com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest, + com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse> + getListExperimentsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest, + com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse> + getListExperimentsMethod; + if ((getListExperimentsMethod = ExperimentsGrpc.getListExperimentsMethod) == null) { + synchronized (ExperimentsGrpc.class) { + if ((getListExperimentsMethod = ExperimentsGrpc.getListExperimentsMethod) == null) { + ExperimentsGrpc.getListExperimentsMethod = + getListExperimentsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListExperiments")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new ExperimentsMethodDescriptorSupplier("ListExperiments")) + .build(); + } + } + } + return getListExperimentsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest, + com.google.cloud.dialogflow.cx.v3beta1.Experiment> + getGetExperimentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetExperiment", + requestType = com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3beta1.Experiment.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest, + com.google.cloud.dialogflow.cx.v3beta1.Experiment> + getGetExperimentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest, + com.google.cloud.dialogflow.cx.v3beta1.Experiment> + getGetExperimentMethod; + if ((getGetExperimentMethod = ExperimentsGrpc.getGetExperimentMethod) == null) { + synchronized (ExperimentsGrpc.class) { + if ((getGetExperimentMethod = ExperimentsGrpc.getGetExperimentMethod) == null) { + ExperimentsGrpc.getGetExperimentMethod = + getGetExperimentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetExperiment")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.Experiment + .getDefaultInstance())) + .setSchemaDescriptor(new ExperimentsMethodDescriptorSupplier("GetExperiment")) + .build(); + } + } + } + return getGetExperimentMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest, + com.google.cloud.dialogflow.cx.v3beta1.Experiment> + getCreateExperimentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateExperiment", + requestType = com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3beta1.Experiment.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest, + com.google.cloud.dialogflow.cx.v3beta1.Experiment> + getCreateExperimentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest, + com.google.cloud.dialogflow.cx.v3beta1.Experiment> + getCreateExperimentMethod; + if ((getCreateExperimentMethod = ExperimentsGrpc.getCreateExperimentMethod) == null) { + synchronized (ExperimentsGrpc.class) { + if ((getCreateExperimentMethod = ExperimentsGrpc.getCreateExperimentMethod) == null) { + ExperimentsGrpc.getCreateExperimentMethod = + getCreateExperimentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateExperiment")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.Experiment + .getDefaultInstance())) + .setSchemaDescriptor( + new ExperimentsMethodDescriptorSupplier("CreateExperiment")) + .build(); + } + } + } + return getCreateExperimentMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest, + com.google.cloud.dialogflow.cx.v3beta1.Experiment> + getUpdateExperimentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateExperiment", + requestType = com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3beta1.Experiment.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest, + com.google.cloud.dialogflow.cx.v3beta1.Experiment> + getUpdateExperimentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest, + com.google.cloud.dialogflow.cx.v3beta1.Experiment> + getUpdateExperimentMethod; + if ((getUpdateExperimentMethod = ExperimentsGrpc.getUpdateExperimentMethod) == null) { + synchronized (ExperimentsGrpc.class) { + if ((getUpdateExperimentMethod = ExperimentsGrpc.getUpdateExperimentMethod) == null) { + ExperimentsGrpc.getUpdateExperimentMethod = + getUpdateExperimentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateExperiment")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.Experiment + .getDefaultInstance())) + .setSchemaDescriptor( + new ExperimentsMethodDescriptorSupplier("UpdateExperiment")) + .build(); + } + } + } + return getUpdateExperimentMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest, com.google.protobuf.Empty> + getDeleteExperimentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteExperiment", + requestType = com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest, com.google.protobuf.Empty> + getDeleteExperimentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest, + com.google.protobuf.Empty> + getDeleteExperimentMethod; + if ((getDeleteExperimentMethod = ExperimentsGrpc.getDeleteExperimentMethod) == null) { + synchronized (ExperimentsGrpc.class) { + if ((getDeleteExperimentMethod = ExperimentsGrpc.getDeleteExperimentMethod) == null) { + ExperimentsGrpc.getDeleteExperimentMethod = + getDeleteExperimentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteExperiment")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new ExperimentsMethodDescriptorSupplier("DeleteExperiment")) + .build(); + } + } + } + return getDeleteExperimentMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest, + com.google.cloud.dialogflow.cx.v3beta1.Experiment> + getStartExperimentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "StartExperiment", + requestType = com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3beta1.Experiment.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest, + com.google.cloud.dialogflow.cx.v3beta1.Experiment> + getStartExperimentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest, + com.google.cloud.dialogflow.cx.v3beta1.Experiment> + getStartExperimentMethod; + if ((getStartExperimentMethod = ExperimentsGrpc.getStartExperimentMethod) == null) { + synchronized (ExperimentsGrpc.class) { + if ((getStartExperimentMethod = ExperimentsGrpc.getStartExperimentMethod) == null) { + ExperimentsGrpc.getStartExperimentMethod = + getStartExperimentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "StartExperiment")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.Experiment + .getDefaultInstance())) + .setSchemaDescriptor( + new ExperimentsMethodDescriptorSupplier("StartExperiment")) + .build(); + } + } + } + return getStartExperimentMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest, + com.google.cloud.dialogflow.cx.v3beta1.Experiment> + getStopExperimentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "StopExperiment", + requestType = com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3beta1.Experiment.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest, + com.google.cloud.dialogflow.cx.v3beta1.Experiment> + getStopExperimentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest, + com.google.cloud.dialogflow.cx.v3beta1.Experiment> + getStopExperimentMethod; + if ((getStopExperimentMethod = ExperimentsGrpc.getStopExperimentMethod) == null) { + synchronized (ExperimentsGrpc.class) { + if ((getStopExperimentMethod = ExperimentsGrpc.getStopExperimentMethod) == null) { + ExperimentsGrpc.getStopExperimentMethod = + getStopExperimentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "StopExperiment")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.Experiment + .getDefaultInstance())) + .setSchemaDescriptor( + new ExperimentsMethodDescriptorSupplier("StopExperiment")) + .build(); + } + } + } + return getStopExperimentMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static ExperimentsStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ExperimentsStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ExperimentsStub(channel, callOptions); + } + }; + return ExperimentsStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static ExperimentsBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ExperimentsBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ExperimentsBlockingStub(channel, callOptions); + } + }; + return ExperimentsBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static ExperimentsFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ExperimentsFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ExperimentsFutureStub(channel, callOptions); + } + }; + return ExperimentsFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Service for managing
+   * [Experiments][google.cloud.dialogflow.cx.v3beta1.Experiment].
+   * 
+ */ + public abstract static class ExperimentsImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Returns the list of all experiments in the specified
+     * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
+     * 
+ */ + public void listExperiments( + com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getListExperimentsMethod(), responseObserver); + } + + /** + * + * + *
+     * Retrieves the specified
+     * [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment].
+     * 
+ */ + public void getExperiment( + com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getGetExperimentMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates an [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment] in
+     * the specified
+     * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
+     * 
+ */ + public void createExperiment( + com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getCreateExperimentMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the specified
+     * [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment].
+     * 
+ */ + public void updateExperiment( + com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getUpdateExperimentMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes the specified
+     * [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment].
+     * 
+ */ + public void deleteExperiment( + com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getDeleteExperimentMethod(), responseObserver); + } + + /** + * + * + *
+     * Starts the specified
+     * [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only
+     * changes the state of experiment from PENDING to RUNNING.
+     * 
+ */ + public void startExperiment( + com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getStartExperimentMethod(), responseObserver); + } + + /** + * + * + *
+     * Stops the specified
+     * [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only
+     * changes the state of experiment from RUNNING to DONE.
+     * 
+ */ + public void stopExperiment( + com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getStopExperimentMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getListExperimentsMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest, + com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse>( + this, METHODID_LIST_EXPERIMENTS))) + .addMethod( + getGetExperimentMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest, + com.google.cloud.dialogflow.cx.v3beta1.Experiment>( + this, METHODID_GET_EXPERIMENT))) + .addMethod( + getCreateExperimentMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest, + com.google.cloud.dialogflow.cx.v3beta1.Experiment>( + this, METHODID_CREATE_EXPERIMENT))) + .addMethod( + getUpdateExperimentMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest, + com.google.cloud.dialogflow.cx.v3beta1.Experiment>( + this, METHODID_UPDATE_EXPERIMENT))) + .addMethod( + getDeleteExperimentMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest, + com.google.protobuf.Empty>(this, METHODID_DELETE_EXPERIMENT))) + .addMethod( + getStartExperimentMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest, + com.google.cloud.dialogflow.cx.v3beta1.Experiment>( + this, METHODID_START_EXPERIMENT))) + .addMethod( + getStopExperimentMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest, + com.google.cloud.dialogflow.cx.v3beta1.Experiment>( + this, METHODID_STOP_EXPERIMENT))) + .build(); + } + } + + /** + * + * + *
+   * Service for managing
+   * [Experiments][google.cloud.dialogflow.cx.v3beta1.Experiment].
+   * 
+ */ + public static final class ExperimentsStub + extends io.grpc.stub.AbstractAsyncStub { + private ExperimentsStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ExperimentsStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ExperimentsStub(channel, callOptions); + } + + /** + * + * + *
+     * Returns the list of all experiments in the specified
+     * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
+     * 
+ */ + public void listExperiments( + com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListExperimentsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Retrieves the specified
+     * [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment].
+     * 
+ */ + public void getExperiment( + com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetExperimentMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates an [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment] in
+     * the specified
+     * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
+     * 
+ */ + public void createExperiment( + com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getCreateExperimentMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the specified
+     * [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment].
+     * 
+ */ + public void updateExperiment( + com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getUpdateExperimentMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes the specified
+     * [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment].
+     * 
+ */ + public void deleteExperiment( + com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getDeleteExperimentMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Starts the specified
+     * [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only
+     * changes the state of experiment from PENDING to RUNNING.
+     * 
+ */ + public void startExperiment( + com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getStartExperimentMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Stops the specified
+     * [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only
+     * changes the state of experiment from RUNNING to DONE.
+     * 
+ */ + public void stopExperiment( + com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getStopExperimentMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * Service for managing
+   * [Experiments][google.cloud.dialogflow.cx.v3beta1.Experiment].
+   * 
+ */ + public static final class ExperimentsBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private ExperimentsBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ExperimentsBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ExperimentsBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Returns the list of all experiments in the specified
+     * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse listExperiments( + com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest request) { + return blockingUnaryCall(getChannel(), getListExperimentsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Retrieves the specified
+     * [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment].
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3beta1.Experiment getExperiment( + com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest request) { + return blockingUnaryCall(getChannel(), getGetExperimentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates an [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment] in
+     * the specified
+     * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3beta1.Experiment createExperiment( + com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest request) { + return blockingUnaryCall( + getChannel(), getCreateExperimentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the specified
+     * [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment].
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3beta1.Experiment updateExperiment( + com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest request) { + return blockingUnaryCall( + getChannel(), getUpdateExperimentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes the specified
+     * [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment].
+     * 
+ */ + public com.google.protobuf.Empty deleteExperiment( + com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest request) { + return blockingUnaryCall( + getChannel(), getDeleteExperimentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Starts the specified
+     * [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only
+     * changes the state of experiment from PENDING to RUNNING.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3beta1.Experiment startExperiment( + com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest request) { + return blockingUnaryCall(getChannel(), getStartExperimentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Stops the specified
+     * [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only
+     * changes the state of experiment from RUNNING to DONE.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3beta1.Experiment stopExperiment( + com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest request) { + return blockingUnaryCall(getChannel(), getStopExperimentMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * Service for managing
+   * [Experiments][google.cloud.dialogflow.cx.v3beta1.Experiment].
+   * 
+ */ + public static final class ExperimentsFutureStub + extends io.grpc.stub.AbstractFutureStub { + private ExperimentsFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ExperimentsFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ExperimentsFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Returns the list of all experiments in the specified
+     * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse> + listExperiments(com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest request) { + return futureUnaryCall( + getChannel().newCall(getListExperimentsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Retrieves the specified
+     * [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3beta1.Experiment> + getExperiment(com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetExperimentMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates an [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment] in
+     * the specified
+     * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3beta1.Experiment> + createExperiment(com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest request) { + return futureUnaryCall( + getChannel().newCall(getCreateExperimentMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the specified
+     * [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3beta1.Experiment> + updateExperiment(com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest request) { + return futureUnaryCall( + getChannel().newCall(getUpdateExperimentMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes the specified
+     * [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteExperiment(com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest request) { + return futureUnaryCall( + getChannel().newCall(getDeleteExperimentMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Starts the specified
+     * [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only
+     * changes the state of experiment from PENDING to RUNNING.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3beta1.Experiment> + startExperiment(com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest request) { + return futureUnaryCall( + getChannel().newCall(getStartExperimentMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Stops the specified
+     * [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only
+     * changes the state of experiment from RUNNING to DONE.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3beta1.Experiment> + stopExperiment(com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest request) { + return futureUnaryCall( + getChannel().newCall(getStopExperimentMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_EXPERIMENTS = 0; + private static final int METHODID_GET_EXPERIMENT = 1; + private static final int METHODID_CREATE_EXPERIMENT = 2; + private static final int METHODID_UPDATE_EXPERIMENT = 3; + private static final int METHODID_DELETE_EXPERIMENT = 4; + private static final int METHODID_START_EXPERIMENT = 5; + private static final int METHODID_STOP_EXPERIMENT = 6; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final ExperimentsImplBase serviceImpl; + private final int methodId; + + MethodHandlers(ExperimentsImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_LIST_EXPERIMENTS: + serviceImpl.listExperiments( + (com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse>) + responseObserver); + break; + case METHODID_GET_EXPERIMENT: + serviceImpl.getExperiment( + (com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_EXPERIMENT: + serviceImpl.createExperiment( + (com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_EXPERIMENT: + serviceImpl.updateExperiment( + (com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DELETE_EXPERIMENT: + serviceImpl.deleteExperiment( + (com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_START_EXPERIMENT: + serviceImpl.startExperiment( + (com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_STOP_EXPERIMENT: + serviceImpl.stopExperiment( + (com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private abstract static class ExperimentsBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + ExperimentsBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("Experiments"); + } + } + + private static final class ExperimentsFileDescriptorSupplier + extends ExperimentsBaseDescriptorSupplier { + ExperimentsFileDescriptorSupplier() {} + } + + private static final class ExperimentsMethodDescriptorSupplier + extends ExperimentsBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + ExperimentsMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (ExperimentsGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new ExperimentsFileDescriptorSupplier()) + .addMethod(getListExperimentsMethod()) + .addMethod(getGetExperimentMethod()) + .addMethod(getCreateExperimentMethod()) + .addMethod(getUpdateExperimentMethod()) + .addMethod(getDeleteExperimentMethod()) + .addMethod(getStartExperimentMethod()) + .addMethod(getStopExperimentMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateExperimentRequest.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateExperimentRequest.java new file mode 100644 index 000000000..d71b06641 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateExperimentRequest.java @@ -0,0 +1,983 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/experiment.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The request message for
+ * [Experiments.CreateExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.CreateExperiment].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest} + */ +public final class CreateExperimentRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest) + CreateExperimentRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateExperimentRequest.newBuilder() to construct. + private CreateExperimentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateExperimentRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateExperimentRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateExperimentRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Builder subBuilder = null; + if (experiment_ != null) { + subBuilder = experiment_.toBuilder(); + } + experiment_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.Experiment.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(experiment_); + experiment_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_CreateExperimentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_CreateExperimentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The [Agent][google.cloud.dialogflow.cx.v3beta1.Agent] to create
+   * an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The [Agent][google.cloud.dialogflow.cx.v3beta1.Agent] to create
+   * an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXPERIMENT_FIELD_NUMBER = 2; + private com.google.cloud.dialogflow.cx.v3beta1.Experiment experiment_; + /** + * + * + *
+   * Required. The experiment to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the experiment field is set. + */ + @java.lang.Override + public boolean hasExperiment() { + return experiment_ != null; + } + /** + * + * + *
+   * Required. The experiment to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The experiment. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Experiment getExperiment() { + return experiment_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Experiment.getDefaultInstance() + : experiment_; + } + /** + * + * + *
+   * Required. The experiment to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExperimentOrBuilder getExperimentOrBuilder() { + return getExperiment(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (experiment_ != null) { + output.writeMessage(2, getExperiment()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (experiment_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getExperiment()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest other = + (com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasExperiment() != other.hasExperiment()) return false; + if (hasExperiment()) { + if (!getExperiment().equals(other.getExperiment())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasExperiment()) { + hash = (37 * hash) + EXPERIMENT_FIELD_NUMBER; + hash = (53 * hash) + getExperiment().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for
+   * [Experiments.CreateExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.CreateExperiment].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest) + com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_CreateExperimentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_CreateExperimentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (experimentBuilder_ == null) { + experiment_ = null; + } else { + experiment_ = null; + experimentBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_CreateExperimentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest build() { + com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest result = + new com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest(this); + result.parent_ = parent_; + if (experimentBuilder_ == null) { + result.experiment_ = experiment_; + } else { + result.experiment_ = experimentBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasExperiment()) { + mergeExperiment(other.getExperiment()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The [Agent][google.cloud.dialogflow.cx.v3beta1.Agent] to create
+     * an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The [Agent][google.cloud.dialogflow.cx.v3beta1.Agent] to create
+     * an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The [Agent][google.cloud.dialogflow.cx.v3beta1.Agent] to create
+     * an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The [Agent][google.cloud.dialogflow.cx.v3beta1.Agent] to create
+     * an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The [Agent][google.cloud.dialogflow.cx.v3beta1.Agent] to create
+     * an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.dialogflow.cx.v3beta1.Experiment experiment_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Experiment, + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ExperimentOrBuilder> + experimentBuilder_; + /** + * + * + *
+     * Required. The experiment to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the experiment field is set. + */ + public boolean hasExperiment() { + return experimentBuilder_ != null || experiment_ != null; + } + /** + * + * + *
+     * Required. The experiment to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The experiment. + */ + public com.google.cloud.dialogflow.cx.v3beta1.Experiment getExperiment() { + if (experimentBuilder_ == null) { + return experiment_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Experiment.getDefaultInstance() + : experiment_; + } else { + return experimentBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The experiment to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setExperiment(com.google.cloud.dialogflow.cx.v3beta1.Experiment value) { + if (experimentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + experiment_ = value; + onChanged(); + } else { + experimentBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The experiment to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setExperiment( + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Builder builderForValue) { + if (experimentBuilder_ == null) { + experiment_ = builderForValue.build(); + onChanged(); + } else { + experimentBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The experiment to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeExperiment(com.google.cloud.dialogflow.cx.v3beta1.Experiment value) { + if (experimentBuilder_ == null) { + if (experiment_ != null) { + experiment_ = + com.google.cloud.dialogflow.cx.v3beta1.Experiment.newBuilder(experiment_) + .mergeFrom(value) + .buildPartial(); + } else { + experiment_ = value; + } + onChanged(); + } else { + experimentBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The experiment to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearExperiment() { + if (experimentBuilder_ == null) { + experiment_ = null; + onChanged(); + } else { + experiment_ = null; + experimentBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The experiment to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Builder getExperimentBuilder() { + + onChanged(); + return getExperimentFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The experiment to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ExperimentOrBuilder getExperimentOrBuilder() { + if (experimentBuilder_ != null) { + return experimentBuilder_.getMessageOrBuilder(); + } else { + return experiment_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Experiment.getDefaultInstance() + : experiment_; + } + } + /** + * + * + *
+     * Required. The experiment to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Experiment, + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ExperimentOrBuilder> + getExperimentFieldBuilder() { + if (experimentBuilder_ == null) { + experimentBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Experiment, + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ExperimentOrBuilder>( + getExperiment(), getParentForChildren(), isClean()); + experiment_ = null; + } + return experimentBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest) + private static final com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateExperimentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateExperimentRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateExperimentRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateExperimentRequestOrBuilder.java new file mode 100644 index 000000000..f2da2e270 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateExperimentRequestOrBuilder.java @@ -0,0 +1,101 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/experiment.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface CreateExperimentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The [Agent][google.cloud.dialogflow.cx.v3beta1.Agent] to create
+   * an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The [Agent][google.cloud.dialogflow.cx.v3beta1.Agent] to create
+   * an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The experiment to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the experiment field is set. + */ + boolean hasExperiment(); + /** + * + * + *
+   * Required. The experiment to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The experiment. + */ + com.google.cloud.dialogflow.cx.v3beta1.Experiment getExperiment(); + /** + * + * + *
+   * Required. The experiment to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.ExperimentOrBuilder getExperimentOrBuilder(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteExperimentRequest.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteExperimentRequest.java new file mode 100644 index 000000000..e75fcbc30 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteExperimentRequest.java @@ -0,0 +1,680 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/experiment.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The request message for
+ * [Experiments.DeleteExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.DeleteExperiment].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest} + */ +public final class DeleteExperimentRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest) + DeleteExperimentRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteExperimentRequest.newBuilder() to construct. + private DeleteExperimentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteExperimentRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteExperimentRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteExperimentRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_DeleteExperimentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_DeleteExperimentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the
+   * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to delete.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the
+   * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to delete.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest other = + (com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for
+   * [Experiments.DeleteExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.DeleteExperiment].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest) + com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_DeleteExperimentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_DeleteExperimentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_DeleteExperimentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest build() { + com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest result = + new com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the
+     * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to delete.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the
+     * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to delete.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the
+     * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to delete.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the
+     * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to delete.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the
+     * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to delete.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest) + private static final com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteExperimentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteExperimentRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteExperimentRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteExperimentRequestOrBuilder.java new file mode 100644 index 000000000..ee0fe93c0 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteExperimentRequestOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/experiment.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface DeleteExperimentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the
+   * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to delete.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the
+   * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to delete.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityType.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityType.java index 0f9e50750..92481c340 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityType.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityType.java @@ -157,6 +157,11 @@ private EntityType( enableFuzzyExtraction_ = input.readBool(); break; } + case 72: + { + redact_ = input.readBool(); + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -2690,6 +2695,26 @@ public boolean getEnableFuzzyExtraction() { return enableFuzzyExtraction_; } + public static final int REDACT_FIELD_NUMBER = 9; + private boolean 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 during logging.
+   * 
+ * + * bool redact = 9; + * + * @return The redact. + */ + @java.lang.Override + public boolean getRedact() { + return redact_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -2729,6 +2754,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (enableFuzzyExtraction_ != false) { output.writeBool(7, enableFuzzyExtraction_); } + if (redact_ != false) { + output.writeBool(9, redact_); + } unknownFields.writeTo(output); } @@ -2763,6 +2791,9 @@ public int getSerializedSize() { if (enableFuzzyExtraction_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(7, enableFuzzyExtraction_); } + if (redact_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(9, redact_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -2786,6 +2817,7 @@ public boolean equals(final java.lang.Object obj) { if (!getEntitiesList().equals(other.getEntitiesList())) return false; if (!getExcludedPhrasesList().equals(other.getExcludedPhrasesList())) return false; if (getEnableFuzzyExtraction() != other.getEnableFuzzyExtraction()) return false; + if (getRedact() != other.getRedact()) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -2815,6 +2847,8 @@ public int hashCode() { } hash = (37 * hash) + ENABLE_FUZZY_EXTRACTION_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableFuzzyExtraction()); + hash = (37 * hash) + REDACT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRedact()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -3005,6 +3039,8 @@ public Builder clear() { } enableFuzzyExtraction_ = false; + redact_ = false; + return this; } @@ -3056,6 +3092,7 @@ public com.google.cloud.dialogflow.cx.v3beta1.EntityType buildPartial() { result.excludedPhrases_ = excludedPhrasesBuilder_.build(); } result.enableFuzzyExtraction_ = enableFuzzyExtraction_; + result.redact_ = redact_; onBuilt(); return result; } @@ -3177,6 +3214,9 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.EntityType other if (other.getEnableFuzzyExtraction() != false) { setEnableFuzzyExtraction(other.getEnableFuzzyExtraction()); } + if (other.getRedact() != false) { + setRedact(other.getRedact()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -4543,6 +4583,64 @@ public Builder clearEnableFuzzyExtraction() { return this; } + private boolean 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 during logging.
+     * 
+ * + * bool redact = 9; + * + * @return The redact. + */ + @java.lang.Override + public boolean getRedact() { + return 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 during logging.
+     * 
+ * + * bool redact = 9; + * + * @param value The redact to set. + * @return This builder for chaining. + */ + public Builder setRedact(boolean value) { + + redact_ = value; + onChanged(); + 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 during logging.
+     * 
+ * + * bool redact = 9; + * + * @return This builder for chaining. + */ + public Builder clearRedact() { + + redact_ = false; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypeOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypeOrBuilder.java index 6c2cdc66c..74577495e 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypeOrBuilder.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypeOrBuilder.java @@ -284,4 +284,19 @@ public interface EntityTypeOrBuilder * @return The enableFuzzyExtraction. */ boolean getEnableFuzzyExtraction(); + + /** + * + * + *
+   * 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 during logging.
+   * 
+ * + * bool redact = 9; + * + * @return The redact. + */ + boolean getRedact(); } diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypeProto.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypeProto.java index 8dbe94c61..5eb128cac 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypeProto.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypeProto.java @@ -78,7 +78,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\032\027google/api/client.proto\032\037google/api/fi" + "eld_behavior.proto\032\031google/api/resource." + "proto\032\033google/protobuf/empty.proto\032 goog" - + "le/protobuf/field_mask.proto\"\236\006\n\nEntityT" + + "le/protobuf/field_mask.proto\"\256\006\n\nEntityT" + "ype\022\014\n\004name\030\001 \001(\t\022\031\n\014display_name\030\002 \001(\tB" + "\003\340A\002\022F\n\004kind\030\003 \001(\01623.google.cloud.dialog" + "flow.cx.v3beta1.EntityType.KindB\003\340A\002\022]\n\023" @@ -89,73 +89,73 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "tity\022W\n\020excluded_phrases\030\006 \003(\0132=.google." + "cloud.dialogflow.cx.v3beta1.EntityType.E" + "xcludedPhrase\022\037\n\027enable_fuzzy_extraction" - + "\030\007 \001(\010\0323\n\006Entity\022\022\n\005value\030\001 \001(\tB\003\340A\002\022\025\n\010" - + "synonyms\030\002 \003(\tB\003\340A\002\032$\n\016ExcludedPhrase\022\022\n" - + "\005value\030\001 \001(\tB\003\340A\002\"J\n\004Kind\022\024\n\020KIND_UNSPEC" - + "IFIED\020\000\022\014\n\010KIND_MAP\020\001\022\r\n\tKIND_LIST\020\002\022\017\n\013" - + "KIND_REGEXP\020\003\"Y\n\021AutoExpansionMode\022#\n\037AU" - + "TO_EXPANSION_MODE_UNSPECIFIED\020\000\022\037\n\033AUTO_" - + "EXPANSION_MODE_DEFAULT\020\001:{\352Ax\n$dialogflo" - + "w.googleapis.com/EntityType\022Pprojects/{p" - + "roject}/locations/{location}/agents/{age" - + "nt}/entityTypes/{entity_type}\"\224\001\n\026ListEn" - + "tityTypesRequest\022<\n\006parent\030\001 \001(\tB,\340A\002\372A&" - + "\022$dialogflow.googleapis.com/EntityType\022\025" - + "\n\rlanguage_code\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005" - + "\022\022\n\npage_token\030\004 \001(\t\"x\n\027ListEntityTypesR" - + "esponse\022D\n\014entity_types\030\001 \003(\0132..google.c" - + "loud.dialogflow.cx.v3beta1.EntityType\022\027\n" - + "\017next_page_token\030\002 \001(\t\"i\n\024GetEntityTypeR" - + "equest\022:\n\004name\030\001 \001(\tB,\340A\002\372A&\n$dialogflow" - + ".googleapis.com/EntityType\022\025\n\rlanguage_c" - + "ode\030\002 \001(\t\"\270\001\n\027CreateEntityTypeRequest\022<\n" - + "\006parent\030\001 \001(\tB,\340A\002\372A&\022$dialogflow.google" - + "apis.com/EntityType\022H\n\013entity_type\030\002 \001(\013" - + "2..google.cloud.dialogflow.cx.v3beta1.En" - + "tityTypeB\003\340A\002\022\025\n\rlanguage_code\030\003 \001(\t\"\253\001\n" - + "\027UpdateEntityTypeRequest\022H\n\013entity_type\030" - + "\001 \001(\0132..google.cloud.dialogflow.cx.v3bet" - + "a1.EntityTypeB\003\340A\002\022\025\n\rlanguage_code\030\002 \001(" - + "\t\022/\n\013update_mask\030\003 \001(\0132\032.google.protobuf" - + ".FieldMask\"d\n\027DeleteEntityTypeRequest\022:\n" - + "\004name\030\001 \001(\tB,\340A\002\372A&\n$dialogflow.googleap" - + "is.com/EntityType\022\r\n\005force\030\002 \001(\0102\315\t\n\013Ent" - + "ityTypes\022\332\001\n\017ListEntityTypes\022:.google.cl" - + "oud.dialogflow.cx.v3beta1.ListEntityType" - + "sRequest\032;.google.cloud.dialogflow.cx.v3" - + "beta1.ListEntityTypesResponse\"N\202\323\344\223\002?\022=/" - + "v3beta1/{parent=projects/*/locations/*/a" - + "gents/*}/entityTypes\332A\006parent\022\307\001\n\rGetEnt" - + "ityType\0228.google.cloud.dialogflow.cx.v3b" - + "eta1.GetEntityTypeRequest\032..google.cloud" - + ".dialogflow.cx.v3beta1.EntityType\"L\202\323\344\223\002" - + "?\022=/v3beta1/{name=projects/*/locations/*" - + "/agents/*/entityTypes/*}\332A\004name\022\350\001\n\020Crea" - + "teEntityType\022;.google.cloud.dialogflow.c" - + "x.v3beta1.CreateEntityTypeRequest\032..goog" - + "le.cloud.dialogflow.cx.v3beta1.EntityTyp" - + "e\"g\202\323\344\223\002L\"=/v3beta1/{parent=projects/*/l" - + "ocations/*/agents/*}/entityTypes:\013entity" - + "_type\332A\022parent,entity_type\022\371\001\n\020UpdateEnt" - + "ityType\022;.google.cloud.dialogflow.cx.v3b" - + "eta1.UpdateEntityTypeRequest\032..google.cl" - + "oud.dialogflow.cx.v3beta1.EntityType\"x\202\323" - + "\344\223\002X2I/v3beta1/{entity_type.name=project" - + "s/*/locations/*/agents/*/entityTypes/*}:" - + "\013entity_type\332A\027entity_type,update_mask\022\265" - + "\001\n\020DeleteEntityType\022;.google.cloud.dialo" - + "gflow.cx.v3beta1.DeleteEntityTypeRequest" - + "\032\026.google.protobuf.Empty\"L\202\323\344\223\002?*=/v3bet" - + "a1/{name=projects/*/locations/*/agents/*" - + "/entityTypes/*}\332A\004name\032x\312A\031dialogflow.go" - + "ogleapis.com\322AYhttps://www.googleapis.co" - + "m/auth/cloud-platform,https://www.google" - + "apis.com/auth/dialogflowB\256\001\n&com.google." - + "cloud.dialogflow.cx.v3beta1B\017EntityTypeP" - + "rotoP\001ZDgoogle.golang.org/genproto/googl" - + "eapis/cloud/dialogflow/cx/v3beta1;cx\370\001\001\242" - + "\002\002DF\252\002\"Google.Cloud.Dialogflow.Cx.V3Beta" - + "1b\006proto3" + + "\030\007 \001(\010\022\016\n\006redact\030\t \001(\010\0323\n\006Entity\022\022\n\005valu" + + "e\030\001 \001(\tB\003\340A\002\022\025\n\010synonyms\030\002 \003(\tB\003\340A\002\032$\n\016E" + + "xcludedPhrase\022\022\n\005value\030\001 \001(\tB\003\340A\002\"J\n\004Kin" + + "d\022\024\n\020KIND_UNSPECIFIED\020\000\022\014\n\010KIND_MAP\020\001\022\r\n" + + "\tKIND_LIST\020\002\022\017\n\013KIND_REGEXP\020\003\"Y\n\021AutoExp" + + "ansionMode\022#\n\037AUTO_EXPANSION_MODE_UNSPEC" + + "IFIED\020\000\022\037\n\033AUTO_EXPANSION_MODE_DEFAULT\020\001" + + ":{\352Ax\n$dialogflow.googleapis.com/EntityT" + + "ype\022Pprojects/{project}/locations/{locat" + + "ion}/agents/{agent}/entityTypes/{entity_" + + "type}\"\224\001\n\026ListEntityTypesRequest\022<\n\006pare" + + "nt\030\001 \001(\tB,\340A\002\372A&\022$dialogflow.googleapis." + + "com/EntityType\022\025\n\rlanguage_code\030\002 \001(\t\022\021\n" + + "\tpage_size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\"x\n\027" + + "ListEntityTypesResponse\022D\n\014entity_types\030" + + "\001 \003(\0132..google.cloud.dialogflow.cx.v3bet" + + "a1.EntityType\022\027\n\017next_page_token\030\002 \001(\t\"i" + + "\n\024GetEntityTypeRequest\022:\n\004name\030\001 \001(\tB,\340A" + + "\002\372A&\n$dialogflow.googleapis.com/EntityTy" + + "pe\022\025\n\rlanguage_code\030\002 \001(\t\"\270\001\n\027CreateEnti" + + "tyTypeRequest\022<\n\006parent\030\001 \001(\tB,\340A\002\372A&\022$d" + + "ialogflow.googleapis.com/EntityType\022H\n\013e" + + "ntity_type\030\002 \001(\0132..google.cloud.dialogfl" + + "ow.cx.v3beta1.EntityTypeB\003\340A\002\022\025\n\rlanguag" + + "e_code\030\003 \001(\t\"\253\001\n\027UpdateEntityTypeRequest" + + "\022H\n\013entity_type\030\001 \001(\0132..google.cloud.dia" + + "logflow.cx.v3beta1.EntityTypeB\003\340A\002\022\025\n\rla" + + "nguage_code\030\002 \001(\t\022/\n\013update_mask\030\003 \001(\0132\032" + + ".google.protobuf.FieldMask\"d\n\027DeleteEnti" + + "tyTypeRequest\022:\n\004name\030\001 \001(\tB,\340A\002\372A&\n$dia" + + "logflow.googleapis.com/EntityType\022\r\n\005for" + + "ce\030\002 \001(\0102\315\t\n\013EntityTypes\022\332\001\n\017ListEntityT" + + "ypes\022:.google.cloud.dialogflow.cx.v3beta" + + "1.ListEntityTypesRequest\032;.google.cloud." + + "dialogflow.cx.v3beta1.ListEntityTypesRes" + + "ponse\"N\202\323\344\223\002?\022=/v3beta1/{parent=projects" + + "/*/locations/*/agents/*}/entityTypes\332A\006p" + + "arent\022\307\001\n\rGetEntityType\0228.google.cloud.d" + + "ialogflow.cx.v3beta1.GetEntityTypeReques" + + "t\032..google.cloud.dialogflow.cx.v3beta1.E" + + "ntityType\"L\202\323\344\223\002?\022=/v3beta1/{name=projec" + + "ts/*/locations/*/agents/*/entityTypes/*}" + + "\332A\004name\022\350\001\n\020CreateEntityType\022;.google.cl" + + "oud.dialogflow.cx.v3beta1.CreateEntityTy" + + "peRequest\032..google.cloud.dialogflow.cx.v" + + "3beta1.EntityType\"g\202\323\344\223\002L\"=/v3beta1/{par" + + "ent=projects/*/locations/*/agents/*}/ent" + + "ityTypes:\013entity_type\332A\022parent,entity_ty" + + "pe\022\371\001\n\020UpdateEntityType\022;.google.cloud.d" + + "ialogflow.cx.v3beta1.UpdateEntityTypeReq" + + "uest\032..google.cloud.dialogflow.cx.v3beta" + + "1.EntityType\"x\202\323\344\223\002X2I/v3beta1/{entity_t" + + "ype.name=projects/*/locations/*/agents/*" + + "/entityTypes/*}:\013entity_type\332A\027entity_ty" + + "pe,update_mask\022\265\001\n\020DeleteEntityType\022;.go" + + "ogle.cloud.dialogflow.cx.v3beta1.DeleteE" + + "ntityTypeRequest\032\026.google.protobuf.Empty" + + "\"L\202\323\344\223\002?*=/v3beta1/{name=projects/*/loca" + + "tions/*/agents/*/entityTypes/*}\332A\004name\032x" + + "\312A\031dialogflow.googleapis.com\322AYhttps://w" + + "ww.googleapis.com/auth/cloud-platform,ht" + + "tps://www.googleapis.com/auth/dialogflow" + + "B\256\001\n&com.google.cloud.dialogflow.cx.v3be" + + "ta1B\017EntityTypeProtoP\001ZDgoogle.golang.or" + + "g/genproto/googleapis/cloud/dialogflow/c" + + "x/v3beta1;cx\370\001\001\242\002\002DF\252\002\"Google.Cloud.Dial" + + "ogflow.Cx.V3Beta1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -181,6 +181,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Entities", "ExcludedPhrases", "EnableFuzzyExtraction", + "Redact", }); internal_static_google_cloud_dialogflow_cx_v3beta1_EntityType_Entity_descriptor = internal_static_google_cloud_dialogflow_cx_v3beta1_EntityType_descriptor diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Experiment.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Experiment.java new file mode 100644 index 000000000..90d68a371 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Experiment.java @@ -0,0 +1,10716 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/experiment.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * Represents an experiment in an environment.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Experiment} + */ +public final class Experiment extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.Experiment) + ExperimentOrBuilder { + private static final long serialVersionUID = 0L; + // Use Experiment.newBuilder() to construct. + private Experiment(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Experiment() { + name_ = ""; + displayName_ = ""; + description_ = ""; + state_ = 0; + variantsHistory_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Experiment(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Experiment( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 32: + { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 42: + { + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition.Builder subBuilder = + null; + if (definition_ != null) { + subBuilder = definition_.toBuilder(); + } + definition_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(definition_); + definition_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Builder subBuilder = null; + if (result_ != null) { + subBuilder = result_.toBuilder(); + } + result_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(result_); + result_ = subBuilder.buildPartial(); + } + + break; + } + case 58: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 66: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (startTime_ != null) { + subBuilder = startTime_.toBuilder(); + } + startTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(startTime_); + startTime_ = subBuilder.buildPartial(); + } + + break; + } + case 74: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (endTime_ != null) { + subBuilder = endTime_.toBuilder(); + } + endTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(endTime_); + endTime_ = subBuilder.buildPartial(); + } + + break; + } + case 82: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (lastUpdateTime_ != null) { + subBuilder = lastUpdateTime_.toBuilder(); + } + lastUpdateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(lastUpdateTime_); + lastUpdateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 90: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (experimentLength_ != null) { + subBuilder = experimentLength_.toBuilder(); + } + experimentLength_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(experimentLength_); + experimentLength_ = subBuilder.buildPartial(); + } + + break; + } + case 98: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + variantsHistory_ = + new java.util.ArrayList< + com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory>(); + mutable_bitField0_ |= 0x00000001; + } + variantsHistory_.add( + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + variantsHistory_ = java.util.Collections.unmodifiableList(variantsHistory_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.Experiment.class, + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Builder.class); + } + + /** + * + * + *
+   * The state of the experiment.
+   * 
+ * + * Protobuf enum {@code google.cloud.dialogflow.cx.v3beta1.Experiment.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * State unspecified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The experiment is created but not started yet.
+     * 
+ * + * DRAFT = 1; + */ + DRAFT(1), + /** + * + * + *
+     * The experiment is running.
+     * 
+ * + * RUNNING = 2; + */ + RUNNING(2), + /** + * + * + *
+     * The experiment is done.
+     * 
+ * + * DONE = 3; + */ + DONE(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * State unspecified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The experiment is created but not started yet.
+     * 
+ * + * DRAFT = 1; + */ + public static final int DRAFT_VALUE = 1; + /** + * + * + *
+     * The experiment is running.
+     * 
+ * + * RUNNING = 2; + */ + public static final int RUNNING_VALUE = 2; + /** + * + * + *
+     * The experiment is done.
+     * 
+ * + * DONE = 3; + */ + public static final int DONE_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return DRAFT; + case 2: + return RUNNING; + case 3: + return DONE; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.Experiment.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3beta1.Experiment.State) + } + + public interface DefinitionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.Experiment.Definition) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * 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).
+     * 
+ * + * string condition = 1; + * + * @return The condition. + */ + java.lang.String getCondition(); + /** + * + * + *
+     * 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).
+     * 
+ * + * string condition = 1; + * + * @return The bytes for condition. + */ + com.google.protobuf.ByteString getConditionBytes(); + + /** + * + * + *
+     * The flow versions as the variants of this experiment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.VersionVariants version_variants = 2; + * + * @return Whether the versionVariants field is set. + */ + boolean hasVersionVariants(); + /** + * + * + *
+     * The flow versions as the variants of this experiment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.VersionVariants version_variants = 2; + * + * @return The versionVariants. + */ + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants getVersionVariants(); + /** + * + * + *
+     * The flow versions as the variants of this experiment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.VersionVariants version_variants = 2; + */ + com.google.cloud.dialogflow.cx.v3beta1.VersionVariantsOrBuilder getVersionVariantsOrBuilder(); + + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition.VariantsCase + getVariantsCase(); + } + /** + * + * + *
+   * Definition of the experiment.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Experiment.Definition} + */ + public static final class Definition extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.Experiment.Definition) + DefinitionOrBuilder { + private static final long serialVersionUID = 0L; + // Use Definition.newBuilder() to construct. + private Definition(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Definition() { + condition_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Definition(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Definition( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + condition_ = s; + break; + } + case 18: + { + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Builder subBuilder = null; + if (variantsCase_ == 2) { + subBuilder = + ((com.google.cloud.dialogflow.cx.v3beta1.VersionVariants) variants_) + .toBuilder(); + } + variants_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.dialogflow.cx.v3beta1.VersionVariants) variants_); + variants_ = subBuilder.buildPartial(); + } + variantsCase_ = 2; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Definition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Definition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition.class, + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition.Builder.class); + } + + private int variantsCase_ = 0; + private java.lang.Object variants_; + + public enum VariantsCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + VERSION_VARIANTS(2), + VARIANTS_NOT_SET(0); + private final int value; + + private VariantsCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static VariantsCase valueOf(int value) { + return forNumber(value); + } + + public static VariantsCase forNumber(int value) { + switch (value) { + case 2: + return VERSION_VARIANTS; + case 0: + return VARIANTS_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public VariantsCase getVariantsCase() { + return VariantsCase.forNumber(variantsCase_); + } + + public static final int CONDITION_FIELD_NUMBER = 1; + private volatile java.lang.Object 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).
+     * 
+ * + * string condition = 1; + * + * @return The condition. + */ + @java.lang.Override + public java.lang.String getCondition() { + java.lang.Object ref = condition_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + condition_ = s; + return s; + } + } + /** + * + * + *
+     * 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).
+     * 
+ * + * string condition = 1; + * + * @return The bytes for condition. + */ + @java.lang.Override + public com.google.protobuf.ByteString getConditionBytes() { + java.lang.Object ref = condition_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + condition_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERSION_VARIANTS_FIELD_NUMBER = 2; + /** + * + * + *
+     * The flow versions as the variants of this experiment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.VersionVariants version_variants = 2; + * + * @return Whether the versionVariants field is set. + */ + @java.lang.Override + public boolean hasVersionVariants() { + return variantsCase_ == 2; + } + /** + * + * + *
+     * The flow versions as the variants of this experiment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.VersionVariants version_variants = 2; + * + * @return The versionVariants. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.VersionVariants getVersionVariants() { + if (variantsCase_ == 2) { + return (com.google.cloud.dialogflow.cx.v3beta1.VersionVariants) variants_; + } + return com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.getDefaultInstance(); + } + /** + * + * + *
+     * The flow versions as the variants of this experiment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.VersionVariants version_variants = 2; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.VersionVariantsOrBuilder + getVersionVariantsOrBuilder() { + if (variantsCase_ == 2) { + return (com.google.cloud.dialogflow.cx.v3beta1.VersionVariants) variants_; + } + return com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getConditionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, condition_); + } + if (variantsCase_ == 2) { + output.writeMessage(2, (com.google.cloud.dialogflow.cx.v3beta1.VersionVariants) variants_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getConditionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, condition_); + } + if (variantsCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.dialogflow.cx.v3beta1.VersionVariants) variants_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition other = + (com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition) obj; + + if (!getCondition().equals(other.getCondition())) return false; + if (!getVariantsCase().equals(other.getVariantsCase())) return false; + switch (variantsCase_) { + case 2: + if (!getVersionVariants().equals(other.getVersionVariants())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CONDITION_FIELD_NUMBER; + hash = (53 * hash) + getCondition().hashCode(); + switch (variantsCase_) { + case 2: + hash = (37 * hash) + VERSION_VARIANTS_FIELD_NUMBER; + hash = (53 * hash) + getVersionVariants().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Definition of the experiment.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Experiment.Definition} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.Experiment.Definition) + com.google.cloud.dialogflow.cx.v3beta1.Experiment.DefinitionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Definition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Definition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition.class, + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + condition_ = ""; + + variantsCase_ = 0; + variants_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Definition_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition build() { + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition result = + new com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition(this); + result.condition_ = condition_; + if (variantsCase_ == 2) { + if (versionVariantsBuilder_ == null) { + result.variants_ = variants_; + } else { + result.variants_ = versionVariantsBuilder_.build(); + } + } + result.variantsCase_ = variantsCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition.getDefaultInstance()) + return this; + if (!other.getCondition().isEmpty()) { + condition_ = other.condition_; + onChanged(); + } + switch (other.getVariantsCase()) { + case VERSION_VARIANTS: + { + mergeVersionVariants(other.getVersionVariants()); + break; + } + case VARIANTS_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int variantsCase_ = 0; + private java.lang.Object variants_; + + public VariantsCase getVariantsCase() { + return VariantsCase.forNumber(variantsCase_); + } + + public Builder clearVariants() { + variantsCase_ = 0; + variants_ = null; + onChanged(); + return this; + } + + private java.lang.Object 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).
+       * 
+ * + * string condition = 1; + * + * @return The condition. + */ + public java.lang.String getCondition() { + java.lang.Object ref = condition_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + condition_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * 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).
+       * 
+ * + * string condition = 1; + * + * @return The bytes for condition. + */ + public com.google.protobuf.ByteString getConditionBytes() { + java.lang.Object ref = condition_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + condition_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * 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).
+       * 
+ * + * string condition = 1; + * + * @param value The condition to set. + * @return This builder for chaining. + */ + public Builder setCondition(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + condition_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * 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).
+       * 
+ * + * string condition = 1; + * + * @return This builder for chaining. + */ + public Builder clearCondition() { + + condition_ = getDefaultInstance().getCondition(); + onChanged(); + return this; + } + /** + * + * + *
+       * 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).
+       * 
+ * + * string condition = 1; + * + * @param value The bytes for condition to set. + * @return This builder for chaining. + */ + public Builder setConditionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + condition_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants, + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Builder, + com.google.cloud.dialogflow.cx.v3beta1.VersionVariantsOrBuilder> + versionVariantsBuilder_; + /** + * + * + *
+       * The flow versions as the variants of this experiment.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.VersionVariants version_variants = 2; + * + * @return Whether the versionVariants field is set. + */ + @java.lang.Override + public boolean hasVersionVariants() { + return variantsCase_ == 2; + } + /** + * + * + *
+       * The flow versions as the variants of this experiment.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.VersionVariants version_variants = 2; + * + * @return The versionVariants. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.VersionVariants getVersionVariants() { + if (versionVariantsBuilder_ == null) { + if (variantsCase_ == 2) { + return (com.google.cloud.dialogflow.cx.v3beta1.VersionVariants) variants_; + } + return com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.getDefaultInstance(); + } else { + if (variantsCase_ == 2) { + return versionVariantsBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.getDefaultInstance(); + } + } + /** + * + * + *
+       * The flow versions as the variants of this experiment.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.VersionVariants version_variants = 2; + */ + public Builder setVersionVariants( + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants value) { + if (versionVariantsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + variants_ = value; + onChanged(); + } else { + versionVariantsBuilder_.setMessage(value); + } + variantsCase_ = 2; + return this; + } + /** + * + * + *
+       * The flow versions as the variants of this experiment.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.VersionVariants version_variants = 2; + */ + public Builder setVersionVariants( + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Builder builderForValue) { + if (versionVariantsBuilder_ == null) { + variants_ = builderForValue.build(); + onChanged(); + } else { + versionVariantsBuilder_.setMessage(builderForValue.build()); + } + variantsCase_ = 2; + return this; + } + /** + * + * + *
+       * The flow versions as the variants of this experiment.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.VersionVariants version_variants = 2; + */ + public Builder mergeVersionVariants( + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants value) { + if (versionVariantsBuilder_ == null) { + if (variantsCase_ == 2 + && variants_ + != com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.getDefaultInstance()) { + variants_ = + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.newBuilder( + (com.google.cloud.dialogflow.cx.v3beta1.VersionVariants) variants_) + .mergeFrom(value) + .buildPartial(); + } else { + variants_ = value; + } + onChanged(); + } else { + if (variantsCase_ == 2) { + versionVariantsBuilder_.mergeFrom(value); + } + versionVariantsBuilder_.setMessage(value); + } + variantsCase_ = 2; + return this; + } + /** + * + * + *
+       * The flow versions as the variants of this experiment.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.VersionVariants version_variants = 2; + */ + public Builder clearVersionVariants() { + if (versionVariantsBuilder_ == null) { + if (variantsCase_ == 2) { + variantsCase_ = 0; + variants_ = null; + onChanged(); + } + } else { + if (variantsCase_ == 2) { + variantsCase_ = 0; + variants_ = null; + } + versionVariantsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * The flow versions as the variants of this experiment.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.VersionVariants version_variants = 2; + */ + public com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Builder + getVersionVariantsBuilder() { + return getVersionVariantsFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The flow versions as the variants of this experiment.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.VersionVariants version_variants = 2; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.VersionVariantsOrBuilder + getVersionVariantsOrBuilder() { + if ((variantsCase_ == 2) && (versionVariantsBuilder_ != null)) { + return versionVariantsBuilder_.getMessageOrBuilder(); + } else { + if (variantsCase_ == 2) { + return (com.google.cloud.dialogflow.cx.v3beta1.VersionVariants) variants_; + } + return com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.getDefaultInstance(); + } + } + /** + * + * + *
+       * The flow versions as the variants of this experiment.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.VersionVariants version_variants = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants, + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Builder, + com.google.cloud.dialogflow.cx.v3beta1.VersionVariantsOrBuilder> + getVersionVariantsFieldBuilder() { + if (versionVariantsBuilder_ == null) { + if (!(variantsCase_ == 2)) { + variants_ = com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.getDefaultInstance(); + } + versionVariantsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants, + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Builder, + com.google.cloud.dialogflow.cx.v3beta1.VersionVariantsOrBuilder>( + (com.google.cloud.dialogflow.cx.v3beta1.VersionVariants) variants_, + getParentForChildren(), + isClean()); + variants_ = null; + } + variantsCase_ = 2; + onChanged(); + ; + return versionVariantsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.Experiment.Definition) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.Experiment.Definition) + private static final com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Definition parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Definition(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.Experiment.Result) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Version variants and metrics.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics version_metrics = 1; + * + */ + java.util.List + getVersionMetricsList(); + /** + * + * + *
+     * Version variants and metrics.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics version_metrics = 1; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics getVersionMetrics( + int index); + /** + * + * + *
+     * Version variants and metrics.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics version_metrics = 1; + * + */ + int getVersionMetricsCount(); + /** + * + * + *
+     * Version variants and metrics.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics version_metrics = 1; + * + */ + java.util.List< + ? extends + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetricsOrBuilder> + getVersionMetricsOrBuilderList(); + /** + * + * + *
+     * Version variants and metrics.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics version_metrics = 1; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetricsOrBuilder + getVersionMetricsOrBuilder(int index); + + /** + * + * + *
+     * The last time the experiment's stats data was updated. Will have default
+     * value if stats have never been computed for this experiment.
+     * 
+ * + * .google.protobuf.Timestamp last_update_time = 2; + * + * @return Whether the lastUpdateTime field is set. + */ + boolean hasLastUpdateTime(); + /** + * + * + *
+     * The last time the experiment's stats data was updated. Will have default
+     * value if stats have never been computed for this experiment.
+     * 
+ * + * .google.protobuf.Timestamp last_update_time = 2; + * + * @return The lastUpdateTime. + */ + com.google.protobuf.Timestamp getLastUpdateTime(); + /** + * + * + *
+     * The last time the experiment's stats data was updated. Will have default
+     * value if stats have never been computed for this experiment.
+     * 
+ * + * .google.protobuf.Timestamp last_update_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getLastUpdateTimeOrBuilder(); + } + /** + * + * + *
+   * The inference result which includes an objective metric to optimize and the
+   * confidence interval.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Experiment.Result} + */ + public static final class Result extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.Experiment.Result) + ResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use Result.newBuilder() to construct. + private Result(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Result() { + versionMetrics_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Result(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Result( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + versionMetrics_ = + new java.util.ArrayList< + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result + .VersionMetrics>(); + mutable_bitField0_ |= 0x00000001; + } + versionMetrics_.add( + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics + .parser(), + extensionRegistry)); + break; + } + case 18: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (lastUpdateTime_ != null) { + subBuilder = lastUpdateTime_.toBuilder(); + } + lastUpdateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(lastUpdateTime_); + lastUpdateTime_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + versionMetrics_ = java.util.Collections.unmodifiableList(versionMetrics_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.class, + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Builder.class); + } + + /** + * + * + *
+     * Types of ratio-based metric for Dialogflow experiment.
+     * 
+ * + * Protobuf enum {@code google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType} + */ + public enum MetricType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Metric unspecified.
+       * 
+ * + * METRIC_UNSPECIFIED = 0; + */ + METRIC_UNSPECIFIED(0), + /** + * + * + *
+       * Percentage of contained sessions without user calling back in 24 hours.
+       * 
+ * + * CONTAINED_SESSION_NO_CALLBACK_RATE = 1; + */ + CONTAINED_SESSION_NO_CALLBACK_RATE(1), + /** + * + * + *
+       * Percentage of sessions that were handed to a human agent.
+       * 
+ * + * LIVE_AGENT_HANDOFF_RATE = 2; + */ + LIVE_AGENT_HANDOFF_RATE(2), + /** + * + * + *
+       * Percentage of sessions with the same user calling back.
+       * 
+ * + * CALLBACK_SESSION_RATE = 3; + */ + CALLBACK_SESSION_RATE(3), + /** + * + * + *
+       * Percentage of sessions where user hung up.
+       * 
+ * + * ABANDONED_SESSION_RATE = 4; + */ + ABANDONED_SESSION_RATE(4), + /** + * + * + *
+       * Percentage of sessions reached Dialogflow 'END_PAGE' or
+       * 'END_SESSION'.
+       * 
+ * + * SESSION_END_RATE = 5; + */ + SESSION_END_RATE(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Metric unspecified.
+       * 
+ * + * METRIC_UNSPECIFIED = 0; + */ + public static final int METRIC_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * Percentage of contained sessions without user calling back in 24 hours.
+       * 
+ * + * CONTAINED_SESSION_NO_CALLBACK_RATE = 1; + */ + public static final int CONTAINED_SESSION_NO_CALLBACK_RATE_VALUE = 1; + /** + * + * + *
+       * Percentage of sessions that were handed to a human agent.
+       * 
+ * + * LIVE_AGENT_HANDOFF_RATE = 2; + */ + public static final int LIVE_AGENT_HANDOFF_RATE_VALUE = 2; + /** + * + * + *
+       * Percentage of sessions with the same user calling back.
+       * 
+ * + * CALLBACK_SESSION_RATE = 3; + */ + public static final int CALLBACK_SESSION_RATE_VALUE = 3; + /** + * + * + *
+       * Percentage of sessions where user hung up.
+       * 
+ * + * ABANDONED_SESSION_RATE = 4; + */ + public static final int ABANDONED_SESSION_RATE_VALUE = 4; + /** + * + * + *
+       * Percentage of sessions reached Dialogflow 'END_PAGE' or
+       * 'END_SESSION'.
+       * 
+ * + * SESSION_END_RATE = 5; + */ + public static final int SESSION_END_RATE_VALUE = 5; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static MetricType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static MetricType forNumber(int value) { + switch (value) { + case 0: + return METRIC_UNSPECIFIED; + case 1: + return CONTAINED_SESSION_NO_CALLBACK_RATE; + case 2: + return LIVE_AGENT_HANDOFF_RATE; + case 3: + return CALLBACK_SESSION_RATE; + case 4: + return ABANDONED_SESSION_RATE; + case 5: + return SESSION_END_RATE; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public MetricType findValueByNumber(int number) { + return MetricType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final MetricType[] VALUES = values(); + + public static MetricType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private MetricType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType) + } + + /** + * + * + *
+     * types of count-based metric for Dialogflow experiment.
+     * 
+ * + * Protobuf enum {@code google.cloud.dialogflow.cx.v3beta1.Experiment.Result.CountType} + */ + public enum CountType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Count type unspecified.
+       * 
+ * + * COUNT_TYPE_UNSPECIFIED = 0; + */ + COUNT_TYPE_UNSPECIFIED(0), + /** + * + * + *
+       * Total number of occurrences of a 'NO_MATCH'.
+       * 
+ * + * TOTAL_NO_MATCH_COUNT = 1; + */ + TOTAL_NO_MATCH_COUNT(1), + /** + * + * + *
+       * Total number of turn counts.
+       * 
+ * + * TOTAL_TURN_COUNT = 2; + */ + TOTAL_TURN_COUNT(2), + /** + * + * + *
+       * Average turn count in a session.
+       * 
+ * + * AVERAGE_TURN_COUNT = 3; + */ + AVERAGE_TURN_COUNT(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Count type unspecified.
+       * 
+ * + * COUNT_TYPE_UNSPECIFIED = 0; + */ + public static final int COUNT_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * Total number of occurrences of a 'NO_MATCH'.
+       * 
+ * + * TOTAL_NO_MATCH_COUNT = 1; + */ + public static final int TOTAL_NO_MATCH_COUNT_VALUE = 1; + /** + * + * + *
+       * Total number of turn counts.
+       * 
+ * + * TOTAL_TURN_COUNT = 2; + */ + public static final int TOTAL_TURN_COUNT_VALUE = 2; + /** + * + * + *
+       * Average turn count in a session.
+       * 
+ * + * AVERAGE_TURN_COUNT = 3; + */ + public static final int AVERAGE_TURN_COUNT_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static CountType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static CountType forNumber(int value) { + switch (value) { + case 0: + return COUNT_TYPE_UNSPECIFIED; + case 1: + return TOTAL_NO_MATCH_COUNT; + case 2: + return TOTAL_TURN_COUNT; + case 3: + return AVERAGE_TURN_COUNT; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public CountType findValueByNumber(int number) { + return CountType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final CountType[] VALUES = values(); + + public static CountType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private CountType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3beta1.Experiment.Result.CountType) + } + + public interface ConfidenceIntervalOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * The confidence level used to construct the interval, i.e. there is X%
+       * chance that the true value is within this interval.
+       * 
+ * + * double confidence_level = 1; + * + * @return The confidenceLevel. + */ + double getConfidenceLevel(); + + /** + * + * + *
+       * The percent change between an experiment metric's value and the value
+       * for its control.
+       * 
+ * + * double ratio = 2; + * + * @return The ratio. + */ + double getRatio(); + + /** + * + * + *
+       * Lower bound of the interval.
+       * 
+ * + * double lower_bound = 3; + * + * @return The lowerBound. + */ + double getLowerBound(); + + /** + * + * + *
+       * Upper bound of the interval.
+       * 
+ * + * double upper_bound = 4; + * + * @return The upperBound. + */ + double getUpperBound(); + } + /** + * + * + *
+     * A confidence interval is a range of possible values for the experiment
+     * objective you are trying to measure.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval} + */ + public static final class ConfidenceInterval extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval) + ConfidenceIntervalOrBuilder { + private static final long serialVersionUID = 0L; + // Use ConfidenceInterval.newBuilder() to construct. + private ConfidenceInterval(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ConfidenceInterval() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ConfidenceInterval(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ConfidenceInterval( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 9: + { + confidenceLevel_ = input.readDouble(); + break; + } + case 17: + { + ratio_ = input.readDouble(); + break; + } + case 25: + { + lowerBound_ = input.readDouble(); + break; + } + case 33: + { + upperBound_ = input.readDouble(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_ConfidenceInterval_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_ConfidenceInterval_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval.class, + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval.Builder + .class); + } + + public static final int CONFIDENCE_LEVEL_FIELD_NUMBER = 1; + private double confidenceLevel_; + /** + * + * + *
+       * The confidence level used to construct the interval, i.e. there is X%
+       * chance that the true value is within this interval.
+       * 
+ * + * double confidence_level = 1; + * + * @return The confidenceLevel. + */ + @java.lang.Override + public double getConfidenceLevel() { + return confidenceLevel_; + } + + public static final int RATIO_FIELD_NUMBER = 2; + private double ratio_; + /** + * + * + *
+       * The percent change between an experiment metric's value and the value
+       * for its control.
+       * 
+ * + * double ratio = 2; + * + * @return The ratio. + */ + @java.lang.Override + public double getRatio() { + return ratio_; + } + + public static final int LOWER_BOUND_FIELD_NUMBER = 3; + private double lowerBound_; + /** + * + * + *
+       * Lower bound of the interval.
+       * 
+ * + * double lower_bound = 3; + * + * @return The lowerBound. + */ + @java.lang.Override + public double getLowerBound() { + return lowerBound_; + } + + public static final int UPPER_BOUND_FIELD_NUMBER = 4; + private double upperBound_; + /** + * + * + *
+       * Upper bound of the interval.
+       * 
+ * + * double upper_bound = 4; + * + * @return The upperBound. + */ + @java.lang.Override + public double getUpperBound() { + return upperBound_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (confidenceLevel_ != 0D) { + output.writeDouble(1, confidenceLevel_); + } + if (ratio_ != 0D) { + output.writeDouble(2, ratio_); + } + if (lowerBound_ != 0D) { + output.writeDouble(3, lowerBound_); + } + if (upperBound_ != 0D) { + output.writeDouble(4, upperBound_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (confidenceLevel_ != 0D) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(1, confidenceLevel_); + } + if (ratio_ != 0D) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, ratio_); + } + if (lowerBound_ != 0D) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(3, lowerBound_); + } + if (upperBound_ != 0D) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(4, upperBound_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval other = + (com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval) obj; + + if (java.lang.Double.doubleToLongBits(getConfidenceLevel()) + != java.lang.Double.doubleToLongBits(other.getConfidenceLevel())) return false; + if (java.lang.Double.doubleToLongBits(getRatio()) + != java.lang.Double.doubleToLongBits(other.getRatio())) return false; + if (java.lang.Double.doubleToLongBits(getLowerBound()) + != java.lang.Double.doubleToLongBits(other.getLowerBound())) return false; + if (java.lang.Double.doubleToLongBits(getUpperBound()) + != java.lang.Double.doubleToLongBits(other.getUpperBound())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CONFIDENCE_LEVEL_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getConfidenceLevel())); + hash = (37 * hash) + RATIO_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getRatio())); + hash = (37 * hash) + LOWER_BOUND_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getLowerBound())); + hash = (37 * hash) + UPPER_BOUND_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getUpperBound())); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * A confidence interval is a range of possible values for the experiment
+       * objective you are trying to measure.
+       * 
+ * + * Protobuf type {@code + * google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval) + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceIntervalOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_ConfidenceInterval_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_ConfidenceInterval_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval.class, + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval + .Builder.class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + confidenceLevel_ = 0D; + + ratio_ = 0D; + + lowerBound_ = 0D; + + upperBound_ = 0D; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_ConfidenceInterval_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval build() { + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval + buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval result = + new com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval(this); + result.confidenceLevel_ = confidenceLevel_; + result.ratio_ = ratio_; + result.lowerBound_ = lowerBound_; + result.upperBound_ = upperBound_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval + .getDefaultInstance()) return this; + if (other.getConfidenceLevel() != 0D) { + setConfidenceLevel(other.getConfidenceLevel()); + } + if (other.getRatio() != 0D) { + setRatio(other.getRatio()); + } + if (other.getLowerBound() != 0D) { + setLowerBound(other.getLowerBound()); + } + if (other.getUpperBound() != 0D) { + setUpperBound(other.getUpperBound()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private double confidenceLevel_; + /** + * + * + *
+         * The confidence level used to construct the interval, i.e. there is X%
+         * chance that the true value is within this interval.
+         * 
+ * + * double confidence_level = 1; + * + * @return The confidenceLevel. + */ + @java.lang.Override + public double getConfidenceLevel() { + return confidenceLevel_; + } + /** + * + * + *
+         * The confidence level used to construct the interval, i.e. there is X%
+         * chance that the true value is within this interval.
+         * 
+ * + * double confidence_level = 1; + * + * @param value The confidenceLevel to set. + * @return This builder for chaining. + */ + public Builder setConfidenceLevel(double value) { + + confidenceLevel_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * The confidence level used to construct the interval, i.e. there is X%
+         * chance that the true value is within this interval.
+         * 
+ * + * double confidence_level = 1; + * + * @return This builder for chaining. + */ + public Builder clearConfidenceLevel() { + + confidenceLevel_ = 0D; + onChanged(); + return this; + } + + private double ratio_; + /** + * + * + *
+         * The percent change between an experiment metric's value and the value
+         * for its control.
+         * 
+ * + * double ratio = 2; + * + * @return The ratio. + */ + @java.lang.Override + public double getRatio() { + return ratio_; + } + /** + * + * + *
+         * The percent change between an experiment metric's value and the value
+         * for its control.
+         * 
+ * + * double ratio = 2; + * + * @param value The ratio to set. + * @return This builder for chaining. + */ + public Builder setRatio(double value) { + + ratio_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * The percent change between an experiment metric's value and the value
+         * for its control.
+         * 
+ * + * double ratio = 2; + * + * @return This builder for chaining. + */ + public Builder clearRatio() { + + ratio_ = 0D; + onChanged(); + return this; + } + + private double lowerBound_; + /** + * + * + *
+         * Lower bound of the interval.
+         * 
+ * + * double lower_bound = 3; + * + * @return The lowerBound. + */ + @java.lang.Override + public double getLowerBound() { + return lowerBound_; + } + /** + * + * + *
+         * Lower bound of the interval.
+         * 
+ * + * double lower_bound = 3; + * + * @param value The lowerBound to set. + * @return This builder for chaining. + */ + public Builder setLowerBound(double value) { + + lowerBound_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Lower bound of the interval.
+         * 
+ * + * double lower_bound = 3; + * + * @return This builder for chaining. + */ + public Builder clearLowerBound() { + + lowerBound_ = 0D; + onChanged(); + return this; + } + + private double upperBound_; + /** + * + * + *
+         * Upper bound of the interval.
+         * 
+ * + * double upper_bound = 4; + * + * @return The upperBound. + */ + @java.lang.Override + public double getUpperBound() { + return upperBound_; + } + /** + * + * + *
+         * Upper bound of the interval.
+         * 
+ * + * double upper_bound = 4; + * + * @param value The upperBound to set. + * @return This builder for chaining. + */ + public Builder setUpperBound(double value) { + + upperBound_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Upper bound of the interval.
+         * 
+ * + * double upper_bound = 4; + * + * @return This builder for chaining. + */ + public Builder clearUpperBound() { + + upperBound_ = 0D; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval) + private static final com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result + .ConfidenceInterval + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ConfidenceInterval parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ConfidenceInterval(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface MetricOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Ratio-based metric type. Only one of type or count_type is specified in
+       * each Metric.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType type = 1; + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
+       * Ratio-based metric type. Only one of type or count_type is specified in
+       * each Metric.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType type = 1; + * + * @return The type. + */ + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType getType(); + + /** + * + * + *
+       * Count-based metric type. Only one of type or count_type is specified in
+       * each Metric.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.CountType count_type = 5; + * + * + * @return The enum numeric value on the wire for countType. + */ + int getCountTypeValue(); + /** + * + * + *
+       * Count-based metric type. Only one of type or count_type is specified in
+       * each Metric.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.CountType count_type = 5; + * + * + * @return The countType. + */ + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.CountType getCountType(); + + /** + * + * + *
+       * Ratio value of a metric.
+       * 
+ * + * double ratio = 2; + * + * @return The ratio. + */ + double getRatio(); + + /** + * + * + *
+       * Count value of a metric.
+       * 
+ * + * double count = 4; + * + * @return The count. + */ + double getCount(); + + /** + * + * + *
+       * The probability that the treatment is better than all other treatments
+       * in the experiment
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval confidence_interval = 3; + * + * + * @return Whether the confidenceInterval field is set. + */ + boolean hasConfidenceInterval(); + /** + * + * + *
+       * The probability that the treatment is better than all other treatments
+       * in the experiment
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval confidence_interval = 3; + * + * + * @return The confidenceInterval. + */ + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval + getConfidenceInterval(); + /** + * + * + *
+       * The probability that the treatment is better than all other treatments
+       * in the experiment
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval confidence_interval = 3; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceIntervalOrBuilder + getConfidenceIntervalOrBuilder(); + + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric.ValueCase + getValueCase(); + } + /** + * + * + *
+     * Metric and corresponding confidence intervals.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric} + */ + public static final class Metric extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric) + MetricOrBuilder { + private static final long serialVersionUID = 0L; + // Use Metric.newBuilder() to construct. + private Metric(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Metric() { + type_ = 0; + countType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Metric(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Metric( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } + case 17: + { + valueCase_ = 2; + value_ = input.readDouble(); + break; + } + case 26: + { + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval + .Builder + subBuilder = null; + if (confidenceInterval_ != null) { + subBuilder = confidenceInterval_.toBuilder(); + } + confidenceInterval_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result + .ConfidenceInterval.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(confidenceInterval_); + confidenceInterval_ = subBuilder.buildPartial(); + } + + break; + } + case 33: + { + valueCase_ = 4; + value_ = input.readDouble(); + break; + } + case 40: + { + int rawValue = input.readEnum(); + + countType_ = rawValue; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_Metric_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_Metric_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric.class, + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric.Builder.class); + } + + private int valueCase_ = 0; + private java.lang.Object value_; + + public enum ValueCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + RATIO(2), + COUNT(4), + VALUE_NOT_SET(0); + private final int value; + + private ValueCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ValueCase valueOf(int value) { + return forNumber(value); + } + + public static ValueCase forNumber(int value) { + switch (value) { + case 2: + return RATIO; + case 4: + return COUNT; + case 0: + return VALUE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ValueCase getValueCase() { + return ValueCase.forNumber(valueCase_); + } + + public static final int TYPE_FIELD_NUMBER = 1; + private int type_; + /** + * + * + *
+       * Ratio-based metric type. Only one of type or count_type is specified in
+       * each Metric.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType type = 1; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+       * Ratio-based metric type. Only one of type or count_type is specified in
+       * each Metric.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType type = 1; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType getType() { + @SuppressWarnings("deprecation") + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType result = + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType.valueOf(type_); + return result == null + ? com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType.UNRECOGNIZED + : result; + } + + public static final int COUNT_TYPE_FIELD_NUMBER = 5; + private int countType_; + /** + * + * + *
+       * Count-based metric type. Only one of type or count_type is specified in
+       * each Metric.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.CountType count_type = 5; + * + * + * @return The enum numeric value on the wire for countType. + */ + @java.lang.Override + public int getCountTypeValue() { + return countType_; + } + /** + * + * + *
+       * Count-based metric type. Only one of type or count_type is specified in
+       * each Metric.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.CountType count_type = 5; + * + * + * @return The countType. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.CountType getCountType() { + @SuppressWarnings("deprecation") + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.CountType result = + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.CountType.valueOf(countType_); + return result == null + ? com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.CountType.UNRECOGNIZED + : result; + } + + public static final int RATIO_FIELD_NUMBER = 2; + /** + * + * + *
+       * Ratio value of a metric.
+       * 
+ * + * double ratio = 2; + * + * @return The ratio. + */ + @java.lang.Override + public double getRatio() { + if (valueCase_ == 2) { + return (java.lang.Double) value_; + } + return 0D; + } + + public static final int COUNT_FIELD_NUMBER = 4; + /** + * + * + *
+       * Count value of a metric.
+       * 
+ * + * double count = 4; + * + * @return The count. + */ + @java.lang.Override + public double getCount() { + if (valueCase_ == 4) { + return (java.lang.Double) value_; + } + return 0D; + } + + public static final int CONFIDENCE_INTERVAL_FIELD_NUMBER = 3; + private com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval + confidenceInterval_; + /** + * + * + *
+       * The probability that the treatment is better than all other treatments
+       * in the experiment
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval confidence_interval = 3; + * + * + * @return Whether the confidenceInterval field is set. + */ + @java.lang.Override + public boolean hasConfidenceInterval() { + return confidenceInterval_ != null; + } + /** + * + * + *
+       * The probability that the treatment is better than all other treatments
+       * in the experiment
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval confidence_interval = 3; + * + * + * @return The confidenceInterval. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval + getConfidenceInterval() { + return confidenceInterval_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval + .getDefaultInstance() + : confidenceInterval_; + } + /** + * + * + *
+       * The probability that the treatment is better than all other treatments
+       * in the experiment
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval confidence_interval = 3; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceIntervalOrBuilder + getConfidenceIntervalOrBuilder() { + return getConfidenceInterval(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (type_ + != com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType + .METRIC_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, type_); + } + if (valueCase_ == 2) { + output.writeDouble(2, (double) ((java.lang.Double) value_)); + } + if (confidenceInterval_ != null) { + output.writeMessage(3, getConfidenceInterval()); + } + if (valueCase_ == 4) { + output.writeDouble(4, (double) ((java.lang.Double) value_)); + } + if (countType_ + != com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.CountType + .COUNT_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(5, countType_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (type_ + != com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType + .METRIC_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, type_); + } + if (valueCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeDoubleSize( + 2, (double) ((java.lang.Double) value_)); + } + if (confidenceInterval_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(3, getConfidenceInterval()); + } + if (valueCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeDoubleSize( + 4, (double) ((java.lang.Double) value_)); + } + if (countType_ + != com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.CountType + .COUNT_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, countType_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric other = + (com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric) obj; + + if (type_ != other.type_) return false; + if (countType_ != other.countType_) return false; + if (hasConfidenceInterval() != other.hasConfidenceInterval()) return false; + if (hasConfidenceInterval()) { + if (!getConfidenceInterval().equals(other.getConfidenceInterval())) return false; + } + if (!getValueCase().equals(other.getValueCase())) return false; + switch (valueCase_) { + case 2: + if (java.lang.Double.doubleToLongBits(getRatio()) + != java.lang.Double.doubleToLongBits(other.getRatio())) return false; + break; + case 4: + if (java.lang.Double.doubleToLongBits(getCount()) + != java.lang.Double.doubleToLongBits(other.getCount())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + COUNT_TYPE_FIELD_NUMBER; + hash = (53 * hash) + countType_; + if (hasConfidenceInterval()) { + hash = (37 * hash) + CONFIDENCE_INTERVAL_FIELD_NUMBER; + hash = (53 * hash) + getConfidenceInterval().hashCode(); + } + switch (valueCase_) { + case 2: + hash = (37 * hash) + RATIO_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getRatio())); + break; + case 4: + hash = (37 * hash) + COUNT_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getCount())); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * Metric and corresponding confidence intervals.
+       * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric) + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_Metric_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_Metric_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric.class, + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric.Builder.class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + type_ = 0; + + countType_ = 0; + + if (confidenceIntervalBuilder_ == null) { + confidenceInterval_ = null; + } else { + confidenceInterval_ = null; + confidenceIntervalBuilder_ = null; + } + valueCase_ = 0; + value_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_Metric_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric build() { + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric result = + new com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric(this); + result.type_ = type_; + result.countType_ = countType_; + if (valueCase_ == 2) { + result.value_ = value_; + } + if (valueCase_ == 4) { + result.value_ = value_; + } + if (confidenceIntervalBuilder_ == null) { + result.confidenceInterval_ = confidenceInterval_; + } else { + result.confidenceInterval_ = confidenceIntervalBuilder_.build(); + } + result.valueCase_ = valueCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric + .getDefaultInstance()) return this; + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (other.countType_ != 0) { + setCountTypeValue(other.getCountTypeValue()); + } + if (other.hasConfidenceInterval()) { + mergeConfidenceInterval(other.getConfidenceInterval()); + } + switch (other.getValueCase()) { + case RATIO: + { + setRatio(other.getRatio()); + break; + } + case COUNT: + { + setCount(other.getCount()); + break; + } + case VALUE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int valueCase_ = 0; + private java.lang.Object value_; + + public ValueCase getValueCase() { + return ValueCase.forNumber(valueCase_); + } + + public Builder clearValue() { + valueCase_ = 0; + value_ = null; + onChanged(); + return this; + } + + private int type_ = 0; + /** + * + * + *
+         * Ratio-based metric type. Only one of type or count_type is specified in
+         * each Metric.
+         * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType type = 1; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+         * Ratio-based metric type. Only one of type or count_type is specified in
+         * each Metric.
+         * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType type = 1; + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + + type_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Ratio-based metric type. Only one of type or count_type is specified in
+         * each Metric.
+         * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType type = 1; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType getType() { + @SuppressWarnings("deprecation") + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType result = + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType.valueOf(type_); + return result == null + ? com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType.UNRECOGNIZED + : result; + } + /** + * + * + *
+         * Ratio-based metric type. Only one of type or count_type is specified in
+         * each Metric.
+         * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType type = 1; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType( + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+         * Ratio-based metric type. Only one of type or count_type is specified in
+         * each Metric.
+         * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType type = 1; + * + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + private int countType_ = 0; + /** + * + * + *
+         * Count-based metric type. Only one of type or count_type is specified in
+         * each Metric.
+         * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.CountType count_type = 5; + * + * + * @return The enum numeric value on the wire for countType. + */ + @java.lang.Override + public int getCountTypeValue() { + return countType_; + } + /** + * + * + *
+         * Count-based metric type. Only one of type or count_type is specified in
+         * each Metric.
+         * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.CountType count_type = 5; + * + * + * @param value The enum numeric value on the wire for countType to set. + * @return This builder for chaining. + */ + public Builder setCountTypeValue(int value) { + + countType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Count-based metric type. Only one of type or count_type is specified in
+         * each Metric.
+         * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.CountType count_type = 5; + * + * + * @return The countType. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.CountType getCountType() { + @SuppressWarnings("deprecation") + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.CountType result = + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.CountType.valueOf( + countType_); + return result == null + ? com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.CountType.UNRECOGNIZED + : result; + } + /** + * + * + *
+         * Count-based metric type. Only one of type or count_type is specified in
+         * each Metric.
+         * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.CountType count_type = 5; + * + * + * @param value The countType to set. + * @return This builder for chaining. + */ + public Builder setCountType( + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.CountType value) { + if (value == null) { + throw new NullPointerException(); + } + + countType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+         * Count-based metric type. Only one of type or count_type is specified in
+         * each Metric.
+         * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.CountType count_type = 5; + * + * + * @return This builder for chaining. + */ + public Builder clearCountType() { + + countType_ = 0; + onChanged(); + return this; + } + + /** + * + * + *
+         * Ratio value of a metric.
+         * 
+ * + * double ratio = 2; + * + * @return The ratio. + */ + public double getRatio() { + if (valueCase_ == 2) { + return (java.lang.Double) value_; + } + return 0D; + } + /** + * + * + *
+         * Ratio value of a metric.
+         * 
+ * + * double ratio = 2; + * + * @param value The ratio to set. + * @return This builder for chaining. + */ + public Builder setRatio(double value) { + valueCase_ = 2; + value_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Ratio value of a metric.
+         * 
+ * + * double ratio = 2; + * + * @return This builder for chaining. + */ + public Builder clearRatio() { + if (valueCase_ == 2) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+         * Count value of a metric.
+         * 
+ * + * double count = 4; + * + * @return The count. + */ + public double getCount() { + if (valueCase_ == 4) { + return (java.lang.Double) value_; + } + return 0D; + } + /** + * + * + *
+         * Count value of a metric.
+         * 
+ * + * double count = 4; + * + * @param value The count to set. + * @return This builder for chaining. + */ + public Builder setCount(double value) { + valueCase_ = 4; + value_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Count value of a metric.
+         * 
+ * + * double count = 4; + * + * @return This builder for chaining. + */ + public Builder clearCount() { + if (valueCase_ == 4) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + return this; + } + + private com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval + confidenceInterval_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval, + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result + .ConfidenceIntervalOrBuilder> + confidenceIntervalBuilder_; + /** + * + * + *
+         * The probability that the treatment is better than all other treatments
+         * in the experiment
+         * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval confidence_interval = 3; + * + * + * @return Whether the confidenceInterval field is set. + */ + public boolean hasConfidenceInterval() { + return confidenceIntervalBuilder_ != null || confidenceInterval_ != null; + } + /** + * + * + *
+         * The probability that the treatment is better than all other treatments
+         * in the experiment
+         * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval confidence_interval = 3; + * + * + * @return The confidenceInterval. + */ + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval + getConfidenceInterval() { + if (confidenceIntervalBuilder_ == null) { + return confidenceInterval_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval + .getDefaultInstance() + : confidenceInterval_; + } else { + return confidenceIntervalBuilder_.getMessage(); + } + } + /** + * + * + *
+         * The probability that the treatment is better than all other treatments
+         * in the experiment
+         * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval confidence_interval = 3; + * + */ + public Builder setConfidenceInterval( + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval value) { + if (confidenceIntervalBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + confidenceInterval_ = value; + onChanged(); + } else { + confidenceIntervalBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+         * The probability that the treatment is better than all other treatments
+         * in the experiment
+         * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval confidence_interval = 3; + * + */ + public Builder setConfidenceInterval( + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval.Builder + builderForValue) { + if (confidenceIntervalBuilder_ == null) { + confidenceInterval_ = builderForValue.build(); + onChanged(); + } else { + confidenceIntervalBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+         * The probability that the treatment is better than all other treatments
+         * in the experiment
+         * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval confidence_interval = 3; + * + */ + public Builder mergeConfidenceInterval( + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval value) { + if (confidenceIntervalBuilder_ == null) { + if (confidenceInterval_ != null) { + confidenceInterval_ = + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval + .newBuilder(confidenceInterval_) + .mergeFrom(value) + .buildPartial(); + } else { + confidenceInterval_ = value; + } + onChanged(); + } else { + confidenceIntervalBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+         * The probability that the treatment is better than all other treatments
+         * in the experiment
+         * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval confidence_interval = 3; + * + */ + public Builder clearConfidenceInterval() { + if (confidenceIntervalBuilder_ == null) { + confidenceInterval_ = null; + onChanged(); + } else { + confidenceInterval_ = null; + confidenceIntervalBuilder_ = null; + } + + return this; + } + /** + * + * + *
+         * The probability that the treatment is better than all other treatments
+         * in the experiment
+         * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval confidence_interval = 3; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval.Builder + getConfidenceIntervalBuilder() { + + onChanged(); + return getConfidenceIntervalFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * The probability that the treatment is better than all other treatments
+         * in the experiment
+         * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval confidence_interval = 3; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceIntervalOrBuilder + getConfidenceIntervalOrBuilder() { + if (confidenceIntervalBuilder_ != null) { + return confidenceIntervalBuilder_.getMessageOrBuilder(); + } else { + return confidenceInterval_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval + .getDefaultInstance() + : confidenceInterval_; + } + } + /** + * + * + *
+         * The probability that the treatment is better than all other treatments
+         * in the experiment
+         * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval confidence_interval = 3; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval, + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result + .ConfidenceIntervalOrBuilder> + getConfidenceIntervalFieldBuilder() { + if (confidenceIntervalBuilder_ == null) { + confidenceIntervalBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval, + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval + .Builder, + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result + .ConfidenceIntervalOrBuilder>( + getConfidenceInterval(), getParentForChildren(), isClean()); + confidenceInterval_ = null; + } + return confidenceIntervalBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric) + private static final com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Metric parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Metric(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface VersionMetricsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * The name of the flow
+       * [Version][google.cloud.dialogflow.cx.v3beta1.Version]. Format:
+       * `projects/<Project Number>/locations/<Location ID>/agents/<Agent
+       * ID>/flows/<Flow ID>/versions/<Version ID>`.
+       * 
+ * + * string version = 1 [(.google.api.resource_reference) = { ... } + * + * @return The version. + */ + java.lang.String getVersion(); + /** + * + * + *
+       * The name of the flow
+       * [Version][google.cloud.dialogflow.cx.v3beta1.Version]. Format:
+       * `projects/<Project Number>/locations/<Location ID>/agents/<Agent
+       * ID>/flows/<Flow ID>/versions/<Version ID>`.
+       * 
+ * + * string version = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for version. + */ + com.google.protobuf.ByteString getVersionBytes(); + + /** + * + * + *
+       * The metrics and corresponding confidence intervals in the inference
+       * result.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric metrics = 2; + * + */ + java.util.List + getMetricsList(); + /** + * + * + *
+       * The metrics and corresponding confidence intervals in the inference
+       * result.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric metrics = 2; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric getMetrics(int index); + /** + * + * + *
+       * The metrics and corresponding confidence intervals in the inference
+       * result.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric metrics = 2; + * + */ + int getMetricsCount(); + /** + * + * + *
+       * The metrics and corresponding confidence intervals in the inference
+       * result.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric metrics = 2; + * + */ + java.util.List< + ? extends com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricOrBuilder> + getMetricsOrBuilderList(); + /** + * + * + *
+       * The metrics and corresponding confidence intervals in the inference
+       * result.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric metrics = 2; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricOrBuilder getMetricsOrBuilder( + int index); + + /** + * + * + *
+       * Number of sessions that were allocated to this version.
+       * 
+ * + * int32 session_count = 3; + * + * @return The sessionCount. + */ + int getSessionCount(); + } + /** + * + * + *
+     * Version variant and associated metrics.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics} + */ + public static final class VersionMetrics extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics) + VersionMetricsOrBuilder { + private static final long serialVersionUID = 0L; + // Use VersionMetrics.newBuilder() to construct. + private VersionMetrics(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VersionMetrics() { + version_ = ""; + metrics_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VersionMetrics(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private VersionMetrics( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + version_ = s; + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + metrics_ = + new java.util.ArrayList< + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric>(); + mutable_bitField0_ |= 0x00000001; + } + metrics_.add( + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric.parser(), + extensionRegistry)); + break; + } + case 24: + { + sessionCount_ = input.readInt32(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + metrics_ = java.util.Collections.unmodifiableList(metrics_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_VersionMetrics_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_VersionMetrics_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics.class, + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics.Builder + .class); + } + + public static final int VERSION_FIELD_NUMBER = 1; + private volatile java.lang.Object version_; + /** + * + * + *
+       * The name of the flow
+       * [Version][google.cloud.dialogflow.cx.v3beta1.Version]. Format:
+       * `projects/<Project Number>/locations/<Location ID>/agents/<Agent
+       * ID>/flows/<Flow ID>/versions/<Version ID>`.
+       * 
+ * + * string version = 1 [(.google.api.resource_reference) = { ... } + * + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + /** + * + * + *
+       * The name of the flow
+       * [Version][google.cloud.dialogflow.cx.v3beta1.Version]. Format:
+       * `projects/<Project Number>/locations/<Location ID>/agents/<Agent
+       * ID>/flows/<Flow ID>/versions/<Version ID>`.
+       * 
+ * + * string version = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int METRICS_FIELD_NUMBER = 2; + private java.util.List + metrics_; + /** + * + * + *
+       * The metrics and corresponding confidence intervals in the inference
+       * result.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric metrics = 2; + * + */ + @java.lang.Override + public java.util.List + getMetricsList() { + return metrics_; + } + /** + * + * + *
+       * The metrics and corresponding confidence intervals in the inference
+       * result.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric metrics = 2; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricOrBuilder> + getMetricsOrBuilderList() { + return metrics_; + } + /** + * + * + *
+       * The metrics and corresponding confidence intervals in the inference
+       * result.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric metrics = 2; + * + */ + @java.lang.Override + public int getMetricsCount() { + return metrics_.size(); + } + /** + * + * + *
+       * The metrics and corresponding confidence intervals in the inference
+       * result.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric metrics = 2; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric getMetrics(int index) { + return metrics_.get(index); + } + /** + * + * + *
+       * The metrics and corresponding confidence intervals in the inference
+       * result.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric metrics = 2; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricOrBuilder + getMetricsOrBuilder(int index) { + return metrics_.get(index); + } + + public static final int SESSION_COUNT_FIELD_NUMBER = 3; + private int sessionCount_; + /** + * + * + *
+       * Number of sessions that were allocated to this version.
+       * 
+ * + * int32 session_count = 3; + * + * @return The sessionCount. + */ + @java.lang.Override + public int getSessionCount() { + return sessionCount_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, version_); + } + for (int i = 0; i < metrics_.size(); i++) { + output.writeMessage(2, metrics_.get(i)); + } + if (sessionCount_ != 0) { + output.writeInt32(3, sessionCount_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, version_); + } + for (int i = 0; i < metrics_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, metrics_.get(i)); + } + if (sessionCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, sessionCount_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics other = + (com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics) obj; + + if (!getVersion().equals(other.getVersion())) return false; + if (!getMetricsList().equals(other.getMetricsList())) return false; + if (getSessionCount() != other.getSessionCount()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + if (getMetricsCount() > 0) { + hash = (37 * hash) + METRICS_FIELD_NUMBER; + hash = (53 * hash) + getMetricsList().hashCode(); + } + hash = (37 * hash) + SESSION_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getSessionCount(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * Version variant and associated metrics.
+       * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics) + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetricsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_VersionMetrics_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_VersionMetrics_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics.class, + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics.Builder + .class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getMetricsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + version_ = ""; + + if (metricsBuilder_ == null) { + metrics_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + metricsBuilder_.clear(); + } + sessionCount_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_VersionMetrics_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics build() { + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics + buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics result = + new com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics(this); + int from_bitField0_ = bitField0_; + result.version_ = version_; + if (metricsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + metrics_ = java.util.Collections.unmodifiableList(metrics_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.metrics_ = metrics_; + } else { + result.metrics_ = metricsBuilder_.build(); + } + result.sessionCount_ = sessionCount_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics + .getDefaultInstance()) return this; + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + onChanged(); + } + if (metricsBuilder_ == null) { + if (!other.metrics_.isEmpty()) { + if (metrics_.isEmpty()) { + metrics_ = other.metrics_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureMetricsIsMutable(); + metrics_.addAll(other.metrics_); + } + onChanged(); + } + } else { + if (!other.metrics_.isEmpty()) { + if (metricsBuilder_.isEmpty()) { + metricsBuilder_.dispose(); + metricsBuilder_ = null; + metrics_ = other.metrics_; + bitField0_ = (bitField0_ & ~0x00000001); + metricsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getMetricsFieldBuilder() + : null; + } else { + metricsBuilder_.addAllMessages(other.metrics_); + } + } + } + if (other.getSessionCount() != 0) { + setSessionCount(other.getSessionCount()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object version_ = ""; + /** + * + * + *
+         * The name of the flow
+         * [Version][google.cloud.dialogflow.cx.v3beta1.Version]. Format:
+         * `projects/<Project Number>/locations/<Location ID>/agents/<Agent
+         * ID>/flows/<Flow ID>/versions/<Version ID>`.
+         * 
+ * + * string version = 1 [(.google.api.resource_reference) = { ... } + * + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * The name of the flow
+         * [Version][google.cloud.dialogflow.cx.v3beta1.Version]. Format:
+         * `projects/<Project Number>/locations/<Location ID>/agents/<Agent
+         * ID>/flows/<Flow ID>/versions/<Version ID>`.
+         * 
+ * + * string version = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for version. + */ + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * The name of the flow
+         * [Version][google.cloud.dialogflow.cx.v3beta1.Version]. Format:
+         * `projects/<Project Number>/locations/<Location ID>/agents/<Agent
+         * ID>/flows/<Flow ID>/versions/<Version ID>`.
+         * 
+ * + * string version = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + version_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * The name of the flow
+         * [Version][google.cloud.dialogflow.cx.v3beta1.Version]. Format:
+         * `projects/<Project Number>/locations/<Location ID>/agents/<Agent
+         * ID>/flows/<Flow ID>/versions/<Version ID>`.
+         * 
+ * + * string version = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearVersion() { + + version_ = getDefaultInstance().getVersion(); + onChanged(); + return this; + } + /** + * + * + *
+         * The name of the flow
+         * [Version][google.cloud.dialogflow.cx.v3beta1.Version]. Format:
+         * `projects/<Project Number>/locations/<Location ID>/agents/<Agent
+         * ID>/flows/<Flow ID>/versions/<Version ID>`.
+         * 
+ * + * string version = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + version_ = value; + onChanged(); + return this; + } + + private java.util.List + metrics_ = java.util.Collections.emptyList(); + + private void ensureMetricsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + metrics_ = + new java.util.ArrayList< + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric>(metrics_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric, + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricOrBuilder> + metricsBuilder_; + + /** + * + * + *
+         * The metrics and corresponding confidence intervals in the inference
+         * result.
+         * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric metrics = 2; + * + */ + public java.util.List + getMetricsList() { + if (metricsBuilder_ == null) { + return java.util.Collections.unmodifiableList(metrics_); + } else { + return metricsBuilder_.getMessageList(); + } + } + /** + * + * + *
+         * The metrics and corresponding confidence intervals in the inference
+         * result.
+         * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric metrics = 2; + * + */ + public int getMetricsCount() { + if (metricsBuilder_ == null) { + return metrics_.size(); + } else { + return metricsBuilder_.getCount(); + } + } + /** + * + * + *
+         * The metrics and corresponding confidence intervals in the inference
+         * result.
+         * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric metrics = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric getMetrics( + int index) { + if (metricsBuilder_ == null) { + return metrics_.get(index); + } else { + return metricsBuilder_.getMessage(index); + } + } + /** + * + * + *
+         * The metrics and corresponding confidence intervals in the inference
+         * result.
+         * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric metrics = 2; + * + */ + public Builder setMetrics( + int index, com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric value) { + if (metricsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricsIsMutable(); + metrics_.set(index, value); + onChanged(); + } else { + metricsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+         * The metrics and corresponding confidence intervals in the inference
+         * result.
+         * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric metrics = 2; + * + */ + public Builder setMetrics( + int index, + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric.Builder + builderForValue) { + if (metricsBuilder_ == null) { + ensureMetricsIsMutable(); + metrics_.set(index, builderForValue.build()); + onChanged(); + } else { + metricsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * The metrics and corresponding confidence intervals in the inference
+         * result.
+         * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric metrics = 2; + * + */ + public Builder addMetrics( + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric value) { + if (metricsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricsIsMutable(); + metrics_.add(value); + onChanged(); + } else { + metricsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+         * The metrics and corresponding confidence intervals in the inference
+         * result.
+         * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric metrics = 2; + * + */ + public Builder addMetrics( + int index, com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric value) { + if (metricsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricsIsMutable(); + metrics_.add(index, value); + onChanged(); + } else { + metricsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+         * The metrics and corresponding confidence intervals in the inference
+         * result.
+         * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric metrics = 2; + * + */ + public Builder addMetrics( + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric.Builder + builderForValue) { + if (metricsBuilder_ == null) { + ensureMetricsIsMutable(); + metrics_.add(builderForValue.build()); + onChanged(); + } else { + metricsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * The metrics and corresponding confidence intervals in the inference
+         * result.
+         * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric metrics = 2; + * + */ + public Builder addMetrics( + int index, + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric.Builder + builderForValue) { + if (metricsBuilder_ == null) { + ensureMetricsIsMutable(); + metrics_.add(index, builderForValue.build()); + onChanged(); + } else { + metricsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * The metrics and corresponding confidence intervals in the inference
+         * result.
+         * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric metrics = 2; + * + */ + public Builder addAllMetrics( + java.lang.Iterable< + ? extends com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric> + values) { + if (metricsBuilder_ == null) { + ensureMetricsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, metrics_); + onChanged(); + } else { + metricsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+         * The metrics and corresponding confidence intervals in the inference
+         * result.
+         * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric metrics = 2; + * + */ + public Builder clearMetrics() { + if (metricsBuilder_ == null) { + metrics_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + metricsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+         * The metrics and corresponding confidence intervals in the inference
+         * result.
+         * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric metrics = 2; + * + */ + public Builder removeMetrics(int index) { + if (metricsBuilder_ == null) { + ensureMetricsIsMutable(); + metrics_.remove(index); + onChanged(); + } else { + metricsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+         * The metrics and corresponding confidence intervals in the inference
+         * result.
+         * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric metrics = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric.Builder + getMetricsBuilder(int index) { + return getMetricsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+         * The metrics and corresponding confidence intervals in the inference
+         * result.
+         * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric metrics = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricOrBuilder + getMetricsOrBuilder(int index) { + if (metricsBuilder_ == null) { + return metrics_.get(index); + } else { + return metricsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+         * The metrics and corresponding confidence intervals in the inference
+         * result.
+         * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric metrics = 2; + * + */ + public java.util.List< + ? extends com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricOrBuilder> + getMetricsOrBuilderList() { + if (metricsBuilder_ != null) { + return metricsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(metrics_); + } + } + /** + * + * + *
+         * The metrics and corresponding confidence intervals in the inference
+         * result.
+         * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric metrics = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric.Builder + addMetricsBuilder() { + return getMetricsFieldBuilder() + .addBuilder( + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric + .getDefaultInstance()); + } + /** + * + * + *
+         * The metrics and corresponding confidence intervals in the inference
+         * result.
+         * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric metrics = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric.Builder + addMetricsBuilder(int index) { + return getMetricsFieldBuilder() + .addBuilder( + index, + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric + .getDefaultInstance()); + } + /** + * + * + *
+         * The metrics and corresponding confidence intervals in the inference
+         * result.
+         * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric metrics = 2; + * + */ + public java.util.List< + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric.Builder> + getMetricsBuilderList() { + return getMetricsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric, + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricOrBuilder> + getMetricsFieldBuilder() { + if (metricsBuilder_ == null) { + metricsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric, + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricOrBuilder>( + metrics_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + metrics_ = null; + } + return metricsBuilder_; + } + + private int sessionCount_; + /** + * + * + *
+         * Number of sessions that were allocated to this version.
+         * 
+ * + * int32 session_count = 3; + * + * @return The sessionCount. + */ + @java.lang.Override + public int getSessionCount() { + return sessionCount_; + } + /** + * + * + *
+         * Number of sessions that were allocated to this version.
+         * 
+ * + * int32 session_count = 3; + * + * @param value The sessionCount to set. + * @return This builder for chaining. + */ + public Builder setSessionCount(int value) { + + sessionCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Number of sessions that were allocated to this version.
+         * 
+ * + * int32 session_count = 3; + * + * @return This builder for chaining. + */ + public Builder clearSessionCount() { + + sessionCount_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics) + private static final com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VersionMetrics parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new VersionMetrics(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int VERSION_METRICS_FIELD_NUMBER = 1; + private java.util.List + versionMetrics_; + /** + * + * + *
+     * Version variants and metrics.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics version_metrics = 1; + * + */ + @java.lang.Override + public java.util.List + getVersionMetricsList() { + return versionMetrics_; + } + /** + * + * + *
+     * Version variants and metrics.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics version_metrics = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetricsOrBuilder> + getVersionMetricsOrBuilderList() { + return versionMetrics_; + } + /** + * + * + *
+     * Version variants and metrics.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics version_metrics = 1; + * + */ + @java.lang.Override + public int getVersionMetricsCount() { + return versionMetrics_.size(); + } + /** + * + * + *
+     * Version variants and metrics.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics version_metrics = 1; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics + getVersionMetrics(int index) { + return versionMetrics_.get(index); + } + /** + * + * + *
+     * Version variants and metrics.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics version_metrics = 1; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetricsOrBuilder + getVersionMetricsOrBuilder(int index) { + return versionMetrics_.get(index); + } + + public static final int LAST_UPDATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp lastUpdateTime_; + /** + * + * + *
+     * The last time the experiment's stats data was updated. Will have default
+     * value if stats have never been computed for this experiment.
+     * 
+ * + * .google.protobuf.Timestamp last_update_time = 2; + * + * @return Whether the lastUpdateTime field is set. + */ + @java.lang.Override + public boolean hasLastUpdateTime() { + return lastUpdateTime_ != null; + } + /** + * + * + *
+     * The last time the experiment's stats data was updated. Will have default
+     * value if stats have never been computed for this experiment.
+     * 
+ * + * .google.protobuf.Timestamp last_update_time = 2; + * + * @return The lastUpdateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getLastUpdateTime() { + return lastUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastUpdateTime_; + } + /** + * + * + *
+     * The last time the experiment's stats data was updated. Will have default
+     * value if stats have never been computed for this experiment.
+     * 
+ * + * .google.protobuf.Timestamp last_update_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getLastUpdateTimeOrBuilder() { + return getLastUpdateTime(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < versionMetrics_.size(); i++) { + output.writeMessage(1, versionMetrics_.get(i)); + } + if (lastUpdateTime_ != null) { + output.writeMessage(2, getLastUpdateTime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < versionMetrics_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, versionMetrics_.get(i)); + } + if (lastUpdateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getLastUpdateTime()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result other = + (com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result) obj; + + if (!getVersionMetricsList().equals(other.getVersionMetricsList())) return false; + if (hasLastUpdateTime() != other.hasLastUpdateTime()) return false; + if (hasLastUpdateTime()) { + if (!getLastUpdateTime().equals(other.getLastUpdateTime())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getVersionMetricsCount() > 0) { + hash = (37 * hash) + VERSION_METRICS_FIELD_NUMBER; + hash = (53 * hash) + getVersionMetricsList().hashCode(); + } + if (hasLastUpdateTime()) { + hash = (37 * hash) + LAST_UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getLastUpdateTime().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * The inference result which includes an objective metric to optimize and the
+     * confidence interval.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Experiment.Result} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.Experiment.Result) + com.google.cloud.dialogflow.cx.v3beta1.Experiment.ResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.class, + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getVersionMetricsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (versionMetricsBuilder_ == null) { + versionMetrics_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + versionMetricsBuilder_.clear(); + } + if (lastUpdateTimeBuilder_ == null) { + lastUpdateTime_ = null; + } else { + lastUpdateTime_ = null; + lastUpdateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result build() { + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result result = + new com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result(this); + int from_bitField0_ = bitField0_; + if (versionMetricsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + versionMetrics_ = java.util.Collections.unmodifiableList(versionMetrics_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.versionMetrics_ = versionMetrics_; + } else { + result.versionMetrics_ = versionMetricsBuilder_.build(); + } + if (lastUpdateTimeBuilder_ == null) { + result.lastUpdateTime_ = lastUpdateTime_; + } else { + result.lastUpdateTime_ = lastUpdateTimeBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.getDefaultInstance()) + return this; + if (versionMetricsBuilder_ == null) { + if (!other.versionMetrics_.isEmpty()) { + if (versionMetrics_.isEmpty()) { + versionMetrics_ = other.versionMetrics_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureVersionMetricsIsMutable(); + versionMetrics_.addAll(other.versionMetrics_); + } + onChanged(); + } + } else { + if (!other.versionMetrics_.isEmpty()) { + if (versionMetricsBuilder_.isEmpty()) { + versionMetricsBuilder_.dispose(); + versionMetricsBuilder_ = null; + versionMetrics_ = other.versionMetrics_; + bitField0_ = (bitField0_ & ~0x00000001); + versionMetricsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getVersionMetricsFieldBuilder() + : null; + } else { + versionMetricsBuilder_.addAllMessages(other.versionMetrics_); + } + } + } + if (other.hasLastUpdateTime()) { + mergeLastUpdateTime(other.getLastUpdateTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List< + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics> + versionMetrics_ = java.util.Collections.emptyList(); + + private void ensureVersionMetricsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + versionMetrics_ = + new java.util.ArrayList< + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics>( + versionMetrics_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics, + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetricsOrBuilder> + versionMetricsBuilder_; + + /** + * + * + *
+       * Version variants and metrics.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics version_metrics = 1; + * + */ + public java.util.List + getVersionMetricsList() { + if (versionMetricsBuilder_ == null) { + return java.util.Collections.unmodifiableList(versionMetrics_); + } else { + return versionMetricsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Version variants and metrics.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics version_metrics = 1; + * + */ + public int getVersionMetricsCount() { + if (versionMetricsBuilder_ == null) { + return versionMetrics_.size(); + } else { + return versionMetricsBuilder_.getCount(); + } + } + /** + * + * + *
+       * Version variants and metrics.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics version_metrics = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics + getVersionMetrics(int index) { + if (versionMetricsBuilder_ == null) { + return versionMetrics_.get(index); + } else { + return versionMetricsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Version variants and metrics.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics version_metrics = 1; + * + */ + public Builder setVersionMetrics( + int index, + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics value) { + if (versionMetricsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVersionMetricsIsMutable(); + versionMetrics_.set(index, value); + onChanged(); + } else { + versionMetricsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Version variants and metrics.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics version_metrics = 1; + * + */ + public Builder setVersionMetrics( + int index, + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics.Builder + builderForValue) { + if (versionMetricsBuilder_ == null) { + ensureVersionMetricsIsMutable(); + versionMetrics_.set(index, builderForValue.build()); + onChanged(); + } else { + versionMetricsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Version variants and metrics.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics version_metrics = 1; + * + */ + public Builder addVersionMetrics( + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics value) { + if (versionMetricsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVersionMetricsIsMutable(); + versionMetrics_.add(value); + onChanged(); + } else { + versionMetricsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Version variants and metrics.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics version_metrics = 1; + * + */ + public Builder addVersionMetrics( + int index, + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics value) { + if (versionMetricsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVersionMetricsIsMutable(); + versionMetrics_.add(index, value); + onChanged(); + } else { + versionMetricsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Version variants and metrics.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics version_metrics = 1; + * + */ + public Builder addVersionMetrics( + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics.Builder + builderForValue) { + if (versionMetricsBuilder_ == null) { + ensureVersionMetricsIsMutable(); + versionMetrics_.add(builderForValue.build()); + onChanged(); + } else { + versionMetricsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Version variants and metrics.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics version_metrics = 1; + * + */ + public Builder addVersionMetrics( + int index, + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics.Builder + builderForValue) { + if (versionMetricsBuilder_ == null) { + ensureVersionMetricsIsMutable(); + versionMetrics_.add(index, builderForValue.build()); + onChanged(); + } else { + versionMetricsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Version variants and metrics.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics version_metrics = 1; + * + */ + public Builder addAllVersionMetrics( + java.lang.Iterable< + ? extends com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics> + values) { + if (versionMetricsBuilder_ == null) { + ensureVersionMetricsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, versionMetrics_); + onChanged(); + } else { + versionMetricsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Version variants and metrics.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics version_metrics = 1; + * + */ + public Builder clearVersionMetrics() { + if (versionMetricsBuilder_ == null) { + versionMetrics_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + versionMetricsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Version variants and metrics.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics version_metrics = 1; + * + */ + public Builder removeVersionMetrics(int index) { + if (versionMetricsBuilder_ == null) { + ensureVersionMetricsIsMutable(); + versionMetrics_.remove(index); + onChanged(); + } else { + versionMetricsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Version variants and metrics.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics version_metrics = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics.Builder + getVersionMetricsBuilder(int index) { + return getVersionMetricsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Version variants and metrics.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics version_metrics = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetricsOrBuilder + getVersionMetricsOrBuilder(int index) { + if (versionMetricsBuilder_ == null) { + return versionMetrics_.get(index); + } else { + return versionMetricsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Version variants and metrics.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics version_metrics = 1; + * + */ + public java.util.List< + ? extends + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetricsOrBuilder> + getVersionMetricsOrBuilderList() { + if (versionMetricsBuilder_ != null) { + return versionMetricsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(versionMetrics_); + } + } + /** + * + * + *
+       * Version variants and metrics.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics version_metrics = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics.Builder + addVersionMetricsBuilder() { + return getVersionMetricsFieldBuilder() + .addBuilder( + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics + .getDefaultInstance()); + } + /** + * + * + *
+       * Version variants and metrics.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics version_metrics = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics.Builder + addVersionMetricsBuilder(int index) { + return getVersionMetricsFieldBuilder() + .addBuilder( + index, + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics + .getDefaultInstance()); + } + /** + * + * + *
+       * Version variants and metrics.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics version_metrics = 1; + * + */ + public java.util.List< + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics.Builder> + getVersionMetricsBuilderList() { + return getVersionMetricsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics, + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetricsOrBuilder> + getVersionMetricsFieldBuilder() { + if (versionMetricsBuilder_ == null) { + versionMetricsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics, + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetricsOrBuilder>( + versionMetrics_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + versionMetrics_ = null; + } + return versionMetricsBuilder_; + } + + private com.google.protobuf.Timestamp lastUpdateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + lastUpdateTimeBuilder_; + /** + * + * + *
+       * The last time the experiment's stats data was updated. Will have default
+       * value if stats have never been computed for this experiment.
+       * 
+ * + * .google.protobuf.Timestamp last_update_time = 2; + * + * @return Whether the lastUpdateTime field is set. + */ + public boolean hasLastUpdateTime() { + return lastUpdateTimeBuilder_ != null || lastUpdateTime_ != null; + } + /** + * + * + *
+       * The last time the experiment's stats data was updated. Will have default
+       * value if stats have never been computed for this experiment.
+       * 
+ * + * .google.protobuf.Timestamp last_update_time = 2; + * + * @return The lastUpdateTime. + */ + public com.google.protobuf.Timestamp getLastUpdateTime() { + if (lastUpdateTimeBuilder_ == null) { + return lastUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastUpdateTime_; + } else { + return lastUpdateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The last time the experiment's stats data was updated. Will have default
+       * value if stats have never been computed for this experiment.
+       * 
+ * + * .google.protobuf.Timestamp last_update_time = 2; + */ + public Builder setLastUpdateTime(com.google.protobuf.Timestamp value) { + if (lastUpdateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lastUpdateTime_ = value; + onChanged(); + } else { + lastUpdateTimeBuilder_.setMessage(value); + } + + 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.
+       * 
+ * + * .google.protobuf.Timestamp last_update_time = 2; + */ + public Builder setLastUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (lastUpdateTimeBuilder_ == null) { + lastUpdateTime_ = builderForValue.build(); + onChanged(); + } else { + lastUpdateTimeBuilder_.setMessage(builderForValue.build()); + } + + 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.
+       * 
+ * + * .google.protobuf.Timestamp last_update_time = 2; + */ + public Builder mergeLastUpdateTime(com.google.protobuf.Timestamp value) { + if (lastUpdateTimeBuilder_ == null) { + if (lastUpdateTime_ != null) { + lastUpdateTime_ = + com.google.protobuf.Timestamp.newBuilder(lastUpdateTime_) + .mergeFrom(value) + .buildPartial(); + } else { + lastUpdateTime_ = value; + } + onChanged(); + } else { + lastUpdateTimeBuilder_.mergeFrom(value); + } + + 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.
+       * 
+ * + * .google.protobuf.Timestamp last_update_time = 2; + */ + public Builder clearLastUpdateTime() { + if (lastUpdateTimeBuilder_ == null) { + lastUpdateTime_ = null; + onChanged(); + } else { + lastUpdateTime_ = null; + lastUpdateTimeBuilder_ = null; + } + + 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.
+       * 
+ * + * .google.protobuf.Timestamp last_update_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getLastUpdateTimeBuilder() { + + onChanged(); + return getLastUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The last time the experiment's stats data was updated. Will have default
+       * value if stats have never been computed for this experiment.
+       * 
+ * + * .google.protobuf.Timestamp last_update_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getLastUpdateTimeOrBuilder() { + if (lastUpdateTimeBuilder_ != null) { + return lastUpdateTimeBuilder_.getMessageOrBuilder(); + } else { + return lastUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastUpdateTime_; + } + } + /** + * + * + *
+       * The last time the experiment's stats data was updated. Will have default
+       * value if stats have never been computed for this experiment.
+       * 
+ * + * .google.protobuf.Timestamp last_update_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getLastUpdateTimeFieldBuilder() { + if (lastUpdateTimeBuilder_ == null) { + lastUpdateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getLastUpdateTime(), getParentForChildren(), isClean()); + lastUpdateTime_ = null; + } + return lastUpdateTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.Experiment.Result) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.Experiment.Result) + private static final com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Result parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Result(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * The name of the experiment.
+   * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>/experiments/<Experiment ID>..
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the experiment.
+   * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>/experiments/<Experiment ID>..
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Required. The human-readable name of the experiment (unique in an
+   * environment). Limit of 64 characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The human-readable name of the experiment (unique in an
+   * environment). Limit of 64 characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + private volatile java.lang.Object description_; + /** + * + * + *
+   * The human-readable description of the experiment.
+   * 
+ * + * string description = 3; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * The human-readable description of the experiment.
+   * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 4; + private int state_; + /** + * + * + *
+   * The current state of the experiment.
+   * Transition triggered by Expriments.StartExperiment: PENDING->RUNNING.
+   * Transition triggered by Expriments.CancelExperiment: PENDING->CANCELLED or
+   * RUNNING->CANCELLED.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.State state = 4; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * The current state of the experiment.
+   * Transition triggered by Expriments.StartExperiment: PENDING->RUNNING.
+   * Transition triggered by Expriments.CancelExperiment: PENDING->CANCELLED or
+   * RUNNING->CANCELLED.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.State state = 4; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.dialogflow.cx.v3beta1.Experiment.State result = + com.google.cloud.dialogflow.cx.v3beta1.Experiment.State.valueOf(state_); + return result == null + ? com.google.cloud.dialogflow.cx.v3beta1.Experiment.State.UNRECOGNIZED + : result; + } + + public static final int DEFINITION_FIELD_NUMBER = 5; + private com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition definition_; + /** + * + * + *
+   * The definition of the experiment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Definition definition = 5; + * + * @return Whether the definition field is set. + */ + @java.lang.Override + public boolean hasDefinition() { + return definition_ != null; + } + /** + * + * + *
+   * The definition of the experiment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Definition definition = 5; + * + * @return The definition. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition getDefinition() { + return definition_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition.getDefaultInstance() + : definition_; + } + /** + * + * + *
+   * The definition of the experiment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Definition definition = 5; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.DefinitionOrBuilder + getDefinitionOrBuilder() { + return getDefinition(); + } + + public static final int RESULT_FIELD_NUMBER = 6; + private com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result result_; + /** + * + * + *
+   * Inference result of the experiment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result result = 6; + * + * @return Whether the result field is set. + */ + @java.lang.Override + public boolean hasResult() { + return result_ != null; + } + /** + * + * + *
+   * Inference result of the experiment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result result = 6; + * + * @return The result. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result getResult() { + return result_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.getDefaultInstance() + : result_; + } + /** + * + * + *
+   * Inference result of the experiment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result result = 6; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.ResultOrBuilder getResultOrBuilder() { + return getResult(); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Creation time of this experiment.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7; + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Creation time of this experiment.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7; + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Creation time of this experiment.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int START_TIME_FIELD_NUMBER = 8; + private com.google.protobuf.Timestamp startTime_; + /** + * + * + *
+   * Start time of this experiment.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 8; + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return startTime_ != null; + } + /** + * + * + *
+   * Start time of this experiment.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 8; + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + * + * + *
+   * Start time of this experiment.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 8; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return getStartTime(); + } + + public static final int END_TIME_FIELD_NUMBER = 9; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+   * End time of this experiment.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 9; + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + * + * + *
+   * End time of this experiment.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 9; + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
+   * End time of this experiment.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 9; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return getEndTime(); + } + + public static final int LAST_UPDATE_TIME_FIELD_NUMBER = 10; + private com.google.protobuf.Timestamp lastUpdateTime_; + /** + * + * + *
+   * Last update time of this experiment.
+   * 
+ * + * .google.protobuf.Timestamp last_update_time = 10; + * + * @return Whether the lastUpdateTime field is set. + */ + @java.lang.Override + public boolean hasLastUpdateTime() { + return lastUpdateTime_ != null; + } + /** + * + * + *
+   * Last update time of this experiment.
+   * 
+ * + * .google.protobuf.Timestamp last_update_time = 10; + * + * @return The lastUpdateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getLastUpdateTime() { + return lastUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastUpdateTime_; + } + /** + * + * + *
+   * Last update time of this experiment.
+   * 
+ * + * .google.protobuf.Timestamp last_update_time = 10; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getLastUpdateTimeOrBuilder() { + return getLastUpdateTime(); + } + + public static final int EXPERIMENT_LENGTH_FIELD_NUMBER = 11; + private com.google.protobuf.Duration experimentLength_; + /** + * + * + *
+   * Maximum number of days to run the experiment.
+   * 
+ * + * .google.protobuf.Duration experiment_length = 11; + * + * @return Whether the experimentLength field is set. + */ + @java.lang.Override + public boolean hasExperimentLength() { + return experimentLength_ != null; + } + /** + * + * + *
+   * Maximum number of days to run the experiment.
+   * 
+ * + * .google.protobuf.Duration experiment_length = 11; + * + * @return The experimentLength. + */ + @java.lang.Override + public com.google.protobuf.Duration getExperimentLength() { + return experimentLength_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : experimentLength_; + } + /** + * + * + *
+   * Maximum number of days to run the experiment.
+   * 
+ * + * .google.protobuf.Duration experiment_length = 11; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getExperimentLengthOrBuilder() { + return getExperimentLength(); + } + + public static final int VARIANTS_HISTORY_FIELD_NUMBER = 12; + private java.util.List variantsHistory_; + /** + * + * + *
+   * The history of updates to the experiment variants.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.VariantsHistory variants_history = 12; + * + */ + @java.lang.Override + public java.util.List + getVariantsHistoryList() { + return variantsHistory_; + } + /** + * + * + *
+   * The history of updates to the experiment variants.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.VariantsHistory variants_history = 12; + * + */ + @java.lang.Override + public java.util.List + getVariantsHistoryOrBuilderList() { + return variantsHistory_; + } + /** + * + * + *
+   * The history of updates to the experiment variants.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.VariantsHistory variants_history = 12; + * + */ + @java.lang.Override + public int getVariantsHistoryCount() { + return variantsHistory_.size(); + } + /** + * + * + *
+   * The history of updates to the experiment variants.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.VariantsHistory variants_history = 12; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory getVariantsHistory(int index) { + return variantsHistory_.get(index); + } + /** + * + * + *
+   * The history of updates to the experiment variants.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.VariantsHistory variants_history = 12; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.VariantsHistoryOrBuilder + getVariantsHistoryOrBuilder(int index) { + return variantsHistory_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + if (state_ + != com.google.cloud.dialogflow.cx.v3beta1.Experiment.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(4, state_); + } + if (definition_ != null) { + output.writeMessage(5, getDefinition()); + } + if (result_ != null) { + output.writeMessage(6, getResult()); + } + if (createTime_ != null) { + output.writeMessage(7, getCreateTime()); + } + if (startTime_ != null) { + output.writeMessage(8, getStartTime()); + } + if (endTime_ != null) { + output.writeMessage(9, getEndTime()); + } + if (lastUpdateTime_ != null) { + output.writeMessage(10, getLastUpdateTime()); + } + if (experimentLength_ != null) { + output.writeMessage(11, getExperimentLength()); + } + for (int i = 0; i < variantsHistory_.size(); i++) { + output.writeMessage(12, variantsHistory_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + if (state_ + != com.google.cloud.dialogflow.cx.v3beta1.Experiment.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, state_); + } + if (definition_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getDefinition()); + } + if (result_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getResult()); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getCreateTime()); + } + if (startTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getStartTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getEndTime()); + } + if (lastUpdateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getLastUpdateTime()); + } + if (experimentLength_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getExperimentLength()); + } + for (int i = 0; i < variantsHistory_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, variantsHistory_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.Experiment)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.Experiment other = + (com.google.cloud.dialogflow.cx.v3beta1.Experiment) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (state_ != other.state_) return false; + if (hasDefinition() != other.hasDefinition()) return false; + if (hasDefinition()) { + if (!getDefinition().equals(other.getDefinition())) return false; + } + if (hasResult() != other.hasResult()) return false; + if (hasResult()) { + if (!getResult().equals(other.getResult())) return false; + } + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (hasLastUpdateTime() != other.hasLastUpdateTime()) return false; + if (hasLastUpdateTime()) { + if (!getLastUpdateTime().equals(other.getLastUpdateTime())) return false; + } + if (hasExperimentLength() != other.hasExperimentLength()) return false; + if (hasExperimentLength()) { + if (!getExperimentLength().equals(other.getExperimentLength())) return false; + } + if (!getVariantsHistoryList().equals(other.getVariantsHistoryList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (hasDefinition()) { + hash = (37 * hash) + DEFINITION_FIELD_NUMBER; + hash = (53 * hash) + getDefinition().hashCode(); + } + if (hasResult()) { + hash = (37 * hash) + RESULT_FIELD_NUMBER; + hash = (53 * hash) + getResult().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + if (hasLastUpdateTime()) { + hash = (37 * hash) + LAST_UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getLastUpdateTime().hashCode(); + } + if (hasExperimentLength()) { + hash = (37 * hash) + EXPERIMENT_LENGTH_FIELD_NUMBER; + hash = (53 * hash) + getExperimentLength().hashCode(); + } + if (getVariantsHistoryCount() > 0) { + hash = (37 * hash) + VARIANTS_HISTORY_FIELD_NUMBER; + hash = (53 * hash) + getVariantsHistoryList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.dialogflow.cx.v3beta1.Experiment prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Represents an experiment in an environment.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Experiment} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.Experiment) + com.google.cloud.dialogflow.cx.v3beta1.ExperimentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.Experiment.class, + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.Experiment.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getVariantsHistoryFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + displayName_ = ""; + + description_ = ""; + + state_ = 0; + + if (definitionBuilder_ == null) { + definition_ = null; + } else { + definition_ = null; + definitionBuilder_ = null; + } + if (resultBuilder_ == null) { + result_ = null; + } else { + result_ = null; + resultBuilder_ = null; + } + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (startTimeBuilder_ == null) { + startTime_ = null; + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + if (endTimeBuilder_ == null) { + endTime_ = null; + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + if (lastUpdateTimeBuilder_ == null) { + lastUpdateTime_ = null; + } else { + lastUpdateTime_ = null; + lastUpdateTimeBuilder_ = null; + } + if (experimentLengthBuilder_ == null) { + experimentLength_ = null; + } else { + experimentLength_ = null; + experimentLengthBuilder_ = null; + } + if (variantsHistoryBuilder_ == null) { + variantsHistory_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + variantsHistoryBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Experiment getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.Experiment.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Experiment build() { + com.google.cloud.dialogflow.cx.v3beta1.Experiment result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Experiment buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.Experiment result = + new com.google.cloud.dialogflow.cx.v3beta1.Experiment(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.displayName_ = displayName_; + result.description_ = description_; + result.state_ = state_; + if (definitionBuilder_ == null) { + result.definition_ = definition_; + } else { + result.definition_ = definitionBuilder_.build(); + } + if (resultBuilder_ == null) { + result.result_ = result_; + } else { + result.result_ = resultBuilder_.build(); + } + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (startTimeBuilder_ == null) { + result.startTime_ = startTime_; + } else { + result.startTime_ = startTimeBuilder_.build(); + } + if (endTimeBuilder_ == null) { + result.endTime_ = endTime_; + } else { + result.endTime_ = endTimeBuilder_.build(); + } + if (lastUpdateTimeBuilder_ == null) { + result.lastUpdateTime_ = lastUpdateTime_; + } else { + result.lastUpdateTime_ = lastUpdateTimeBuilder_.build(); + } + if (experimentLengthBuilder_ == null) { + result.experimentLength_ = experimentLength_; + } else { + result.experimentLength_ = experimentLengthBuilder_.build(); + } + if (variantsHistoryBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + variantsHistory_ = java.util.Collections.unmodifiableList(variantsHistory_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.variantsHistory_ = variantsHistory_; + } else { + result.variantsHistory_ = variantsHistoryBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.Experiment) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.Experiment) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.Experiment other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.Experiment.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.hasDefinition()) { + mergeDefinition(other.getDefinition()); + } + if (other.hasResult()) { + mergeResult(other.getResult()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (other.hasLastUpdateTime()) { + mergeLastUpdateTime(other.getLastUpdateTime()); + } + if (other.hasExperimentLength()) { + mergeExperimentLength(other.getExperimentLength()); + } + if (variantsHistoryBuilder_ == null) { + if (!other.variantsHistory_.isEmpty()) { + if (variantsHistory_.isEmpty()) { + variantsHistory_ = other.variantsHistory_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureVariantsHistoryIsMutable(); + variantsHistory_.addAll(other.variantsHistory_); + } + onChanged(); + } + } else { + if (!other.variantsHistory_.isEmpty()) { + if (variantsHistoryBuilder_.isEmpty()) { + variantsHistoryBuilder_.dispose(); + variantsHistoryBuilder_ = null; + variantsHistory_ = other.variantsHistory_; + bitField0_ = (bitField0_ & ~0x00000001); + variantsHistoryBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getVariantsHistoryFieldBuilder() + : null; + } else { + variantsHistoryBuilder_.addAllMessages(other.variantsHistory_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.Experiment parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.Experiment) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The name of the experiment.
+     * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/experiments/<Experiment ID>..
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the experiment.
+     * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/experiments/<Experiment ID>..
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the experiment.
+     * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/experiments/<Experiment ID>..
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the experiment.
+     * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/experiments/<Experiment ID>..
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the experiment.
+     * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/experiments/<Experiment ID>..
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Required. The human-readable name of the experiment (unique in an
+     * environment). Limit of 64 characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The human-readable name of the experiment (unique in an
+     * environment). Limit of 64 characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The human-readable name of the experiment (unique in an
+     * environment). Limit of 64 characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The human-readable name of the experiment (unique in an
+     * environment). Limit of 64 characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The human-readable name of the experiment (unique in an
+     * environment). Limit of 64 characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * The human-readable description of the experiment.
+     * 
+ * + * string description = 3; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The human-readable description of the experiment.
+     * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The human-readable description of the experiment.
+     * 
+ * + * string description = 3; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The human-readable description of the experiment.
+     * 
+ * + * string description = 3; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+     * The human-readable description of the experiment.
+     * 
+ * + * string description = 3; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private int state_ = 0; + /** + * + * + *
+     * The current state of the experiment.
+     * Transition triggered by Expriments.StartExperiment: PENDING->RUNNING.
+     * Transition triggered by Expriments.CancelExperiment: PENDING->CANCELLED or
+     * RUNNING->CANCELLED.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.State state = 4; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * The current state of the experiment.
+     * Transition triggered by Expriments.StartExperiment: PENDING->RUNNING.
+     * Transition triggered by Expriments.CancelExperiment: PENDING->CANCELLED or
+     * RUNNING->CANCELLED.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.State state = 4; + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + + state_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The current state of the experiment.
+     * Transition triggered by Expriments.StartExperiment: PENDING->RUNNING.
+     * Transition triggered by Expriments.CancelExperiment: PENDING->CANCELLED or
+     * RUNNING->CANCELLED.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.State state = 4; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.dialogflow.cx.v3beta1.Experiment.State result = + com.google.cloud.dialogflow.cx.v3beta1.Experiment.State.valueOf(state_); + return result == null + ? com.google.cloud.dialogflow.cx.v3beta1.Experiment.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The current state of the experiment.
+     * Transition triggered by Expriments.StartExperiment: PENDING->RUNNING.
+     * Transition triggered by Expriments.CancelExperiment: PENDING->CANCELLED or
+     * RUNNING->CANCELLED.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.State state = 4; + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.dialogflow.cx.v3beta1.Experiment.State value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The current state of the experiment.
+     * Transition triggered by Expriments.StartExperiment: PENDING->RUNNING.
+     * Transition triggered by Expriments.CancelExperiment: PENDING->CANCELLED or
+     * RUNNING->CANCELLED.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.State state = 4; + * + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition definition_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition, + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Experiment.DefinitionOrBuilder> + definitionBuilder_; + /** + * + * + *
+     * The definition of the experiment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Definition definition = 5; + * + * @return Whether the definition field is set. + */ + public boolean hasDefinition() { + return definitionBuilder_ != null || definition_ != null; + } + /** + * + * + *
+     * The definition of the experiment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Definition definition = 5; + * + * @return The definition. + */ + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition getDefinition() { + if (definitionBuilder_ == null) { + return definition_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition.getDefaultInstance() + : definition_; + } else { + return definitionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The definition of the experiment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Definition definition = 5; + */ + public Builder setDefinition( + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition value) { + if (definitionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + definition_ = value; + onChanged(); + } else { + definitionBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The definition of the experiment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Definition definition = 5; + */ + public Builder setDefinition( + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition.Builder builderForValue) { + if (definitionBuilder_ == null) { + definition_ = builderForValue.build(); + onChanged(); + } else { + definitionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The definition of the experiment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Definition definition = 5; + */ + public Builder mergeDefinition( + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition value) { + if (definitionBuilder_ == null) { + if (definition_ != null) { + definition_ = + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition.newBuilder(definition_) + .mergeFrom(value) + .buildPartial(); + } else { + definition_ = value; + } + onChanged(); + } else { + definitionBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The definition of the experiment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Definition definition = 5; + */ + public Builder clearDefinition() { + if (definitionBuilder_ == null) { + definition_ = null; + onChanged(); + } else { + definition_ = null; + definitionBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The definition of the experiment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Definition definition = 5; + */ + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition.Builder + getDefinitionBuilder() { + + onChanged(); + return getDefinitionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The definition of the experiment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Definition definition = 5; + */ + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.DefinitionOrBuilder + getDefinitionOrBuilder() { + if (definitionBuilder_ != null) { + return definitionBuilder_.getMessageOrBuilder(); + } else { + return definition_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition.getDefaultInstance() + : definition_; + } + } + /** + * + * + *
+     * The definition of the experiment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Definition definition = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition, + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Experiment.DefinitionOrBuilder> + getDefinitionFieldBuilder() { + if (definitionBuilder_ == null) { + definitionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition, + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Experiment.DefinitionOrBuilder>( + getDefinition(), getParentForChildren(), isClean()); + definition_ = null; + } + return definitionBuilder_; + } + + private com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result result_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result, + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Experiment.ResultOrBuilder> + resultBuilder_; + /** + * + * + *
+     * Inference result of the experiment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result result = 6; + * + * @return Whether the result field is set. + */ + public boolean hasResult() { + return resultBuilder_ != null || result_ != null; + } + /** + * + * + *
+     * Inference result of the experiment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result result = 6; + * + * @return The result. + */ + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result getResult() { + if (resultBuilder_ == null) { + return result_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.getDefaultInstance() + : result_; + } else { + return resultBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Inference result of the experiment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result result = 6; + */ + public Builder setResult(com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result value) { + if (resultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + result_ = value; + onChanged(); + } else { + resultBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Inference result of the experiment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result result = 6; + */ + public Builder setResult( + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Builder builderForValue) { + if (resultBuilder_ == null) { + result_ = builderForValue.build(); + onChanged(); + } else { + resultBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Inference result of the experiment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result result = 6; + */ + public Builder mergeResult(com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result value) { + if (resultBuilder_ == null) { + if (result_ != null) { + result_ = + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.newBuilder(result_) + .mergeFrom(value) + .buildPartial(); + } else { + result_ = value; + } + onChanged(); + } else { + resultBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Inference result of the experiment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result result = 6; + */ + public Builder clearResult() { + if (resultBuilder_ == null) { + result_ = null; + onChanged(); + } else { + result_ = null; + resultBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Inference result of the experiment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result result = 6; + */ + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Builder getResultBuilder() { + + onChanged(); + return getResultFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Inference result of the experiment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result result = 6; + */ + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.ResultOrBuilder getResultOrBuilder() { + if (resultBuilder_ != null) { + return resultBuilder_.getMessageOrBuilder(); + } else { + return result_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.getDefaultInstance() + : result_; + } + } + /** + * + * + *
+     * Inference result of the experiment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result result = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result, + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Experiment.ResultOrBuilder> + getResultFieldBuilder() { + if (resultBuilder_ == null) { + resultBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result, + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Experiment.ResultOrBuilder>( + getResult(), getParentForChildren(), isClean()); + result_ = null; + } + return resultBuilder_; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Creation time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Creation time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Creation time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Creation time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Creation time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Creation time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Creation time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Creation time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Creation time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + /** + * + * + *
+     * Start time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 8; + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return startTimeBuilder_ != null || startTime_ != null; + } + /** + * + * + *
+     * Start time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 8; + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Start time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 8; + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + onChanged(); + } else { + startTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Start time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 8; + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + onChanged(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Start time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 8; + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (startTime_ != null) { + startTime_ = + com.google.protobuf.Timestamp.newBuilder(startTime_).mergeFrom(value).buildPartial(); + } else { + startTime_ = value; + } + onChanged(); + } else { + startTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Start time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 8; + */ + public Builder clearStartTime() { + if (startTimeBuilder_ == null) { + startTime_ = null; + onChanged(); + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Start time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 8; + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Start time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 8; + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + /** + * + * + *
+     * Start time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + /** + * + * + *
+     * End time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 9; + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return endTimeBuilder_ != null || endTime_ != null; + } + /** + * + * + *
+     * End time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 9; + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * End time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 9; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + onChanged(); + } else { + endTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * End time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 9; + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + onChanged(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * End time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 9; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (endTime_ != null) { + endTime_ = + com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial(); + } else { + endTime_ = value; + } + onChanged(); + } else { + endTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * End time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 9; + */ + public Builder clearEndTime() { + if (endTimeBuilder_ == null) { + endTime_ = null; + onChanged(); + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * End time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 9; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * End time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 9; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
+     * End time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private com.google.protobuf.Timestamp lastUpdateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + lastUpdateTimeBuilder_; + /** + * + * + *
+     * Last update time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp last_update_time = 10; + * + * @return Whether the lastUpdateTime field is set. + */ + public boolean hasLastUpdateTime() { + return lastUpdateTimeBuilder_ != null || lastUpdateTime_ != null; + } + /** + * + * + *
+     * Last update time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp last_update_time = 10; + * + * @return The lastUpdateTime. + */ + public com.google.protobuf.Timestamp getLastUpdateTime() { + if (lastUpdateTimeBuilder_ == null) { + return lastUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastUpdateTime_; + } else { + return lastUpdateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Last update time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp last_update_time = 10; + */ + public Builder setLastUpdateTime(com.google.protobuf.Timestamp value) { + if (lastUpdateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lastUpdateTime_ = value; + onChanged(); + } else { + lastUpdateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Last update time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp last_update_time = 10; + */ + public Builder setLastUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (lastUpdateTimeBuilder_ == null) { + lastUpdateTime_ = builderForValue.build(); + onChanged(); + } else { + lastUpdateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Last update time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp last_update_time = 10; + */ + public Builder mergeLastUpdateTime(com.google.protobuf.Timestamp value) { + if (lastUpdateTimeBuilder_ == null) { + if (lastUpdateTime_ != null) { + lastUpdateTime_ = + com.google.protobuf.Timestamp.newBuilder(lastUpdateTime_) + .mergeFrom(value) + .buildPartial(); + } else { + lastUpdateTime_ = value; + } + onChanged(); + } else { + lastUpdateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Last update time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp last_update_time = 10; + */ + public Builder clearLastUpdateTime() { + if (lastUpdateTimeBuilder_ == null) { + lastUpdateTime_ = null; + onChanged(); + } else { + lastUpdateTime_ = null; + lastUpdateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Last update time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp last_update_time = 10; + */ + public com.google.protobuf.Timestamp.Builder getLastUpdateTimeBuilder() { + + onChanged(); + return getLastUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Last update time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp last_update_time = 10; + */ + public com.google.protobuf.TimestampOrBuilder getLastUpdateTimeOrBuilder() { + if (lastUpdateTimeBuilder_ != null) { + return lastUpdateTimeBuilder_.getMessageOrBuilder(); + } else { + return lastUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastUpdateTime_; + } + } + /** + * + * + *
+     * Last update time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp last_update_time = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getLastUpdateTimeFieldBuilder() { + if (lastUpdateTimeBuilder_ == null) { + lastUpdateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getLastUpdateTime(), getParentForChildren(), isClean()); + lastUpdateTime_ = null; + } + return lastUpdateTimeBuilder_; + } + + private com.google.protobuf.Duration experimentLength_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + experimentLengthBuilder_; + /** + * + * + *
+     * Maximum number of days to run the experiment.
+     * 
+ * + * .google.protobuf.Duration experiment_length = 11; + * + * @return Whether the experimentLength field is set. + */ + public boolean hasExperimentLength() { + return experimentLengthBuilder_ != null || experimentLength_ != null; + } + /** + * + * + *
+     * Maximum number of days to run the experiment.
+     * 
+ * + * .google.protobuf.Duration experiment_length = 11; + * + * @return The experimentLength. + */ + public com.google.protobuf.Duration getExperimentLength() { + if (experimentLengthBuilder_ == null) { + return experimentLength_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : experimentLength_; + } else { + return experimentLengthBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Maximum number of days to run the experiment.
+     * 
+ * + * .google.protobuf.Duration experiment_length = 11; + */ + public Builder setExperimentLength(com.google.protobuf.Duration value) { + if (experimentLengthBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + experimentLength_ = value; + onChanged(); + } else { + experimentLengthBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Maximum number of days to run the experiment.
+     * 
+ * + * .google.protobuf.Duration experiment_length = 11; + */ + public Builder setExperimentLength(com.google.protobuf.Duration.Builder builderForValue) { + if (experimentLengthBuilder_ == null) { + experimentLength_ = builderForValue.build(); + onChanged(); + } else { + experimentLengthBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Maximum number of days to run the experiment.
+     * 
+ * + * .google.protobuf.Duration experiment_length = 11; + */ + public Builder mergeExperimentLength(com.google.protobuf.Duration value) { + if (experimentLengthBuilder_ == null) { + if (experimentLength_ != null) { + experimentLength_ = + com.google.protobuf.Duration.newBuilder(experimentLength_) + .mergeFrom(value) + .buildPartial(); + } else { + experimentLength_ = value; + } + onChanged(); + } else { + experimentLengthBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Maximum number of days to run the experiment.
+     * 
+ * + * .google.protobuf.Duration experiment_length = 11; + */ + public Builder clearExperimentLength() { + if (experimentLengthBuilder_ == null) { + experimentLength_ = null; + onChanged(); + } else { + experimentLength_ = null; + experimentLengthBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Maximum number of days to run the experiment.
+     * 
+ * + * .google.protobuf.Duration experiment_length = 11; + */ + public com.google.protobuf.Duration.Builder getExperimentLengthBuilder() { + + onChanged(); + return getExperimentLengthFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Maximum number of days to run the experiment.
+     * 
+ * + * .google.protobuf.Duration experiment_length = 11; + */ + public com.google.protobuf.DurationOrBuilder getExperimentLengthOrBuilder() { + if (experimentLengthBuilder_ != null) { + return experimentLengthBuilder_.getMessageOrBuilder(); + } else { + return experimentLength_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : experimentLength_; + } + } + /** + * + * + *
+     * Maximum number of days to run the experiment.
+     * 
+ * + * .google.protobuf.Duration experiment_length = 11; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getExperimentLengthFieldBuilder() { + if (experimentLengthBuilder_ == null) { + experimentLengthBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getExperimentLength(), getParentForChildren(), isClean()); + experimentLength_ = null; + } + return experimentLengthBuilder_; + } + + private java.util.List + variantsHistory_ = java.util.Collections.emptyList(); + + private void ensureVariantsHistoryIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + variantsHistory_ = + new java.util.ArrayList( + variantsHistory_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory, + com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory.Builder, + com.google.cloud.dialogflow.cx.v3beta1.VariantsHistoryOrBuilder> + variantsHistoryBuilder_; + + /** + * + * + *
+     * The history of updates to the experiment variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.VariantsHistory variants_history = 12; + * + */ + public java.util.List + getVariantsHistoryList() { + if (variantsHistoryBuilder_ == null) { + return java.util.Collections.unmodifiableList(variantsHistory_); + } else { + return variantsHistoryBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The history of updates to the experiment variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.VariantsHistory variants_history = 12; + * + */ + public int getVariantsHistoryCount() { + if (variantsHistoryBuilder_ == null) { + return variantsHistory_.size(); + } else { + return variantsHistoryBuilder_.getCount(); + } + } + /** + * + * + *
+     * The history of updates to the experiment variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.VariantsHistory variants_history = 12; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory getVariantsHistory(int index) { + if (variantsHistoryBuilder_ == null) { + return variantsHistory_.get(index); + } else { + return variantsHistoryBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The history of updates to the experiment variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.VariantsHistory variants_history = 12; + * + */ + public Builder setVariantsHistory( + int index, com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory value) { + if (variantsHistoryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVariantsHistoryIsMutable(); + variantsHistory_.set(index, value); + onChanged(); + } else { + variantsHistoryBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The history of updates to the experiment variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.VariantsHistory variants_history = 12; + * + */ + public Builder setVariantsHistory( + int index, com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory.Builder builderForValue) { + if (variantsHistoryBuilder_ == null) { + ensureVariantsHistoryIsMutable(); + variantsHistory_.set(index, builderForValue.build()); + onChanged(); + } else { + variantsHistoryBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The history of updates to the experiment variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.VariantsHistory variants_history = 12; + * + */ + public Builder addVariantsHistory( + com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory value) { + if (variantsHistoryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVariantsHistoryIsMutable(); + variantsHistory_.add(value); + onChanged(); + } else { + variantsHistoryBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The history of updates to the experiment variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.VariantsHistory variants_history = 12; + * + */ + public Builder addVariantsHistory( + int index, com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory value) { + if (variantsHistoryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVariantsHistoryIsMutable(); + variantsHistory_.add(index, value); + onChanged(); + } else { + variantsHistoryBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The history of updates to the experiment variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.VariantsHistory variants_history = 12; + * + */ + public Builder addVariantsHistory( + com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory.Builder builderForValue) { + if (variantsHistoryBuilder_ == null) { + ensureVariantsHistoryIsMutable(); + variantsHistory_.add(builderForValue.build()); + onChanged(); + } else { + variantsHistoryBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The history of updates to the experiment variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.VariantsHistory variants_history = 12; + * + */ + public Builder addVariantsHistory( + int index, com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory.Builder builderForValue) { + if (variantsHistoryBuilder_ == null) { + ensureVariantsHistoryIsMutable(); + variantsHistory_.add(index, builderForValue.build()); + onChanged(); + } else { + variantsHistoryBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The history of updates to the experiment variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.VariantsHistory variants_history = 12; + * + */ + public Builder addAllVariantsHistory( + java.lang.Iterable + values) { + if (variantsHistoryBuilder_ == null) { + ensureVariantsHistoryIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, variantsHistory_); + onChanged(); + } else { + variantsHistoryBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The history of updates to the experiment variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.VariantsHistory variants_history = 12; + * + */ + public Builder clearVariantsHistory() { + if (variantsHistoryBuilder_ == null) { + variantsHistory_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + variantsHistoryBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The history of updates to the experiment variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.VariantsHistory variants_history = 12; + * + */ + public Builder removeVariantsHistory(int index) { + if (variantsHistoryBuilder_ == null) { + ensureVariantsHistoryIsMutable(); + variantsHistory_.remove(index); + onChanged(); + } else { + variantsHistoryBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The history of updates to the experiment variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.VariantsHistory variants_history = 12; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory.Builder getVariantsHistoryBuilder( + int index) { + return getVariantsHistoryFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The history of updates to the experiment variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.VariantsHistory variants_history = 12; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.VariantsHistoryOrBuilder + getVariantsHistoryOrBuilder(int index) { + if (variantsHistoryBuilder_ == null) { + return variantsHistory_.get(index); + } else { + return variantsHistoryBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The history of updates to the experiment variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.VariantsHistory variants_history = 12; + * + */ + public java.util.List + getVariantsHistoryOrBuilderList() { + if (variantsHistoryBuilder_ != null) { + return variantsHistoryBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(variantsHistory_); + } + } + /** + * + * + *
+     * The history of updates to the experiment variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.VariantsHistory variants_history = 12; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory.Builder + addVariantsHistoryBuilder() { + return getVariantsHistoryFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory.getDefaultInstance()); + } + /** + * + * + *
+     * The history of updates to the experiment variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.VariantsHistory variants_history = 12; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory.Builder addVariantsHistoryBuilder( + int index) { + return getVariantsHistoryFieldBuilder() + .addBuilder( + index, com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory.getDefaultInstance()); + } + /** + * + * + *
+     * The history of updates to the experiment variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.VariantsHistory variants_history = 12; + * + */ + public java.util.List + getVariantsHistoryBuilderList() { + return getVariantsHistoryFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory, + com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory.Builder, + com.google.cloud.dialogflow.cx.v3beta1.VariantsHistoryOrBuilder> + getVariantsHistoryFieldBuilder() { + if (variantsHistoryBuilder_ == null) { + variantsHistoryBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory, + com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory.Builder, + com.google.cloud.dialogflow.cx.v3beta1.VariantsHistoryOrBuilder>( + variantsHistory_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + variantsHistory_ = null; + } + return variantsHistoryBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.Experiment) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.Experiment) + private static final com.google.cloud.dialogflow.cx.v3beta1.Experiment DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.Experiment(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Experiment getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Experiment parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Experiment(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Experiment getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentName.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentName.java new file mode 100644 index 000000000..fc6750c8a --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentName.java @@ -0,0 +1,298 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.cx.v3beta1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class ExperimentName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_AGENT_ENVIRONMENT_EXPERIMENT = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String agent; + private final String environment; + private final String experiment; + + @Deprecated + protected ExperimentName() { + project = null; + location = null; + agent = null; + environment = null; + experiment = null; + } + + private ExperimentName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + agent = Preconditions.checkNotNull(builder.getAgent()); + environment = Preconditions.checkNotNull(builder.getEnvironment()); + experiment = Preconditions.checkNotNull(builder.getExperiment()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAgent() { + return agent; + } + + public String getEnvironment() { + return environment; + } + + public String getExperiment() { + return experiment; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ExperimentName of( + String project, String location, String agent, String environment, String experiment) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAgent(agent) + .setEnvironment(environment) + .setExperiment(experiment) + .build(); + } + + public static String format( + String project, String location, String agent, String environment, String experiment) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAgent(agent) + .setEnvironment(environment) + .setExperiment(experiment) + .build() + .toString(); + } + + public static ExperimentName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_AGENT_ENVIRONMENT_EXPERIMENT.validatedMatch( + formattedString, "ExperimentName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("agent"), + matchMap.get("environment"), + matchMap.get("experiment")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (ExperimentName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_AGENT_ENVIRONMENT_EXPERIMENT.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (agent != null) { + fieldMapBuilder.put("agent", agent); + } + if (environment != null) { + fieldMapBuilder.put("environment", environment); + } + if (experiment != null) { + fieldMapBuilder.put("experiment", experiment); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_AGENT_ENVIRONMENT_EXPERIMENT.instantiate( + "project", + project, + "location", + location, + "agent", + agent, + "environment", + environment, + "experiment", + experiment); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + ExperimentName that = ((ExperimentName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.agent, that.agent) + && Objects.equals(this.environment, that.environment) + && Objects.equals(this.experiment, that.experiment); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(agent); + h *= 1000003; + h ^= Objects.hashCode(environment); + h *= 1000003; + h ^= Objects.hashCode(experiment); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}. + */ + public static class Builder { + private String project; + private String location; + private String agent; + private String environment; + private String experiment; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAgent() { + return agent; + } + + public String getEnvironment() { + return environment; + } + + public String getExperiment() { + return experiment; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setAgent(String agent) { + this.agent = agent; + return this; + } + + public Builder setEnvironment(String environment) { + this.environment = environment; + return this; + } + + public Builder setExperiment(String experiment) { + this.experiment = experiment; + return this; + } + + private Builder(ExperimentName experimentName) { + project = experimentName.project; + location = experimentName.location; + agent = experimentName.agent; + environment = experimentName.environment; + experiment = experimentName.experiment; + } + + public ExperimentName build() { + return new ExperimentName(this); + } + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentOrBuilder.java new file mode 100644 index 000000000..6c652bd94 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentOrBuilder.java @@ -0,0 +1,440 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/experiment.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface ExperimentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.Experiment) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The name of the experiment.
+   * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>/experiments/<Experiment ID>..
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The name of the experiment.
+   * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>/experiments/<Experiment ID>..
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The human-readable name of the experiment (unique in an
+   * environment). Limit of 64 characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Required. The human-readable name of the experiment (unique in an
+   * environment). Limit of 64 characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * The human-readable description of the experiment.
+   * 
+ * + * string description = 3; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * The human-readable description of the experiment.
+   * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * The current state of the experiment.
+   * Transition triggered by Expriments.StartExperiment: PENDING->RUNNING.
+   * Transition triggered by Expriments.CancelExperiment: PENDING->CANCELLED or
+   * RUNNING->CANCELLED.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.State state = 4; + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * The current state of the experiment.
+   * Transition triggered by Expriments.StartExperiment: PENDING->RUNNING.
+   * Transition triggered by Expriments.CancelExperiment: PENDING->CANCELLED or
+   * RUNNING->CANCELLED.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.State state = 4; + * + * @return The state. + */ + com.google.cloud.dialogflow.cx.v3beta1.Experiment.State getState(); + + /** + * + * + *
+   * The definition of the experiment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Definition definition = 5; + * + * @return Whether the definition field is set. + */ + boolean hasDefinition(); + /** + * + * + *
+   * The definition of the experiment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Definition definition = 5; + * + * @return The definition. + */ + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition getDefinition(); + /** + * + * + *
+   * The definition of the experiment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Definition definition = 5; + */ + com.google.cloud.dialogflow.cx.v3beta1.Experiment.DefinitionOrBuilder getDefinitionOrBuilder(); + + /** + * + * + *
+   * Inference result of the experiment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result result = 6; + * + * @return Whether the result field is set. + */ + boolean hasResult(); + /** + * + * + *
+   * Inference result of the experiment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result result = 6; + * + * @return The result. + */ + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Result getResult(); + /** + * + * + *
+   * Inference result of the experiment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Experiment.Result result = 6; + */ + com.google.cloud.dialogflow.cx.v3beta1.Experiment.ResultOrBuilder getResultOrBuilder(); + + /** + * + * + *
+   * Creation time of this experiment.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7; + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Creation time of this experiment.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7; + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Creation time of this experiment.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Start time of this experiment.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 8; + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + * + * + *
+   * Start time of this experiment.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 8; + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + * + * + *
+   * Start time of this experiment.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 8; + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
+   * End time of this experiment.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 9; + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+   * End time of this experiment.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 9; + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+   * End time of this experiment.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 9; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+   * Last update time of this experiment.
+   * 
+ * + * .google.protobuf.Timestamp last_update_time = 10; + * + * @return Whether the lastUpdateTime field is set. + */ + boolean hasLastUpdateTime(); + /** + * + * + *
+   * Last update time of this experiment.
+   * 
+ * + * .google.protobuf.Timestamp last_update_time = 10; + * + * @return The lastUpdateTime. + */ + com.google.protobuf.Timestamp getLastUpdateTime(); + /** + * + * + *
+   * Last update time of this experiment.
+   * 
+ * + * .google.protobuf.Timestamp last_update_time = 10; + */ + com.google.protobuf.TimestampOrBuilder getLastUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Maximum number of days to run the experiment.
+   * 
+ * + * .google.protobuf.Duration experiment_length = 11; + * + * @return Whether the experimentLength field is set. + */ + boolean hasExperimentLength(); + /** + * + * + *
+   * Maximum number of days to run the experiment.
+   * 
+ * + * .google.protobuf.Duration experiment_length = 11; + * + * @return The experimentLength. + */ + com.google.protobuf.Duration getExperimentLength(); + /** + * + * + *
+   * Maximum number of days to run the experiment.
+   * 
+ * + * .google.protobuf.Duration experiment_length = 11; + */ + com.google.protobuf.DurationOrBuilder getExperimentLengthOrBuilder(); + + /** + * + * + *
+   * The history of updates to the experiment variants.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.VariantsHistory variants_history = 12; + * + */ + java.util.List getVariantsHistoryList(); + /** + * + * + *
+   * The history of updates to the experiment variants.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.VariantsHistory variants_history = 12; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory getVariantsHistory(int index); + /** + * + * + *
+   * The history of updates to the experiment variants.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.VariantsHistory variants_history = 12; + * + */ + int getVariantsHistoryCount(); + /** + * + * + *
+   * The history of updates to the experiment variants.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.VariantsHistory variants_history = 12; + * + */ + java.util.List + getVariantsHistoryOrBuilderList(); + /** + * + * + *
+   * The history of updates to the experiment variants.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.VariantsHistory variants_history = 12; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.VariantsHistoryOrBuilder getVariantsHistoryOrBuilder( + int index); +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentProto.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentProto.java new file mode 100644 index 000000000..c6494b939 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentProto.java @@ -0,0 +1,442 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/experiment.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public final class ExperimentProto { + private ExperimentProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Definition_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Definition_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_ConfidenceInterval_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_ConfidenceInterval_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_Metric_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_Metric_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_VersionMetrics_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_VersionMetrics_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_VersionVariants_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_VersionVariants_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_VersionVariants_Variant_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_VersionVariants_Variant_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_VariantsHistory_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_VariantsHistory_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_ListExperimentsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_ListExperimentsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_ListExperimentsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_ListExperimentsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_GetExperimentRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_GetExperimentRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_CreateExperimentRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_CreateExperimentRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateExperimentRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateExperimentRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_DeleteExperimentRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_DeleteExperimentRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_StartExperimentRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_StartExperimentRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_StopExperimentRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_StopExperimentRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n3google/cloud/dialogflow/cx/v3beta1/exp" + + "eriment.proto\022\"google.cloud.dialogflow.c" + + "x.v3beta1\032\034google/api/annotations.proto\032" + + "\027google/api/client.proto\032\037google/api/fie" + + "ld_behavior.proto\032\031google/api/resource.p" + + "roto\032\036google/protobuf/duration.proto\032\033go" + + "ogle/protobuf/empty.proto\032 google/protob" + + "uf/field_mask.proto\032\037google/protobuf/tim" + + "estamp.proto\"\357\017\n\nExperiment\022\014\n\004name\030\001 \001(" + + "\t\022\031\n\014display_name\030\002 \001(\tB\003\340A\002\022\023\n\013descript" + + "ion\030\003 \001(\t\022C\n\005state\030\004 \001(\01624.google.cloud." + + "dialogflow.cx.v3beta1.Experiment.State\022M" + + "\n\ndefinition\030\005 \001(\01329.google.cloud.dialog" + + "flow.cx.v3beta1.Experiment.Definition\022E\n" + + "\006result\030\006 \001(\01325.google.cloud.dialogflow." + + "cx.v3beta1.Experiment.Result\022/\n\013create_t" + + "ime\030\007 \001(\0132\032.google.protobuf.Timestamp\022.\n" + + "\nstart_time\030\010 \001(\0132\032.google.protobuf.Time" + + "stamp\022,\n\010end_time\030\t \001(\0132\032.google.protobu" + + "f.Timestamp\0224\n\020last_update_time\030\n \001(\0132\032." + + "google.protobuf.Timestamp\0224\n\021experiment_" + + "length\030\013 \001(\0132\031.google.protobuf.Duration\022" + + "M\n\020variants_history\030\014 \003(\01323.google.cloud" + + ".dialogflow.cx.v3beta1.VariantsHistory\032|" + + "\n\nDefinition\022\021\n\tcondition\030\001 \001(\t\022O\n\020versi" + + "on_variants\030\002 \001(\01323.google.cloud.dialogf" + + "low.cx.v3beta1.VersionVariantsH\000B\n\n\010vari" + + "ants\032\244\010\n\006Result\022]\n\017version_metrics\030\001 \003(\013" + + "2D.google.cloud.dialogflow.cx.v3beta1.Ex" + + "periment.Result.VersionMetrics\0224\n\020last_u" + + "pdate_time\030\002 \001(\0132\032.google.protobuf.Times" + + "tamp\032g\n\022ConfidenceInterval\022\030\n\020confidence" + + "_level\030\001 \001(\001\022\r\n\005ratio\030\002 \001(\001\022\023\n\013lower_bou" + + "nd\030\003 \001(\001\022\023\n\013upper_bound\030\004 \001(\001\032\277\002\n\006Metric" + + "\022N\n\004type\030\001 \001(\0162@.google.cloud.dialogflow" + + ".cx.v3beta1.Experiment.Result.MetricType" + + "\022S\n\ncount_type\030\005 \001(\0162?.google.cloud.dial" + + "ogflow.cx.v3beta1.Experiment.Result.Coun" + + "tType\022\017\n\005ratio\030\002 \001(\001H\000\022\017\n\005count\030\004 \001(\001H\000\022" + + "e\n\023confidence_interval\030\003 \001(\0132H.google.cl" + + "oud.dialogflow.cx.v3beta1.Experiment.Res" + + "ult.ConfidenceIntervalB\007\n\005value\032\257\001\n\016Vers" + + "ionMetrics\0227\n\007version\030\001 \001(\tB&\372A#\n!dialog" + + "flow.googleapis.com/Version\022M\n\007metrics\030\002" + + " \003(\0132<.google.cloud.dialogflow.cx.v3beta" + + "1.Experiment.Result.Metric\022\025\n\rsession_co" + + "unt\030\003 \001(\005\"\266\001\n\nMetricType\022\026\n\022METRIC_UNSPE" + + "CIFIED\020\000\022&\n\"CONTAINED_SESSION_NO_CALLBAC" + + "K_RATE\020\001\022\033\n\027LIVE_AGENT_HANDOFF_RATE\020\002\022\031\n" + + "\025CALLBACK_SESSION_RATE\020\003\022\032\n\026ABANDONED_SE" + + "SSION_RATE\020\004\022\024\n\020SESSION_END_RATE\020\005\"o\n\tCo" + + "untType\022\032\n\026COUNT_TYPE_UNSPECIFIED\020\000\022\030\n\024T" + + "OTAL_NO_MATCH_COUNT\020\001\022\024\n\020TOTAL_TURN_COUN" + + "T\020\002\022\026\n\022AVERAGE_TURN_COUNT\020\003\"@\n\005State\022\025\n\021" + + "STATE_UNSPECIFIED\020\000\022\t\n\005DRAFT\020\001\022\013\n\007RUNNIN" + + "G\020\002\022\010\n\004DONE\020\003:\226\001\352A\222\001\n$dialogflow.googlea" + + "pis.com/Experiment\022jprojects/{project}/l" + + "ocations/{location}/agents/{agent}/envir" + + "onments/{environment}/experiments/{exper" + + "iment}\"\262\001\n\017VersionVariants\022M\n\010variants\030\001" + + " \003(\0132;.google.cloud.dialogflow.cx.v3beta" + + "1.VersionVariants.Variant\032P\n\007Variant\022\017\n\007" + + "version\030\001 \001(\t\022\032\n\022traffic_allocation\030\002 \001(" + + "\002\022\030\n\020is_control_group\030\003 \001(\010\"\237\001\n\017Variants" + + "History\022O\n\020version_variants\030\001 \001(\01323.goog" + + "le.cloud.dialogflow.cx.v3beta1.VersionVa" + + "riantsH\000\022/\n\013update_time\030\002 \001(\0132\032.google.p" + + "rotobuf.TimestampB\n\n\010variants\"}\n\026ListExp" + + "erimentsRequest\022<\n\006parent\030\001 \001(\tB,\340A\002\372A&\022" + + "$dialogflow.googleapis.com/Experiment\022\021\n" + + "\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"w\n\027" + + "ListExperimentsResponse\022C\n\013experiments\030\001" + + " \003(\0132..google.cloud.dialogflow.cx.v3beta" + + "1.Experiment\022\027\n\017next_page_token\030\002 \001(\t\"R\n" + + "\024GetExperimentRequest\022:\n\004name\030\001 \001(\tB,\340A\002" + + "\372A&\n$dialogflow.googleapis.com/Experimen" + + "t\"\240\001\n\027CreateExperimentRequest\022<\n\006parent\030" + + "\001 \001(\tB,\340A\002\372A&\022$dialogflow.googleapis.com" + + "/Experiment\022G\n\nexperiment\030\002 \001(\0132..google" + + ".cloud.dialogflow.cx.v3beta1.ExperimentB" + + "\003\340A\002\"\230\001\n\027UpdateExperimentRequest\022G\n\nexpe" + + "riment\030\001 \001(\0132..google.cloud.dialogflow.c" + + "x.v3beta1.ExperimentB\003\340A\002\0224\n\013update_mask" + + "\030\002 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\002\"" + + "U\n\027DeleteExperimentRequest\022:\n\004name\030\001 \001(\t" + + "B,\340A\002\372A&\n$dialogflow.googleapis.com/Expe" + + "riment\"T\n\026StartExperimentRequest\022:\n\004name" + + "\030\001 \001(\tB,\340A\002\372A&\n$dialogflow.googleapis.co" + + "m/Experiment\"S\n\025StopExperimentRequest\022:\n" + + "\004name\030\001 \001(\tB,\340A\002\372A&\n$dialogflow.googleap" + + "is.com/Experiment2\335\r\n\013Experiments\022\351\001\n\017Li" + + "stExperiments\022:.google.cloud.dialogflow." + + "cx.v3beta1.ListExperimentsRequest\032;.goog" + + "le.cloud.dialogflow.cx.v3beta1.ListExper" + + "imentsResponse\"]\202\323\344\223\002N\022L/v3beta1/{parent" + + "=projects/*/locations/*/agents/*/environ" + + "ments/*}/experiments\332A\006parent\022\326\001\n\rGetExp" + + "eriment\0228.google.cloud.dialogflow.cx.v3b" + + "eta1.GetExperimentRequest\032..google.cloud" + + ".dialogflow.cx.v3beta1.Experiment\"[\202\323\344\223\002" + + "N\022L/v3beta1/{name=projects/*/locations/*" + + "/agents/*/environments/*/experiments/*}\332" + + "A\004name\022\365\001\n\020CreateExperiment\022;.google.clo" + + "ud.dialogflow.cx.v3beta1.CreateExperimen" + + "tRequest\032..google.cloud.dialogflow.cx.v3" + + "beta1.Experiment\"t\202\323\344\223\002Z\"L/v3beta1/{pare" + + "nt=projects/*/locations/*/agents/*/envir" + + "onments/*}/experiments:\nexperiment\332A\021par" + + "ent,experiment\022\206\002\n\020UpdateExperiment\022;.go" + + "ogle.cloud.dialogflow.cx.v3beta1.UpdateE" + + "xperimentRequest\032..google.cloud.dialogfl" + + "ow.cx.v3beta1.Experiment\"\204\001\202\323\344\223\002e2W/v3be" + + "ta1/{experiment.name=projects/*/location" + + "s/*/agents/*/environments/*/experiments/" + + "*}:\nexperiment\332A\026experiment,update_mask\022" + + "\304\001\n\020DeleteExperiment\022;.google.cloud.dial" + + "ogflow.cx.v3beta1.DeleteExperimentReques" + + "t\032\026.google.protobuf.Empty\"[\202\323\344\223\002N*L/v3be" + + "ta1/{name=projects/*/locations/*/agents/" + + "*/environments/*/experiments/*}\332A\004name\022\343" + + "\001\n\017StartExperiment\022:.google.cloud.dialog" + + "flow.cx.v3beta1.StartExperimentRequest\032." + + ".google.cloud.dialogflow.cx.v3beta1.Expe" + + "riment\"d\202\323\344\223\002W\"R/v3beta1/{name=projects/" + + "*/locations/*/agents/*/environments/*/ex" + + "periments/*}:start:\001*\332A\004name\022\340\001\n\016StopExp" + + "eriment\0229.google.cloud.dialogflow.cx.v3b" + + "eta1.StopExperimentRequest\032..google.clou" + + "d.dialogflow.cx.v3beta1.Experiment\"c\202\323\344\223" + + "\002V\"Q/v3beta1/{name=projects/*/locations/" + + "*/agents/*/environments/*/experiments/*}" + + ":stop:\001*\332A\004name\032x\312A\031dialogflow.googleapi" + + "s.com\322AYhttps://www.googleapis.com/auth/" + + "cloud-platform,https://www.googleapis.co" + + "m/auth/dialogflowB\256\001\n&com.google.cloud.d" + + "ialogflow.cx.v3beta1B\017ExperimentProtoP\001Z" + + "Dgoogle.golang.org/genproto/googleapis/c" + + "loud/dialogflow/cx/v3beta1;cx\370\001\001\242\002\002DF\252\002\"" + + "Google.Cloud.Dialogflow.Cx.V3Beta1b\006prot" + + "o3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.DurationProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_descriptor, + new java.lang.String[] { + "Name", + "DisplayName", + "Description", + "State", + "Definition", + "Result", + "CreateTime", + "StartTime", + "EndTime", + "LastUpdateTime", + "ExperimentLength", + "VariantsHistory", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Definition_descriptor = + internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Definition_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Definition_descriptor, + new java.lang.String[] { + "Condition", "VersionVariants", "Variants", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_descriptor = + internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_descriptor, + new java.lang.String[] { + "VersionMetrics", "LastUpdateTime", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_ConfidenceInterval_descriptor = + internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_ConfidenceInterval_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_ConfidenceInterval_descriptor, + new java.lang.String[] { + "ConfidenceLevel", "Ratio", "LowerBound", "UpperBound", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_Metric_descriptor = + internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_Metric_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_Metric_descriptor, + new java.lang.String[] { + "Type", "CountType", "Ratio", "Count", "ConfidenceInterval", "Value", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_VersionMetrics_descriptor = + internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_VersionMetrics_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_Experiment_Result_VersionMetrics_descriptor, + new java.lang.String[] { + "Version", "Metrics", "SessionCount", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_VersionVariants_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_dialogflow_cx_v3beta1_VersionVariants_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_VersionVariants_descriptor, + new java.lang.String[] { + "Variants", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_VersionVariants_Variant_descriptor = + internal_static_google_cloud_dialogflow_cx_v3beta1_VersionVariants_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_dialogflow_cx_v3beta1_VersionVariants_Variant_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_VersionVariants_Variant_descriptor, + new java.lang.String[] { + "Version", "TrafficAllocation", "IsControlGroup", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_VariantsHistory_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_dialogflow_cx_v3beta1_VariantsHistory_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_VariantsHistory_descriptor, + new java.lang.String[] { + "VersionVariants", "UpdateTime", "Variants", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_ListExperimentsRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_dialogflow_cx_v3beta1_ListExperimentsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_ListExperimentsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_ListExperimentsResponse_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_dialogflow_cx_v3beta1_ListExperimentsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_ListExperimentsResponse_descriptor, + new java.lang.String[] { + "Experiments", "NextPageToken", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_GetExperimentRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_dialogflow_cx_v3beta1_GetExperimentRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_GetExperimentRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_CreateExperimentRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_dialogflow_cx_v3beta1_CreateExperimentRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_CreateExperimentRequest_descriptor, + new java.lang.String[] { + "Parent", "Experiment", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateExperimentRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateExperimentRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateExperimentRequest_descriptor, + new java.lang.String[] { + "Experiment", "UpdateMask", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_DeleteExperimentRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_dialogflow_cx_v3beta1_DeleteExperimentRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_DeleteExperimentRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_StartExperimentRequest_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_dialogflow_cx_v3beta1_StartExperimentRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_StartExperimentRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_StopExperimentRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_dialogflow_cx_v3beta1_StopExperimentRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_StopExperimentRequest_descriptor, + new java.lang.String[] { + "Name", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.DurationProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Form.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Form.java index fa95fd702..5325c7ebe 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Form.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Form.java @@ -309,9 +309,9 @@ public interface ParameterOrBuilder * * *
-     * Indicates whether the parameter content should be redacted in text and
-     * audio. If the flag is set to true, the parameter content will be replaced
-     * by parameter name in both request and response.
+     * 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.v3beta1.EntityType.redact] is
      * enabled.
@@ -2927,9 +2927,9 @@ public com.google.protobuf.ValueOrBuilder getDefaultValueOrBuilder() {
      *
      *
      * 
-     * Indicates whether the parameter content should be redacted in text and
-     * audio. If the flag is set to true, the parameter content will be replaced
-     * by parameter name in both request and response.
+     * 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.v3beta1.EntityType.redact] is
      * enabled.
@@ -4155,9 +4155,9 @@ public com.google.protobuf.ValueOrBuilder getDefaultValueOrBuilder() {
        *
        *
        * 
-       * Indicates whether the parameter content should be redacted in text and
-       * audio. If the flag is set to true, the parameter content will be replaced
-       * by parameter name in both request and response.
+       * 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.v3beta1.EntityType.redact] is
        * enabled.
@@ -4175,9 +4175,9 @@ public boolean getRedact() {
        *
        *
        * 
-       * Indicates whether the parameter content should be redacted in text and
-       * audio. If the flag is set to true, the parameter content will be replaced
-       * by parameter name in both request and response.
+       * 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.v3beta1.EntityType.redact] is
        * enabled.
@@ -4198,9 +4198,9 @@ public Builder setRedact(boolean value) {
        *
        *
        * 
-       * Indicates whether the parameter content should be redacted in text and
-       * audio. If the flag is set to true, the parameter content will be replaced
-       * by parameter name in both request and response.
+       * 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.v3beta1.EntityType.redact] is
        * enabled.
diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetExperimentRequest.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetExperimentRequest.java
new file mode 100644
index 000000000..b877a26ab
--- /dev/null
+++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetExperimentRequest.java
@@ -0,0 +1,674 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by the protocol buffer compiler.  DO NOT EDIT!
+// source: google/cloud/dialogflow/cx/v3beta1/experiment.proto
+
+package com.google.cloud.dialogflow.cx.v3beta1;
+
+/**
+ *
+ *
+ * 
+ * The request message for
+ * [Experiments.GetExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.GetExperiment].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest} + */ +public final class GetExperimentRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest) + GetExperimentRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetExperimentRequest.newBuilder() to construct. + private GetExperimentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetExperimentRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetExperimentRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetExperimentRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GetExperimentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GetExperimentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the
+   * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. Format:
+   * `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the
+   * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. Format:
+   * `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest other = + (com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for
+   * [Experiments.GetExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.GetExperiment].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest) + com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GetExperimentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GetExperimentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GetExperimentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest build() { + com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest result = + new com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the
+     * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. Format:
+     * `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the
+     * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. Format:
+     * `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the
+     * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. Format:
+     * `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the
+     * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. Format:
+     * `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the
+     * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. Format:
+     * `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest) + private static final com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetExperimentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetExperimentRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetExperimentRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetExperimentRequestOrBuilder.java new file mode 100644 index 000000000..541546b27 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetExperimentRequestOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/experiment.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface GetExperimentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the
+   * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. Format:
+   * `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the
+   * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. Format:
+   * `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Intent.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Intent.java index 05246b971..d4fb14186 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Intent.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Intent.java @@ -2912,9 +2912,9 @@ public interface ParameterOrBuilder * * *
-     * Indicates whether the parameter content should be redacted in text and
-     * audio. If the flag is set to true, the parameter content will be replaced
-     * by parameter name in both request and response.
+     * 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.v3beta1.EntityType.redact] is
      * enabled.
@@ -3177,9 +3177,9 @@ public boolean getIsList() {
      *
      *
      * 
-     * Indicates whether the parameter content should be redacted in text and
-     * audio. If the flag is set to true, the parameter content will be replaced
-     * by parameter name in both request and response.
+     * 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.v3beta1.EntityType.redact] is
      * enabled.
@@ -3877,9 +3877,9 @@ public Builder clearIsList() {
        *
        *
        * 
-       * Indicates whether the parameter content should be redacted in text and
-       * audio. If the flag is set to true, the parameter content will be replaced
-       * by parameter name in both request and response.
+       * 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.v3beta1.EntityType.redact] is
        * enabled.
@@ -3897,9 +3897,9 @@ public boolean getRedact() {
        *
        *
        * 
-       * Indicates whether the parameter content should be redacted in text and
-       * audio. If the flag is set to true, the parameter content will be replaced
-       * by parameter name in both request and response.
+       * 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.v3beta1.EntityType.redact] is
        * enabled.
@@ -3920,9 +3920,9 @@ public Builder setRedact(boolean value) {
        *
        *
        * 
-       * Indicates whether the parameter content should be redacted in text and
-       * audio. If the flag is set to true, the parameter content will be replaced
-       * by parameter name in both request and response.
+       * 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.v3beta1.EntityType.redact] is
        * enabled.
diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExperimentsRequest.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExperimentsRequest.java
new file mode 100644
index 000000000..9798908bc
--- /dev/null
+++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExperimentsRequest.java
@@ -0,0 +1,951 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by the protocol buffer compiler.  DO NOT EDIT!
+// source: google/cloud/dialogflow/cx/v3beta1/experiment.proto
+
+package com.google.cloud.dialogflow.cx.v3beta1;
+
+/**
+ *
+ *
+ * 
+ * The request message for
+ * [Experiments.ListExperiments][google.cloud.dialogflow.cx.v3beta1.Experiments.ListExperiments].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest} + */ +public final class ListExperimentsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest) + ListExperimentsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListExperimentsRequest.newBuilder() to construct. + private ListExperimentsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListExperimentsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListExperimentsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListExperimentsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: + { + pageSize_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListExperimentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListExperimentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]
+   * to list all environments for. Format: `projects/<Project
+   * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment
+   * ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]
+   * to list all environments for. Format: `projects/<Project
+   * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment
+   * ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * The maximum number of items to return in a single page. By default 20 and
+   * at most 100.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * The next_page_token value returned from a previous list request.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The next_page_token value returned from a previous list request.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest other = + (com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for
+   * [Experiments.ListExperiments][google.cloud.dialogflow.cx.v3beta1.Experiments.ListExperiments].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest) + com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListExperimentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListExperimentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListExperimentsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest build() { + com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest result = + new com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]
+     * to list all environments for. Format: `projects/<Project
+     * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment
+     * ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]
+     * to list all environments for. Format: `projects/<Project
+     * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment
+     * ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]
+     * to list all environments for. Format: `projects/<Project
+     * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment
+     * ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]
+     * to list all environments for. Format: `projects/<Project
+     * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment
+     * ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]
+     * to list all environments for. Format: `projects/<Project
+     * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment
+     * ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of items to return in a single page. By default 20 and
+     * at most 100.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of items to return in a single page. By default 20 and
+     * at most 100.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of items to return in a single page. By default 20 and
+     * at most 100.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The next_page_token value returned from a previous list request.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The next_page_token value returned from a previous list request.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The next_page_token value returned from a previous list request.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The next_page_token value returned from a previous list request.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The next_page_token value returned from a previous list request.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest) + private static final com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListExperimentsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListExperimentsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExperimentsRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExperimentsRequestOrBuilder.java new file mode 100644 index 000000000..915d81e02 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExperimentsRequestOrBuilder.java @@ -0,0 +1,99 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/experiment.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface ListExperimentsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]
+   * to list all environments for. Format: `projects/<Project
+   * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment
+   * ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]
+   * to list all environments for. Format: `projects/<Project
+   * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment
+   * ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of items to return in a single page. By default 20 and
+   * at most 100.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The next_page_token value returned from a previous list request.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The next_page_token value returned from a previous list request.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExperimentsResponse.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExperimentsResponse.java new file mode 100644 index 000000000..ec88fdbd8 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExperimentsResponse.java @@ -0,0 +1,1225 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/experiment.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The response message for
+ * [Experiments.ListExperiments][google.cloud.dialogflow.cx.v3beta1.Experiments.ListExperiments].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse} + */ +public final class ListExperimentsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse) + ListExperimentsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListExperimentsResponse.newBuilder() to construct. + private ListExperimentsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListExperimentsResponse() { + experiments_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListExperimentsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListExperimentsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + experiments_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + experiments_.add( + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.Experiment.parser(), + extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + experiments_ = java.util.Collections.unmodifiableList(experiments_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListExperimentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListExperimentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse.class, + com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse.Builder.class); + } + + public static final int EXPERIMENTS_FIELD_NUMBER = 1; + private java.util.List 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.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment experiments = 1; + */ + @java.lang.Override + public java.util.List getExperimentsList() { + return 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.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment experiments = 1; + */ + @java.lang.Override + public java.util.List + getExperimentsOrBuilderList() { + return 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.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment experiments = 1; + */ + @java.lang.Override + public int getExperimentsCount() { + return experiments_.size(); + } + /** + * + * + *
+   * 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.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment experiments = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Experiment getExperiments(int index) { + return experiments_.get(index); + } + /** + * + * + *
+   * 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.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment experiments = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExperimentOrBuilder getExperimentsOrBuilder( + int index) { + return experiments_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < experiments_.size(); i++) { + output.writeMessage(1, experiments_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < experiments_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, experiments_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse other = + (com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse) obj; + + if (!getExperimentsList().equals(other.getExperimentsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getExperimentsCount() > 0) { + hash = (37 * hash) + EXPERIMENTS_FIELD_NUMBER; + hash = (53 * hash) + getExperimentsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The response message for
+   * [Experiments.ListExperiments][google.cloud.dialogflow.cx.v3beta1.Experiments.ListExperiments].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse) + com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListExperimentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListExperimentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse.class, + com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getExperimentsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (experimentsBuilder_ == null) { + experiments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + experimentsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListExperimentsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse build() { + com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse result = + new com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse(this); + int from_bitField0_ = bitField0_; + if (experimentsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + experiments_ = java.util.Collections.unmodifiableList(experiments_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.experiments_ = experiments_; + } else { + result.experiments_ = experimentsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse.getDefaultInstance()) + return this; + if (experimentsBuilder_ == null) { + if (!other.experiments_.isEmpty()) { + if (experiments_.isEmpty()) { + experiments_ = other.experiments_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureExperimentsIsMutable(); + experiments_.addAll(other.experiments_); + } + onChanged(); + } + } else { + if (!other.experiments_.isEmpty()) { + if (experimentsBuilder_.isEmpty()) { + experimentsBuilder_.dispose(); + experimentsBuilder_ = null; + experiments_ = other.experiments_; + bitField0_ = (bitField0_ & ~0x00000001); + experimentsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getExperimentsFieldBuilder() + : null; + } else { + experimentsBuilder_.addAllMessages(other.experiments_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List experiments_ = + java.util.Collections.emptyList(); + + private void ensureExperimentsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + experiments_ = + new java.util.ArrayList( + experiments_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Experiment, + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ExperimentOrBuilder> + experimentsBuilder_; + + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment experiments = 1; + */ + public java.util.List getExperimentsList() { + if (experimentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(experiments_); + } else { + return experimentsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment experiments = 1; + */ + public int getExperimentsCount() { + if (experimentsBuilder_ == null) { + return experiments_.size(); + } else { + return experimentsBuilder_.getCount(); + } + } + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment experiments = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.Experiment getExperiments(int index) { + if (experimentsBuilder_ == null) { + return experiments_.get(index); + } else { + return experimentsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment experiments = 1; + */ + public Builder setExperiments( + int index, com.google.cloud.dialogflow.cx.v3beta1.Experiment value) { + if (experimentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExperimentsIsMutable(); + experiments_.set(index, value); + onChanged(); + } else { + experimentsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment experiments = 1; + */ + public Builder setExperiments( + int index, com.google.cloud.dialogflow.cx.v3beta1.Experiment.Builder builderForValue) { + if (experimentsBuilder_ == null) { + ensureExperimentsIsMutable(); + experiments_.set(index, builderForValue.build()); + onChanged(); + } else { + experimentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment experiments = 1; + */ + public Builder addExperiments(com.google.cloud.dialogflow.cx.v3beta1.Experiment value) { + if (experimentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExperimentsIsMutable(); + experiments_.add(value); + onChanged(); + } else { + experimentsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment experiments = 1; + */ + public Builder addExperiments( + int index, com.google.cloud.dialogflow.cx.v3beta1.Experiment value) { + if (experimentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExperimentsIsMutable(); + experiments_.add(index, value); + onChanged(); + } else { + experimentsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment experiments = 1; + */ + public Builder addExperiments( + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Builder builderForValue) { + if (experimentsBuilder_ == null) { + ensureExperimentsIsMutable(); + experiments_.add(builderForValue.build()); + onChanged(); + } else { + experimentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment experiments = 1; + */ + public Builder addExperiments( + int index, com.google.cloud.dialogflow.cx.v3beta1.Experiment.Builder builderForValue) { + if (experimentsBuilder_ == null) { + ensureExperimentsIsMutable(); + experiments_.add(index, builderForValue.build()); + onChanged(); + } else { + experimentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment experiments = 1; + */ + public Builder addAllExperiments( + java.lang.Iterable values) { + if (experimentsBuilder_ == null) { + ensureExperimentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, experiments_); + onChanged(); + } else { + experimentsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment experiments = 1; + */ + public Builder clearExperiments() { + if (experimentsBuilder_ == null) { + experiments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + experimentsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment experiments = 1; + */ + public Builder removeExperiments(int index) { + if (experimentsBuilder_ == null) { + ensureExperimentsIsMutable(); + experiments_.remove(index); + onChanged(); + } else { + experimentsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment experiments = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Builder getExperimentsBuilder( + int index) { + return getExperimentsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment experiments = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.ExperimentOrBuilder getExperimentsOrBuilder( + int index) { + if (experimentsBuilder_ == null) { + return experiments_.get(index); + } else { + return experimentsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment experiments = 1; + */ + public java.util.List + getExperimentsOrBuilderList() { + if (experimentsBuilder_ != null) { + return experimentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(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.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment experiments = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Builder addExperimentsBuilder() { + return getExperimentsFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3beta1.Experiment.getDefaultInstance()); + } + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment experiments = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Builder addExperimentsBuilder( + int index) { + return getExperimentsFieldBuilder() + .addBuilder( + index, com.google.cloud.dialogflow.cx.v3beta1.Experiment.getDefaultInstance()); + } + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment experiments = 1; + */ + public java.util.List + getExperimentsBuilderList() { + return getExperimentsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Experiment, + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ExperimentOrBuilder> + getExperimentsFieldBuilder() { + if (experimentsBuilder_ == null) { + experimentsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Experiment, + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ExperimentOrBuilder>( + experiments_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + experiments_ = null; + } + return experimentsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse) + private static final com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListExperimentsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListExperimentsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExperimentsResponseOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExperimentsResponseOrBuilder.java new file mode 100644 index 000000000..473f7028e --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExperimentsResponseOrBuilder.java @@ -0,0 +1,119 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/experiment.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface ListExperimentsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * 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.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment experiments = 1; + */ + java.util.List getExperimentsList(); + /** + * + * + *
+   * 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.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment experiments = 1; + */ + com.google.cloud.dialogflow.cx.v3beta1.Experiment getExperiments(int index); + /** + * + * + *
+   * 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.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment experiments = 1; + */ + int getExperimentsCount(); + /** + * + * + *
+   * 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.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment experiments = 1; + */ + java.util.List + getExperimentsOrBuilderList(); + /** + * + * + *
+   * 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.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Experiment experiments = 1; + */ + com.google.cloud.dialogflow.cx.v3beta1.ExperimentOrBuilder getExperimentsOrBuilder(int index); + + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/StartExperimentRequest.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/StartExperimentRequest.java new file mode 100644 index 000000000..225233618 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/StartExperimentRequest.java @@ -0,0 +1,671 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/experiment.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The request message for
+ * [Experiments.StartExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.StartExperiment].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest} + */ +public final class StartExperimentRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest) + StartExperimentRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use StartExperimentRequest.newBuilder() to construct. + private StartExperimentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private StartExperimentRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new StartExperimentRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private StartExperimentRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_StartExperimentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_StartExperimentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Resource name of the experiment to start.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Resource name of the experiment to start.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest other = + (com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for
+   * [Experiments.StartExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.StartExperiment].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest) + com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_StartExperimentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_StartExperimentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_StartExperimentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest build() { + com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest result = + new com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Resource name of the experiment to start.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Resource name of the experiment to start.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Resource name of the experiment to start.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Resource name of the experiment to start.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Resource name of the experiment to start.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest) + private static final com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StartExperimentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StartExperimentRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/StartExperimentRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/StartExperimentRequestOrBuilder.java new file mode 100644 index 000000000..ca5732d15 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/StartExperimentRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/experiment.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface StartExperimentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Resource name of the experiment to start.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Resource name of the experiment to start.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/StopExperimentRequest.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/StopExperimentRequest.java new file mode 100644 index 000000000..c6c46db81 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/StopExperimentRequest.java @@ -0,0 +1,670 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/experiment.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The request message for
+ * [Experiments.StopExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.StopExperiment].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest} + */ +public final class StopExperimentRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest) + StopExperimentRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use StopExperimentRequest.newBuilder() to construct. + private StopExperimentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private StopExperimentRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new StopExperimentRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private StopExperimentRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_StopExperimentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_StopExperimentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Resource name of the experiment to stop.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Resource name of the experiment to stop.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest other = + (com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for
+   * [Experiments.StopExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.StopExperiment].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest) + com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_StopExperimentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_StopExperimentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_StopExperimentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest build() { + com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest result = + new com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Resource name of the experiment to stop.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Resource name of the experiment to stop.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Resource name of the experiment to stop.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Resource name of the experiment to stop.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Resource name of the experiment to stop.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest) + private static final com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StopExperimentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StopExperimentRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/StopExperimentRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/StopExperimentRequestOrBuilder.java new file mode 100644 index 000000000..8aed1c386 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/StopExperimentRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/experiment.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface StopExperimentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Resource name of the experiment to stop.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Resource name of the experiment to stop.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseProto.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseProto.java index 51dec22a0..8969c1305 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseProto.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseProto.java @@ -208,226 +208,226 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "3beta1.TestCaseResult:u\352Ar\n\"dialogflow.g" + "oogleapis.com/TestCase\022Lprojects/{projec" + "t}/locations/{location}/agents/{agent}/t" - + "estCases/{test_case}\"\270\003\n\016TestCaseResult\022" - + "\014\n\004name\030\001 \001(\t\022B\n\013environment\030\002 \001(\tB-\340A\001\372" - + "A\'\n%dialogflow.googleapis.com/Environmen" - + "t\022P\n\022conversation_turns\030\003 \003(\01324.google.c" - + "loud.dialogflow.cx.v3beta1.ConversationT" - + "urn\022C\n\013test_result\030\004 \001(\0162..google.cloud." - + "dialogflow.cx.v3beta1.TestResult\022-\n\ttest" - + "_time\030\005 \001(\0132\032.google.protobuf.Timestamp:" - + "\215\001\352A\211\001\n(dialogflow.googleapis.com/TestCa" - + "seResult\022]projects/{project}/locations/{" - + "location}/agents/{agent}/testCases/{test" - + "_case}/results/{result}\"\\\n\nTestConfig\022\033\n" - + "\023tracking_parameters\030\001 \003(\t\0221\n\004flow\030\002 \001(\t" - + "B#\372A \n\036dialogflow.googleapis.com/Flow\"\277\006" - + "\n\020ConversationTurn\022R\n\nuser_input\030\001 \001(\0132>" - + ".google.cloud.dialogflow.cx.v3beta1.Conv" - + "ersationTurn.UserInput\022e\n\024virtual_agent_" - + "output\030\002 \001(\0132G.google.cloud.dialogflow.c" - + "x.v3beta1.ConversationTurn.VirtualAgentO" - + "utput\032\234\001\n\tUserInput\022=\n\005input\030\005 \001(\0132..goo" - + "gle.cloud.dialogflow.cx.v3beta1.QueryInp" - + "ut\0224\n\023injected_parameters\030\002 \001(\0132\027.google" - + ".protobuf.Struct\022\032\n\022is_webhook_enabled\030\003" - + " \001(\010\032\320\003\n\022VirtualAgentOutput\0223\n\022session_p" - + "arameters\030\004 \001(\0132\027.google.protobuf.Struct" - + "\022O\n\013differences\030\005 \003(\01325.google.cloud.dia" - + "logflow.cx.v3beta1.TestRunDifferenceB\003\340A" - + "\003\0228\n\017diagnostic_info\030\006 \001(\0132\027.google.prot" - + "obuf.StructB\006\340A\002\340A\004\022D\n\020triggered_intent\030" - + "\007 \001(\0132*.google.cloud.dialogflow.cx.v3bet" - + "a1.Intent\022>\n\014current_page\030\010 \001(\0132(.google" - + ".cloud.dialogflow.cx.v3beta1.Page\022P\n\016tex" - + "t_responses\030\t \003(\01328.google.cloud.dialogf" - + "low.cx.v3beta1.ResponseMessage.Text\022\"\n\006s" - + "tatus\030\n \001(\0132\022.google.rpc.Status\"\322\001\n\021Test" - + "RunDifference\022L\n\004type\030\001 \001(\0162>.google.clo" - + "ud.dialogflow.cx.v3beta1.TestRunDifferen" - + "ce.DiffType\022\023\n\013description\030\002 \001(\t\"Z\n\010Diff" - + "Type\022\031\n\025DIFF_TYPE_UNSPECIFIED\020\000\022\n\n\006INTEN" - + "T\020\001\022\010\n\004PAGE\020\002\022\016\n\nPARAMETERS\020\003\022\r\n\tUTTERAN" - + "CE\020\004\"\226\005\n\022TransitionCoverage\022V\n\013transitio" - + "ns\030\001 \003(\0132A.google.cloud.dialogflow.cx.v3" - + "beta1.TransitionCoverage.Transition\022\026\n\016c" - + "overage_score\030\002 \001(\002\032\214\001\n\016TransitionNode\0228" - + "\n\004page\030\001 \001(\0132(.google.cloud.dialogflow.c" - + "x.v3beta1.PageH\000\0228\n\004flow\030\002 \001(\0132(.google." - + "cloud.dialogflow.cx.v3beta1.FlowH\000B\006\n\004ki" - + "nd\032\200\003\n\nTransition\022U\n\006source\030\001 \001(\0132E.goog" - + "le.cloud.dialogflow.cx.v3beta1.Transitio" - + "nCoverage.TransitionNode\022\r\n\005index\030\004 \001(\005\022" - + "U\n\006target\030\002 \001(\0132E.google.cloud.dialogflo" - + "w.cx.v3beta1.TransitionCoverage.Transiti" - + "onNode\022\017\n\007covered\030\003 \001(\010\022O\n\020transition_ro" - + "ute\030\005 \001(\01323.google.cloud.dialogflow.cx.v" - + "3beta1.TransitionRouteH\000\022I\n\revent_handle" - + "r\030\006 \001(\01320.google.cloud.dialogflow.cx.v3b" - + "eta1.EventHandlerH\000B\010\n\006detail\"\306\001\n\016Intent" - + "Coverage\022J\n\007intents\030\001 \003(\01329.google.cloud" - + ".dialogflow.cx.v3beta1.IntentCoverage.In" - + "tent\022\026\n\016coverage_score\030\002 \001(\002\032P\n\006Intent\0225" - + "\n\006intent\030\001 \001(\tB%\372A\"\n dialogflow.googleap" - + "is.com/Intent\022\017\n\007covered\030\002 \001(\010\"\200\002\n\030Calcu" - + "lateCoverageRequest\0226\n\005agent\030\003 \001(\tB\'\340A\002\372" - + "A!\n\037dialogflow.googleapis.com/Agent\022\\\n\004t" - + "ype\030\002 \001(\0162I.google.cloud.dialogflow.cx.v" - + "3beta1.CalculateCoverageRequest.Coverage" - + "TypeB\003\340A\002\"N\n\014CoverageType\022\035\n\031COVERAGE_TY" - + "PE_UNSPECIFIED\020\000\022\n\n\006INTENT\020\001\022\023\n\017PAGE_TRA" - + "NSITION\020\002\"\207\002\n\031CalculateCoverageResponse\022" - + "3\n\005agent\030\005 \001(\tB$\372A!\n\037dialogflow.googleap" - + "is.com/Agent\022M\n\017intent_coverage\030\002 \001(\01322." - + "google.cloud.dialogflow.cx.v3beta1.Inten" - + "tCoverageH\000\022U\n\023transition_coverage\030\004 \001(\013" - + "26.google.cloud.dialogflow.cx.v3beta1.Tr" - + "ansitionCoverageH\000B\017\n\rcoverage_type\"\223\002\n\024" - + "ListTestCasesRequest\022:\n\006parent\030\001 \001(\tB*\340A" - + "\002\372A$\022\"dialogflow.googleapis.com/TestCase" - + "\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022" - + "S\n\004view\030\004 \001(\0162E.google.cloud.dialogflow." - + "cx.v3beta1.ListTestCasesRequest.TestCase" - + "View\"C\n\014TestCaseView\022\036\n\032TEST_CASE_VIEW_U" - + "NSPECIFIED\020\000\022\t\n\005BASIC\020\001\022\010\n\004FULL\020\002\"r\n\025Lis" - + "tTestCasesResponse\022@\n\ntest_cases\030\001 \003(\0132," - + ".google.cloud.dialogflow.cx.v3beta1.Test" - + "Case\022\027\n\017next_page_token\030\002 \001(\t\"\224\001\n\033BatchD" - + "eleteTestCasesRequest\022:\n\006parent\030\001 \001(\tB*\340" + + "estCases/{test_case}\"\265\003\n\016TestCaseResult\022" + + "\014\n\004name\030\001 \001(\t\022?\n\013environment\030\002 \001(\tB*\372A\'\n" + + "%dialogflow.googleapis.com/Environment\022P" + + "\n\022conversation_turns\030\003 \003(\01324.google.clou" + + "d.dialogflow.cx.v3beta1.ConversationTurn" + + "\022C\n\013test_result\030\004 \001(\0162..google.cloud.dia" + + "logflow.cx.v3beta1.TestResult\022-\n\ttest_ti" + + "me\030\005 \001(\0132\032.google.protobuf.Timestamp:\215\001\352" + + "A\211\001\n(dialogflow.googleapis.com/TestCaseR" + + "esult\022]projects/{project}/locations/{loc" + + "ation}/agents/{agent}/testCases/{test_ca" + + "se}/results/{result}\"\\\n\nTestConfig\022\033\n\023tr" + + "acking_parameters\030\001 \003(\t\0221\n\004flow\030\002 \001(\tB#\372" + + "A \n\036dialogflow.googleapis.com/Flow\"\277\006\n\020C" + + "onversationTurn\022R\n\nuser_input\030\001 \001(\0132>.go" + + "ogle.cloud.dialogflow.cx.v3beta1.Convers" + + "ationTurn.UserInput\022e\n\024virtual_agent_out" + + "put\030\002 \001(\0132G.google.cloud.dialogflow.cx.v" + + "3beta1.ConversationTurn.VirtualAgentOutp" + + "ut\032\234\001\n\tUserInput\022=\n\005input\030\005 \001(\0132..google" + + ".cloud.dialogflow.cx.v3beta1.QueryInput\022" + + "4\n\023injected_parameters\030\002 \001(\0132\027.google.pr" + + "otobuf.Struct\022\032\n\022is_webhook_enabled\030\003 \001(" + + "\010\032\320\003\n\022VirtualAgentOutput\0223\n\022session_para" + + "meters\030\004 \001(\0132\027.google.protobuf.Struct\022O\n" + + "\013differences\030\005 \003(\01325.google.cloud.dialog" + + "flow.cx.v3beta1.TestRunDifferenceB\003\340A\003\0228" + + "\n\017diagnostic_info\030\006 \001(\0132\027.google.protobu" + + "f.StructB\006\340A\002\340A\004\022D\n\020triggered_intent\030\007 \001" + + "(\0132*.google.cloud.dialogflow.cx.v3beta1." + + "Intent\022>\n\014current_page\030\010 \001(\0132(.google.cl" + + "oud.dialogflow.cx.v3beta1.Page\022P\n\016text_r" + + "esponses\030\t \003(\01328.google.cloud.dialogflow" + + ".cx.v3beta1.ResponseMessage.Text\022\"\n\006stat" + + "us\030\n \001(\0132\022.google.rpc.Status\"\322\001\n\021TestRun" + + "Difference\022L\n\004type\030\001 \001(\0162>.google.cloud." + + "dialogflow.cx.v3beta1.TestRunDifference." + + "DiffType\022\023\n\013description\030\002 \001(\t\"Z\n\010DiffTyp" + + "e\022\031\n\025DIFF_TYPE_UNSPECIFIED\020\000\022\n\n\006INTENT\020\001" + + "\022\010\n\004PAGE\020\002\022\016\n\nPARAMETERS\020\003\022\r\n\tUTTERANCE\020" + + "\004\"\226\005\n\022TransitionCoverage\022V\n\013transitions\030" + + "\001 \003(\0132A.google.cloud.dialogflow.cx.v3bet" + + "a1.TransitionCoverage.Transition\022\026\n\016cove" + + "rage_score\030\002 \001(\002\032\214\001\n\016TransitionNode\0228\n\004p" + + "age\030\001 \001(\0132(.google.cloud.dialogflow.cx.v" + + "3beta1.PageH\000\0228\n\004flow\030\002 \001(\0132(.google.clo" + + "ud.dialogflow.cx.v3beta1.FlowH\000B\006\n\004kind\032" + + "\200\003\n\nTransition\022U\n\006source\030\001 \001(\0132E.google." + + "cloud.dialogflow.cx.v3beta1.TransitionCo" + + "verage.TransitionNode\022\r\n\005index\030\004 \001(\005\022U\n\006" + + "target\030\002 \001(\0132E.google.cloud.dialogflow.c" + + "x.v3beta1.TransitionCoverage.TransitionN" + + "ode\022\017\n\007covered\030\003 \001(\010\022O\n\020transition_route" + + "\030\005 \001(\01323.google.cloud.dialogflow.cx.v3be" + + "ta1.TransitionRouteH\000\022I\n\revent_handler\030\006" + + " \001(\01320.google.cloud.dialogflow.cx.v3beta" + + "1.EventHandlerH\000B\010\n\006detail\"\306\001\n\016IntentCov" + + "erage\022J\n\007intents\030\001 \003(\01329.google.cloud.di" + + "alogflow.cx.v3beta1.IntentCoverage.Inten" + + "t\022\026\n\016coverage_score\030\002 \001(\002\032P\n\006Intent\0225\n\006i" + + "ntent\030\001 \001(\tB%\372A\"\n dialogflow.googleapis." + + "com/Intent\022\017\n\007covered\030\002 \001(\010\"\200\002\n\030Calculat" + + "eCoverageRequest\0226\n\005agent\030\003 \001(\tB\'\340A\002\372A!\n" + + "\037dialogflow.googleapis.com/Agent\022\\\n\004type" + + "\030\002 \001(\0162I.google.cloud.dialogflow.cx.v3be" + + "ta1.CalculateCoverageRequest.CoverageTyp" + + "eB\003\340A\002\"N\n\014CoverageType\022\035\n\031COVERAGE_TYPE_" + + "UNSPECIFIED\020\000\022\n\n\006INTENT\020\001\022\023\n\017PAGE_TRANSI" + + "TION\020\002\"\207\002\n\031CalculateCoverageResponse\0223\n\005" + + "agent\030\005 \001(\tB$\372A!\n\037dialogflow.googleapis." + + "com/Agent\022M\n\017intent_coverage\030\002 \001(\01322.goo" + + "gle.cloud.dialogflow.cx.v3beta1.IntentCo" + + "verageH\000\022U\n\023transition_coverage\030\004 \001(\01326." + + "google.cloud.dialogflow.cx.v3beta1.Trans" + + "itionCoverageH\000B\017\n\rcoverage_type\"\223\002\n\024Lis" + + "tTestCasesRequest\022:\n\006parent\030\001 \001(\tB*\340A\002\372A" + + "$\022\"dialogflow.googleapis.com/TestCase\022\021\n" + + "\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022S\n\004" + + "view\030\004 \001(\0162E.google.cloud.dialogflow.cx." + + "v3beta1.ListTestCasesRequest.TestCaseVie" + + "w\"C\n\014TestCaseView\022\036\n\032TEST_CASE_VIEW_UNSP" + + "ECIFIED\020\000\022\t\n\005BASIC\020\001\022\010\n\004FULL\020\002\"r\n\025ListTe" + + "stCasesResponse\022@\n\ntest_cases\030\001 \003(\0132,.go" + + "ogle.cloud.dialogflow.cx.v3beta1.TestCas" + + "e\022\027\n\017next_page_token\030\002 \001(\t\"\224\001\n\033BatchDele" + + "teTestCasesRequest\022:\n\006parent\030\001 \001(\tB*\340A\002\372" + + "A$\022\"dialogflow.googleapis.com/TestCase\0229" + + "\n\005names\030\003 \003(\tB*\340A\002\372A$\n\"dialogflow.google" + + "apis.com/TestCase\"\231\001\n\025CreateTestCaseRequ" + + "est\022:\n\006parent\030\001 \001(\tB*\340A\002\372A$\022\"dialogflow." + + "googleapis.com/TestCase\022D\n\ttest_case\030\002 \001" + + "(\0132,.google.cloud.dialogflow.cx.v3beta1." + + "TestCaseB\003\340A\002\"\223\001\n\025UpdateTestCaseRequest\022" + + "D\n\ttest_case\030\001 \001(\0132,.google.cloud.dialog" + + "flow.cx.v3beta1.TestCaseB\003\340A\002\0224\n\013update_" + + "mask\030\002 \001(\0132\032.google.protobuf.FieldMaskB\003" + + "\340A\002\"N\n\022GetTestCaseRequest\0228\n\004name\030\001 \001(\tB" + + "*\340A\002\372A$\n\"dialogflow.googleapis.com/TestC" + + "ase\"\222\001\n\022RunTestCaseRequest\0228\n\004name\030\001 \001(\t" + + "B*\340A\002\372A$\n\"dialogflow.googleapis.com/Test" + + "Case\022B\n\013environment\030\002 \001(\tB-\340A\001\372A\'\n%dialo" + + "gflow.googleapis.com/Environment\"Y\n\023RunT" + + "estCaseResponse\022B\n\006result\030\002 \001(\01322.google" + + ".cloud.dialogflow.cx.v3beta1.TestCaseRes" + + "ult\"\025\n\023RunTestCaseMetadata\"\332\001\n\030BatchRunT" + + "estCasesRequest\022:\n\006parent\030\001 \001(\tB*\340A\002\372A$\022" + + "\"dialogflow.googleapis.com/TestCase\022B\n\013e" + + "nvironment\030\002 \001(\tB-\340A\001\372A\'\n%dialogflow.goo" + + "gleapis.com/Environment\022>\n\ntest_cases\030\003 " + + "\003(\tB*\340A\002\372A$\n\"dialogflow.googleapis.com/T" + + "estCase\"`\n\031BatchRunTestCasesResponse\022C\n\007" + + "results\030\001 \003(\01322.google.cloud.dialogflow." + + "cx.v3beta1.TestCaseResult\"Z\n\031BatchRunTes" + + "tCasesMetadata\022=\n\006errors\030\001 \003(\0132-.google." + + "cloud.dialogflow.cx.v3beta1.TestError\"\232\001" + + "\n\tTestError\022:\n\ttest_case\030\001 \001(\tB\'\372A$\n\"dia" + + "logflow.googleapis.com/TestCase\022\"\n\006statu" + + "s\030\002 \001(\0132\022.google.rpc.Status\022-\n\ttest_time" + + "\030\003 \001(\0132\032.google.protobuf.Timestamp\"\204\001\n\026I" + + "mportTestCasesRequest\022:\n\006parent\030\001 \001(\tB*\340" + "A\002\372A$\022\"dialogflow.googleapis.com/TestCas" - + "e\0229\n\005names\030\003 \003(\tB*\340A\002\372A$\n\"dialogflow.goo" - + "gleapis.com/TestCase\"\231\001\n\025CreateTestCaseR" - + "equest\022:\n\006parent\030\001 \001(\tB*\340A\002\372A$\022\"dialogfl" - + "ow.googleapis.com/TestCase\022D\n\ttest_case\030" - + "\002 \001(\0132,.google.cloud.dialogflow.cx.v3bet" - + "a1.TestCaseB\003\340A\002\"\223\001\n\025UpdateTestCaseReque" - + "st\022D\n\ttest_case\030\001 \001(\0132,.google.cloud.dia" - + "logflow.cx.v3beta1.TestCaseB\003\340A\002\0224\n\013upda" - + "te_mask\030\002 \001(\0132\032.google.protobuf.FieldMas" - + "kB\003\340A\002\"N\n\022GetTestCaseRequest\0228\n\004name\030\001 \001" - + "(\tB*\340A\002\372A$\n\"dialogflow.googleapis.com/Te" - + "stCase\"\222\001\n\022RunTestCaseRequest\0228\n\004name\030\001 " - + "\001(\tB*\340A\002\372A$\n\"dialogflow.googleapis.com/T" - + "estCase\022B\n\013environment\030\002 \001(\tB-\340A\001\372A\'\n%di" - + "alogflow.googleapis.com/Environment\"Y\n\023R" - + "unTestCaseResponse\022B\n\006result\030\002 \001(\01322.goo" + + "e\022\021\n\007gcs_uri\030\002 \001(\tH\000\022\021\n\007content\030\003 \001(\014H\000B" + + "\010\n\006source\"Q\n\027ImportTestCasesResponse\0226\n\005" + + "names\030\001 \003(\tB\'\372A$\n\"dialogflow.googleapis." + + "com/TestCase\"\\\n\027ImportTestCasesMetadata\022" + + "A\n\006errors\030\001 \003(\01321.google.cloud.dialogflo" + + "w.cx.v3beta1.TestCaseError\"t\n\rTestCaseEr" + + "ror\022?\n\ttest_case\030\001 \001(\0132,.google.cloud.di" + + "alogflow.cx.v3beta1.TestCase\022\"\n\006status\030\002" + + " \001(\0132\022.google.rpc.Status\"\241\002\n\026ExportTestC" + + "asesRequest\022:\n\006parent\030\001 \001(\tB*\340A\002\372A$\022\"dia" + + "logflow.googleapis.com/TestCase\022\021\n\007gcs_u" + + "ri\030\002 \001(\tH\000\022Z\n\013data_format\030\003 \001(\0162E.google" + + ".cloud.dialogflow.cx.v3beta1.ExportTestC" + + "asesRequest.DataFormat\022\016\n\006filter\030\004 \001(\t\"=" + + "\n\nDataFormat\022\033\n\027DATA_FORMAT_UNSPECIFIED\020" + + "\000\022\010\n\004BLOB\020\001\022\010\n\004JSON\020\002B\r\n\013destination\"N\n\027" + + "ExportTestCasesResponse\022\021\n\007gcs_uri\030\001 \001(\t" + + "H\000\022\021\n\007content\030\002 \001(\014H\000B\r\n\013destination\"\031\n\027" + + "ExportTestCasesMetadata\"\225\001\n\032ListTestCase" + + "ResultsRequest\022@\n\006parent\030\001 \001(\tB0\340A\002\372A*\022(" + + "dialogflow.googleapis.com/TestCaseResult" + + "\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022" + + "\016\n\006filter\030\004 \001(\t\"\205\001\n\033ListTestCaseResultsR" + + "esponse\022M\n\021test_case_results\030\001 \003(\01322.goo" + "gle.cloud.dialogflow.cx.v3beta1.TestCase" - + "Result\"\025\n\023RunTestCaseMetadata\"\332\001\n\030BatchR" - + "unTestCasesRequest\022:\n\006parent\030\001 \001(\tB*\340A\002\372" - + "A$\022\"dialogflow.googleapis.com/TestCase\022B" - + "\n\013environment\030\002 \001(\tB-\340A\001\372A\'\n%dialogflow." - + "googleapis.com/Environment\022>\n\ntest_cases" - + "\030\003 \003(\tB*\340A\002\372A$\n\"dialogflow.googleapis.co" - + "m/TestCase\"`\n\031BatchRunTestCasesResponse\022" - + "C\n\007results\030\001 \003(\01322.google.cloud.dialogfl" - + "ow.cx.v3beta1.TestCaseResult\"Z\n\031BatchRun" - + "TestCasesMetadata\022=\n\006errors\030\001 \003(\0132-.goog" - + "le.cloud.dialogflow.cx.v3beta1.TestError" - + "\"\232\001\n\tTestError\022:\n\ttest_case\030\001 \001(\tB\'\372A$\n\"" - + "dialogflow.googleapis.com/TestCase\022\"\n\006st" - + "atus\030\002 \001(\0132\022.google.rpc.Status\022-\n\ttest_t" - + "ime\030\003 \001(\0132\032.google.protobuf.Timestamp\"\204\001" - + "\n\026ImportTestCasesRequest\022:\n\006parent\030\001 \001(\t" - + "B*\340A\002\372A$\022\"dialogflow.googleapis.com/Test" - + "Case\022\021\n\007gcs_uri\030\002 \001(\tH\000\022\021\n\007content\030\003 \001(\014" - + "H\000B\010\n\006source\"Q\n\027ImportTestCasesResponse\022" - + "6\n\005names\030\001 \003(\tB\'\372A$\n\"dialogflow.googleap" - + "is.com/TestCase\"\\\n\027ImportTestCasesMetada" - + "ta\022A\n\006errors\030\001 \003(\01321.google.cloud.dialog" - + "flow.cx.v3beta1.TestCaseError\"t\n\rTestCas" - + "eError\022?\n\ttest_case\030\001 \001(\0132,.google.cloud" - + ".dialogflow.cx.v3beta1.TestCase\022\"\n\006statu" - + "s\030\002 \001(\0132\022.google.rpc.Status\"\241\002\n\026ExportTe" - + "stCasesRequest\022:\n\006parent\030\001 \001(\tB*\340A\002\372A$\022\"" - + "dialogflow.googleapis.com/TestCase\022\021\n\007gc" - + "s_uri\030\002 \001(\tH\000\022Z\n\013data_format\030\003 \001(\0162E.goo" - + "gle.cloud.dialogflow.cx.v3beta1.ExportTe" - + "stCasesRequest.DataFormat\022\016\n\006filter\030\004 \001(" - + "\t\"=\n\nDataFormat\022\033\n\027DATA_FORMAT_UNSPECIFI" - + "ED\020\000\022\010\n\004BLOB\020\001\022\010\n\004JSON\020\002B\r\n\013destination\"" - + "N\n\027ExportTestCasesResponse\022\021\n\007gcs_uri\030\001 " - + "\001(\tH\000\022\021\n\007content\030\002 \001(\014H\000B\r\n\013destination\"" - + "\031\n\027ExportTestCasesMetadata\"\225\001\n\032ListTestC" - + "aseResultsRequest\022@\n\006parent\030\001 \001(\tB0\340A\002\372A" - + "*\022(dialogflow.googleapis.com/TestCaseRes" - + "ult\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001" - + "(\t\022\016\n\006filter\030\004 \001(\t\"\205\001\n\033ListTestCaseResul" - + "tsResponse\022M\n\021test_case_results\030\001 \003(\01322." - + "google.cloud.dialogflow.cx.v3beta1.TestC" - + "aseResult\022\027\n\017next_page_token\030\002 \001(\t*A\n\nTe" - + "stResult\022\033\n\027TEST_RESULT_UNSPECIFIED\020\000\022\n\n" - + "\006PASSED\020\001\022\n\n\006FAILED\020\0022\317\024\n\tTestCases\022\322\001\n\r" - + "ListTestCases\0228.google.cloud.dialogflow." - + "cx.v3beta1.ListTestCasesRequest\0329.google" - + ".cloud.dialogflow.cx.v3beta1.ListTestCas" - + "esResponse\"L\202\323\344\223\002=\022;/v3beta1/{parent=pro" - + "jects/*/locations/*/agents/*}/testCases\332" - + "A\006parent\022\314\001\n\024BatchDeleteTestCases\022?.goog" - + "le.cloud.dialogflow.cx.v3beta1.BatchDele" - + "teTestCasesRequest\032\026.google.protobuf.Emp" - + "ty\"[\202\323\344\223\002L\"G/v3beta1/{parent=projects/*/" - + "locations/*/agents/*}/testCases:batchDel" - + "ete:\001*\332A\006parent\022\277\001\n\013GetTestCase\0226.google" - + ".cloud.dialogflow.cx.v3beta1.GetTestCase" - + "Request\032,.google.cloud.dialogflow.cx.v3b" - + "eta1.TestCase\"J\202\323\344\223\002=\022;/v3beta1/{name=pr" - + "ojects/*/locations/*/agents/*/testCases/" - + "*}\332A\004name\022\334\001\n\016CreateTestCase\0229.google.cl" - + "oud.dialogflow.cx.v3beta1.CreateTestCase" - + "Request\032,.google.cloud.dialogflow.cx.v3b" - + "eta1.TestCase\"a\202\323\344\223\002H\";/v3beta1/{parent=" - + "projects/*/locations/*/agents/*}/testCas" - + "es:\ttest_case\332A\020parent,test_case\022\353\001\n\016Upd" - + "ateTestCase\0229.google.cloud.dialogflow.cx" - + ".v3beta1.UpdateTestCaseRequest\032,.google." - + "cloud.dialogflow.cx.v3beta1.TestCase\"p\202\323" - + "\344\223\002R2E/v3beta1/{test_case.name=projects/" - + "*/locations/*/agents/*/testCases/*}:\ttes" - + "t_case\332A\025test_case,update_mask\022\324\001\n\013RunTe" - + "stCase\0226.google.cloud.dialogflow.cx.v3be" - + "ta1.RunTestCaseRequest\032\035.google.longrunn" - + "ing.Operation\"n\202\323\344\223\002;\"6/v3beta1/projects" - + "/*/locations/*/agents/*/testCases:run:\001*" - + "\312A*\n\023RunTestCaseResponse\022\023RunTestCaseMet" - + "adata\022\373\001\n\021BatchRunTestCases\022<.google.clo" - + "ud.dialogflow.cx.v3beta1.BatchRunTestCas" + + "Result\022\027\n\017next_page_token\030\002 \001(\t*A\n\nTestR" + + "esult\022\033\n\027TEST_RESULT_UNSPECIFIED\020\000\022\n\n\006PA" + + "SSED\020\001\022\n\n\006FAILED\020\0022\317\024\n\tTestCases\022\322\001\n\rLis" + + "tTestCases\0228.google.cloud.dialogflow.cx." + + "v3beta1.ListTestCasesRequest\0329.google.cl" + + "oud.dialogflow.cx.v3beta1.ListTestCasesR" + + "esponse\"L\202\323\344\223\002=\022;/v3beta1/{parent=projec" + + "ts/*/locations/*/agents/*}/testCases\332A\006p" + + "arent\022\314\001\n\024BatchDeleteTestCases\022?.google." + + "cloud.dialogflow.cx.v3beta1.BatchDeleteT" + + "estCasesRequest\032\026.google.protobuf.Empty\"" + + "[\202\323\344\223\002L\"G/v3beta1/{parent=projects/*/loc" + + "ations/*/agents/*}/testCases:batchDelete" + + ":\001*\332A\006parent\022\277\001\n\013GetTestCase\0226.google.cl" + + "oud.dialogflow.cx.v3beta1.GetTestCaseReq" + + "uest\032,.google.cloud.dialogflow.cx.v3beta" + + "1.TestCase\"J\202\323\344\223\002=\022;/v3beta1/{name=proje" + + "cts/*/locations/*/agents/*/testCases/*}\332" + + "A\004name\022\334\001\n\016CreateTestCase\0229.google.cloud" + + ".dialogflow.cx.v3beta1.CreateTestCaseReq" + + "uest\032,.google.cloud.dialogflow.cx.v3beta" + + "1.TestCase\"a\202\323\344\223\002H\";/v3beta1/{parent=pro" + + "jects/*/locations/*/agents/*}/testCases:" + + "\ttest_case\332A\020parent,test_case\022\353\001\n\016Update" + + "TestCase\0229.google.cloud.dialogflow.cx.v3" + + "beta1.UpdateTestCaseRequest\032,.google.clo" + + "ud.dialogflow.cx.v3beta1.TestCase\"p\202\323\344\223\002" + + "R2E/v3beta1/{test_case.name=projects/*/l" + + "ocations/*/agents/*/testCases/*}:\ttest_c" + + "ase\332A\025test_case,update_mask\022\324\001\n\013RunTestC" + + "ase\0226.google.cloud.dialogflow.cx.v3beta1" + + ".RunTestCaseRequest\032\035.google.longrunning" + + ".Operation\"n\202\323\344\223\002;\"6/v3beta1/projects/*/" + + "locations/*/agents/*/testCases:run:\001*\312A*" + + "\n\023RunTestCaseResponse\022\023RunTestCaseMetada" + + "ta\022\373\001\n\021BatchRunTestCases\022<.google.cloud." + + "dialogflow.cx.v3beta1.BatchRunTestCasesR" + + "equest\032\035.google.longrunning.Operation\"\210\001" + + "\202\323\344\223\002I\"D/v3beta1/{parent=projects/*/loca" + + "tions/*/agents/*}/testCases:batchRun:\001*\312" + + "A6\n\031BatchRunTestCasesResponse\022\031BatchRunT" + + "estCasesMetadata\022\346\001\n\021CalculateCoverage\022<" + + ".google.cloud.dialogflow.cx.v3beta1.Calc" + + "ulateCoverageRequest\032=.google.cloud.dial" + + "ogflow.cx.v3beta1.CalculateCoverageRespo" + + "nse\"T\202\323\344\223\002N\022L/v3beta1/{agent=projects/*/" + + "locations/*/agents/*}/testCases:calculat" + + "eCoverage\022\361\001\n\017ImportTestCases\022:.google.c" + + "loud.dialogflow.cx.v3beta1.ImportTestCas" + "esRequest\032\035.google.longrunning.Operation" - + "\"\210\001\202\323\344\223\002I\"D/v3beta1/{parent=projects/*/l" - + "ocations/*/agents/*}/testCases:batchRun:" - + "\001*\312A6\n\031BatchRunTestCasesResponse\022\031BatchR" - + "unTestCasesMetadata\022\346\001\n\021CalculateCoverag" - + "e\022<.google.cloud.dialogflow.cx.v3beta1.C" - + "alculateCoverageRequest\032=.google.cloud.d" - + "ialogflow.cx.v3beta1.CalculateCoverageRe" - + "sponse\"T\202\323\344\223\002N\022L/v3beta1/{agent=projects" - + "/*/locations/*/agents/*}/testCases:calcu" - + "lateCoverage\022\361\001\n\017ImportTestCases\022:.googl" - + "e.cloud.dialogflow.cx.v3beta1.ImportTest" - + "CasesRequest\032\035.google.longrunning.Operat" - + "ion\"\202\001\202\323\344\223\002G\"B/v3beta1/{parent=projects/" - + "*/locations/*/agents/*}/testCases:import" - + ":\001*\312A2\n\027ImportTestCasesResponse\022\027ImportT" - + "estCasesMetadata\022\361\001\n\017ExportTestCases\022:.g" - + "oogle.cloud.dialogflow.cx.v3beta1.Export" - + "TestCasesRequest\032\035.google.longrunning.Op" - + "eration\"\202\001\202\323\344\223\002G\"B/v3beta1/{parent=proje" - + "cts/*/locations/*/agents/*}/testCases:ex" - + "port:\001*\312A2\n\027ExportTestCasesResponse\022\027Exp" - + "ortTestCasesMetadata\022\356\001\n\023ListTestCaseRes" - + "ults\022>.google.cloud.dialogflow.cx.v3beta" - + "1.ListTestCaseResultsRequest\032?.google.cl" - + "oud.dialogflow.cx.v3beta1.ListTestCaseRe" - + "sultsResponse\"V\202\323\344\223\002G\022E/v3beta1/{parent=" - + "projects/*/locations/*/agents/*/testCase" - + "s/*}/results\332A\006parent\032x\312A\031dialogflow.goo" - + "gleapis.com\322AYhttps://www.googleapis.com" - + "/auth/cloud-platform,https://www.googlea" - + "pis.com/auth/dialogflowB\254\001\n&com.google.c" - + "loud.dialogflow.cx.v3beta1B\rTestCaseProt" - + "oP\001ZDgoogle.golang.org/genproto/googleap" - + "is/cloud/dialogflow/cx/v3beta1;cx\370\001\001\242\002\002D" - + "F\252\002\"Google.Cloud.Dialogflow.Cx.V3Beta1b\006" - + "proto3" + + "\"\202\001\202\323\344\223\002G\"B/v3beta1/{parent=projects/*/l" + + "ocations/*/agents/*}/testCases:import:\001*" + + "\312A2\n\027ImportTestCasesResponse\022\027ImportTest" + + "CasesMetadata\022\361\001\n\017ExportTestCases\022:.goog" + + "le.cloud.dialogflow.cx.v3beta1.ExportTes" + + "tCasesRequest\032\035.google.longrunning.Opera" + + "tion\"\202\001\202\323\344\223\002G\"B/v3beta1/{parent=projects" + + "/*/locations/*/agents/*}/testCases:expor" + + "t:\001*\312A2\n\027ExportTestCasesResponse\022\027Export" + + "TestCasesMetadata\022\356\001\n\023ListTestCaseResult" + + "s\022>.google.cloud.dialogflow.cx.v3beta1.L" + + "istTestCaseResultsRequest\032?.google.cloud" + + ".dialogflow.cx.v3beta1.ListTestCaseResul" + + "tsResponse\"V\202\323\344\223\002G\022E/v3beta1/{parent=pro" + + "jects/*/locations/*/agents/*/testCases/*" + + "}/results\332A\006parent\032x\312A\031dialogflow.google" + + "apis.com\322AYhttps://www.googleapis.com/au" + + "th/cloud-platform,https://www.googleapis" + + ".com/auth/dialogflowB\254\001\n&com.google.clou" + + "d.dialogflow.cx.v3beta1B\rTestCaseProtoP\001" + + "ZDgoogle.golang.org/genproto/googleapis/" + + "cloud/dialogflow/cx/v3beta1;cx\370\001\001\242\002\002DF\252\002" + + "\"Google.Cloud.Dialogflow.Cx.V3Beta1b\006pro" + + "to3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseResult.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseResult.java index 019a4ae03..ceddde35f 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseResult.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseResult.java @@ -220,13 +220,11 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-   * Optional. Environment where the test was run. If not set, it indicates the draft
+   * Environment where the test was run. If not set, it indicates the draft
    * environment.
    * 
* - * - * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * + * string environment = 2 [(.google.api.resource_reference) = { ... } * * @return The environment. */ @@ -246,13 +244,11 @@ public java.lang.String getEnvironment() { * * *
-   * Optional. Environment where the test was run. If not set, it indicates the draft
+   * Environment where the test was run. If not set, it indicates the draft
    * environment.
    * 
* - * - * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * + * string environment = 2 [(.google.api.resource_reference) = { ... } * * @return The bytes for environment. */ @@ -993,13 +989,11 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * * *
-     * Optional. Environment where the test was run. If not set, it indicates the draft
+     * Environment where the test was run. If not set, it indicates the draft
      * environment.
      * 
* - * - * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * + * string environment = 2 [(.google.api.resource_reference) = { ... } * * @return The environment. */ @@ -1018,13 +1012,11 @@ public java.lang.String getEnvironment() { * * *
-     * Optional. Environment where the test was run. If not set, it indicates the draft
+     * Environment where the test was run. If not set, it indicates the draft
      * environment.
      * 
* - * - * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * + * string environment = 2 [(.google.api.resource_reference) = { ... } * * @return The bytes for environment. */ @@ -1043,13 +1035,11 @@ public com.google.protobuf.ByteString getEnvironmentBytes() { * * *
-     * Optional. Environment where the test was run. If not set, it indicates the draft
+     * Environment where the test was run. If not set, it indicates the draft
      * environment.
      * 
* - * - * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * + * string environment = 2 [(.google.api.resource_reference) = { ... } * * @param value The environment to set. * @return This builder for chaining. @@ -1067,13 +1057,11 @@ public Builder setEnvironment(java.lang.String value) { * * *
-     * Optional. Environment where the test was run. If not set, it indicates the draft
+     * Environment where the test was run. If not set, it indicates the draft
      * environment.
      * 
* - * - * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * + * string environment = 2 [(.google.api.resource_reference) = { ... } * * @return This builder for chaining. */ @@ -1087,13 +1075,11 @@ public Builder clearEnvironment() { * * *
-     * Optional. Environment where the test was run. If not set, it indicates the draft
+     * Environment where the test was run. If not set, it indicates the draft
      * environment.
      * 
* - * - * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * + * string environment = 2 [(.google.api.resource_reference) = { ... } * * @param value The bytes for environment to set. * @return This builder for chaining. diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseResultOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseResultOrBuilder.java index 0105c126d..62407290e 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseResultOrBuilder.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseResultOrBuilder.java @@ -56,13 +56,11 @@ public interface TestCaseResultOrBuilder * * *
-   * Optional. Environment where the test was run. If not set, it indicates the draft
+   * Environment where the test was run. If not set, it indicates the draft
    * environment.
    * 
* - * - * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * + * string environment = 2 [(.google.api.resource_reference) = { ... } * * @return The environment. */ @@ -71,13 +69,11 @@ public interface TestCaseResultOrBuilder * * *
-   * Optional. Environment where the test was run. If not set, it indicates the draft
+   * Environment where the test was run. If not set, it indicates the draft
    * environment.
    * 
* - * - * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * + * string environment = 2 [(.google.api.resource_reference) = { ... } * * @return The bytes for environment. */ diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateExperimentRequest.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateExperimentRequest.java new file mode 100644 index 000000000..1af4d4e3d --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateExperimentRequest.java @@ -0,0 +1,1052 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/experiment.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The request message for
+ * [Experiments.UpdateExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.UpdateExperiment].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest} + */ +public final class UpdateExperimentRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest) + UpdateExperimentRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateExperimentRequest.newBuilder() to construct. + private UpdateExperimentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateExperimentRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateExperimentRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateExperimentRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Builder subBuilder = null; + if (experiment_ != null) { + subBuilder = experiment_.toBuilder(); + } + experiment_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.Experiment.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(experiment_); + experiment_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateExperimentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateExperimentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest.Builder.class); + } + + public static final int EXPERIMENT_FIELD_NUMBER = 1; + private com.google.cloud.dialogflow.cx.v3beta1.Experiment experiment_; + /** + * + * + *
+   * Required. The experiment to update.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the experiment field is set. + */ + @java.lang.Override + public boolean hasExperiment() { + return experiment_ != null; + } + /** + * + * + *
+   * Required. The experiment to update.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The experiment. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Experiment getExperiment() { + return experiment_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Experiment.getDefaultInstance() + : experiment_; + } + /** + * + * + *
+   * Required. The experiment to update.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExperimentOrBuilder getExperimentOrBuilder() { + return getExperiment(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. The mask to control which fields get updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Required. The mask to control which fields get updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Required. The mask to control which fields get updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (experiment_ != null) { + output.writeMessage(1, getExperiment()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (experiment_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getExperiment()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest other = + (com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest) obj; + + if (hasExperiment() != other.hasExperiment()) return false; + if (hasExperiment()) { + if (!getExperiment().equals(other.getExperiment())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasExperiment()) { + hash = (37 * hash) + EXPERIMENT_FIELD_NUMBER; + hash = (53 * hash) + getExperiment().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for
+   * [Experiments.UpdateExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.UpdateExperiment].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest) + com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateExperimentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateExperimentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (experimentBuilder_ == null) { + experiment_ = null; + } else { + experiment_ = null; + experimentBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateExperimentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest build() { + com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest result = + new com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest(this); + if (experimentBuilder_ == null) { + result.experiment_ = experiment_; + } else { + result.experiment_ = experimentBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest.getDefaultInstance()) + return this; + if (other.hasExperiment()) { + mergeExperiment(other.getExperiment()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.dialogflow.cx.v3beta1.Experiment experiment_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Experiment, + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ExperimentOrBuilder> + experimentBuilder_; + /** + * + * + *
+     * Required. The experiment to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the experiment field is set. + */ + public boolean hasExperiment() { + return experimentBuilder_ != null || experiment_ != null; + } + /** + * + * + *
+     * Required. The experiment to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The experiment. + */ + public com.google.cloud.dialogflow.cx.v3beta1.Experiment getExperiment() { + if (experimentBuilder_ == null) { + return experiment_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Experiment.getDefaultInstance() + : experiment_; + } else { + return experimentBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The experiment to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setExperiment(com.google.cloud.dialogflow.cx.v3beta1.Experiment value) { + if (experimentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + experiment_ = value; + onChanged(); + } else { + experimentBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The experiment to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setExperiment( + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Builder builderForValue) { + if (experimentBuilder_ == null) { + experiment_ = builderForValue.build(); + onChanged(); + } else { + experimentBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The experiment to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeExperiment(com.google.cloud.dialogflow.cx.v3beta1.Experiment value) { + if (experimentBuilder_ == null) { + if (experiment_ != null) { + experiment_ = + com.google.cloud.dialogflow.cx.v3beta1.Experiment.newBuilder(experiment_) + .mergeFrom(value) + .buildPartial(); + } else { + experiment_ = value; + } + onChanged(); + } else { + experimentBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The experiment to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearExperiment() { + if (experimentBuilder_ == null) { + experiment_ = null; + onChanged(); + } else { + experiment_ = null; + experimentBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The experiment to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.Experiment.Builder getExperimentBuilder() { + + onChanged(); + return getExperimentFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The experiment to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ExperimentOrBuilder getExperimentOrBuilder() { + if (experimentBuilder_ != null) { + return experimentBuilder_.getMessageOrBuilder(); + } else { + return experiment_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Experiment.getDefaultInstance() + : experiment_; + } + } + /** + * + * + *
+     * Required. The experiment to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Experiment, + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ExperimentOrBuilder> + getExperimentFieldBuilder() { + if (experimentBuilder_ == null) { + experimentBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Experiment, + com.google.cloud.dialogflow.cx.v3beta1.Experiment.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ExperimentOrBuilder>( + getExperiment(), getParentForChildren(), isClean()); + experiment_ = null; + } + return experimentBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Required. The mask to control which fields get updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * Required. The mask to control which fields get updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The mask to control which fields get updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The mask to control which fields get updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The mask to control which fields get updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The mask to control which fields get updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The mask to control which fields get updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The mask to control which fields get updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Required. The mask to control which fields get updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest) + private static final com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateExperimentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateExperimentRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateExperimentRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateExperimentRequestOrBuilder.java new file mode 100644 index 000000000..15440bde7 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateExperimentRequestOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/experiment.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface UpdateExperimentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The experiment to update.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the experiment field is set. + */ + boolean hasExperiment(); + /** + * + * + *
+   * Required. The experiment to update.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The experiment. + */ + com.google.cloud.dialogflow.cx.v3beta1.Experiment getExperiment(); + /** + * + * + *
+   * Required. The experiment to update.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.ExperimentOrBuilder getExperimentOrBuilder(); + + /** + * + * + *
+   * Required. The mask to control which fields get updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. The mask to control which fields get updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. The mask to control which fields get updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VariantsHistory.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VariantsHistory.java new file mode 100644 index 000000000..77706d146 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VariantsHistory.java @@ -0,0 +1,1118 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/experiment.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The history of variants update.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.VariantsHistory} + */ +public final class VariantsHistory extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.VariantsHistory) + VariantsHistoryOrBuilder { + private static final long serialVersionUID = 0L; + // Use VariantsHistory.newBuilder() to construct. + private VariantsHistory(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VariantsHistory() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VariantsHistory(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private VariantsHistory( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Builder subBuilder = null; + if (variantsCase_ == 1) { + subBuilder = + ((com.google.cloud.dialogflow.cx.v3beta1.VersionVariants) variants_) + .toBuilder(); + } + variants_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.dialogflow.cx.v3beta1.VersionVariants) variants_); + variants_ = subBuilder.buildPartial(); + } + variantsCase_ = 1; + break; + } + case 18: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_VariantsHistory_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_VariantsHistory_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory.class, + com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory.Builder.class); + } + + private int variantsCase_ = 0; + private java.lang.Object variants_; + + public enum VariantsCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + VERSION_VARIANTS(1), + VARIANTS_NOT_SET(0); + private final int value; + + private VariantsCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static VariantsCase valueOf(int value) { + return forNumber(value); + } + + public static VariantsCase forNumber(int value) { + switch (value) { + case 1: + return VERSION_VARIANTS; + case 0: + return VARIANTS_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public VariantsCase getVariantsCase() { + return VariantsCase.forNumber(variantsCase_); + } + + public static final int VERSION_VARIANTS_FIELD_NUMBER = 1; + /** + * + * + *
+   * The flow versions as the variants.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.VersionVariants version_variants = 1; + * + * @return Whether the versionVariants field is set. + */ + @java.lang.Override + public boolean hasVersionVariants() { + return variantsCase_ == 1; + } + /** + * + * + *
+   * The flow versions as the variants.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.VersionVariants version_variants = 1; + * + * @return The versionVariants. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.VersionVariants getVersionVariants() { + if (variantsCase_ == 1) { + return (com.google.cloud.dialogflow.cx.v3beta1.VersionVariants) variants_; + } + return com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.getDefaultInstance(); + } + /** + * + * + *
+   * The flow versions as the variants.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.VersionVariants version_variants = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.VersionVariantsOrBuilder + getVersionVariantsOrBuilder() { + if (variantsCase_ == 1) { + return (com.google.cloud.dialogflow.cx.v3beta1.VersionVariants) variants_; + } + return com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.getDefaultInstance(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Update time of the variants.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Update time of the variants.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Update time of the variants.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (variantsCase_ == 1) { + output.writeMessage(1, (com.google.cloud.dialogflow.cx.v3beta1.VersionVariants) variants_); + } + if (updateTime_ != null) { + output.writeMessage(2, getUpdateTime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (variantsCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.dialogflow.cx.v3beta1.VersionVariants) variants_); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateTime()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory other = + (com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory) obj; + + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getVariantsCase().equals(other.getVariantsCase())) return false; + switch (variantsCase_) { + case 1: + if (!getVersionVariants().equals(other.getVersionVariants())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + switch (variantsCase_) { + case 1: + hash = (37 * hash) + VERSION_VARIANTS_FIELD_NUMBER; + hash = (53 * hash) + getVersionVariants().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The history of variants update.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.VariantsHistory} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.VariantsHistory) + com.google.cloud.dialogflow.cx.v3beta1.VariantsHistoryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_VariantsHistory_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_VariantsHistory_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory.class, + com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + variantsCase_ = 0; + variants_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_VariantsHistory_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory build() { + com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory result = + new com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory(this); + if (variantsCase_ == 1) { + if (versionVariantsBuilder_ == null) { + result.variants_ = variants_; + } else { + result.variants_ = versionVariantsBuilder_.build(); + } + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + result.variantsCase_ = variantsCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory.getDefaultInstance()) + return this; + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + switch (other.getVariantsCase()) { + case VERSION_VARIANTS: + { + mergeVersionVariants(other.getVersionVariants()); + break; + } + case VARIANTS_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int variantsCase_ = 0; + private java.lang.Object variants_; + + public VariantsCase getVariantsCase() { + return VariantsCase.forNumber(variantsCase_); + } + + public Builder clearVariants() { + variantsCase_ = 0; + variants_ = null; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants, + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Builder, + com.google.cloud.dialogflow.cx.v3beta1.VersionVariantsOrBuilder> + versionVariantsBuilder_; + /** + * + * + *
+     * The flow versions as the variants.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.VersionVariants version_variants = 1; + * + * @return Whether the versionVariants field is set. + */ + @java.lang.Override + public boolean hasVersionVariants() { + return variantsCase_ == 1; + } + /** + * + * + *
+     * The flow versions as the variants.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.VersionVariants version_variants = 1; + * + * @return The versionVariants. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.VersionVariants getVersionVariants() { + if (versionVariantsBuilder_ == null) { + if (variantsCase_ == 1) { + return (com.google.cloud.dialogflow.cx.v3beta1.VersionVariants) variants_; + } + return com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.getDefaultInstance(); + } else { + if (variantsCase_ == 1) { + return versionVariantsBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.getDefaultInstance(); + } + } + /** + * + * + *
+     * The flow versions as the variants.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.VersionVariants version_variants = 1; + */ + public Builder setVersionVariants( + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants value) { + if (versionVariantsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + variants_ = value; + onChanged(); + } else { + versionVariantsBuilder_.setMessage(value); + } + variantsCase_ = 1; + return this; + } + /** + * + * + *
+     * The flow versions as the variants.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.VersionVariants version_variants = 1; + */ + public Builder setVersionVariants( + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Builder builderForValue) { + if (versionVariantsBuilder_ == null) { + variants_ = builderForValue.build(); + onChanged(); + } else { + versionVariantsBuilder_.setMessage(builderForValue.build()); + } + variantsCase_ = 1; + return this; + } + /** + * + * + *
+     * The flow versions as the variants.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.VersionVariants version_variants = 1; + */ + public Builder mergeVersionVariants( + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants value) { + if (versionVariantsBuilder_ == null) { + if (variantsCase_ == 1 + && variants_ + != com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.getDefaultInstance()) { + variants_ = + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.newBuilder( + (com.google.cloud.dialogflow.cx.v3beta1.VersionVariants) variants_) + .mergeFrom(value) + .buildPartial(); + } else { + variants_ = value; + } + onChanged(); + } else { + if (variantsCase_ == 1) { + versionVariantsBuilder_.mergeFrom(value); + } + versionVariantsBuilder_.setMessage(value); + } + variantsCase_ = 1; + return this; + } + /** + * + * + *
+     * The flow versions as the variants.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.VersionVariants version_variants = 1; + */ + public Builder clearVersionVariants() { + if (versionVariantsBuilder_ == null) { + if (variantsCase_ == 1) { + variantsCase_ = 0; + variants_ = null; + onChanged(); + } + } else { + if (variantsCase_ == 1) { + variantsCase_ = 0; + variants_ = null; + } + versionVariantsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The flow versions as the variants.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.VersionVariants version_variants = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Builder + getVersionVariantsBuilder() { + return getVersionVariantsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The flow versions as the variants.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.VersionVariants version_variants = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.VersionVariantsOrBuilder + getVersionVariantsOrBuilder() { + if ((variantsCase_ == 1) && (versionVariantsBuilder_ != null)) { + return versionVariantsBuilder_.getMessageOrBuilder(); + } else { + if (variantsCase_ == 1) { + return (com.google.cloud.dialogflow.cx.v3beta1.VersionVariants) variants_; + } + return com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.getDefaultInstance(); + } + } + /** + * + * + *
+     * The flow versions as the variants.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.VersionVariants version_variants = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants, + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Builder, + com.google.cloud.dialogflow.cx.v3beta1.VersionVariantsOrBuilder> + getVersionVariantsFieldBuilder() { + if (versionVariantsBuilder_ == null) { + if (!(variantsCase_ == 1)) { + variants_ = com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.getDefaultInstance(); + } + versionVariantsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants, + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Builder, + com.google.cloud.dialogflow.cx.v3beta1.VersionVariantsOrBuilder>( + (com.google.cloud.dialogflow.cx.v3beta1.VersionVariants) variants_, + getParentForChildren(), + isClean()); + variants_ = null; + } + variantsCase_ = 1; + onChanged(); + ; + return versionVariantsBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Update time of the variants.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Update time of the variants.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Update time of the variants.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Update time of the variants.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Update time of the variants.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Update time of the variants.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Update time of the variants.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Update time of the variants.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Update time of the variants.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.VariantsHistory) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.VariantsHistory) + private static final com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VariantsHistory parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new VariantsHistory(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VariantsHistoryOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VariantsHistoryOrBuilder.java new file mode 100644 index 000000000..053593084 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VariantsHistoryOrBuilder.java @@ -0,0 +1,97 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/experiment.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface VariantsHistoryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.VariantsHistory) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The flow versions as the variants.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.VersionVariants version_variants = 1; + * + * @return Whether the versionVariants field is set. + */ + boolean hasVersionVariants(); + /** + * + * + *
+   * The flow versions as the variants.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.VersionVariants version_variants = 1; + * + * @return The versionVariants. + */ + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants getVersionVariants(); + /** + * + * + *
+   * The flow versions as the variants.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.VersionVariants version_variants = 1; + */ + com.google.cloud.dialogflow.cx.v3beta1.VersionVariantsOrBuilder getVersionVariantsOrBuilder(); + + /** + * + * + *
+   * Update time of the variants.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Update time of the variants.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Update time of the variants.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + public com.google.cloud.dialogflow.cx.v3beta1.VariantsHistory.VariantsCase getVariantsCase(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VersionVariants.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VersionVariants.java new file mode 100644 index 000000000..2cf87f7bd --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VersionVariants.java @@ -0,0 +1,1882 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/experiment.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * A list of flow version variants.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.VersionVariants} + */ +public final class VersionVariants extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.VersionVariants) + VersionVariantsOrBuilder { + private static final long serialVersionUID = 0L; + // Use VersionVariants.newBuilder() to construct. + private VersionVariants(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VersionVariants() { + variants_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VersionVariants(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private VersionVariants( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + variants_ = + new java.util.ArrayList< + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant>(); + mutable_bitField0_ |= 0x00000001; + } + variants_.add( + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + variants_ = java.util.Collections.unmodifiableList(variants_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_VersionVariants_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_VersionVariants_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.class, + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Builder.class); + } + + public interface VariantOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The name of the flow version.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>/versions/<Version ID>`.
+     * 
+ * + * string version = 1; + * + * @return The version. + */ + java.lang.String getVersion(); + /** + * + * + *
+     * The name of the flow version.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>/versions/<Version ID>`.
+     * 
+ * + * string version = 1; + * + * @return The bytes for version. + */ + com.google.protobuf.ByteString getVersionBytes(); + + /** + * + * + *
+     * 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.
+     * 
+ * + * float traffic_allocation = 2; + * + * @return The trafficAllocation. + */ + float getTrafficAllocation(); + + /** + * + * + *
+     * Whether the variant is for the control group.
+     * 
+ * + * bool is_control_group = 3; + * + * @return The isControlGroup. + */ + boolean getIsControlGroup(); + } + /** + * + * + *
+   * A single flow version with specified traffic allocation.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant} + */ + public static final class Variant extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant) + VariantOrBuilder { + private static final long serialVersionUID = 0L; + // Use Variant.newBuilder() to construct. + private Variant(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Variant() { + version_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Variant(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Variant( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + version_ = s; + break; + } + case 21: + { + trafficAllocation_ = input.readFloat(); + break; + } + case 24: + { + isControlGroup_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_VersionVariants_Variant_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_VersionVariants_Variant_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant.class, + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant.Builder.class); + } + + public static final int VERSION_FIELD_NUMBER = 1; + private volatile java.lang.Object version_; + /** + * + * + *
+     * The name of the flow version.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>/versions/<Version ID>`.
+     * 
+ * + * string version = 1; + * + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + /** + * + * + *
+     * The name of the flow version.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>/versions/<Version ID>`.
+     * 
+ * + * string version = 1; + * + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TRAFFIC_ALLOCATION_FIELD_NUMBER = 2; + private float trafficAllocation_; + /** + * + * + *
+     * 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.
+     * 
+ * + * float traffic_allocation = 2; + * + * @return The trafficAllocation. + */ + @java.lang.Override + public float getTrafficAllocation() { + return trafficAllocation_; + } + + public static final int IS_CONTROL_GROUP_FIELD_NUMBER = 3; + private boolean isControlGroup_; + /** + * + * + *
+     * Whether the variant is for the control group.
+     * 
+ * + * bool is_control_group = 3; + * + * @return The isControlGroup. + */ + @java.lang.Override + public boolean getIsControlGroup() { + return isControlGroup_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, version_); + } + if (trafficAllocation_ != 0F) { + output.writeFloat(2, trafficAllocation_); + } + if (isControlGroup_ != false) { + output.writeBool(3, isControlGroup_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, version_); + } + if (trafficAllocation_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, trafficAllocation_); + } + if (isControlGroup_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, isControlGroup_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant other = + (com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant) obj; + + if (!getVersion().equals(other.getVersion())) return false; + if (java.lang.Float.floatToIntBits(getTrafficAllocation()) + != java.lang.Float.floatToIntBits(other.getTrafficAllocation())) return false; + if (getIsControlGroup() != other.getIsControlGroup()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + hash = (37 * hash) + TRAFFIC_ALLOCATION_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getTrafficAllocation()); + hash = (37 * hash) + IS_CONTROL_GROUP_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsControlGroup()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * A single flow version with specified traffic allocation.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant) + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.VariantOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_VersionVariants_Variant_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_VersionVariants_Variant_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant.class, + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + version_ = ""; + + trafficAllocation_ = 0F; + + isControlGroup_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_VersionVariants_Variant_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant build() { + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant result = + new com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant(this); + result.version_ = version_; + result.trafficAllocation_ = trafficAllocation_; + result.isControlGroup_ = isControlGroup_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant.getDefaultInstance()) + return this; + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + onChanged(); + } + if (other.getTrafficAllocation() != 0F) { + setTrafficAllocation(other.getTrafficAllocation()); + } + if (other.getIsControlGroup() != false) { + setIsControlGroup(other.getIsControlGroup()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object version_ = ""; + /** + * + * + *
+       * The name of the flow version.
+       * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+       * ID>/flows/<Flow ID>/versions/<Version ID>`.
+       * 
+ * + * string version = 1; + * + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The name of the flow version.
+       * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+       * ID>/flows/<Flow ID>/versions/<Version ID>`.
+       * 
+ * + * string version = 1; + * + * @return The bytes for version. + */ + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The name of the flow version.
+       * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+       * ID>/flows/<Flow ID>/versions/<Version ID>`.
+       * 
+ * + * string version = 1; + * + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + version_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The name of the flow version.
+       * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+       * ID>/flows/<Flow ID>/versions/<Version ID>`.
+       * 
+ * + * string version = 1; + * + * @return This builder for chaining. + */ + public Builder clearVersion() { + + version_ = getDefaultInstance().getVersion(); + onChanged(); + return this; + } + /** + * + * + *
+       * The name of the flow version.
+       * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+       * ID>/flows/<Flow ID>/versions/<Version ID>`.
+       * 
+ * + * string version = 1; + * + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + version_ = value; + onChanged(); + return this; + } + + private float trafficAllocation_; + /** + * + * + *
+       * 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.
+       * 
+ * + * float traffic_allocation = 2; + * + * @return The trafficAllocation. + */ + @java.lang.Override + public float getTrafficAllocation() { + return trafficAllocation_; + } + /** + * + * + *
+       * 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.
+       * 
+ * + * float traffic_allocation = 2; + * + * @param value The trafficAllocation to set. + * @return This builder for chaining. + */ + public Builder setTrafficAllocation(float value) { + + trafficAllocation_ = value; + onChanged(); + 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.
+       * 
+ * + * float traffic_allocation = 2; + * + * @return This builder for chaining. + */ + public Builder clearTrafficAllocation() { + + trafficAllocation_ = 0F; + onChanged(); + return this; + } + + private boolean isControlGroup_; + /** + * + * + *
+       * Whether the variant is for the control group.
+       * 
+ * + * bool is_control_group = 3; + * + * @return The isControlGroup. + */ + @java.lang.Override + public boolean getIsControlGroup() { + return isControlGroup_; + } + /** + * + * + *
+       * Whether the variant is for the control group.
+       * 
+ * + * bool is_control_group = 3; + * + * @param value The isControlGroup to set. + * @return This builder for chaining. + */ + public Builder setIsControlGroup(boolean value) { + + isControlGroup_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Whether the variant is for the control group.
+       * 
+ * + * bool is_control_group = 3; + * + * @return This builder for chaining. + */ + public Builder clearIsControlGroup() { + + isControlGroup_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant) + private static final com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Variant parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Variant(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int VARIANTS_FIELD_NUMBER = 1; + private java.util.List variants_; + /** + * + * + *
+   * A list of flow version variants.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant variants = 1; + */ + @java.lang.Override + public java.util.List + getVariantsList() { + return variants_; + } + /** + * + * + *
+   * A list of flow version variants.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant variants = 1; + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.VariantOrBuilder> + getVariantsOrBuilderList() { + return variants_; + } + /** + * + * + *
+   * A list of flow version variants.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant variants = 1; + */ + @java.lang.Override + public int getVariantsCount() { + return variants_.size(); + } + /** + * + * + *
+   * A list of flow version variants.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant variants = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant getVariants(int index) { + return variants_.get(index); + } + /** + * + * + *
+   * A list of flow version variants.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant variants = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.VariantOrBuilder + getVariantsOrBuilder(int index) { + return variants_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < variants_.size(); i++) { + output.writeMessage(1, variants_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < variants_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, variants_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.VersionVariants)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants other = + (com.google.cloud.dialogflow.cx.v3beta1.VersionVariants) obj; + + if (!getVariantsList().equals(other.getVariantsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getVariantsCount() > 0) { + hash = (37 * hash) + VARIANTS_FIELD_NUMBER; + hash = (53 * hash) + getVariantsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.VersionVariants parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.VersionVariants parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.VersionVariants parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.VersionVariants parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.VersionVariants parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.VersionVariants parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.VersionVariants parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.VersionVariants parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.VersionVariants parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.VersionVariants parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.VersionVariants parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.VersionVariants parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A list of flow version variants.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.VersionVariants} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.VersionVariants) + com.google.cloud.dialogflow.cx.v3beta1.VersionVariantsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_VersionVariants_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_VersionVariants_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.class, + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getVariantsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (variantsBuilder_ == null) { + variants_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + variantsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_VersionVariants_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.VersionVariants getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.VersionVariants build() { + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.VersionVariants buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants result = + new com.google.cloud.dialogflow.cx.v3beta1.VersionVariants(this); + int from_bitField0_ = bitField0_; + if (variantsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + variants_ = java.util.Collections.unmodifiableList(variants_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.variants_ = variants_; + } else { + result.variants_ = variantsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.VersionVariants) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.VersionVariants) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.VersionVariants other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.getDefaultInstance()) + return this; + if (variantsBuilder_ == null) { + if (!other.variants_.isEmpty()) { + if (variants_.isEmpty()) { + variants_ = other.variants_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureVariantsIsMutable(); + variants_.addAll(other.variants_); + } + onChanged(); + } + } else { + if (!other.variants_.isEmpty()) { + if (variantsBuilder_.isEmpty()) { + variantsBuilder_.dispose(); + variantsBuilder_ = null; + variants_ = other.variants_; + bitField0_ = (bitField0_ & ~0x00000001); + variantsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getVariantsFieldBuilder() + : null; + } else { + variantsBuilder_.addAllMessages(other.variants_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.VersionVariants) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List + variants_ = java.util.Collections.emptyList(); + + private void ensureVariantsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + variants_ = + new java.util.ArrayList( + variants_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant, + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant.Builder, + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.VariantOrBuilder> + variantsBuilder_; + + /** + * + * + *
+     * A list of flow version variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant variants = 1; + * + */ + public java.util.List + getVariantsList() { + if (variantsBuilder_ == null) { + return java.util.Collections.unmodifiableList(variants_); + } else { + return variantsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of flow version variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant variants = 1; + * + */ + public int getVariantsCount() { + if (variantsBuilder_ == null) { + return variants_.size(); + } else { + return variantsBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of flow version variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant variants = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant getVariants(int index) { + if (variantsBuilder_ == null) { + return variants_.get(index); + } else { + return variantsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of flow version variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant variants = 1; + * + */ + public Builder setVariants( + int index, com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant value) { + if (variantsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVariantsIsMutable(); + variants_.set(index, value); + onChanged(); + } else { + variantsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of flow version variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant variants = 1; + * + */ + public Builder setVariants( + int index, + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant.Builder builderForValue) { + if (variantsBuilder_ == null) { + ensureVariantsIsMutable(); + variants_.set(index, builderForValue.build()); + onChanged(); + } else { + variantsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of flow version variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant variants = 1; + * + */ + public Builder addVariants( + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant value) { + if (variantsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVariantsIsMutable(); + variants_.add(value); + onChanged(); + } else { + variantsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of flow version variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant variants = 1; + * + */ + public Builder addVariants( + int index, com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant value) { + if (variantsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVariantsIsMutable(); + variants_.add(index, value); + onChanged(); + } else { + variantsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of flow version variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant variants = 1; + * + */ + public Builder addVariants( + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant.Builder builderForValue) { + if (variantsBuilder_ == null) { + ensureVariantsIsMutable(); + variants_.add(builderForValue.build()); + onChanged(); + } else { + variantsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of flow version variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant variants = 1; + * + */ + public Builder addVariants( + int index, + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant.Builder builderForValue) { + if (variantsBuilder_ == null) { + ensureVariantsIsMutable(); + variants_.add(index, builderForValue.build()); + onChanged(); + } else { + variantsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of flow version variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant variants = 1; + * + */ + public Builder addAllVariants( + java.lang.Iterable + values) { + if (variantsBuilder_ == null) { + ensureVariantsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, variants_); + onChanged(); + } else { + variantsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of flow version variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant variants = 1; + * + */ + public Builder clearVariants() { + if (variantsBuilder_ == null) { + variants_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + variantsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of flow version variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant variants = 1; + * + */ + public Builder removeVariants(int index) { + if (variantsBuilder_ == null) { + ensureVariantsIsMutable(); + variants_.remove(index); + onChanged(); + } else { + variantsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of flow version variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant variants = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant.Builder + getVariantsBuilder(int index) { + return getVariantsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of flow version variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant variants = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.VariantOrBuilder + getVariantsOrBuilder(int index) { + if (variantsBuilder_ == null) { + return variants_.get(index); + } else { + return variantsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of flow version variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant variants = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.VariantOrBuilder> + getVariantsOrBuilderList() { + if (variantsBuilder_ != null) { + return variantsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(variants_); + } + } + /** + * + * + *
+     * A list of flow version variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant variants = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant.Builder + addVariantsBuilder() { + return getVariantsFieldBuilder() + .addBuilder( + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant.getDefaultInstance()); + } + /** + * + * + *
+     * A list of flow version variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant variants = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant.Builder + addVariantsBuilder(int index) { + return getVariantsFieldBuilder() + .addBuilder( + index, + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant.getDefaultInstance()); + } + /** + * + * + *
+     * A list of flow version variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant variants = 1; + * + */ + public java.util.List + getVariantsBuilderList() { + return getVariantsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant, + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant.Builder, + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.VariantOrBuilder> + getVariantsFieldBuilder() { + if (variantsBuilder_ == null) { + variantsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant, + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant.Builder, + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.VariantOrBuilder>( + variants_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + variants_ = null; + } + return variantsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.VersionVariants) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.VersionVariants) + private static final com.google.cloud.dialogflow.cx.v3beta1.VersionVariants DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.VersionVariants(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.VersionVariants getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VersionVariants parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new VersionVariants(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.VersionVariants getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VersionVariantsOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VersionVariantsOrBuilder.java new file mode 100644 index 000000000..a76704633 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VersionVariantsOrBuilder.java @@ -0,0 +1,78 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/experiment.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface VersionVariantsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.VersionVariants) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of flow version variants.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant variants = 1; + */ + java.util.List getVariantsList(); + /** + * + * + *
+   * A list of flow version variants.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant variants = 1; + */ + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant getVariants(int index); + /** + * + * + *
+   * A list of flow version variants.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant variants = 1; + */ + int getVariantsCount(); + /** + * + * + *
+   * A list of flow version variants.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant variants = 1; + */ + java.util.List + getVariantsOrBuilderList(); + /** + * + * + *
+   * A list of flow version variants.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant variants = 1; + */ + com.google.cloud.dialogflow.cx.v3beta1.VersionVariants.VariantOrBuilder getVariantsOrBuilder( + int index); +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/WebhookProto.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/WebhookProto.java index 3c71d785c..55c1ae584 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/WebhookProto.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/WebhookProto.java @@ -161,7 +161,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\002\022/\n\013update_mask\030\002 \001(\0132\032.google.protobuf" + ".FieldMask\"^\n\024DeleteWebhookRequest\0227\n\004na" + "me\030\001 \001(\tB)\340A\002\372A#\n!dialogflow.googleapis." - + "com/Webhook\022\r\n\005force\030\002 \001(\010\"\234\007\n\016WebhookRe" + + "com/Webhook\022\r\n\005force\030\002 \001(\010\"\306\007\n\016WebhookRe" + "quest\022!\n\031detect_intent_response_id\030\001 \001(\t" + "\022\\\n\020fulfillment_info\030\006 \001(\0132B.google.clou" + "d.dialogflow.cx.v3beta1.WebhookRequest.F" @@ -174,92 +174,93 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ssages\030\007 \003(\01323.google.cloud.dialogflow.c" + "x.v3beta1.ResponseMessage\022(\n\007payload\030\010 \001" + "(\0132\027.google.protobuf.Struct\032\036\n\017Fulfillme" - + "ntInfo\022\013\n\003tag\030\001 \001(\t\032\233\003\n\nIntentInfo\022B\n\023la" + + "ntInfo\022\013\n\003tag\030\001 \001(\t\032\305\003\n\nIntentInfo\022B\n\023la" + "st_matched_intent\030\001 \001(\tB%\372A\"\n dialogflow" - + ".googleapis.com/Intent\022a\n\nparameters\030\002 \003" - + "(\0132M.google.cloud.dialogflow.cx.v3beta1." - + "WebhookRequest.IntentInfo.ParametersEntr" - + "y\032^\n\024IntentParameterValue\022\026\n\016original_va" - + "lue\030\001 \001(\t\022.\n\016resolved_value\030\002 \001(\0132\026.goog" - + "le.protobuf.Value\032\205\001\n\017ParametersEntry\022\013\n" - + "\003key\030\001 \001(\t\022a\n\005value\030\002 \001(\0132R.google.cloud" - + ".dialogflow.cx.v3beta1.WebhookRequest.In" - + "tentInfo.IntentParameterValue:\0028\001\"\310\005\n\017We" - + "bhookResponse\022e\n\024fulfillment_response\030\001 " - + "\001(\0132G.google.cloud.dialogflow.cx.v3beta1" - + ".WebhookResponse.FulfillmentResponse\022?\n\t" - + "page_info\030\002 \001(\0132,.google.cloud.dialogflo" - + "w.cx.v3beta1.PageInfo\022E\n\014session_info\030\003 " - + "\001(\0132/.google.cloud.dialogflow.cx.v3beta1" - + ".SessionInfo\022(\n\007payload\030\004 \001(\0132\027.google.p" - + "rotobuf.Struct\022:\n\013target_page\030\005 \001(\tB#\372A " - + "\n\036dialogflow.googleapis.com/PageH\000\022:\n\013ta" - + "rget_flow\030\006 \001(\tB#\372A \n\036dialogflow.googlea" - + "pis.com/FlowH\000\032\225\002\n\023FulfillmentResponse\022E" - + "\n\010messages\030\001 \003(\01323.google.cloud.dialogfl" - + "ow.cx.v3beta1.ResponseMessage\022m\n\016merge_b" - + "ehavior\030\002 \001(\0162U.google.cloud.dialogflow." - + "cx.v3beta1.WebhookResponse.FulfillmentRe" - + "sponse.MergeBehavior\"H\n\rMergeBehavior\022\036\n" - + "\032MERGE_BEHAVIOR_UNSPECIFIED\020\000\022\n\n\006APPEND\020" - + "\001\022\013\n\007REPLACE\020\002B\014\n\ntransition\"\254\004\n\010PageInf" - + "o\0229\n\014current_page\030\001 \001(\tB#\372A \n\036dialogflow" - + ".googleapis.com/Page\022H\n\tform_info\030\003 \001(\0132" - + "5.google.cloud.dialogflow.cx.v3beta1.Pag" - + "eInfo.FormInfo\032\232\003\n\010FormInfo\022[\n\016parameter" - + "_info\030\002 \003(\0132C.google.cloud.dialogflow.cx" - + ".v3beta1.PageInfo.FormInfo.ParameterInfo" - + "\032\260\002\n\rParameterInfo\022\024\n\014display_name\030\001 \001(\t" - + "\022\020\n\010required\030\002 \001(\010\022a\n\005state\030\003 \001(\0162R.goog" - + "le.cloud.dialogflow.cx.v3beta1.PageInfo." - + "FormInfo.ParameterInfo.ParameterState\022%\n" - + "\005value\030\004 \001(\0132\026.google.protobuf.Value\022\026\n\016" - + "just_collected\030\005 \001(\010\"U\n\016ParameterState\022\037" - + "\n\033PARAMETER_STATE_UNSPECIFIED\020\000\022\t\n\005EMPTY" - + "\020\001\022\013\n\007INVALID\020\002\022\n\n\006FILLED\020\003\"\346\001\n\013SessionI" - + "nfo\0227\n\007session\030\001 \001(\tB&\372A#\n!dialogflow.go" - + "ogleapis.com/Session\022S\n\nparameters\030\002 \003(\013" - + "2?.google.cloud.dialogflow.cx.v3beta1.Se" - + "ssionInfo.ParametersEntry\032I\n\017ParametersE" - + "ntry\022\013\n\003key\030\001 \001(\t\022%\n\005value\030\002 \001(\0132\026.googl" - + "e.protobuf.Value:\0028\0012\375\010\n\010Webhooks\022\316\001\n\014Li" - + "stWebhooks\0227.google.cloud.dialogflow.cx." - + "v3beta1.ListWebhooksRequest\0328.google.clo" - + "ud.dialogflow.cx.v3beta1.ListWebhooksRes" - + "ponse\"K\202\323\344\223\002<\022:/v3beta1/{parent=projects" - + "/*/locations/*/agents/*}/webhooks\332A\006pare" - + "nt\022\273\001\n\nGetWebhook\0225.google.cloud.dialogf" - + "low.cx.v3beta1.GetWebhookRequest\032+.googl" - + "e.cloud.dialogflow.cx.v3beta1.Webhook\"I\202" - + "\323\344\223\002<\022:/v3beta1/{name=projects/*/locatio" - + "ns/*/agents/*/webhooks/*}\332A\004name\022\324\001\n\rCre" - + "ateWebhook\0228.google.cloud.dialogflow.cx." - + "v3beta1.CreateWebhookRequest\032+.google.cl" - + "oud.dialogflow.cx.v3beta1.Webhook\"\\\202\323\344\223\002" - + "E\":/v3beta1/{parent=projects/*/locations" - + "/*/agents/*}/webhooks:\007webhook\332A\016parent," - + "webhook\022\341\001\n\rUpdateWebhook\0228.google.cloud" - + ".dialogflow.cx.v3beta1.UpdateWebhookRequ" - + "est\032+.google.cloud.dialogflow.cx.v3beta1" - + ".Webhook\"i\202\323\344\223\002M2B/v3beta1/{webhook.name" - + "=projects/*/locations/*/agents/*/webhook" - + "s/*}:\007webhook\332A\023webhook,update_mask\022\254\001\n\r" - + "DeleteWebhook\0228.google.cloud.dialogflow." - + "cx.v3beta1.DeleteWebhookRequest\032\026.google" - + ".protobuf.Empty\"I\202\323\344\223\002<*:/v3beta1/{name=" - + "projects/*/locations/*/agents/*/webhooks" - + "/*}\332A\004name\032x\312A\031dialogflow.googleapis.com" - + "\322AYhttps://www.googleapis.com/auth/cloud" - + "-platform,https://www.googleapis.com/aut" - + "h/dialogflowB\252\002\n&com.google.cloud.dialog" - + "flow.cx.v3beta1B\014WebhookProtoP\001ZDgoogle." - + "golang.org/genproto/googleapis/cloud/dia" - + "logflow/cx/v3beta1;cx\370\001\001\242\002\002DF\252\002\"Google.C" - + "loud.Dialogflow.Cx.V3Beta1\352A|\n\'servicedi" - + "rectory.googleapis.com/Service\022Qprojects" - + "/{project}/locations/{location}/namespac" - + "es/{namespace}/services/{service}b\006proto" - + "3" + + ".googleapis.com/Intent\022\024\n\014display_name\030\003" + + " \001(\t\022a\n\nparameters\030\002 \003(\0132M.google.cloud." + + "dialogflow.cx.v3beta1.WebhookRequest.Int" + + "entInfo.ParametersEntry\022\022\n\nconfidence\030\004 " + + "\001(\002\032^\n\024IntentParameterValue\022\026\n\016original_" + + "value\030\001 \001(\t\022.\n\016resolved_value\030\002 \001(\0132\026.go" + + "ogle.protobuf.Value\032\205\001\n\017ParametersEntry\022" + + "\013\n\003key\030\001 \001(\t\022a\n\005value\030\002 \001(\0132R.google.clo" + + "ud.dialogflow.cx.v3beta1.WebhookRequest." + + "IntentInfo.IntentParameterValue:\0028\001\"\310\005\n\017" + + "WebhookResponse\022e\n\024fulfillment_response\030" + + "\001 \001(\0132G.google.cloud.dialogflow.cx.v3bet" + + "a1.WebhookResponse.FulfillmentResponse\022?" + + "\n\tpage_info\030\002 \001(\0132,.google.cloud.dialogf" + + "low.cx.v3beta1.PageInfo\022E\n\014session_info\030" + + "\003 \001(\0132/.google.cloud.dialogflow.cx.v3bet" + + "a1.SessionInfo\022(\n\007payload\030\004 \001(\0132\027.google" + + ".protobuf.Struct\022:\n\013target_page\030\005 \001(\tB#\372" + + "A \n\036dialogflow.googleapis.com/PageH\000\022:\n\013" + + "target_flow\030\006 \001(\tB#\372A \n\036dialogflow.googl" + + "eapis.com/FlowH\000\032\225\002\n\023FulfillmentResponse" + + "\022E\n\010messages\030\001 \003(\01323.google.cloud.dialog" + + "flow.cx.v3beta1.ResponseMessage\022m\n\016merge" + + "_behavior\030\002 \001(\0162U.google.cloud.dialogflo" + + "w.cx.v3beta1.WebhookResponse.Fulfillment" + + "Response.MergeBehavior\"H\n\rMergeBehavior\022" + + "\036\n\032MERGE_BEHAVIOR_UNSPECIFIED\020\000\022\n\n\006APPEN" + + "D\020\001\022\013\n\007REPLACE\020\002B\014\n\ntransition\"\254\004\n\010PageI" + + "nfo\0229\n\014current_page\030\001 \001(\tB#\372A \n\036dialogfl" + + "ow.googleapis.com/Page\022H\n\tform_info\030\003 \001(" + + "\01325.google.cloud.dialogflow.cx.v3beta1.P" + + "ageInfo.FormInfo\032\232\003\n\010FormInfo\022[\n\016paramet" + + "er_info\030\002 \003(\0132C.google.cloud.dialogflow." + + "cx.v3beta1.PageInfo.FormInfo.ParameterIn" + + "fo\032\260\002\n\rParameterInfo\022\024\n\014display_name\030\001 \001" + + "(\t\022\020\n\010required\030\002 \001(\010\022a\n\005state\030\003 \001(\0162R.go" + + "ogle.cloud.dialogflow.cx.v3beta1.PageInf" + + "o.FormInfo.ParameterInfo.ParameterState\022" + + "%\n\005value\030\004 \001(\0132\026.google.protobuf.Value\022\026" + + "\n\016just_collected\030\005 \001(\010\"U\n\016ParameterState" + + "\022\037\n\033PARAMETER_STATE_UNSPECIFIED\020\000\022\t\n\005EMP" + + "TY\020\001\022\013\n\007INVALID\020\002\022\n\n\006FILLED\020\003\"\346\001\n\013Sessio" + + "nInfo\0227\n\007session\030\001 \001(\tB&\372A#\n!dialogflow." + + "googleapis.com/Session\022S\n\nparameters\030\002 \003" + + "(\0132?.google.cloud.dialogflow.cx.v3beta1." + + "SessionInfo.ParametersEntry\032I\n\017Parameter" + + "sEntry\022\013\n\003key\030\001 \001(\t\022%\n\005value\030\002 \001(\0132\026.goo" + + "gle.protobuf.Value:\0028\0012\375\010\n\010Webhooks\022\316\001\n\014" + + "ListWebhooks\0227.google.cloud.dialogflow.c" + + "x.v3beta1.ListWebhooksRequest\0328.google.c" + + "loud.dialogflow.cx.v3beta1.ListWebhooksR" + + "esponse\"K\202\323\344\223\002<\022:/v3beta1/{parent=projec" + + "ts/*/locations/*/agents/*}/webhooks\332A\006pa" + + "rent\022\273\001\n\nGetWebhook\0225.google.cloud.dialo" + + "gflow.cx.v3beta1.GetWebhookRequest\032+.goo" + + "gle.cloud.dialogflow.cx.v3beta1.Webhook\"" + + "I\202\323\344\223\002<\022:/v3beta1/{name=projects/*/locat" + + "ions/*/agents/*/webhooks/*}\332A\004name\022\324\001\n\rC" + + "reateWebhook\0228.google.cloud.dialogflow.c" + + "x.v3beta1.CreateWebhookRequest\032+.google." + + "cloud.dialogflow.cx.v3beta1.Webhook\"\\\202\323\344" + + "\223\002E\":/v3beta1/{parent=projects/*/locatio" + + "ns/*/agents/*}/webhooks:\007webhook\332A\016paren" + + "t,webhook\022\341\001\n\rUpdateWebhook\0228.google.clo" + + "ud.dialogflow.cx.v3beta1.UpdateWebhookRe" + + "quest\032+.google.cloud.dialogflow.cx.v3bet" + + "a1.Webhook\"i\202\323\344\223\002M2B/v3beta1/{webhook.na" + + "me=projects/*/locations/*/agents/*/webho" + + "oks/*}:\007webhook\332A\023webhook,update_mask\022\254\001" + + "\n\rDeleteWebhook\0228.google.cloud.dialogflo" + + "w.cx.v3beta1.DeleteWebhookRequest\032\026.goog" + + "le.protobuf.Empty\"I\202\323\344\223\002<*:/v3beta1/{nam" + + "e=projects/*/locations/*/agents/*/webhoo" + + "ks/*}\332A\004name\032x\312A\031dialogflow.googleapis.c" + + "om\322AYhttps://www.googleapis.com/auth/clo" + + "ud-platform,https://www.googleapis.com/a" + + "uth/dialogflowB\252\002\n&com.google.cloud.dial" + + "ogflow.cx.v3beta1B\014WebhookProtoP\001ZDgoogl" + + "e.golang.org/genproto/googleapis/cloud/d" + + "ialogflow/cx/v3beta1;cx\370\001\001\242\002\002DF\252\002\"Google" + + ".Cloud.Dialogflow.Cx.V3Beta1\352A|\n\'service" + + "directory.googleapis.com/Service\022Qprojec" + + "ts/{project}/locations/{location}/namesp" + + "aces/{namespace}/services/{service}b\006pro" + + "to3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -383,7 +384,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_WebhookRequest_IntentInfo_descriptor, new java.lang.String[] { - "LastMatchedIntent", "Parameters", + "LastMatchedIntent", "DisplayName", "Parameters", "Confidence", }); internal_static_google_cloud_dialogflow_cx_v3beta1_WebhookRequest_IntentInfo_IntentParameterValue_descriptor = internal_static_google_cloud_dialogflow_cx_v3beta1_WebhookRequest_IntentInfo_descriptor diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/WebhookRequest.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/WebhookRequest.java index 54559d8d0..2f7ce7dc7 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/WebhookRequest.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/WebhookRequest.java @@ -925,6 +925,31 @@ public interface IntentInfoOrBuilder */ com.google.protobuf.ByteString getLastMatchedIntentBytes(); + /** + * + * + *
+     * Always present. The display name of the last matched [intent][google.cloud.dialogflow.cx.v3beta1.Intent].
+     * 
+ * + * string display_name = 3; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+     * Always present. The display name of the last matched [intent][google.cloud.dialogflow.cx.v3beta1.Intent].
+     * 
+ * + * string display_name = 3; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + /** * * @@ -1014,6 +1039,20 @@ public interface IntentInfoOrBuilder */ com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.IntentInfo.IntentParameterValue getParametersOrThrow(java.lang.String key); + + /** + * + * + *
+     * The confidence of the matched intent. Values range from 0.0 (completely
+     * uncertain) to 1.0 (completely certain).
+     * 
+ * + * float confidence = 4; + * + * @return The confidence. + */ + float getConfidence(); } /** * @@ -1036,6 +1075,7 @@ private IntentInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { private IntentInfo() { lastMatchedIntent_ = ""; + displayName_ = ""; } @java.lang.Override @@ -1094,6 +1134,18 @@ private IntentInfo( parameters_.getMutableMap().put(parameters__.getKey(), parameters__.getValue()); break; } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 37: + { + confidence_ = input.readFloat(); + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -2233,6 +2285,55 @@ public com.google.protobuf.ByteString getLastMatchedIntentBytes() { } } + public static final int DISPLAY_NAME_FIELD_NUMBER = 3; + private volatile java.lang.Object displayName_; + /** + * + * + *
+     * Always present. The display name of the last matched [intent][google.cloud.dialogflow.cx.v3beta1.Intent].
+     * 
+ * + * string display_name = 3; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+     * Always present. The display name of the last matched [intent][google.cloud.dialogflow.cx.v3beta1.Intent].
+     * 
+ * + * string display_name = 3; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int PARAMETERS_FIELD_NUMBER = 2; private static final class ParametersDefaultEntryHolder { @@ -2383,6 +2484,25 @@ public boolean containsParameters(java.lang.String key) { return map.get(key); } + public static final int CONFIDENCE_FIELD_NUMBER = 4; + private float confidence_; + /** + * + * + *
+     * The confidence of the matched intent. Values range from 0.0 (completely
+     * uncertain) to 1.0 (completely certain).
+     * 
+ * + * float confidence = 4; + * + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -2402,6 +2522,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetParameters(), ParametersDefaultEntryHolder.defaultEntry, 2); + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, displayName_); + } + if (confidence_ != 0F) { + output.writeFloat(4, confidence_); + } unknownFields.writeTo(output); } @@ -2430,6 +2556,12 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, parameters__); } + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, displayName_); + } + if (confidence_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(4, confidence_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -2447,7 +2579,10 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.IntentInfo) obj; if (!getLastMatchedIntent().equals(other.getLastMatchedIntent())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; if (!internalGetParameters().equals(other.internalGetParameters())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits(other.getConfidence())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -2461,10 +2596,14 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + LAST_MATCHED_INTENT_FIELD_NUMBER; hash = (53 * hash) + getLastMatchedIntent().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); if (!internalGetParameters().getMap().isEmpty()) { hash = (37 * hash) + PARAMETERS_FIELD_NUMBER; hash = (53 * hash) + internalGetParameters().hashCode(); } + hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getConfidence()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -2637,7 +2776,11 @@ public Builder clear() { super.clear(); lastMatchedIntent_ = ""; + displayName_ = ""; + internalGetMutableParameters().clear(); + confidence_ = 0F; + return this; } @@ -2669,8 +2812,10 @@ public com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.IntentInfo buildPar new com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.IntentInfo(this); int from_bitField0_ = bitField0_; result.lastMatchedIntent_ = lastMatchedIntent_; + result.displayName_ = displayName_; result.parameters_ = internalGetParameters(); result.parameters_.makeImmutable(); + result.confidence_ = confidence_; onBuilt(); return result; } @@ -2730,7 +2875,14 @@ public Builder mergeFrom( lastMatchedIntent_ = other.lastMatchedIntent_; onChanged(); } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } internalGetMutableParameters().mergeFrom(other.internalGetParameters()); + if (other.getConfidence() != 0F) { + setConfidence(other.getConfidence()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -2880,6 +3032,112 @@ public Builder setLastMatchedIntentBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object displayName_ = ""; + /** + * + * + *
+       * Always present. The display name of the last matched [intent][google.cloud.dialogflow.cx.v3beta1.Intent].
+       * 
+ * + * string display_name = 3; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Always present. The display name of the last matched [intent][google.cloud.dialogflow.cx.v3beta1.Intent].
+       * 
+ * + * string display_name = 3; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Always present. The display name of the last matched [intent][google.cloud.dialogflow.cx.v3beta1.Intent].
+       * 
+ * + * string display_name = 3; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Always present. The display name of the last matched [intent][google.cloud.dialogflow.cx.v3beta1.Intent].
+       * 
+ * + * string display_name = 3; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+       * Always present. The display name of the last matched [intent][google.cloud.dialogflow.cx.v3beta1.Intent].
+       * 
+ * + * string display_name = 3; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + private com.google.protobuf.MapField< java.lang.String, com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.IntentInfo.IntentParameterValue> @@ -3111,6 +3369,61 @@ public Builder putAllParameters( return this; } + private float confidence_; + /** + * + * + *
+       * The confidence of the matched intent. Values range from 0.0 (completely
+       * uncertain) to 1.0 (completely certain).
+       * 
+ * + * float confidence = 4; + * + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + /** + * + * + *
+       * The confidence of the matched intent. Values range from 0.0 (completely
+       * uncertain) to 1.0 (completely certain).
+       * 
+ * + * float confidence = 4; + * + * @param value The confidence to set. + * @return This builder for chaining. + */ + public Builder setConfidence(float value) { + + confidence_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The confidence of the matched intent. Values range from 0.0 (completely
+       * uncertain) to 1.0 (completely certain).
+       * 
+ * + * float confidence = 4; + * + * @return This builder for chaining. + */ + public Builder clearConfidence() { + + confidence_ = 0F; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/audio_config.proto b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/audio_config.proto index c6a1b0201..93234328b 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/audio_config.proto +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/audio_config.proto @@ -29,31 +29,6 @@ option java_outer_classname = "AudioConfigProto"; option java_package = "com.google.cloud.dialogflow.cx.v3beta1"; option objc_class_prefix = "DF"; -// Information for a word recognized by the speech recognizer. -message SpeechWordInfo { - // The word this info is for. - string word = 3; - - // 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. - google.protobuf.Duration start_offset = 1; - - // 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. - google.protobuf.Duration end_offset = 2; - - // 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. - float confidence = 4; -} - // Audio encoding of the audio content sent in the conversational query request. // Refer to the // [Cloud Speech API @@ -103,6 +78,31 @@ enum AudioEncoding { AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE = 7; } +// Information for a word recognized by the speech recognizer. +message SpeechWordInfo { + // The word this info is for. + string word = 3; + + // 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. + google.protobuf.Duration start_offset = 1; + + // 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. + google.protobuf.Duration end_offset = 2; + + // 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. + float confidence = 4; +} + // Instructs the speech recognizer on how to process the audio content. message InputAudioConfig { // Required. Audio encoding of the audio content to process. diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/entity_type.proto b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/entity_type.proto index 01cd25add..e51d92f88 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/entity_type.proto +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/entity_type.proto @@ -204,6 +204,11 @@ message EntityType { // Enables fuzzy entity extraction during classification. bool enable_fuzzy_extraction = 7; + + // 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 during logging. + bool redact = 9; } // The request message for [EntityTypes.ListEntityTypes][google.cloud.dialogflow.cx.v3beta1.EntityTypes.ListEntityTypes]. diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/experiment.proto b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/experiment.proto new file mode 100644 index 000000000..a6d69f1cd --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/experiment.proto @@ -0,0 +1,461 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dialogflow.cx.v3beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1;cx"; +option java_multiple_files = true; +option java_outer_classname = "ExperimentProto"; +option java_package = "com.google.cloud.dialogflow.cx.v3beta1"; +option objc_class_prefix = "DF"; + +// Service for managing +// [Experiments][google.cloud.dialogflow.cx.v3beta1.Experiment]. +service Experiments { + option (google.api.default_host) = "dialogflow.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/dialogflow"; + + // Returns the list of all experiments in the specified + // [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. + rpc ListExperiments(ListExperimentsRequest) + returns (ListExperimentsResponse) { + option (google.api.http) = { + get: "/v3beta1/{parent=projects/*/locations/*/agents/*/environments/*}/experiments" + }; + option (google.api.method_signature) = "parent"; + } + + // Retrieves the specified + // [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. + rpc GetExperiment(GetExperimentRequest) returns (Experiment) { + option (google.api.http) = { + get: "/v3beta1/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates an [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment] in + // the specified + // [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. + rpc CreateExperiment(CreateExperimentRequest) returns (Experiment) { + option (google.api.http) = { + post: "/v3beta1/{parent=projects/*/locations/*/agents/*/environments/*}/experiments" + body: "experiment" + }; + option (google.api.method_signature) = "parent,experiment"; + } + + // Updates the specified + // [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. + rpc UpdateExperiment(UpdateExperimentRequest) returns (Experiment) { + option (google.api.http) = { + patch: "/v3beta1/{experiment.name=projects/*/locations/*/agents/*/environments/*/experiments/*}" + body: "experiment" + }; + option (google.api.method_signature) = "experiment,update_mask"; + } + + // Deletes the specified + // [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. + rpc DeleteExperiment(DeleteExperimentRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v3beta1/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Starts the specified + // [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only + // changes the state of experiment from PENDING to RUNNING. + rpc StartExperiment(StartExperimentRequest) returns (Experiment) { + option (google.api.http) = { + post: "/v3beta1/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}:start" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Stops the specified + // [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only + // changes the state of experiment from RUNNING to DONE. + rpc StopExperiment(StopExperimentRequest) returns (Experiment) { + option (google.api.http) = { + post: "/v3beta1/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}:stop" + body: "*" + }; + option (google.api.method_signature) = "name"; + } +} + +// Represents an experiment in an environment. +message Experiment { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/Experiment" + pattern: "projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}" + }; + + // Definition of the experiment. + message Definition { + // 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). + string condition = 1; + + // The variants of the experiment. We currently only support single variant + // experiment. + oneof variants { + // The flow versions as the variants of this experiment. + VersionVariants version_variants = 2; + } + } + + // The inference result which includes an objective metric to optimize and the + // confidence interval. + message Result { + // A confidence interval is a range of possible values for the experiment + // objective you are trying to measure. + message ConfidenceInterval { + // The confidence level used to construct the interval, i.e. there is X% + // chance that the true value is within this interval. + double confidence_level = 1; + + // The percent change between an experiment metric's value and the value + // for its control. + double ratio = 2; + + // Lower bound of the interval. + double lower_bound = 3; + + // Upper bound of the interval. + double upper_bound = 4; + } + + // Metric and corresponding confidence intervals. + message Metric { + // Ratio-based metric type. Only one of type or count_type is specified in + // each Metric. + MetricType type = 1; + + // Count-based metric type. Only one of type or count_type is specified in + // each Metric. + CountType count_type = 5; + + // The actual value of the metric. + oneof value { + // Ratio value of a metric. + double ratio = 2; + + // Count value of a metric. + double count = 4; + } + + // The probability that the treatment is better than all other treatments + // in the experiment + ConfidenceInterval confidence_interval = 3; + } + + // Version variant and associated metrics. + message VersionMetrics { + // The name of the flow + // [Version][google.cloud.dialogflow.cx.v3beta1.Version]. Format: + // `projects//locations//agents//flows//versions/`. + string version = 1 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Version" + }]; + + // The metrics and corresponding confidence intervals in the inference + // result. + repeated Metric metrics = 2; + + // Number of sessions that were allocated to this version. + int32 session_count = 3; + } + + // Types of ratio-based metric for Dialogflow experiment. + enum MetricType { + // Metric unspecified. + METRIC_UNSPECIFIED = 0; + + // Percentage of contained sessions without user calling back in 24 hours. + CONTAINED_SESSION_NO_CALLBACK_RATE = 1; + + // Percentage of sessions that were handed to a human agent. + LIVE_AGENT_HANDOFF_RATE = 2; + + // Percentage of sessions with the same user calling back. + CALLBACK_SESSION_RATE = 3; + + // Percentage of sessions where user hung up. + ABANDONED_SESSION_RATE = 4; + + // Percentage of sessions reached Dialogflow 'END_PAGE' or + // 'END_SESSION'. + SESSION_END_RATE = 5; + } + + // types of count-based metric for Dialogflow experiment. + enum CountType { + // Count type unspecified. + COUNT_TYPE_UNSPECIFIED = 0; + + // Total number of occurrences of a 'NO_MATCH'. + TOTAL_NO_MATCH_COUNT = 1; + + // Total number of turn counts. + TOTAL_TURN_COUNT = 2; + + // Average turn count in a session. + AVERAGE_TURN_COUNT = 3; + } + + // Version variants and metrics. + repeated VersionMetrics version_metrics = 1; + + // The last time the experiment's stats data was updated. Will have default + // value if stats have never been computed for this experiment. + google.protobuf.Timestamp last_update_time = 2; + } + + // The state of the experiment. + enum State { + // State unspecified. + STATE_UNSPECIFIED = 0; + + // The experiment is created but not started yet. + DRAFT = 1; + + // The experiment is running. + RUNNING = 2; + + // The experiment is done. + DONE = 3; + } + + // The name of the experiment. + // Format: projects//locations//agents//environments//experiments/.. + string name = 1; + + // Required. The human-readable name of the experiment (unique in an + // environment). Limit of 64 characters. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // The human-readable description of the experiment. + string description = 3; + + // The current state of the experiment. + // Transition triggered by Expriments.StartExperiment: PENDING->RUNNING. + // Transition triggered by Expriments.CancelExperiment: PENDING->CANCELLED or + // RUNNING->CANCELLED. + State state = 4; + + // The definition of the experiment. + Definition definition = 5; + + // Inference result of the experiment. + Result result = 6; + + // Creation time of this experiment. + google.protobuf.Timestamp create_time = 7; + + // Start time of this experiment. + google.protobuf.Timestamp start_time = 8; + + // End time of this experiment. + google.protobuf.Timestamp end_time = 9; + + // Last update time of this experiment. + google.protobuf.Timestamp last_update_time = 10; + + // Maximum number of days to run the experiment. + google.protobuf.Duration experiment_length = 11; + + // The history of updates to the experiment variants. + repeated VariantsHistory variants_history = 12; +} + +// A list of flow version variants. +message VersionVariants { + // A single flow version with specified traffic allocation. + message Variant { + // The name of the flow version. + // Format: `projects//locations//agents//flows//versions/`. + string version = 1; + + // 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. + float traffic_allocation = 2; + + // Whether the variant is for the control group. + bool is_control_group = 3; + } + + // A list of flow version variants. + repeated Variant variants = 1; +} + +// The history of variants update. +message VariantsHistory { + // The variants updated. We currently only support single variant + // experiment. + oneof variants { + // The flow versions as the variants. + VersionVariants version_variants = 1; + } + + // Update time of the variants. + google.protobuf.Timestamp update_time = 2; +} + +// The request message for +// [Experiments.ListExperiments][google.cloud.dialogflow.cx.v3beta1.Experiments.ListExperiments]. +message ListExperimentsRequest { + // Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] + // to list all environments for. Format: `projects//locations//agents//environments/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Experiment" + } + ]; + + // The maximum number of items to return in a single page. By default 20 and + // at most 100. + int32 page_size = 2; + + // The next_page_token value returned from a previous list request. + string page_token = 3; +} + +// The response message for +// [Experiments.ListExperiments][google.cloud.dialogflow.cx.v3beta1.Experiments.ListExperiments]. +message ListExperimentsResponse { + // 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. + repeated Experiment experiments = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// The request message for +// [Experiments.GetExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.GetExperiment]. +message GetExperimentRequest { + // Required. The name of the + // [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. Format: + // `projects//locations//agents//environments//experiments/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Experiment" + } + ]; +} + +// The request message for +// [Experiments.CreateExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.CreateExperiment]. +message CreateExperimentRequest { + // Required. The [Agent][google.cloud.dialogflow.cx.v3beta1.Agent] to create + // an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] for. + // Format: `projects//locations//agents//environments/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Experiment" + } + ]; + + // Required. The experiment to create. + Experiment experiment = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The request message for +// [Experiments.UpdateExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.UpdateExperiment]. +message UpdateExperimentRequest { + // Required. The experiment to update. + Experiment experiment = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The mask to control which fields get updated. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// The request message for +// [Experiments.DeleteExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.DeleteExperiment]. +message DeleteExperimentRequest { + // Required. The name of the + // [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to delete. + // Format: `projects//locations//agents//environments//experiments/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Experiment" + } + ]; +} + +// The request message for +// [Experiments.StartExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.StartExperiment]. +message StartExperimentRequest { + // Required. Resource name of the experiment to start. + // Format: `projects//locations//agents//environments//experiments/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Experiment" + } + ]; +} + +// The request message for +// [Experiments.StopExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.StopExperiment]. +message StopExperimentRequest { + // Required. Resource name of the experiment to stop. + // Format: `projects//locations//agents//environments//experiments/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Experiment" + } + ]; +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/intent.proto b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/intent.proto index 6cbe2a62c..c66df1266 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/intent.proto +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/intent.proto @@ -155,9 +155,9 @@ message Intent { // Indicates whether the parameter represents a list of values. bool is_list = 3; - // Indicates whether the parameter content should be redacted in text and - // audio. If the flag is set to true, the parameter content will be replaced - // by parameter name in both request and response. + // 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.v3beta1.EntityType.redact] is // enabled. diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/page.proto b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/page.proto index 53a57a0a8..fbfb734fe 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/page.proto +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/page.proto @@ -242,9 +242,9 @@ message Form { // the default value will be ignored. google.protobuf.Value default_value = 9; - // Indicates whether the parameter content should be redacted in text and - // audio. If the flag is set to true, the parameter content will be replaced - // by parameter name in both request and response. + // 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.v3beta1.EntityType.redact] is // enabled. diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/test_case.proto b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/test_case.proto index 351a007a5..4a5137757 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/test_case.proto +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/test_case.proto @@ -210,14 +210,11 @@ message TestCaseResult { // /results/`. string name = 1; - // Optional. Environment where the test was run. If not set, it indicates the draft + // Environment where the test was run. If not set, it indicates the draft // environment. - string environment = 2 [ - (google.api.field_behavior) = OPTIONAL, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/Environment" - } - ]; + string environment = 2 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Environment" + }]; // The conversation turns uttered during the test case replay in chronological // order. diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/webhook.proto b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/webhook.proto index 3439bd49e..cea3258f9 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/webhook.proto +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/webhook.proto @@ -259,11 +259,18 @@ message WebhookRequest { type: "dialogflow.googleapis.com/Intent" }]; + // Always present. The display name of the last matched [intent][google.cloud.dialogflow.cx.v3beta1.Intent]. + string display_name = 3; + // 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. map parameters = 2; + + // The confidence of the matched intent. Values range from 0.0 (completely + // uncertain) to 1.0 (completely certain). + float confidence = 4; } // Always present. The unique identifier of the [DetectIntentResponse][google.cloud.dialogflow.cx.v3beta1.DetectIntentResponse] that diff --git a/synth.metadata b/synth.metadata index b923b4fd5..223344e14 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,16 +11,16 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "6fa7194aba4d0c501592dea28c041890265079dc", - "internalRef": "353783208" + "sha": "ed71e24d908d7064311bf3e63282e68d2f683f04", + "internalRef": "354550974" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "6fa7194aba4d0c501592dea28c041890265079dc", - "internalRef": "353783208" + "sha": "ed71e24d908d7064311bf3e63282e68d2f683f04", + "internalRef": "354550974" } }, { @@ -203,6 +203,8 @@ "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesSettings.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentsClient.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentsSettings.java", + "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsClient.java", + "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsSettings.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsClient.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsSettings.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/IntentsClient.java", @@ -230,6 +232,8 @@ "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/EntityTypesStubSettings.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/EnvironmentsStub.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/EnvironmentsStubSettings.java", + "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/ExperimentsStub.java", + "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/ExperimentsStubSettings.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/FlowsStub.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/FlowsStubSettings.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcAgentsCallableFactory.java", @@ -238,6 +242,8 @@ "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcEntityTypesStub.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcEnvironmentsCallableFactory.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcEnvironmentsStub.java", + "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcExperimentsCallableFactory.java", + "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcExperimentsStub.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcFlowsCallableFactory.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcFlowsStub.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcIntentsCallableFactory.java", @@ -318,6 +324,7 @@ "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClientTest.java", "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesClientTest.java", "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentsClientTest.java", + "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsClientTest.java", "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsClientTest.java", "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/IntentsClientTest.java", "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockAgents.java", @@ -326,6 +333,8 @@ "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockEntityTypesImpl.java", "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockEnvironments.java", "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockEnvironmentsImpl.java", + "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockExperiments.java", + "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockExperimentsImpl.java", "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockFlows.java", "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockFlowsImpl.java", "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockIntents.java", @@ -370,6 +379,7 @@ "grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsGrpc.java", "grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesGrpc.java", "grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentsGrpc.java", + "grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsGrpc.java", "grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsGrpc.java", "grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/IntentsGrpc.java", "grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PagesGrpc.java", @@ -788,6 +798,8 @@ "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateEntityTypeRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateEnvironmentRequest.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateEnvironmentRequestOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateExperimentRequest.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateExperimentRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateFlowRequest.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateFlowRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateIntentRequest.java", @@ -814,6 +826,8 @@ "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteEntityTypeRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteEnvironmentRequest.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteEnvironmentRequestOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteExperimentRequest.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteExperimentRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteFlowRequest.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteFlowRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteIntentRequest.java", @@ -848,6 +862,10 @@ "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EventHandlerOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EventInput.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EventInputOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Experiment.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentName.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentProto.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportAgentRequest.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportAgentRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportAgentResponse.java", @@ -882,6 +900,8 @@ "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetEntityTypeRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetEnvironmentRequest.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetEnvironmentRequestOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetExperimentRequest.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetExperimentRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetFlowRequest.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetFlowRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetFlowValidationResultRequest.java", @@ -931,6 +951,10 @@ "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListEnvironmentsRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListEnvironmentsResponse.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListEnvironmentsResponseOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExperimentsRequest.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExperimentsRequestOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExperimentsResponse.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExperimentsResponseOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListFlowsRequest.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListFlowsRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListFlowsResponse.java", @@ -1034,6 +1058,10 @@ "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SpeechWordInfo.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SpeechWordInfoOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SsmlVoiceGender.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/StartExperimentRequest.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/StartExperimentRequestOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/StopExperimentRequest.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/StopExperimentRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/StreamingDetectIntentRequest.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/StreamingDetectIntentRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/StreamingDetectIntentResponse.java", @@ -1076,6 +1104,8 @@ "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateEntityTypeRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateEnvironmentRequest.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateEnvironmentRequestOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateExperimentRequest.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateExperimentRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateFlowRequest.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateFlowRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateIntentRequest.java", @@ -1101,10 +1131,14 @@ "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidationMessage.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidationMessageOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ValidationMessageProto.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VariantsHistory.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VariantsHistoryOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Version.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VersionName.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VersionOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VersionProto.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VersionVariants.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VersionVariantsOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VoiceSelectionParams.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VoiceSelectionParamsOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Webhook.java", @@ -1119,6 +1153,7 @@ "proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/audio_config.proto", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/entity_type.proto", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/environment.proto", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/experiment.proto", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/flow.proto", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/intent.proto", From d51f8c8d43cb2d37fa048da1df1a6c11880ac1fd Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Tue, 16 Feb 2021 19:03:38 -0800 Subject: [PATCH 06/12] feat: Add new Experiment service docs: minor doc update on redact field in intent.proto and page.proto PiperOrigin-RevId: 354553780 Source-Author: Google APIs Source-Date: Fri Jan 29 09:59:13 2021 -0800 Source-Repo: googleapis/googleapis Source-Sha: c71a9c4ff7bc5179f2e94af31bc95ce4922575ff Source-Link: https://github.com/googleapis/googleapis/commit/c71a9c4ff7bc5179f2e94af31bc95ce4922575ff --- .../dialogflow/cx/v3/ExperimentsClient.java | 635 + .../dialogflow/cx/v3/ExperimentsSettings.java | 250 + .../cloud/dialogflow/cx/v3/package-info.java | 7 + .../cx/v3/stub/ExperimentsStub.java | 79 + .../cx/v3/stub/ExperimentsStubSettings.java | 491 + .../stub/GrpcExperimentsCallableFactory.java | 113 + .../cx/v3/stub/GrpcExperimentsStub.java | 368 + .../cx/v3/EntityTypesClientTest.java | 5 + .../cx/v3/ExperimentsClientTest.java | 721 ++ .../dialogflow/cx/v3/MockExperiments.java | 59 + .../dialogflow/cx/v3/MockExperimentsImpl.java | 166 + .../dialogflow/cx/v3/ExperimentsGrpc.java | 1074 ++ .../cx/v3/CreateExperimentRequest.java | 967 ++ .../v3/CreateExperimentRequestOrBuilder.java | 99 + .../cx/v3/DeleteExperimentRequest.java | 665 + .../v3/DeleteExperimentRequestOrBuilder.java | 58 + .../cloud/dialogflow/cx/v3/EntityType.java | 98 + .../dialogflow/cx/v3/EntityTypeOrBuilder.java | 15 + .../dialogflow/cx/v3/EntityTypeProto.java | 130 +- .../cloud/dialogflow/cx/v3/Experiment.java | 10587 ++++++++++++++++ .../dialogflow/cx/v3/ExperimentName.java | 298 + .../dialogflow/cx/v3/ExperimentOrBuilder.java | 434 + .../dialogflow/cx/v3/ExperimentProto.java | 433 + .../google/cloud/dialogflow/cx/v3/Form.java | 30 +- .../cx/v3/GetExperimentRequest.java | 665 + .../cx/v3/GetExperimentRequestOrBuilder.java | 58 + .../google/cloud/dialogflow/cx/v3/Intent.java | 30 +- .../cx/v3/ListExperimentsRequest.java | 938 ++ .../v3/ListExperimentsRequestOrBuilder.java | 97 + .../cx/v3/ListExperimentsResponse.java | 1209 ++ .../v3/ListExperimentsResponseOrBuilder.java | 119 + .../dialogflow/cx/v3/ResponseMessage.java | 982 +- .../cx/v3/ResponseMessageProto.java | 32 +- .../cx/v3/StartExperimentRequest.java | 665 + .../v3/StartExperimentRequestOrBuilder.java | 58 + .../cx/v3/StopExperimentRequest.java | 665 + .../cx/v3/StopExperimentRequestOrBuilder.java | 58 + .../cloud/dialogflow/cx/v3/TestCaseProto.java | 418 +- .../dialogflow/cx/v3/TestCaseResult.java | 42 +- .../cx/v3/TestCaseResultOrBuilder.java | 12 +- .../cx/v3/UpdateExperimentRequest.java | 1043 ++ .../v3/UpdateExperimentRequestOrBuilder.java | 104 + .../dialogflow/cx/v3/VariantsHistory.java | 1111 ++ .../cx/v3/VariantsHistoryOrBuilder.java | 97 + .../dialogflow/cx/v3/VersionVariants.java | 1854 +++ .../cx/v3/VersionVariantsOrBuilder.java | 78 + .../cloud/dialogflow/cx/v3/WebhookProto.java | 167 +- .../dialogflow/cx/v3/WebhookRequest.java | 313 + .../cloud/dialogflow/cx/v3/entity_type.proto | 5 + .../cloud/dialogflow/cx/v3/experiment.proto | 436 + .../cloud/dialogflow/cx/v3/intent.proto | 6 +- .../google/cloud/dialogflow/cx/v3/page.proto | 6 +- .../dialogflow/cx/v3/response_message.proto | 14 +- .../cloud/dialogflow/cx/v3/test_case.proto | 11 +- .../cloud/dialogflow/cx/v3/webhook.proto | 7 + synth.metadata | 43 +- 56 files changed, 28172 insertions(+), 953 deletions(-) create mode 100644 google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentsClient.java create mode 100644 google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentsSettings.java create mode 100644 google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/ExperimentsStub.java create mode 100644 google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/ExperimentsStubSettings.java create mode 100644 google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcExperimentsCallableFactory.java create mode 100644 google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcExperimentsStub.java create mode 100644 google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/ExperimentsClientTest.java create mode 100644 google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockExperiments.java create mode 100644 google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockExperimentsImpl.java create mode 100644 grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentsGrpc.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateExperimentRequest.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateExperimentRequestOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeleteExperimentRequest.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeleteExperimentRequestOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Experiment.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentName.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentProto.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetExperimentRequest.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetExperimentRequestOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListExperimentsRequest.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListExperimentsRequestOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListExperimentsResponse.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListExperimentsResponseOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StartExperimentRequest.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StartExperimentRequestOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StopExperimentRequest.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StopExperimentRequestOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateExperimentRequest.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateExperimentRequestOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VariantsHistory.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VariantsHistoryOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VersionVariants.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VersionVariantsOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/experiment.proto diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentsClient.java new file mode 100644 index 000000000..9c917cfc5 --- /dev/null +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentsClient.java @@ -0,0 +1,635 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.cx.v3; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dialogflow.cx.v3.stub.ExperimentsStub; +import com.google.cloud.dialogflow.cx.v3.stub.ExperimentsStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Service for managing + * [Experiments][google.cloud.dialogflow.cx.v3.Experiment]. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

Note: close() needs to be called on the ExperimentsClient object to clean up resources such as + * threads. In the example above, try-with-resources is used, which automatically calls close(). + * + *

The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of ExperimentsSettings to + * create(). For example: + * + *

To customize credentials: + * + *

{@code
+ * ExperimentsSettings experimentsSettings =
+ *     ExperimentsSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * ExperimentsClient experimentsClient = ExperimentsClient.create(experimentsSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * ExperimentsSettings experimentsSettings =
+ *     ExperimentsSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * ExperimentsClient experimentsClient = ExperimentsClient.create(experimentsSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class ExperimentsClient implements BackgroundResource { + private final ExperimentsSettings settings; + private final ExperimentsStub stub; + + /** Constructs an instance of ExperimentsClient with default settings. */ + public static final ExperimentsClient create() throws IOException { + return create(ExperimentsSettings.newBuilder().build()); + } + + /** + * Constructs an instance of ExperimentsClient, using the given settings. The channels are created + * based on the settings passed in, or defaults for any settings that are not set. + */ + public static final ExperimentsClient create(ExperimentsSettings settings) throws IOException { + return new ExperimentsClient(settings); + } + + /** + * Constructs an instance of ExperimentsClient, using the given stub for making calls. This is for + * advanced usage - prefer using create(ExperimentsSettings). + */ + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public static final ExperimentsClient create(ExperimentsStub stub) { + return new ExperimentsClient(stub); + } + + /** + * Constructs an instance of ExperimentsClient, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected ExperimentsClient(ExperimentsSettings settings) throws IOException { + this.settings = settings; + this.stub = ((ExperimentsStubSettings) settings.getStubSettings()).createStub(); + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + protected ExperimentsClient(ExperimentsStub stub) { + this.settings = null; + this.stub = stub; + } + + public final ExperimentsSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public ExperimentsStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the list of all experiments in the specified + * [Environment][google.cloud.dialogflow.cx.v3.Environment]. + * + * @param parent Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to list + * all environments for. Format: `projects/<Project ID>/locations/<Location + * ID>/agents/<Agent ID>/environments/<Environment ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListExperimentsPagedResponse listExperiments(EnvironmentName parent) { + ListExperimentsRequest request = + ListExperimentsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listExperiments(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the list of all experiments in the specified + * [Environment][google.cloud.dialogflow.cx.v3.Environment]. + * + * @param parent Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to list + * all environments for. Format: `projects/<Project ID>/locations/<Location + * ID>/agents/<Agent ID>/environments/<Environment ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListExperimentsPagedResponse listExperiments(String parent) { + ListExperimentsRequest request = ListExperimentsRequest.newBuilder().setParent(parent).build(); + return listExperiments(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the list of all experiments in the specified + * [Environment][google.cloud.dialogflow.cx.v3.Environment]. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListExperimentsPagedResponse listExperiments(ListExperimentsRequest request) { + return listExperimentsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the list of all experiments in the specified + * [Environment][google.cloud.dialogflow.cx.v3.Environment]. + * + *

Sample code: + */ + public final UnaryCallable + listExperimentsPagedCallable() { + return stub.listExperimentsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the list of all experiments in the specified + * [Environment][google.cloud.dialogflow.cx.v3.Environment]. + * + *

Sample code: + */ + public final UnaryCallable + listExperimentsCallable() { + return stub.listExperimentsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. + * + * @param name Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment]. + * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/environments/<Environment ID>/experiments/<Experiment ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Experiment getExperiment(ExperimentName name) { + GetExperimentRequest request = + GetExperimentRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getExperiment(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. + * + * @param name Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment]. + * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/environments/<Environment ID>/experiments/<Experiment ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Experiment getExperiment(String name) { + GetExperimentRequest request = GetExperimentRequest.newBuilder().setName(name).build(); + return getExperiment(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Experiment getExperiment(GetExperimentRequest request) { + return getExperimentCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. + * + *

Sample code: + */ + public final UnaryCallable getExperimentCallable() { + return stub.getExperimentCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an [Experiment][google.cloud.dialogflow.cx.v3.Experiment] in the specified + * [Environment][google.cloud.dialogflow.cx.v3.Environment]. + * + * @param parent Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to create an + * [Environment][google.cloud.dialogflow.cx.v3.Environment] for. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment + * ID>`. + * @param experiment Required. The experiment to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Experiment createExperiment(EnvironmentName parent, Experiment experiment) { + CreateExperimentRequest request = + CreateExperimentRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setExperiment(experiment) + .build(); + return createExperiment(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an [Experiment][google.cloud.dialogflow.cx.v3.Experiment] in the specified + * [Environment][google.cloud.dialogflow.cx.v3.Environment]. + * + * @param parent Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to create an + * [Environment][google.cloud.dialogflow.cx.v3.Environment] for. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment + * ID>`. + * @param experiment Required. The experiment to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Experiment createExperiment(String parent, Experiment experiment) { + CreateExperimentRequest request = + CreateExperimentRequest.newBuilder().setParent(parent).setExperiment(experiment).build(); + return createExperiment(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an [Experiment][google.cloud.dialogflow.cx.v3.Experiment] in the specified + * [Environment][google.cloud.dialogflow.cx.v3.Environment]. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Experiment createExperiment(CreateExperimentRequest request) { + return createExperimentCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an [Experiment][google.cloud.dialogflow.cx.v3.Experiment] in the specified + * [Environment][google.cloud.dialogflow.cx.v3.Environment]. + * + *

Sample code: + */ + public final UnaryCallable createExperimentCallable() { + return stub.createExperimentCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. + * + * @param experiment Required. The experiment to update. + * @param updateMask Required. The mask to control which fields get updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Experiment updateExperiment(Experiment experiment, FieldMask updateMask) { + UpdateExperimentRequest request = + UpdateExperimentRequest.newBuilder() + .setExperiment(experiment) + .setUpdateMask(updateMask) + .build(); + return updateExperiment(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Experiment updateExperiment(UpdateExperimentRequest request) { + return updateExperimentCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. + * + *

Sample code: + */ + public final UnaryCallable updateExperimentCallable() { + return stub.updateExperimentCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. + * + * @param name Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment] + * to delete. Format: `projects/<Project ID>/locations/<Location + * ID>/agents/<Agent ID>/environments/<Environment + * ID>/experiments/<Experiment ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteExperiment(ExperimentName name) { + DeleteExperimentRequest request = + DeleteExperimentRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteExperiment(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. + * + * @param name Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment] + * to delete. Format: `projects/<Project ID>/locations/<Location + * ID>/agents/<Agent ID>/environments/<Environment + * ID>/experiments/<Experiment ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteExperiment(String name) { + DeleteExperimentRequest request = DeleteExperimentRequest.newBuilder().setName(name).build(); + deleteExperiment(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteExperiment(DeleteExperimentRequest request) { + deleteExperimentCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. + * + *

Sample code: + */ + public final UnaryCallable deleteExperimentCallable() { + return stub.deleteExperimentCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Starts the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. This rpc only + * changes the state of experiment from PENDING to RUNNING. + * + * @param name Required. Resource name of the experiment to start. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment + * ID>/experiments/<Experiment ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Experiment startExperiment(ExperimentName name) { + StartExperimentRequest request = + StartExperimentRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return startExperiment(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Starts the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. This rpc only + * changes the state of experiment from PENDING to RUNNING. + * + * @param name Required. Resource name of the experiment to start. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment + * ID>/experiments/<Experiment ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Experiment startExperiment(String name) { + StartExperimentRequest request = StartExperimentRequest.newBuilder().setName(name).build(); + return startExperiment(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Starts the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. This rpc only + * changes the state of experiment from PENDING to RUNNING. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Experiment startExperiment(StartExperimentRequest request) { + return startExperimentCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Starts the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. This rpc only + * changes the state of experiment from PENDING to RUNNING. + * + *

Sample code: + */ + public final UnaryCallable startExperimentCallable() { + return stub.startExperimentCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Stops the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. This rpc only + * changes the state of experiment from RUNNING to DONE. + * + * @param name Required. Resource name of the experiment to stop. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment + * ID>/experiments/<Experiment ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Experiment stopExperiment(ExperimentName name) { + StopExperimentRequest request = + StopExperimentRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return stopExperiment(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Stops the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. This rpc only + * changes the state of experiment from RUNNING to DONE. + * + * @param name Required. Resource name of the experiment to stop. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment + * ID>/experiments/<Experiment ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Experiment stopExperiment(String name) { + StopExperimentRequest request = StopExperimentRequest.newBuilder().setName(name).build(); + return stopExperiment(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Stops the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. This rpc only + * changes the state of experiment from RUNNING to DONE. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Experiment stopExperiment(StopExperimentRequest request) { + return stopExperimentCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Stops the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. This rpc only + * changes the state of experiment from RUNNING to DONE. + * + *

Sample code: + */ + public final UnaryCallable stopExperimentCallable() { + return stub.stopExperimentCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListExperimentsPagedResponse + extends AbstractPagedListResponse< + ListExperimentsRequest, + ListExperimentsResponse, + Experiment, + ListExperimentsPage, + ListExperimentsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListExperimentsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListExperimentsPagedResponse apply(ListExperimentsPage input) { + return new ListExperimentsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListExperimentsPagedResponse(ListExperimentsPage page) { + super(page, ListExperimentsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListExperimentsPage + extends AbstractPage< + ListExperimentsRequest, ListExperimentsResponse, Experiment, ListExperimentsPage> { + + private ListExperimentsPage( + PageContext context, + ListExperimentsResponse response) { + super(context, response); + } + + private static ListExperimentsPage createEmptyPage() { + return new ListExperimentsPage(null, null); + } + + @Override + protected ListExperimentsPage createPage( + PageContext context, + ListExperimentsResponse response) { + return new ListExperimentsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListExperimentsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListExperimentsRequest, + ListExperimentsResponse, + Experiment, + ListExperimentsPage, + ListExperimentsFixedSizeCollection> { + + private ListExperimentsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListExperimentsFixedSizeCollection createEmptyCollection() { + return new ListExperimentsFixedSizeCollection(null, 0); + } + + @Override + protected ListExperimentsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListExperimentsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentsSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentsSettings.java new file mode 100644 index 000000000..f48869a41 --- /dev/null +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentsSettings.java @@ -0,0 +1,250 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.cx.v3; + +import static com.google.cloud.dialogflow.cx.v3.ExperimentsClient.ListExperimentsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.dialogflow.cx.v3.stub.ExperimentsStubSettings; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link ExperimentsClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (dialogflow.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of getExperiment to 30 seconds: + * + *

{@code
+ * ExperimentsSettings.Builder experimentsSettingsBuilder = ExperimentsSettings.newBuilder();
+ * experimentsSettingsBuilder
+ *     .getExperimentSettings()
+ *     .setRetrySettings(
+ *         experimentsSettingsBuilder
+ *             .getExperimentSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * ExperimentsSettings experimentsSettings = experimentsSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class ExperimentsSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to listExperiments. */ + public PagedCallSettings< + ListExperimentsRequest, ListExperimentsResponse, ListExperimentsPagedResponse> + listExperimentsSettings() { + return ((ExperimentsStubSettings) getStubSettings()).listExperimentsSettings(); + } + + /** Returns the object with the settings used for calls to getExperiment. */ + public UnaryCallSettings getExperimentSettings() { + return ((ExperimentsStubSettings) getStubSettings()).getExperimentSettings(); + } + + /** Returns the object with the settings used for calls to createExperiment. */ + public UnaryCallSettings createExperimentSettings() { + return ((ExperimentsStubSettings) getStubSettings()).createExperimentSettings(); + } + + /** Returns the object with the settings used for calls to updateExperiment. */ + public UnaryCallSettings updateExperimentSettings() { + return ((ExperimentsStubSettings) getStubSettings()).updateExperimentSettings(); + } + + /** Returns the object with the settings used for calls to deleteExperiment. */ + public UnaryCallSettings deleteExperimentSettings() { + return ((ExperimentsStubSettings) getStubSettings()).deleteExperimentSettings(); + } + + /** Returns the object with the settings used for calls to startExperiment. */ + public UnaryCallSettings startExperimentSettings() { + return ((ExperimentsStubSettings) getStubSettings()).startExperimentSettings(); + } + + /** Returns the object with the settings used for calls to stopExperiment. */ + public UnaryCallSettings stopExperimentSettings() { + return ((ExperimentsStubSettings) getStubSettings()).stopExperimentSettings(); + } + + public static final ExperimentsSettings create(ExperimentsStubSettings stub) throws IOException { + return new ExperimentsSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return ExperimentsStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return ExperimentsStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return ExperimentsStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return ExperimentsStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return ExperimentsStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return ExperimentsStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ExperimentsStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected ExperimentsSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for ExperimentsSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(ExperimentsStubSettings.newBuilder(clientContext)); + } + + protected Builder(ExperimentsSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(ExperimentsStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(ExperimentsStubSettings.newBuilder()); + } + + public ExperimentsStubSettings.Builder getStubSettingsBuilder() { + return ((ExperimentsStubSettings.Builder) getStubSettings()); + } + + // NEXT_MAJOR_VER: remove 'throws Exception'. + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to listExperiments. */ + public PagedCallSettings.Builder< + ListExperimentsRequest, ListExperimentsResponse, ListExperimentsPagedResponse> + listExperimentsSettings() { + return getStubSettingsBuilder().listExperimentsSettings(); + } + + /** Returns the builder for the settings used for calls to getExperiment. */ + public UnaryCallSettings.Builder getExperimentSettings() { + return getStubSettingsBuilder().getExperimentSettings(); + } + + /** Returns the builder for the settings used for calls to createExperiment. */ + public UnaryCallSettings.Builder + createExperimentSettings() { + return getStubSettingsBuilder().createExperimentSettings(); + } + + /** Returns the builder for the settings used for calls to updateExperiment. */ + public UnaryCallSettings.Builder + updateExperimentSettings() { + return getStubSettingsBuilder().updateExperimentSettings(); + } + + /** Returns the builder for the settings used for calls to deleteExperiment. */ + public UnaryCallSettings.Builder deleteExperimentSettings() { + return getStubSettingsBuilder().deleteExperimentSettings(); + } + + /** Returns the builder for the settings used for calls to startExperiment. */ + public UnaryCallSettings.Builder startExperimentSettings() { + return getStubSettingsBuilder().startExperimentSettings(); + } + + /** Returns the builder for the settings used for calls to stopExperiment. */ + public UnaryCallSettings.Builder stopExperimentSettings() { + return getStubSettingsBuilder().stopExperimentSettings(); + } + + @Override + public ExperimentsSettings build() throws IOException { + return new ExperimentsSettings(this); + } + } +} diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/package-info.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/package-info.java index ac242fb95..e6f5e51b3 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/package-info.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/package-info.java @@ -37,6 +37,13 @@ * *

Sample for EnvironmentsClient: * + *

======================= ExperimentsClient ======================= + * + *

Service Description: Service for managing + * [Experiments][google.cloud.dialogflow.cx.v3.Experiment]. + * + *

Sample for ExperimentsClient: + * *

======================= FlowsClient ======================= * *

Service Description: Service for managing [Flows][google.cloud.dialogflow.cx.v3.Flow]. diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/ExperimentsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/ExperimentsStub.java new file mode 100644 index 000000000..8a69671e4 --- /dev/null +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/ExperimentsStub.java @@ -0,0 +1,79 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.cx.v3.stub; + +import static com.google.cloud.dialogflow.cx.v3.ExperimentsClient.ListExperimentsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest; +import com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest; +import com.google.cloud.dialogflow.cx.v3.Experiment; +import com.google.cloud.dialogflow.cx.v3.GetExperimentRequest; +import com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest; +import com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse; +import com.google.cloud.dialogflow.cx.v3.StartExperimentRequest; +import com.google.cloud.dialogflow.cx.v3.StopExperimentRequest; +import com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the Experiments service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class ExperimentsStub implements BackgroundResource { + + public UnaryCallable + listExperimentsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listExperimentsPagedCallable()"); + } + + public UnaryCallable listExperimentsCallable() { + throw new UnsupportedOperationException("Not implemented: listExperimentsCallable()"); + } + + public UnaryCallable getExperimentCallable() { + throw new UnsupportedOperationException("Not implemented: getExperimentCallable()"); + } + + public UnaryCallable createExperimentCallable() { + throw new UnsupportedOperationException("Not implemented: createExperimentCallable()"); + } + + public UnaryCallable updateExperimentCallable() { + throw new UnsupportedOperationException("Not implemented: updateExperimentCallable()"); + } + + public UnaryCallable deleteExperimentCallable() { + throw new UnsupportedOperationException("Not implemented: deleteExperimentCallable()"); + } + + public UnaryCallable startExperimentCallable() { + throw new UnsupportedOperationException("Not implemented: startExperimentCallable()"); + } + + public UnaryCallable stopExperimentCallable() { + throw new UnsupportedOperationException("Not implemented: stopExperimentCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/ExperimentsStubSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/ExperimentsStubSettings.java new file mode 100644 index 000000000..46665a0b8 --- /dev/null +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/ExperimentsStubSettings.java @@ -0,0 +1,491 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.cx.v3.stub; + +import static com.google.cloud.dialogflow.cx.v3.ExperimentsClient.ListExperimentsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest; +import com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest; +import com.google.cloud.dialogflow.cx.v3.Experiment; +import com.google.cloud.dialogflow.cx.v3.GetExperimentRequest; +import com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest; +import com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse; +import com.google.cloud.dialogflow.cx.v3.StartExperimentRequest; +import com.google.cloud.dialogflow.cx.v3.StopExperimentRequest; +import com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link ExperimentsStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (dialogflow.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of getExperiment to 30 seconds: + * + *

{@code
+ * ExperimentsStubSettings.Builder experimentsSettingsBuilder =
+ *     ExperimentsStubSettings.newBuilder();
+ * experimentsSettingsBuilder
+ *     .getExperimentSettings()
+ *     .setRetrySettings(
+ *         experimentsSettingsBuilder
+ *             .getExperimentSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * ExperimentsStubSettings experimentsSettings = experimentsSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class ExperimentsStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder() + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/dialogflow") + .build(); + + private final PagedCallSettings< + ListExperimentsRequest, ListExperimentsResponse, ListExperimentsPagedResponse> + listExperimentsSettings; + private final UnaryCallSettings getExperimentSettings; + private final UnaryCallSettings createExperimentSettings; + private final UnaryCallSettings updateExperimentSettings; + private final UnaryCallSettings deleteExperimentSettings; + private final UnaryCallSettings startExperimentSettings; + private final UnaryCallSettings stopExperimentSettings; + + private static final PagedListDescriptor< + ListExperimentsRequest, ListExperimentsResponse, Experiment> + LIST_EXPERIMENTS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListExperimentsRequest injectToken( + ListExperimentsRequest payload, String token) { + return ListExperimentsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListExperimentsRequest injectPageSize( + ListExperimentsRequest payload, int pageSize) { + return ListExperimentsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListExperimentsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListExperimentsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListExperimentsResponse payload) { + return payload.getExperimentsList() == null + ? ImmutableList.of() + : payload.getExperimentsList(); + } + }; + + private static final PagedListResponseFactory< + ListExperimentsRequest, ListExperimentsResponse, ListExperimentsPagedResponse> + LIST_EXPERIMENTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListExperimentsRequest, ListExperimentsResponse, ListExperimentsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListExperimentsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_EXPERIMENTS_PAGE_STR_DESC, request, context); + return ListExperimentsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to listExperiments. */ + public PagedCallSettings< + ListExperimentsRequest, ListExperimentsResponse, ListExperimentsPagedResponse> + listExperimentsSettings() { + return listExperimentsSettings; + } + + /** Returns the object with the settings used for calls to getExperiment. */ + public UnaryCallSettings getExperimentSettings() { + return getExperimentSettings; + } + + /** Returns the object with the settings used for calls to createExperiment. */ + public UnaryCallSettings createExperimentSettings() { + return createExperimentSettings; + } + + /** Returns the object with the settings used for calls to updateExperiment. */ + public UnaryCallSettings updateExperimentSettings() { + return updateExperimentSettings; + } + + /** Returns the object with the settings used for calls to deleteExperiment. */ + public UnaryCallSettings deleteExperimentSettings() { + return deleteExperimentSettings; + } + + /** Returns the object with the settings used for calls to startExperiment. */ + public UnaryCallSettings startExperimentSettings() { + return startExperimentSettings; + } + + /** Returns the object with the settings used for calls to stopExperiment. */ + public UnaryCallSettings stopExperimentSettings() { + return stopExperimentSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public ExperimentsStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcExperimentsStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "dialogflow.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(ExperimentsStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected ExperimentsStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listExperimentsSettings = settingsBuilder.listExperimentsSettings().build(); + getExperimentSettings = settingsBuilder.getExperimentSettings().build(); + createExperimentSettings = settingsBuilder.createExperimentSettings().build(); + updateExperimentSettings = settingsBuilder.updateExperimentSettings().build(); + deleteExperimentSettings = settingsBuilder.deleteExperimentSettings().build(); + startExperimentSettings = settingsBuilder.startExperimentSettings().build(); + stopExperimentSettings = settingsBuilder.stopExperimentSettings().build(); + } + + /** Builder for ExperimentsStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + ListExperimentsRequest, ListExperimentsResponse, ListExperimentsPagedResponse> + listExperimentsSettings; + private final UnaryCallSettings.Builder getExperimentSettings; + private final UnaryCallSettings.Builder + createExperimentSettings; + private final UnaryCallSettings.Builder + updateExperimentSettings; + private final UnaryCallSettings.Builder + deleteExperimentSettings; + private final UnaryCallSettings.Builder + startExperimentSettings; + private final UnaryCallSettings.Builder + stopExperimentSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + listExperimentsSettings = PagedCallSettings.newBuilder(LIST_EXPERIMENTS_PAGE_STR_FACT); + getExperimentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createExperimentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateExperimentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteExperimentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + startExperimentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + stopExperimentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listExperimentsSettings, + getExperimentSettings, + createExperimentSettings, + updateExperimentSettings, + deleteExperimentSettings, + startExperimentSettings, + stopExperimentSettings); + initDefaults(this); + } + + protected Builder(ExperimentsStubSettings settings) { + super(settings); + + listExperimentsSettings = settings.listExperimentsSettings.toBuilder(); + getExperimentSettings = settings.getExperimentSettings.toBuilder(); + createExperimentSettings = settings.createExperimentSettings.toBuilder(); + updateExperimentSettings = settings.updateExperimentSettings.toBuilder(); + deleteExperimentSettings = settings.deleteExperimentSettings.toBuilder(); + startExperimentSettings = settings.startExperimentSettings.toBuilder(); + stopExperimentSettings = settings.stopExperimentSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listExperimentsSettings, + getExperimentSettings, + createExperimentSettings, + updateExperimentSettings, + deleteExperimentSettings, + startExperimentSettings, + stopExperimentSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .listExperimentsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getExperimentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createExperimentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateExperimentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteExperimentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .startExperimentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .stopExperimentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + return builder; + } + + // NEXT_MAJOR_VER: remove 'throws Exception'. + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to listExperiments. */ + public PagedCallSettings.Builder< + ListExperimentsRequest, ListExperimentsResponse, ListExperimentsPagedResponse> + listExperimentsSettings() { + return listExperimentsSettings; + } + + /** Returns the builder for the settings used for calls to getExperiment. */ + public UnaryCallSettings.Builder getExperimentSettings() { + return getExperimentSettings; + } + + /** Returns the builder for the settings used for calls to createExperiment. */ + public UnaryCallSettings.Builder + createExperimentSettings() { + return createExperimentSettings; + } + + /** Returns the builder for the settings used for calls to updateExperiment. */ + public UnaryCallSettings.Builder + updateExperimentSettings() { + return updateExperimentSettings; + } + + /** Returns the builder for the settings used for calls to deleteExperiment. */ + public UnaryCallSettings.Builder deleteExperimentSettings() { + return deleteExperimentSettings; + } + + /** Returns the builder for the settings used for calls to startExperiment. */ + public UnaryCallSettings.Builder startExperimentSettings() { + return startExperimentSettings; + } + + /** Returns the builder for the settings used for calls to stopExperiment. */ + public UnaryCallSettings.Builder stopExperimentSettings() { + return stopExperimentSettings; + } + + @Override + public ExperimentsStubSettings build() throws IOException { + return new ExperimentsStubSettings(this); + } + } +} diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcExperimentsCallableFactory.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcExperimentsCallableFactory.java new file mode 100644 index 000000000..da36542d1 --- /dev/null +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcExperimentsCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.cx.v3.stub; + +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the Experiments service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcExperimentsCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcExperimentsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcExperimentsStub.java new file mode 100644 index 000000000..e33c42ae1 --- /dev/null +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcExperimentsStub.java @@ -0,0 +1,368 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.cx.v3.stub; + +import static com.google.cloud.dialogflow.cx.v3.ExperimentsClient.ListExperimentsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsExtractor; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest; +import com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest; +import com.google.cloud.dialogflow.cx.v3.Experiment; +import com.google.cloud.dialogflow.cx.v3.GetExperimentRequest; +import com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest; +import com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse; +import com.google.cloud.dialogflow.cx.v3.StartExperimentRequest; +import com.google.cloud.dialogflow.cx.v3.StopExperimentRequest; +import com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the Experiments service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcExperimentsStub extends ExperimentsStub { + private static final MethodDescriptor + listExperimentsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3.Experiments/ListExperiments") + .setRequestMarshaller( + ProtoUtils.marshaller(ListExperimentsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListExperimentsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getExperimentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3.Experiments/GetExperiment") + .setRequestMarshaller( + ProtoUtils.marshaller(GetExperimentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Experiment.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createExperimentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3.Experiments/CreateExperiment") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateExperimentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Experiment.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateExperimentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3.Experiments/UpdateExperiment") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateExperimentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Experiment.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteExperimentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3.Experiments/DeleteExperiment") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteExperimentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + startExperimentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3.Experiments/StartExperiment") + .setRequestMarshaller( + ProtoUtils.marshaller(StartExperimentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Experiment.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + stopExperimentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3.Experiments/StopExperiment") + .setRequestMarshaller( + ProtoUtils.marshaller(StopExperimentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Experiment.getDefaultInstance())) + .build(); + + private final UnaryCallable + listExperimentsCallable; + private final UnaryCallable + listExperimentsPagedCallable; + private final UnaryCallable getExperimentCallable; + private final UnaryCallable createExperimentCallable; + private final UnaryCallable updateExperimentCallable; + private final UnaryCallable deleteExperimentCallable; + private final UnaryCallable startExperimentCallable; + private final UnaryCallable stopExperimentCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcExperimentsStub create(ExperimentsStubSettings settings) + throws IOException { + return new GrpcExperimentsStub(settings, ClientContext.create(settings)); + } + + public static final GrpcExperimentsStub create(ClientContext clientContext) throws IOException { + return new GrpcExperimentsStub(ExperimentsStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcExperimentsStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcExperimentsStub( + ExperimentsStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcExperimentsStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcExperimentsStub(ExperimentsStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcExperimentsCallableFactory()); + } + + /** + * Constructs an instance of GrpcExperimentsStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcExperimentsStub( + ExperimentsStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + listExperimentsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listExperimentsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListExperimentsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings getExperimentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getExperimentMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetExperimentRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings createExperimentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createExperimentMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateExperimentRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings updateExperimentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateExperimentMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateExperimentRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "experiment.name", String.valueOf(request.getExperiment().getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings deleteExperimentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteExperimentMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteExperimentRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings startExperimentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(startExperimentMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(StartExperimentRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings stopExperimentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(stopExperimentMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(StopExperimentRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + + this.listExperimentsCallable = + callableFactory.createUnaryCallable( + listExperimentsTransportSettings, settings.listExperimentsSettings(), clientContext); + this.listExperimentsPagedCallable = + callableFactory.createPagedCallable( + listExperimentsTransportSettings, settings.listExperimentsSettings(), clientContext); + this.getExperimentCallable = + callableFactory.createUnaryCallable( + getExperimentTransportSettings, settings.getExperimentSettings(), clientContext); + this.createExperimentCallable = + callableFactory.createUnaryCallable( + createExperimentTransportSettings, settings.createExperimentSettings(), clientContext); + this.updateExperimentCallable = + callableFactory.createUnaryCallable( + updateExperimentTransportSettings, settings.updateExperimentSettings(), clientContext); + this.deleteExperimentCallable = + callableFactory.createUnaryCallable( + deleteExperimentTransportSettings, settings.deleteExperimentSettings(), clientContext); + this.startExperimentCallable = + callableFactory.createUnaryCallable( + startExperimentTransportSettings, settings.startExperimentSettings(), clientContext); + this.stopExperimentCallable = + callableFactory.createUnaryCallable( + stopExperimentTransportSettings, settings.stopExperimentSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + public UnaryCallable listExperimentsCallable() { + return listExperimentsCallable; + } + + public UnaryCallable + listExperimentsPagedCallable() { + return listExperimentsPagedCallable; + } + + public UnaryCallable getExperimentCallable() { + return getExperimentCallable; + } + + public UnaryCallable createExperimentCallable() { + return createExperimentCallable; + } + + public UnaryCallable updateExperimentCallable() { + return updateExperimentCallable; + } + + public UnaryCallable deleteExperimentCallable() { + return deleteExperimentCallable; + } + + public UnaryCallable startExperimentCallable() { + return startExperimentCallable; + } + + public UnaryCallable stopExperimentCallable() { + return stopExperimentCallable; + } + + @Override + public final void close() { + shutdown(); + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/EntityTypesClientTest.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/EntityTypesClientTest.java index db0cab2fa..014db37e4 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/EntityTypesClientTest.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/EntityTypesClientTest.java @@ -179,6 +179,7 @@ public void getEntityTypeTest() throws Exception { .addAllEntities(new ArrayList()) .addAllExcludedPhrases(new ArrayList()) .setEnableFuzzyExtraction(true) + .setRedact(true) .build(); mockEntityTypes.addResponse(expectedResponse); @@ -223,6 +224,7 @@ public void getEntityTypeTest2() throws Exception { .addAllEntities(new ArrayList()) .addAllExcludedPhrases(new ArrayList()) .setEnableFuzzyExtraction(true) + .setRedact(true) .build(); mockEntityTypes.addResponse(expectedResponse); @@ -266,6 +268,7 @@ public void createEntityTypeTest() throws Exception { .addAllEntities(new ArrayList()) .addAllExcludedPhrases(new ArrayList()) .setEnableFuzzyExtraction(true) + .setRedact(true) .build(); mockEntityTypes.addResponse(expectedResponse); @@ -312,6 +315,7 @@ public void createEntityTypeTest2() throws Exception { .addAllEntities(new ArrayList()) .addAllExcludedPhrases(new ArrayList()) .setEnableFuzzyExtraction(true) + .setRedact(true) .build(); mockEntityTypes.addResponse(expectedResponse); @@ -358,6 +362,7 @@ public void updateEntityTypeTest() throws Exception { .addAllEntities(new ArrayList()) .addAllExcludedPhrases(new ArrayList()) .setEnableFuzzyExtraction(true) + .setRedact(true) .build(); mockEntityTypes.addResponse(expectedResponse); diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/ExperimentsClientTest.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/ExperimentsClientTest.java new file mode 100644 index 000000000..2ec0fbdd4 --- /dev/null +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/ExperimentsClientTest.java @@ -0,0 +1,721 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.cx.v3; + +import static com.google.cloud.dialogflow.cx.v3.ExperimentsClient.ListExperimentsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.common.collect.Lists; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Duration; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class ExperimentsClientTest { + private static MockExperiments mockExperiments; + private static MockServiceHelper mockServiceHelper; + private ExperimentsClient client; + private LocalChannelProvider channelProvider; + + @BeforeClass + public static void startStaticServer() { + mockExperiments = new MockExperiments(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockExperiments)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + ExperimentsSettings settings = + ExperimentsSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = ExperimentsClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void listExperimentsTest() throws Exception { + Experiment responsesElement = Experiment.newBuilder().build(); + ListExperimentsResponse expectedResponse = + ListExperimentsResponse.newBuilder() + .setNextPageToken("") + .addAllExperiments(Arrays.asList(responsesElement)) + .build(); + mockExperiments.addResponse(expectedResponse); + + EnvironmentName parent = + EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]"); + + ListExperimentsPagedResponse pagedListResponse = client.listExperiments(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getExperimentsList().get(0), resources.get(0)); + + List actualRequests = mockExperiments.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListExperimentsRequest actualRequest = ((ListExperimentsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listExperimentsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockExperiments.addException(exception); + + try { + EnvironmentName parent = + EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]"); + client.listExperiments(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listExperimentsTest2() throws Exception { + Experiment responsesElement = Experiment.newBuilder().build(); + ListExperimentsResponse expectedResponse = + ListExperimentsResponse.newBuilder() + .setNextPageToken("") + .addAllExperiments(Arrays.asList(responsesElement)) + .build(); + mockExperiments.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListExperimentsPagedResponse pagedListResponse = client.listExperiments(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getExperimentsList().get(0), resources.get(0)); + + List actualRequests = mockExperiments.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListExperimentsRequest actualRequest = ((ListExperimentsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listExperimentsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockExperiments.addException(exception); + + try { + String parent = "parent-995424086"; + client.listExperiments(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getExperimentTest() throws Exception { + Experiment expectedResponse = + Experiment.newBuilder() + .setName( + ExperimentName.of( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDefinition(Experiment.Definition.newBuilder().build()) + .setResult(Experiment.Result.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setLastUpdateTime(Timestamp.newBuilder().build()) + .setExperimentLength(Duration.newBuilder().build()) + .addAllVariantsHistory(new ArrayList()) + .build(); + mockExperiments.addResponse(expectedResponse); + + ExperimentName name = + ExperimentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]"); + + Experiment actualResponse = client.getExperiment(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockExperiments.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetExperimentRequest actualRequest = ((GetExperimentRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getExperimentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockExperiments.addException(exception); + + try { + ExperimentName name = + ExperimentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]"); + client.getExperiment(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getExperimentTest2() throws Exception { + Experiment expectedResponse = + Experiment.newBuilder() + .setName( + ExperimentName.of( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDefinition(Experiment.Definition.newBuilder().build()) + .setResult(Experiment.Result.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setLastUpdateTime(Timestamp.newBuilder().build()) + .setExperimentLength(Duration.newBuilder().build()) + .addAllVariantsHistory(new ArrayList()) + .build(); + mockExperiments.addResponse(expectedResponse); + + String name = "name3373707"; + + Experiment actualResponse = client.getExperiment(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockExperiments.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetExperimentRequest actualRequest = ((GetExperimentRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getExperimentExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockExperiments.addException(exception); + + try { + String name = "name3373707"; + client.getExperiment(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createExperimentTest() throws Exception { + Experiment expectedResponse = + Experiment.newBuilder() + .setName( + ExperimentName.of( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDefinition(Experiment.Definition.newBuilder().build()) + .setResult(Experiment.Result.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setLastUpdateTime(Timestamp.newBuilder().build()) + .setExperimentLength(Duration.newBuilder().build()) + .addAllVariantsHistory(new ArrayList()) + .build(); + mockExperiments.addResponse(expectedResponse); + + EnvironmentName parent = + EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]"); + Experiment experiment = Experiment.newBuilder().build(); + + Experiment actualResponse = client.createExperiment(parent, experiment); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockExperiments.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateExperimentRequest actualRequest = ((CreateExperimentRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(experiment, actualRequest.getExperiment()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createExperimentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockExperiments.addException(exception); + + try { + EnvironmentName parent = + EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]"); + Experiment experiment = Experiment.newBuilder().build(); + client.createExperiment(parent, experiment); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createExperimentTest2() throws Exception { + Experiment expectedResponse = + Experiment.newBuilder() + .setName( + ExperimentName.of( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDefinition(Experiment.Definition.newBuilder().build()) + .setResult(Experiment.Result.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setLastUpdateTime(Timestamp.newBuilder().build()) + .setExperimentLength(Duration.newBuilder().build()) + .addAllVariantsHistory(new ArrayList()) + .build(); + mockExperiments.addResponse(expectedResponse); + + String parent = "parent-995424086"; + Experiment experiment = Experiment.newBuilder().build(); + + Experiment actualResponse = client.createExperiment(parent, experiment); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockExperiments.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateExperimentRequest actualRequest = ((CreateExperimentRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(experiment, actualRequest.getExperiment()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createExperimentExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockExperiments.addException(exception); + + try { + String parent = "parent-995424086"; + Experiment experiment = Experiment.newBuilder().build(); + client.createExperiment(parent, experiment); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateExperimentTest() throws Exception { + Experiment expectedResponse = + Experiment.newBuilder() + .setName( + ExperimentName.of( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDefinition(Experiment.Definition.newBuilder().build()) + .setResult(Experiment.Result.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setLastUpdateTime(Timestamp.newBuilder().build()) + .setExperimentLength(Duration.newBuilder().build()) + .addAllVariantsHistory(new ArrayList()) + .build(); + mockExperiments.addResponse(expectedResponse); + + Experiment experiment = Experiment.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Experiment actualResponse = client.updateExperiment(experiment, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockExperiments.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateExperimentRequest actualRequest = ((UpdateExperimentRequest) actualRequests.get(0)); + + Assert.assertEquals(experiment, actualRequest.getExperiment()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateExperimentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockExperiments.addException(exception); + + try { + Experiment experiment = Experiment.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateExperiment(experiment, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteExperimentTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockExperiments.addResponse(expectedResponse); + + ExperimentName name = + ExperimentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]"); + + client.deleteExperiment(name); + + List actualRequests = mockExperiments.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteExperimentRequest actualRequest = ((DeleteExperimentRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteExperimentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockExperiments.addException(exception); + + try { + ExperimentName name = + ExperimentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]"); + client.deleteExperiment(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteExperimentTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockExperiments.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteExperiment(name); + + List actualRequests = mockExperiments.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteExperimentRequest actualRequest = ((DeleteExperimentRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteExperimentExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockExperiments.addException(exception); + + try { + String name = "name3373707"; + client.deleteExperiment(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void startExperimentTest() throws Exception { + Experiment expectedResponse = + Experiment.newBuilder() + .setName( + ExperimentName.of( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDefinition(Experiment.Definition.newBuilder().build()) + .setResult(Experiment.Result.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setLastUpdateTime(Timestamp.newBuilder().build()) + .setExperimentLength(Duration.newBuilder().build()) + .addAllVariantsHistory(new ArrayList()) + .build(); + mockExperiments.addResponse(expectedResponse); + + ExperimentName name = + ExperimentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]"); + + Experiment actualResponse = client.startExperiment(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockExperiments.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + StartExperimentRequest actualRequest = ((StartExperimentRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void startExperimentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockExperiments.addException(exception); + + try { + ExperimentName name = + ExperimentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]"); + client.startExperiment(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void startExperimentTest2() throws Exception { + Experiment expectedResponse = + Experiment.newBuilder() + .setName( + ExperimentName.of( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDefinition(Experiment.Definition.newBuilder().build()) + .setResult(Experiment.Result.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setLastUpdateTime(Timestamp.newBuilder().build()) + .setExperimentLength(Duration.newBuilder().build()) + .addAllVariantsHistory(new ArrayList()) + .build(); + mockExperiments.addResponse(expectedResponse); + + String name = "name3373707"; + + Experiment actualResponse = client.startExperiment(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockExperiments.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + StartExperimentRequest actualRequest = ((StartExperimentRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void startExperimentExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockExperiments.addException(exception); + + try { + String name = "name3373707"; + client.startExperiment(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void stopExperimentTest() throws Exception { + Experiment expectedResponse = + Experiment.newBuilder() + .setName( + ExperimentName.of( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDefinition(Experiment.Definition.newBuilder().build()) + .setResult(Experiment.Result.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setLastUpdateTime(Timestamp.newBuilder().build()) + .setExperimentLength(Duration.newBuilder().build()) + .addAllVariantsHistory(new ArrayList()) + .build(); + mockExperiments.addResponse(expectedResponse); + + ExperimentName name = + ExperimentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]"); + + Experiment actualResponse = client.stopExperiment(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockExperiments.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + StopExperimentRequest actualRequest = ((StopExperimentRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void stopExperimentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockExperiments.addException(exception); + + try { + ExperimentName name = + ExperimentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]"); + client.stopExperiment(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void stopExperimentTest2() throws Exception { + Experiment expectedResponse = + Experiment.newBuilder() + .setName( + ExperimentName.of( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDefinition(Experiment.Definition.newBuilder().build()) + .setResult(Experiment.Result.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setLastUpdateTime(Timestamp.newBuilder().build()) + .setExperimentLength(Duration.newBuilder().build()) + .addAllVariantsHistory(new ArrayList()) + .build(); + mockExperiments.addResponse(expectedResponse); + + String name = "name3373707"; + + Experiment actualResponse = client.stopExperiment(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockExperiments.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + StopExperimentRequest actualRequest = ((StopExperimentRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void stopExperimentExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockExperiments.addException(exception); + + try { + String name = "name3373707"; + client.stopExperiment(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockExperiments.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockExperiments.java new file mode 100644 index 000000000..7de1a382d --- /dev/null +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockExperiments.java @@ -0,0 +1,59 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.cx.v3; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockExperiments implements MockGrpcService { + private final MockExperimentsImpl serviceImpl; + + public MockExperiments() { + serviceImpl = new MockExperimentsImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockExperimentsImpl.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockExperimentsImpl.java new file mode 100644 index 000000000..e5b7570dc --- /dev/null +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockExperimentsImpl.java @@ -0,0 +1,166 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.cx.v3; + +import com.google.api.core.BetaApi; +import com.google.cloud.dialogflow.cx.v3.ExperimentsGrpc.ExperimentsImplBase; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Empty; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockExperimentsImpl extends ExperimentsImplBase { + private List requests; + private Queue responses; + + public MockExperimentsImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void listExperiments( + ListExperimentsRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListExperimentsResponse) { + requests.add(request); + responseObserver.onNext(((ListExperimentsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void getExperiment( + GetExperimentRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Experiment) { + requests.add(request); + responseObserver.onNext(((Experiment) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void createExperiment( + CreateExperimentRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Experiment) { + requests.add(request); + responseObserver.onNext(((Experiment) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void updateExperiment( + UpdateExperimentRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Experiment) { + requests.add(request); + responseObserver.onNext(((Experiment) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void deleteExperiment( + DeleteExperimentRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void startExperiment( + StartExperimentRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Experiment) { + requests.add(request); + responseObserver.onNext(((Experiment) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void stopExperiment( + StopExperimentRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Experiment) { + requests.add(request); + responseObserver.onNext(((Experiment) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } +} diff --git a/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentsGrpc.java b/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentsGrpc.java new file mode 100644 index 000000000..2f08892f8 --- /dev/null +++ b/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentsGrpc.java @@ -0,0 +1,1074 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.dialogflow.cx.v3; + +import static io.grpc.MethodDescriptor.generateFullMethodName; +import static io.grpc.stub.ClientCalls.asyncUnaryCall; +import static io.grpc.stub.ClientCalls.blockingUnaryCall; +import static io.grpc.stub.ClientCalls.futureUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; + +/** + * + * + *
+ * Service for managing [Experiments][google.cloud.dialogflow.cx.v3.Experiment].
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/dialogflow/cx/v3/experiment.proto") +public final class ExperimentsGrpc { + + private ExperimentsGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.dialogflow.cx.v3.Experiments"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest, + com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse> + getListExperimentsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListExperiments", + requestType = com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest, + com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse> + getListExperimentsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest, + com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse> + getListExperimentsMethod; + if ((getListExperimentsMethod = ExperimentsGrpc.getListExperimentsMethod) == null) { + synchronized (ExperimentsGrpc.class) { + if ((getListExperimentsMethod = ExperimentsGrpc.getListExperimentsMethod) == null) { + ExperimentsGrpc.getListExperimentsMethod = + getListExperimentsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListExperiments")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new ExperimentsMethodDescriptorSupplier("ListExperiments")) + .build(); + } + } + } + return getListExperimentsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.GetExperimentRequest, + com.google.cloud.dialogflow.cx.v3.Experiment> + getGetExperimentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetExperiment", + requestType = com.google.cloud.dialogflow.cx.v3.GetExperimentRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3.Experiment.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.GetExperimentRequest, + com.google.cloud.dialogflow.cx.v3.Experiment> + getGetExperimentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.GetExperimentRequest, + com.google.cloud.dialogflow.cx.v3.Experiment> + getGetExperimentMethod; + if ((getGetExperimentMethod = ExperimentsGrpc.getGetExperimentMethod) == null) { + synchronized (ExperimentsGrpc.class) { + if ((getGetExperimentMethod = ExperimentsGrpc.getGetExperimentMethod) == null) { + ExperimentsGrpc.getGetExperimentMethod = + getGetExperimentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetExperiment")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.GetExperimentRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.Experiment.getDefaultInstance())) + .setSchemaDescriptor(new ExperimentsMethodDescriptorSupplier("GetExperiment")) + .build(); + } + } + } + return getGetExperimentMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest, + com.google.cloud.dialogflow.cx.v3.Experiment> + getCreateExperimentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateExperiment", + requestType = com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3.Experiment.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest, + com.google.cloud.dialogflow.cx.v3.Experiment> + getCreateExperimentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest, + com.google.cloud.dialogflow.cx.v3.Experiment> + getCreateExperimentMethod; + if ((getCreateExperimentMethod = ExperimentsGrpc.getCreateExperimentMethod) == null) { + synchronized (ExperimentsGrpc.class) { + if ((getCreateExperimentMethod = ExperimentsGrpc.getCreateExperimentMethod) == null) { + ExperimentsGrpc.getCreateExperimentMethod = + getCreateExperimentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateExperiment")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.Experiment.getDefaultInstance())) + .setSchemaDescriptor( + new ExperimentsMethodDescriptorSupplier("CreateExperiment")) + .build(); + } + } + } + return getCreateExperimentMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest, + com.google.cloud.dialogflow.cx.v3.Experiment> + getUpdateExperimentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateExperiment", + requestType = com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3.Experiment.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest, + com.google.cloud.dialogflow.cx.v3.Experiment> + getUpdateExperimentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest, + com.google.cloud.dialogflow.cx.v3.Experiment> + getUpdateExperimentMethod; + if ((getUpdateExperimentMethod = ExperimentsGrpc.getUpdateExperimentMethod) == null) { + synchronized (ExperimentsGrpc.class) { + if ((getUpdateExperimentMethod = ExperimentsGrpc.getUpdateExperimentMethod) == null) { + ExperimentsGrpc.getUpdateExperimentMethod = + getUpdateExperimentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateExperiment")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.Experiment.getDefaultInstance())) + .setSchemaDescriptor( + new ExperimentsMethodDescriptorSupplier("UpdateExperiment")) + .build(); + } + } + } + return getUpdateExperimentMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest, com.google.protobuf.Empty> + getDeleteExperimentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteExperiment", + requestType = com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest, com.google.protobuf.Empty> + getDeleteExperimentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest, com.google.protobuf.Empty> + getDeleteExperimentMethod; + if ((getDeleteExperimentMethod = ExperimentsGrpc.getDeleteExperimentMethod) == null) { + synchronized (ExperimentsGrpc.class) { + if ((getDeleteExperimentMethod = ExperimentsGrpc.getDeleteExperimentMethod) == null) { + ExperimentsGrpc.getDeleteExperimentMethod = + getDeleteExperimentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteExperiment")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new ExperimentsMethodDescriptorSupplier("DeleteExperiment")) + .build(); + } + } + } + return getDeleteExperimentMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.StartExperimentRequest, + com.google.cloud.dialogflow.cx.v3.Experiment> + getStartExperimentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "StartExperiment", + requestType = com.google.cloud.dialogflow.cx.v3.StartExperimentRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3.Experiment.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.StartExperimentRequest, + com.google.cloud.dialogflow.cx.v3.Experiment> + getStartExperimentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.StartExperimentRequest, + com.google.cloud.dialogflow.cx.v3.Experiment> + getStartExperimentMethod; + if ((getStartExperimentMethod = ExperimentsGrpc.getStartExperimentMethod) == null) { + synchronized (ExperimentsGrpc.class) { + if ((getStartExperimentMethod = ExperimentsGrpc.getStartExperimentMethod) == null) { + ExperimentsGrpc.getStartExperimentMethod = + getStartExperimentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "StartExperiment")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.StartExperimentRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.Experiment.getDefaultInstance())) + .setSchemaDescriptor( + new ExperimentsMethodDescriptorSupplier("StartExperiment")) + .build(); + } + } + } + return getStartExperimentMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.StopExperimentRequest, + com.google.cloud.dialogflow.cx.v3.Experiment> + getStopExperimentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "StopExperiment", + requestType = com.google.cloud.dialogflow.cx.v3.StopExperimentRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3.Experiment.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.StopExperimentRequest, + com.google.cloud.dialogflow.cx.v3.Experiment> + getStopExperimentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.StopExperimentRequest, + com.google.cloud.dialogflow.cx.v3.Experiment> + getStopExperimentMethod; + if ((getStopExperimentMethod = ExperimentsGrpc.getStopExperimentMethod) == null) { + synchronized (ExperimentsGrpc.class) { + if ((getStopExperimentMethod = ExperimentsGrpc.getStopExperimentMethod) == null) { + ExperimentsGrpc.getStopExperimentMethod = + getStopExperimentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "StopExperiment")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.StopExperimentRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.Experiment.getDefaultInstance())) + .setSchemaDescriptor( + new ExperimentsMethodDescriptorSupplier("StopExperiment")) + .build(); + } + } + } + return getStopExperimentMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static ExperimentsStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ExperimentsStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ExperimentsStub(channel, callOptions); + } + }; + return ExperimentsStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static ExperimentsBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ExperimentsBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ExperimentsBlockingStub(channel, callOptions); + } + }; + return ExperimentsBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static ExperimentsFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ExperimentsFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ExperimentsFutureStub(channel, callOptions); + } + }; + return ExperimentsFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Service for managing [Experiments][google.cloud.dialogflow.cx.v3.Experiment].
+   * 
+ */ + public abstract static class ExperimentsImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Returns the list of all experiments in the specified [Environment][google.cloud.dialogflow.cx.v3.Environment].
+     * 
+ */ + public void listExperiments( + com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getListExperimentsMethod(), responseObserver); + } + + /** + * + * + *
+     * Retrieves the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment].
+     * 
+ */ + public void getExperiment( + com.google.cloud.dialogflow.cx.v3.GetExperimentRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getGetExperimentMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates an [Experiment][google.cloud.dialogflow.cx.v3.Experiment] in the specified [Environment][google.cloud.dialogflow.cx.v3.Environment].
+     * 
+ */ + public void createExperiment( + com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getCreateExperimentMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment].
+     * 
+ */ + public void updateExperiment( + com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getUpdateExperimentMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment].
+     * 
+ */ + public void deleteExperiment( + com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getDeleteExperimentMethod(), responseObserver); + } + + /** + * + * + *
+     * Starts the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. This rpc only changes the state of
+     * experiment from PENDING to RUNNING.
+     * 
+ */ + public void startExperiment( + com.google.cloud.dialogflow.cx.v3.StartExperimentRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getStartExperimentMethod(), responseObserver); + } + + /** + * + * + *
+     * Stops the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. This rpc only changes the state of
+     * experiment from RUNNING to DONE.
+     * 
+ */ + public void stopExperiment( + com.google.cloud.dialogflow.cx.v3.StopExperimentRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getStopExperimentMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getListExperimentsMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest, + com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse>( + this, METHODID_LIST_EXPERIMENTS))) + .addMethod( + getGetExperimentMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3.GetExperimentRequest, + com.google.cloud.dialogflow.cx.v3.Experiment>(this, METHODID_GET_EXPERIMENT))) + .addMethod( + getCreateExperimentMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest, + com.google.cloud.dialogflow.cx.v3.Experiment>( + this, METHODID_CREATE_EXPERIMENT))) + .addMethod( + getUpdateExperimentMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest, + com.google.cloud.dialogflow.cx.v3.Experiment>( + this, METHODID_UPDATE_EXPERIMENT))) + .addMethod( + getDeleteExperimentMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest, + com.google.protobuf.Empty>(this, METHODID_DELETE_EXPERIMENT))) + .addMethod( + getStartExperimentMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3.StartExperimentRequest, + com.google.cloud.dialogflow.cx.v3.Experiment>( + this, METHODID_START_EXPERIMENT))) + .addMethod( + getStopExperimentMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3.StopExperimentRequest, + com.google.cloud.dialogflow.cx.v3.Experiment>( + this, METHODID_STOP_EXPERIMENT))) + .build(); + } + } + + /** + * + * + *
+   * Service for managing [Experiments][google.cloud.dialogflow.cx.v3.Experiment].
+   * 
+ */ + public static final class ExperimentsStub + extends io.grpc.stub.AbstractAsyncStub { + private ExperimentsStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ExperimentsStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ExperimentsStub(channel, callOptions); + } + + /** + * + * + *
+     * Returns the list of all experiments in the specified [Environment][google.cloud.dialogflow.cx.v3.Environment].
+     * 
+ */ + public void listExperiments( + com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListExperimentsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Retrieves the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment].
+     * 
+ */ + public void getExperiment( + com.google.cloud.dialogflow.cx.v3.GetExperimentRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetExperimentMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates an [Experiment][google.cloud.dialogflow.cx.v3.Experiment] in the specified [Environment][google.cloud.dialogflow.cx.v3.Environment].
+     * 
+ */ + public void createExperiment( + com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getCreateExperimentMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment].
+     * 
+ */ + public void updateExperiment( + com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getUpdateExperimentMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment].
+     * 
+ */ + public void deleteExperiment( + com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getDeleteExperimentMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Starts the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. This rpc only changes the state of
+     * experiment from PENDING to RUNNING.
+     * 
+ */ + public void startExperiment( + com.google.cloud.dialogflow.cx.v3.StartExperimentRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getStartExperimentMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Stops the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. This rpc only changes the state of
+     * experiment from RUNNING to DONE.
+     * 
+ */ + public void stopExperiment( + com.google.cloud.dialogflow.cx.v3.StopExperimentRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getStopExperimentMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * Service for managing [Experiments][google.cloud.dialogflow.cx.v3.Experiment].
+   * 
+ */ + public static final class ExperimentsBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private ExperimentsBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ExperimentsBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ExperimentsBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Returns the list of all experiments in the specified [Environment][google.cloud.dialogflow.cx.v3.Environment].
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse listExperiments( + com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest request) { + return blockingUnaryCall(getChannel(), getListExperimentsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Retrieves the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment].
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.Experiment getExperiment( + com.google.cloud.dialogflow.cx.v3.GetExperimentRequest request) { + return blockingUnaryCall(getChannel(), getGetExperimentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates an [Experiment][google.cloud.dialogflow.cx.v3.Experiment] in the specified [Environment][google.cloud.dialogflow.cx.v3.Environment].
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.Experiment createExperiment( + com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest request) { + return blockingUnaryCall( + getChannel(), getCreateExperimentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment].
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.Experiment updateExperiment( + com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest request) { + return blockingUnaryCall( + getChannel(), getUpdateExperimentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment].
+     * 
+ */ + public com.google.protobuf.Empty deleteExperiment( + com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest request) { + return blockingUnaryCall( + getChannel(), getDeleteExperimentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Starts the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. This rpc only changes the state of
+     * experiment from PENDING to RUNNING.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.Experiment startExperiment( + com.google.cloud.dialogflow.cx.v3.StartExperimentRequest request) { + return blockingUnaryCall(getChannel(), getStartExperimentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Stops the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. This rpc only changes the state of
+     * experiment from RUNNING to DONE.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.Experiment stopExperiment( + com.google.cloud.dialogflow.cx.v3.StopExperimentRequest request) { + return blockingUnaryCall(getChannel(), getStopExperimentMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * Service for managing [Experiments][google.cloud.dialogflow.cx.v3.Experiment].
+   * 
+ */ + public static final class ExperimentsFutureStub + extends io.grpc.stub.AbstractFutureStub { + private ExperimentsFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ExperimentsFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ExperimentsFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Returns the list of all experiments in the specified [Environment][google.cloud.dialogflow.cx.v3.Environment].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse> + listExperiments(com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest request) { + return futureUnaryCall( + getChannel().newCall(getListExperimentsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Retrieves the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3.Experiment> + getExperiment(com.google.cloud.dialogflow.cx.v3.GetExperimentRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetExperimentMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates an [Experiment][google.cloud.dialogflow.cx.v3.Experiment] in the specified [Environment][google.cloud.dialogflow.cx.v3.Environment].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3.Experiment> + createExperiment(com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest request) { + return futureUnaryCall( + getChannel().newCall(getCreateExperimentMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3.Experiment> + updateExperiment(com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest request) { + return futureUnaryCall( + getChannel().newCall(getUpdateExperimentMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteExperiment(com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest request) { + return futureUnaryCall( + getChannel().newCall(getDeleteExperimentMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Starts the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. This rpc only changes the state of
+     * experiment from PENDING to RUNNING.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3.Experiment> + startExperiment(com.google.cloud.dialogflow.cx.v3.StartExperimentRequest request) { + return futureUnaryCall( + getChannel().newCall(getStartExperimentMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Stops the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. This rpc only changes the state of
+     * experiment from RUNNING to DONE.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3.Experiment> + stopExperiment(com.google.cloud.dialogflow.cx.v3.StopExperimentRequest request) { + return futureUnaryCall( + getChannel().newCall(getStopExperimentMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_EXPERIMENTS = 0; + private static final int METHODID_GET_EXPERIMENT = 1; + private static final int METHODID_CREATE_EXPERIMENT = 2; + private static final int METHODID_UPDATE_EXPERIMENT = 3; + private static final int METHODID_DELETE_EXPERIMENT = 4; + private static final int METHODID_START_EXPERIMENT = 5; + private static final int METHODID_STOP_EXPERIMENT = 6; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final ExperimentsImplBase serviceImpl; + private final int methodId; + + MethodHandlers(ExperimentsImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_LIST_EXPERIMENTS: + serviceImpl.listExperiments( + (com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse>) + responseObserver); + break; + case METHODID_GET_EXPERIMENT: + serviceImpl.getExperiment( + (com.google.cloud.dialogflow.cx.v3.GetExperimentRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_EXPERIMENT: + serviceImpl.createExperiment( + (com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_EXPERIMENT: + serviceImpl.updateExperiment( + (com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DELETE_EXPERIMENT: + serviceImpl.deleteExperiment( + (com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_START_EXPERIMENT: + serviceImpl.startExperiment( + (com.google.cloud.dialogflow.cx.v3.StartExperimentRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_STOP_EXPERIMENT: + serviceImpl.stopExperiment( + (com.google.cloud.dialogflow.cx.v3.StopExperimentRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private abstract static class ExperimentsBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + ExperimentsBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("Experiments"); + } + } + + private static final class ExperimentsFileDescriptorSupplier + extends ExperimentsBaseDescriptorSupplier { + ExperimentsFileDescriptorSupplier() {} + } + + private static final class ExperimentsMethodDescriptorSupplier + extends ExperimentsBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + ExperimentsMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (ExperimentsGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new ExperimentsFileDescriptorSupplier()) + .addMethod(getListExperimentsMethod()) + .addMethod(getGetExperimentMethod()) + .addMethod(getCreateExperimentMethod()) + .addMethod(getUpdateExperimentMethod()) + .addMethod(getDeleteExperimentMethod()) + .addMethod(getStartExperimentMethod()) + .addMethod(getStopExperimentMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateExperimentRequest.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateExperimentRequest.java new file mode 100644 index 000000000..5a4f5cc03 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateExperimentRequest.java @@ -0,0 +1,967 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/experiment.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The request message for [Experiments.CreateExperiment][google.cloud.dialogflow.cx.v3.Experiments.CreateExperiment].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.CreateExperimentRequest} + */ +public final class CreateExperimentRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.CreateExperimentRequest) + CreateExperimentRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateExperimentRequest.newBuilder() to construct. + private CreateExperimentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateExperimentRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateExperimentRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateExperimentRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + com.google.cloud.dialogflow.cx.v3.Experiment.Builder subBuilder = null; + if (experiment_ != null) { + subBuilder = experiment_.toBuilder(); + } + experiment_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.Experiment.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(experiment_); + experiment_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_CreateExperimentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_CreateExperimentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest.class, + com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to create an [Environment][google.cloud.dialogflow.cx.v3.Environment] for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to create an [Environment][google.cloud.dialogflow.cx.v3.Environment] for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXPERIMENT_FIELD_NUMBER = 2; + private com.google.cloud.dialogflow.cx.v3.Experiment experiment_; + /** + * + * + *
+   * Required. The experiment to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the experiment field is set. + */ + @java.lang.Override + public boolean hasExperiment() { + return experiment_ != null; + } + /** + * + * + *
+   * Required. The experiment to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The experiment. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Experiment getExperiment() { + return experiment_ == null + ? com.google.cloud.dialogflow.cx.v3.Experiment.getDefaultInstance() + : experiment_; + } + /** + * + * + *
+   * Required. The experiment to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ExperimentOrBuilder getExperimentOrBuilder() { + return getExperiment(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (experiment_ != null) { + output.writeMessage(2, getExperiment()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (experiment_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getExperiment()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest other = + (com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasExperiment() != other.hasExperiment()) return false; + if (hasExperiment()) { + if (!getExperiment().equals(other.getExperiment())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasExperiment()) { + hash = (37 * hash) + EXPERIMENT_FIELD_NUMBER; + hash = (53 * hash) + getExperiment().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for [Experiments.CreateExperiment][google.cloud.dialogflow.cx.v3.Experiments.CreateExperiment].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.CreateExperimentRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.CreateExperimentRequest) + com.google.cloud.dialogflow.cx.v3.CreateExperimentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_CreateExperimentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_CreateExperimentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest.class, + com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (experimentBuilder_ == null) { + experiment_ = null; + } else { + experiment_ = null; + experimentBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_CreateExperimentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest build() { + com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest result = + new com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest(this); + result.parent_ = parent_; + if (experimentBuilder_ == null) { + result.experiment_ = experiment_; + } else { + result.experiment_ = experimentBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasExperiment()) { + mergeExperiment(other.getExperiment()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to create an [Environment][google.cloud.dialogflow.cx.v3.Environment] for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to create an [Environment][google.cloud.dialogflow.cx.v3.Environment] for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to create an [Environment][google.cloud.dialogflow.cx.v3.Environment] for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to create an [Environment][google.cloud.dialogflow.cx.v3.Environment] for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to create an [Environment][google.cloud.dialogflow.cx.v3.Environment] for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.dialogflow.cx.v3.Experiment experiment_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Experiment, + com.google.cloud.dialogflow.cx.v3.Experiment.Builder, + com.google.cloud.dialogflow.cx.v3.ExperimentOrBuilder> + experimentBuilder_; + /** + * + * + *
+     * Required. The experiment to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the experiment field is set. + */ + public boolean hasExperiment() { + return experimentBuilder_ != null || experiment_ != null; + } + /** + * + * + *
+     * Required. The experiment to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The experiment. + */ + public com.google.cloud.dialogflow.cx.v3.Experiment getExperiment() { + if (experimentBuilder_ == null) { + return experiment_ == null + ? com.google.cloud.dialogflow.cx.v3.Experiment.getDefaultInstance() + : experiment_; + } else { + return experimentBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The experiment to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setExperiment(com.google.cloud.dialogflow.cx.v3.Experiment value) { + if (experimentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + experiment_ = value; + onChanged(); + } else { + experimentBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The experiment to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setExperiment( + com.google.cloud.dialogflow.cx.v3.Experiment.Builder builderForValue) { + if (experimentBuilder_ == null) { + experiment_ = builderForValue.build(); + onChanged(); + } else { + experimentBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The experiment to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeExperiment(com.google.cloud.dialogflow.cx.v3.Experiment value) { + if (experimentBuilder_ == null) { + if (experiment_ != null) { + experiment_ = + com.google.cloud.dialogflow.cx.v3.Experiment.newBuilder(experiment_) + .mergeFrom(value) + .buildPartial(); + } else { + experiment_ = value; + } + onChanged(); + } else { + experimentBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The experiment to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearExperiment() { + if (experimentBuilder_ == null) { + experiment_ = null; + onChanged(); + } else { + experiment_ = null; + experimentBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The experiment to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3.Experiment.Builder getExperimentBuilder() { + + onChanged(); + return getExperimentFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The experiment to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3.ExperimentOrBuilder getExperimentOrBuilder() { + if (experimentBuilder_ != null) { + return experimentBuilder_.getMessageOrBuilder(); + } else { + return experiment_ == null + ? com.google.cloud.dialogflow.cx.v3.Experiment.getDefaultInstance() + : experiment_; + } + } + /** + * + * + *
+     * Required. The experiment to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Experiment, + com.google.cloud.dialogflow.cx.v3.Experiment.Builder, + com.google.cloud.dialogflow.cx.v3.ExperimentOrBuilder> + getExperimentFieldBuilder() { + if (experimentBuilder_ == null) { + experimentBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Experiment, + com.google.cloud.dialogflow.cx.v3.Experiment.Builder, + com.google.cloud.dialogflow.cx.v3.ExperimentOrBuilder>( + getExperiment(), getParentForChildren(), isClean()); + experiment_ = null; + } + return experimentBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.CreateExperimentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.CreateExperimentRequest) + private static final com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateExperimentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateExperimentRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateExperimentRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateExperimentRequestOrBuilder.java new file mode 100644 index 000000000..4c293ace0 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateExperimentRequestOrBuilder.java @@ -0,0 +1,99 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/experiment.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface CreateExperimentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.CreateExperimentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to create an [Environment][google.cloud.dialogflow.cx.v3.Environment] for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to create an [Environment][google.cloud.dialogflow.cx.v3.Environment] for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The experiment to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the experiment field is set. + */ + boolean hasExperiment(); + /** + * + * + *
+   * Required. The experiment to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The experiment. + */ + com.google.cloud.dialogflow.cx.v3.Experiment getExperiment(); + /** + * + * + *
+   * Required. The experiment to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.dialogflow.cx.v3.ExperimentOrBuilder getExperimentOrBuilder(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeleteExperimentRequest.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeleteExperimentRequest.java new file mode 100644 index 000000000..453bc158a --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeleteExperimentRequest.java @@ -0,0 +1,665 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/experiment.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The request message for [Experiments.DeleteExperiment][google.cloud.dialogflow.cx.v3.Experiments.DeleteExperiment].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.DeleteExperimentRequest} + */ +public final class DeleteExperimentRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.DeleteExperimentRequest) + DeleteExperimentRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteExperimentRequest.newBuilder() to construct. + private DeleteExperimentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteExperimentRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteExperimentRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteExperimentRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_DeleteExperimentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_DeleteExperimentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest.class, + com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment] to delete.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment] to delete.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest other = + (com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for [Experiments.DeleteExperiment][google.cloud.dialogflow.cx.v3.Experiments.DeleteExperiment].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.DeleteExperimentRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.DeleteExperimentRequest) + com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_DeleteExperimentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_DeleteExperimentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest.class, + com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_DeleteExperimentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest build() { + com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest result = + new com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment] to delete.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment] to delete.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment] to delete.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment] to delete.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment] to delete.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.DeleteExperimentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.DeleteExperimentRequest) + private static final com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteExperimentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteExperimentRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeleteExperimentRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeleteExperimentRequestOrBuilder.java new file mode 100644 index 000000000..e4f3d2f3a --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeleteExperimentRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/experiment.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface DeleteExperimentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.DeleteExperimentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment] to delete.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment] to delete.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityType.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityType.java index a476fa40d..e97f598b9 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityType.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityType.java @@ -156,6 +156,11 @@ private EntityType( enableFuzzyExtraction_ = input.readBool(); break; } + case 72: + { + redact_ = input.readBool(); + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -2667,6 +2672,26 @@ public boolean getEnableFuzzyExtraction() { return enableFuzzyExtraction_; } + public static final int REDACT_FIELD_NUMBER = 9; + private boolean 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.
+   * 
+ * + * bool redact = 9; + * + * @return The redact. + */ + @java.lang.Override + public boolean getRedact() { + return redact_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -2705,6 +2730,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (enableFuzzyExtraction_ != false) { output.writeBool(7, enableFuzzyExtraction_); } + if (redact_ != false) { + output.writeBool(9, redact_); + } unknownFields.writeTo(output); } @@ -2738,6 +2766,9 @@ public int getSerializedSize() { if (enableFuzzyExtraction_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(7, enableFuzzyExtraction_); } + if (redact_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(9, redact_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -2761,6 +2792,7 @@ public boolean equals(final java.lang.Object obj) { if (!getEntitiesList().equals(other.getEntitiesList())) return false; if (!getExcludedPhrasesList().equals(other.getExcludedPhrasesList())) return false; if (getEnableFuzzyExtraction() != other.getEnableFuzzyExtraction()) return false; + if (getRedact() != other.getRedact()) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -2790,6 +2822,8 @@ public int hashCode() { } hash = (37 * hash) + ENABLE_FUZZY_EXTRACTION_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableFuzzyExtraction()); + hash = (37 * hash) + REDACT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRedact()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -2980,6 +3014,8 @@ public Builder clear() { } enableFuzzyExtraction_ = false; + redact_ = false; + return this; } @@ -3031,6 +3067,7 @@ public com.google.cloud.dialogflow.cx.v3.EntityType buildPartial() { result.excludedPhrases_ = excludedPhrasesBuilder_.build(); } result.enableFuzzyExtraction_ = enableFuzzyExtraction_; + result.redact_ = redact_; onBuilt(); return result; } @@ -3151,6 +3188,9 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.EntityType other) { if (other.getEnableFuzzyExtraction() != false) { setEnableFuzzyExtraction(other.getEnableFuzzyExtraction()); } + if (other.getRedact() != false) { + setRedact(other.getRedact()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -4482,6 +4522,64 @@ public Builder clearEnableFuzzyExtraction() { return this; } + private boolean 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.
+     * 
+ * + * bool redact = 9; + * + * @return The redact. + */ + @java.lang.Override + public boolean getRedact() { + return 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.
+     * 
+ * + * bool redact = 9; + * + * @param value The redact to set. + * @return This builder for chaining. + */ + public Builder setRedact(boolean value) { + + redact_ = value; + onChanged(); + 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.
+     * 
+ * + * bool redact = 9; + * + * @return This builder for chaining. + */ + public Builder clearRedact() { + + redact_ = false; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityTypeOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityTypeOrBuilder.java index 45e9df97d..135338630 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityTypeOrBuilder.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityTypeOrBuilder.java @@ -278,4 +278,19 @@ com.google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhraseOrBuilder getExcluded * @return The enableFuzzyExtraction. */ boolean getEnableFuzzyExtraction(); + + /** + * + * + *
+   * 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.
+   * 
+ * + * bool redact = 9; + * + * @return The redact. + */ + boolean getRedact(); } diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityTypeProto.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityTypeProto.java index a54355d99..228677d1b 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityTypeProto.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityTypeProto.java @@ -78,7 +78,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "pi/client.proto\032\037google/api/field_behavi" + "or.proto\032\031google/api/resource.proto\032\033goo" + "gle/protobuf/empty.proto\032 google/protobu" - + "f/field_mask.proto\"\212\006\n\nEntityType\022\014\n\004nam" + + "f/field_mask.proto\"\232\006\n\nEntityType\022\014\n\004nam" + "e\030\001 \001(\t\022\031\n\014display_name\030\002 \001(\tB\003\340A\002\022A\n\004ki" + "nd\030\003 \001(\0162..google.cloud.dialogflow.cx.v3" + ".EntityType.KindB\003\340A\002\022X\n\023auto_expansion_" @@ -88,70 +88,71 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "3.EntityType.Entity\022R\n\020excluded_phrases\030" + "\006 \003(\01328.google.cloud.dialogflow.cx.v3.En" + "tityType.ExcludedPhrase\022\037\n\027enable_fuzzy_" - + "extraction\030\007 \001(\010\0323\n\006Entity\022\022\n\005value\030\001 \001(" - + "\tB\003\340A\002\022\025\n\010synonyms\030\002 \003(\tB\003\340A\002\032$\n\016Exclude" - + "dPhrase\022\022\n\005value\030\001 \001(\tB\003\340A\002\"J\n\004Kind\022\024\n\020K" - + "IND_UNSPECIFIED\020\000\022\014\n\010KIND_MAP\020\001\022\r\n\tKIND_" - + "LIST\020\002\022\017\n\013KIND_REGEXP\020\003\"Y\n\021AutoExpansion" - + "Mode\022#\n\037AUTO_EXPANSION_MODE_UNSPECIFIED\020" - + "\000\022\037\n\033AUTO_EXPANSION_MODE_DEFAULT\020\001:{\352Ax\n" - + "$dialogflow.googleapis.com/EntityType\022Pp" - + "rojects/{project}/locations/{location}/a" - + "gents/{agent}/entityTypes/{entity_type}\"" - + "\224\001\n\026ListEntityTypesRequest\022<\n\006parent\030\001 \001" - + "(\tB,\340A\002\372A&\022$dialogflow.googleapis.com/En" - + "tityType\022\025\n\rlanguage_code\030\002 \001(\t\022\021\n\tpage_" - + "size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\"s\n\027ListEn" - + "tityTypesResponse\022?\n\014entity_types\030\001 \003(\0132" - + ").google.cloud.dialogflow.cx.v3.EntityTy" - + "pe\022\027\n\017next_page_token\030\002 \001(\t\"i\n\024GetEntity" - + "TypeRequest\022:\n\004name\030\001 \001(\tB,\340A\002\372A&\n$dialo" - + "gflow.googleapis.com/EntityType\022\025\n\rlangu" - + "age_code\030\002 \001(\t\"\263\001\n\027CreateEntityTypeReque" + + "extraction\030\007 \001(\010\022\016\n\006redact\030\t \001(\010\0323\n\006Enti" + + "ty\022\022\n\005value\030\001 \001(\tB\003\340A\002\022\025\n\010synonyms\030\002 \003(\t" + + "B\003\340A\002\032$\n\016ExcludedPhrase\022\022\n\005value\030\001 \001(\tB\003" + + "\340A\002\"J\n\004Kind\022\024\n\020KIND_UNSPECIFIED\020\000\022\014\n\010KIN" + + "D_MAP\020\001\022\r\n\tKIND_LIST\020\002\022\017\n\013KIND_REGEXP\020\003\"" + + "Y\n\021AutoExpansionMode\022#\n\037AUTO_EXPANSION_M" + + "ODE_UNSPECIFIED\020\000\022\037\n\033AUTO_EXPANSION_MODE" + + "_DEFAULT\020\001:{\352Ax\n$dialogflow.googleapis.c" + + "om/EntityType\022Pprojects/{project}/locati" + + "ons/{location}/agents/{agent}/entityType" + + "s/{entity_type}\"\224\001\n\026ListEntityTypesReque" + "st\022<\n\006parent\030\001 \001(\tB,\340A\002\372A&\022$dialogflow.g" - + "oogleapis.com/EntityType\022C\n\013entity_type\030" - + "\002 \001(\0132).google.cloud.dialogflow.cx.v3.En" - + "tityTypeB\003\340A\002\022\025\n\rlanguage_code\030\003 \001(\t\"\246\001\n" - + "\027UpdateEntityTypeRequest\022C\n\013entity_type\030" - + "\001 \001(\0132).google.cloud.dialogflow.cx.v3.En" - + "tityTypeB\003\340A\002\022\025\n\rlanguage_code\030\002 \001(\t\022/\n\013" - + "update_mask\030\003 \001(\0132\032.google.protobuf.Fiel" - + "dMask\"d\n\027DeleteEntityTypeRequest\022:\n\004name" - + "\030\001 \001(\tB,\340A\002\372A&\n$dialogflow.googleapis.co" - + "m/EntityType\022\r\n\005force\030\002 \001(\0102\207\t\n\013EntityTy" - + "pes\022\313\001\n\017ListEntityTypes\0225.google.cloud.d" - + "ialogflow.cx.v3.ListEntityTypesRequest\0326" - + ".google.cloud.dialogflow.cx.v3.ListEntit" - + "yTypesResponse\"I\202\323\344\223\002:\0228/v3/{parent=proj" - + "ects/*/locations/*/agents/*}/entityTypes" - + "\332A\006parent\022\270\001\n\rGetEntityType\0223.google.clo" - + "ud.dialogflow.cx.v3.GetEntityTypeRequest" - + "\032).google.cloud.dialogflow.cx.v3.EntityT" - + "ype\"G\202\323\344\223\002:\0228/v3/{name=projects/*/locati" - + "ons/*/agents/*/entityTypes/*}\332A\004name\022\331\001\n" - + "\020CreateEntityType\0226.google.cloud.dialogf" - + "low.cx.v3.CreateEntityTypeRequest\032).goog" - + "le.cloud.dialogflow.cx.v3.EntityType\"b\202\323" - + "\344\223\002G\"8/v3/{parent=projects/*/locations/*" - + "/agents/*}/entityTypes:\013entity_type\332A\022pa" - + "rent,entity_type\022\352\001\n\020UpdateEntityType\0226." - + "google.cloud.dialogflow.cx.v3.UpdateEnti" - + "tyTypeRequest\032).google.cloud.dialogflow." - + "cx.v3.EntityType\"s\202\323\344\223\002S2D/v3/{entity_ty" - + "pe.name=projects/*/locations/*/agents/*/" - + "entityTypes/*}:\013entity_type\332A\027entity_typ" - + "e,update_mask\022\253\001\n\020DeleteEntityType\0226.goo" - + "gle.cloud.dialogflow.cx.v3.DeleteEntityT" - + "ypeRequest\032\026.google.protobuf.Empty\"G\202\323\344\223" - + "\002:*8/v3/{name=projects/*/locations/*/age" - + "nts/*/entityTypes/*}\332A\004name\032x\312A\031dialogfl" - + "ow.googleapis.com\322AYhttps://www.googleap" - + "is.com/auth/cloud-platform,https://www.g" - + "oogleapis.com/auth/dialogflowB\237\001\n!com.go" - + "ogle.cloud.dialogflow.cx.v3B\017EntityTypeP" - + "rotoP\001Z?google.golang.org/genproto/googl" - + "eapis/cloud/dialogflow/cx/v3;cx\370\001\001\242\002\002DF\252" - + "\002\035Google.Cloud.Dialogflow.Cx.V3b\006proto3" + + "oogleapis.com/EntityType\022\025\n\rlanguage_cod" + + "e\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022\022\n\npage_token" + + "\030\004 \001(\t\"s\n\027ListEntityTypesResponse\022?\n\014ent" + + "ity_types\030\001 \003(\0132).google.cloud.dialogflo" + + "w.cx.v3.EntityType\022\027\n\017next_page_token\030\002 " + + "\001(\t\"i\n\024GetEntityTypeRequest\022:\n\004name\030\001 \001(" + + "\tB,\340A\002\372A&\n$dialogflow.googleapis.com/Ent" + + "ityType\022\025\n\rlanguage_code\030\002 \001(\t\"\263\001\n\027Creat" + + "eEntityTypeRequest\022<\n\006parent\030\001 \001(\tB,\340A\002\372" + + "A&\022$dialogflow.googleapis.com/EntityType" + + "\022C\n\013entity_type\030\002 \001(\0132).google.cloud.dia" + + "logflow.cx.v3.EntityTypeB\003\340A\002\022\025\n\rlanguag" + + "e_code\030\003 \001(\t\"\246\001\n\027UpdateEntityTypeRequest" + + "\022C\n\013entity_type\030\001 \001(\0132).google.cloud.dia" + + "logflow.cx.v3.EntityTypeB\003\340A\002\022\025\n\rlanguag" + + "e_code\030\002 \001(\t\022/\n\013update_mask\030\003 \001(\0132\032.goog" + + "le.protobuf.FieldMask\"d\n\027DeleteEntityTyp" + + "eRequest\022:\n\004name\030\001 \001(\tB,\340A\002\372A&\n$dialogfl" + + "ow.googleapis.com/EntityType\022\r\n\005force\030\002 " + + "\001(\0102\207\t\n\013EntityTypes\022\313\001\n\017ListEntityTypes\022" + + "5.google.cloud.dialogflow.cx.v3.ListEnti" + + "tyTypesRequest\0326.google.cloud.dialogflow" + + ".cx.v3.ListEntityTypesResponse\"I\202\323\344\223\002:\0228" + + "/v3/{parent=projects/*/locations/*/agent" + + "s/*}/entityTypes\332A\006parent\022\270\001\n\rGetEntityT" + + "ype\0223.google.cloud.dialogflow.cx.v3.GetE" + + "ntityTypeRequest\032).google.cloud.dialogfl" + + "ow.cx.v3.EntityType\"G\202\323\344\223\002:\0228/v3/{name=p" + + "rojects/*/locations/*/agents/*/entityTyp" + + "es/*}\332A\004name\022\331\001\n\020CreateEntityType\0226.goog" + + "le.cloud.dialogflow.cx.v3.CreateEntityTy" + + "peRequest\032).google.cloud.dialogflow.cx.v" + + "3.EntityType\"b\202\323\344\223\002G\"8/v3/{parent=projec" + + "ts/*/locations/*/agents/*}/entityTypes:\013" + + "entity_type\332A\022parent,entity_type\022\352\001\n\020Upd" + + "ateEntityType\0226.google.cloud.dialogflow." + + "cx.v3.UpdateEntityTypeRequest\032).google.c" + + "loud.dialogflow.cx.v3.EntityType\"s\202\323\344\223\002S" + + "2D/v3/{entity_type.name=projects/*/locat" + + "ions/*/agents/*/entityTypes/*}:\013entity_t" + + "ype\332A\027entity_type,update_mask\022\253\001\n\020Delete" + + "EntityType\0226.google.cloud.dialogflow.cx." + + "v3.DeleteEntityTypeRequest\032\026.google.prot" + + "obuf.Empty\"G\202\323\344\223\002:*8/v3/{name=projects/*" + + "/locations/*/agents/*/entityTypes/*}\332A\004n" + + "ame\032x\312A\031dialogflow.googleapis.com\322AYhttp" + + "s://www.googleapis.com/auth/cloud-platfo" + + "rm,https://www.googleapis.com/auth/dialo" + + "gflowB\237\001\n!com.google.cloud.dialogflow.cx" + + ".v3B\017EntityTypeProtoP\001Z?google.golang.or" + + "g/genproto/googleapis/cloud/dialogflow/c" + + "x/v3;cx\370\001\001\242\002\002DF\252\002\035Google.Cloud.Dialogflo" + + "w.Cx.V3b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -177,6 +178,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Entities", "ExcludedPhrases", "EnableFuzzyExtraction", + "Redact", }); internal_static_google_cloud_dialogflow_cx_v3_EntityType_Entity_descriptor = internal_static_google_cloud_dialogflow_cx_v3_EntityType_descriptor.getNestedTypes().get(0); diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Experiment.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Experiment.java new file mode 100644 index 000000000..51366c542 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Experiment.java @@ -0,0 +1,10587 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/experiment.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * Represents an experiment in an environment.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.Experiment} + */ +public final class Experiment extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.Experiment) + ExperimentOrBuilder { + private static final long serialVersionUID = 0L; + // Use Experiment.newBuilder() to construct. + private Experiment(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Experiment() { + name_ = ""; + displayName_ = ""; + description_ = ""; + state_ = 0; + variantsHistory_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Experiment(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Experiment( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 32: + { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 42: + { + com.google.cloud.dialogflow.cx.v3.Experiment.Definition.Builder subBuilder = null; + if (definition_ != null) { + subBuilder = definition_.toBuilder(); + } + definition_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.Experiment.Definition.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(definition_); + definition_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + com.google.cloud.dialogflow.cx.v3.Experiment.Result.Builder subBuilder = null; + if (result_ != null) { + subBuilder = result_.toBuilder(); + } + result_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.Experiment.Result.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(result_); + result_ = subBuilder.buildPartial(); + } + + break; + } + case 58: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 66: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (startTime_ != null) { + subBuilder = startTime_.toBuilder(); + } + startTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(startTime_); + startTime_ = subBuilder.buildPartial(); + } + + break; + } + case 74: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (endTime_ != null) { + subBuilder = endTime_.toBuilder(); + } + endTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(endTime_); + endTime_ = subBuilder.buildPartial(); + } + + break; + } + case 82: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (lastUpdateTime_ != null) { + subBuilder = lastUpdateTime_.toBuilder(); + } + lastUpdateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(lastUpdateTime_); + lastUpdateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 90: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (experimentLength_ != null) { + subBuilder = experimentLength_.toBuilder(); + } + experimentLength_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(experimentLength_); + experimentLength_ = subBuilder.buildPartial(); + } + + break; + } + case 98: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + variantsHistory_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + variantsHistory_.add( + input.readMessage( + com.google.cloud.dialogflow.cx.v3.VariantsHistory.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + variantsHistory_ = java.util.Collections.unmodifiableList(variantsHistory_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_Experiment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_Experiment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Experiment.class, + com.google.cloud.dialogflow.cx.v3.Experiment.Builder.class); + } + + /** + * + * + *
+   * The state of the experiment.
+   * 
+ * + * Protobuf enum {@code google.cloud.dialogflow.cx.v3.Experiment.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * State unspecified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The experiment is created but not started yet.
+     * 
+ * + * DRAFT = 1; + */ + DRAFT(1), + /** + * + * + *
+     * The experiment is running.
+     * 
+ * + * RUNNING = 2; + */ + RUNNING(2), + /** + * + * + *
+     * The experiment is done.
+     * 
+ * + * DONE = 3; + */ + DONE(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * State unspecified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The experiment is created but not started yet.
+     * 
+ * + * DRAFT = 1; + */ + public static final int DRAFT_VALUE = 1; + /** + * + * + *
+     * The experiment is running.
+     * 
+ * + * RUNNING = 2; + */ + public static final int RUNNING_VALUE = 2; + /** + * + * + *
+     * The experiment is done.
+     * 
+ * + * DONE = 3; + */ + public static final int DONE_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return DRAFT; + case 2: + return RUNNING; + case 3: + return DONE; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.Experiment.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3.Experiment.State) + } + + public interface DefinitionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.Experiment.Definition) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * 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).
+     * 
+ * + * string condition = 1; + * + * @return The condition. + */ + java.lang.String getCondition(); + /** + * + * + *
+     * 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).
+     * 
+ * + * string condition = 1; + * + * @return The bytes for condition. + */ + com.google.protobuf.ByteString getConditionBytes(); + + /** + * + * + *
+     * The flow versions as the variants of this experiment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 2; + * + * @return Whether the versionVariants field is set. + */ + boolean hasVersionVariants(); + /** + * + * + *
+     * The flow versions as the variants of this experiment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 2; + * + * @return The versionVariants. + */ + com.google.cloud.dialogflow.cx.v3.VersionVariants getVersionVariants(); + /** + * + * + *
+     * The flow versions as the variants of this experiment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 2; + */ + com.google.cloud.dialogflow.cx.v3.VersionVariantsOrBuilder getVersionVariantsOrBuilder(); + + public com.google.cloud.dialogflow.cx.v3.Experiment.Definition.VariantsCase getVariantsCase(); + } + /** + * + * + *
+   * Definition of the experiment.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.Experiment.Definition} + */ + public static final class Definition extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.Experiment.Definition) + DefinitionOrBuilder { + private static final long serialVersionUID = 0L; + // Use Definition.newBuilder() to construct. + private Definition(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Definition() { + condition_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Definition(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Definition( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + condition_ = s; + break; + } + case 18: + { + com.google.cloud.dialogflow.cx.v3.VersionVariants.Builder subBuilder = null; + if (variantsCase_ == 2) { + subBuilder = + ((com.google.cloud.dialogflow.cx.v3.VersionVariants) variants_).toBuilder(); + } + variants_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.VersionVariants.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.dialogflow.cx.v3.VersionVariants) variants_); + variants_ = subBuilder.buildPartial(); + } + variantsCase_ = 2; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_Experiment_Definition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_Experiment_Definition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Experiment.Definition.class, + com.google.cloud.dialogflow.cx.v3.Experiment.Definition.Builder.class); + } + + private int variantsCase_ = 0; + private java.lang.Object variants_; + + public enum VariantsCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + VERSION_VARIANTS(2), + VARIANTS_NOT_SET(0); + private final int value; + + private VariantsCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static VariantsCase valueOf(int value) { + return forNumber(value); + } + + public static VariantsCase forNumber(int value) { + switch (value) { + case 2: + return VERSION_VARIANTS; + case 0: + return VARIANTS_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public VariantsCase getVariantsCase() { + return VariantsCase.forNumber(variantsCase_); + } + + public static final int CONDITION_FIELD_NUMBER = 1; + private volatile java.lang.Object 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).
+     * 
+ * + * string condition = 1; + * + * @return The condition. + */ + @java.lang.Override + public java.lang.String getCondition() { + java.lang.Object ref = condition_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + condition_ = s; + return s; + } + } + /** + * + * + *
+     * 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).
+     * 
+ * + * string condition = 1; + * + * @return The bytes for condition. + */ + @java.lang.Override + public com.google.protobuf.ByteString getConditionBytes() { + java.lang.Object ref = condition_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + condition_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERSION_VARIANTS_FIELD_NUMBER = 2; + /** + * + * + *
+     * The flow versions as the variants of this experiment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 2; + * + * @return Whether the versionVariants field is set. + */ + @java.lang.Override + public boolean hasVersionVariants() { + return variantsCase_ == 2; + } + /** + * + * + *
+     * The flow versions as the variants of this experiment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 2; + * + * @return The versionVariants. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.VersionVariants getVersionVariants() { + if (variantsCase_ == 2) { + return (com.google.cloud.dialogflow.cx.v3.VersionVariants) variants_; + } + return com.google.cloud.dialogflow.cx.v3.VersionVariants.getDefaultInstance(); + } + /** + * + * + *
+     * The flow versions as the variants of this experiment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 2; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.VersionVariantsOrBuilder + getVersionVariantsOrBuilder() { + if (variantsCase_ == 2) { + return (com.google.cloud.dialogflow.cx.v3.VersionVariants) variants_; + } + return com.google.cloud.dialogflow.cx.v3.VersionVariants.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getConditionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, condition_); + } + if (variantsCase_ == 2) { + output.writeMessage(2, (com.google.cloud.dialogflow.cx.v3.VersionVariants) variants_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getConditionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, condition_); + } + if (variantsCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.dialogflow.cx.v3.VersionVariants) variants_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.Experiment.Definition)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.Experiment.Definition other = + (com.google.cloud.dialogflow.cx.v3.Experiment.Definition) obj; + + if (!getCondition().equals(other.getCondition())) return false; + if (!getVariantsCase().equals(other.getVariantsCase())) return false; + switch (variantsCase_) { + case 2: + if (!getVersionVariants().equals(other.getVersionVariants())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CONDITION_FIELD_NUMBER; + hash = (53 * hash) + getCondition().hashCode(); + switch (variantsCase_) { + case 2: + hash = (37 * hash) + VERSION_VARIANTS_FIELD_NUMBER; + hash = (53 * hash) + getVersionVariants().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Definition parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Definition parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Definition parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Definition parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Definition parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Definition parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Definition parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Definition parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Definition parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Definition parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Definition parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Definition parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3.Experiment.Definition prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Definition of the experiment.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.Experiment.Definition} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.Experiment.Definition) + com.google.cloud.dialogflow.cx.v3.Experiment.DefinitionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_Experiment_Definition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_Experiment_Definition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Experiment.Definition.class, + com.google.cloud.dialogflow.cx.v3.Experiment.Definition.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.Experiment.Definition.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + condition_ = ""; + + variantsCase_ = 0; + variants_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_Experiment_Definition_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Experiment.Definition getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.Experiment.Definition.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Experiment.Definition build() { + com.google.cloud.dialogflow.cx.v3.Experiment.Definition result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Experiment.Definition buildPartial() { + com.google.cloud.dialogflow.cx.v3.Experiment.Definition result = + new com.google.cloud.dialogflow.cx.v3.Experiment.Definition(this); + result.condition_ = condition_; + if (variantsCase_ == 2) { + if (versionVariantsBuilder_ == null) { + result.variants_ = variants_; + } else { + result.variants_ = versionVariantsBuilder_.build(); + } + } + result.variantsCase_ = variantsCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.Experiment.Definition) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.Experiment.Definition) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.Experiment.Definition other) { + if (other == com.google.cloud.dialogflow.cx.v3.Experiment.Definition.getDefaultInstance()) + return this; + if (!other.getCondition().isEmpty()) { + condition_ = other.condition_; + onChanged(); + } + switch (other.getVariantsCase()) { + case VERSION_VARIANTS: + { + mergeVersionVariants(other.getVersionVariants()); + break; + } + case VARIANTS_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.Experiment.Definition parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.Experiment.Definition) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int variantsCase_ = 0; + private java.lang.Object variants_; + + public VariantsCase getVariantsCase() { + return VariantsCase.forNumber(variantsCase_); + } + + public Builder clearVariants() { + variantsCase_ = 0; + variants_ = null; + onChanged(); + return this; + } + + private java.lang.Object 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).
+       * 
+ * + * string condition = 1; + * + * @return The condition. + */ + public java.lang.String getCondition() { + java.lang.Object ref = condition_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + condition_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * 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).
+       * 
+ * + * string condition = 1; + * + * @return The bytes for condition. + */ + public com.google.protobuf.ByteString getConditionBytes() { + java.lang.Object ref = condition_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + condition_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * 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).
+       * 
+ * + * string condition = 1; + * + * @param value The condition to set. + * @return This builder for chaining. + */ + public Builder setCondition(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + condition_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * 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).
+       * 
+ * + * string condition = 1; + * + * @return This builder for chaining. + */ + public Builder clearCondition() { + + condition_ = getDefaultInstance().getCondition(); + onChanged(); + return this; + } + /** + * + * + *
+       * 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).
+       * 
+ * + * string condition = 1; + * + * @param value The bytes for condition to set. + * @return This builder for chaining. + */ + public Builder setConditionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + condition_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.VersionVariants, + com.google.cloud.dialogflow.cx.v3.VersionVariants.Builder, + com.google.cloud.dialogflow.cx.v3.VersionVariantsOrBuilder> + versionVariantsBuilder_; + /** + * + * + *
+       * The flow versions as the variants of this experiment.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 2; + * + * @return Whether the versionVariants field is set. + */ + @java.lang.Override + public boolean hasVersionVariants() { + return variantsCase_ == 2; + } + /** + * + * + *
+       * The flow versions as the variants of this experiment.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 2; + * + * @return The versionVariants. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.VersionVariants getVersionVariants() { + if (versionVariantsBuilder_ == null) { + if (variantsCase_ == 2) { + return (com.google.cloud.dialogflow.cx.v3.VersionVariants) variants_; + } + return com.google.cloud.dialogflow.cx.v3.VersionVariants.getDefaultInstance(); + } else { + if (variantsCase_ == 2) { + return versionVariantsBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3.VersionVariants.getDefaultInstance(); + } + } + /** + * + * + *
+       * The flow versions as the variants of this experiment.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 2; + */ + public Builder setVersionVariants(com.google.cloud.dialogflow.cx.v3.VersionVariants value) { + if (versionVariantsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + variants_ = value; + onChanged(); + } else { + versionVariantsBuilder_.setMessage(value); + } + variantsCase_ = 2; + return this; + } + /** + * + * + *
+       * The flow versions as the variants of this experiment.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 2; + */ + public Builder setVersionVariants( + com.google.cloud.dialogflow.cx.v3.VersionVariants.Builder builderForValue) { + if (versionVariantsBuilder_ == null) { + variants_ = builderForValue.build(); + onChanged(); + } else { + versionVariantsBuilder_.setMessage(builderForValue.build()); + } + variantsCase_ = 2; + return this; + } + /** + * + * + *
+       * The flow versions as the variants of this experiment.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 2; + */ + public Builder mergeVersionVariants(com.google.cloud.dialogflow.cx.v3.VersionVariants value) { + if (versionVariantsBuilder_ == null) { + if (variantsCase_ == 2 + && variants_ + != com.google.cloud.dialogflow.cx.v3.VersionVariants.getDefaultInstance()) { + variants_ = + com.google.cloud.dialogflow.cx.v3.VersionVariants.newBuilder( + (com.google.cloud.dialogflow.cx.v3.VersionVariants) variants_) + .mergeFrom(value) + .buildPartial(); + } else { + variants_ = value; + } + onChanged(); + } else { + if (variantsCase_ == 2) { + versionVariantsBuilder_.mergeFrom(value); + } + versionVariantsBuilder_.setMessage(value); + } + variantsCase_ = 2; + return this; + } + /** + * + * + *
+       * The flow versions as the variants of this experiment.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 2; + */ + public Builder clearVersionVariants() { + if (versionVariantsBuilder_ == null) { + if (variantsCase_ == 2) { + variantsCase_ = 0; + variants_ = null; + onChanged(); + } + } else { + if (variantsCase_ == 2) { + variantsCase_ = 0; + variants_ = null; + } + versionVariantsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * The flow versions as the variants of this experiment.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 2; + */ + public com.google.cloud.dialogflow.cx.v3.VersionVariants.Builder getVersionVariantsBuilder() { + return getVersionVariantsFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The flow versions as the variants of this experiment.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 2; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.VersionVariantsOrBuilder + getVersionVariantsOrBuilder() { + if ((variantsCase_ == 2) && (versionVariantsBuilder_ != null)) { + return versionVariantsBuilder_.getMessageOrBuilder(); + } else { + if (variantsCase_ == 2) { + return (com.google.cloud.dialogflow.cx.v3.VersionVariants) variants_; + } + return com.google.cloud.dialogflow.cx.v3.VersionVariants.getDefaultInstance(); + } + } + /** + * + * + *
+       * The flow versions as the variants of this experiment.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.VersionVariants, + com.google.cloud.dialogflow.cx.v3.VersionVariants.Builder, + com.google.cloud.dialogflow.cx.v3.VersionVariantsOrBuilder> + getVersionVariantsFieldBuilder() { + if (versionVariantsBuilder_ == null) { + if (!(variantsCase_ == 2)) { + variants_ = com.google.cloud.dialogflow.cx.v3.VersionVariants.getDefaultInstance(); + } + versionVariantsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.VersionVariants, + com.google.cloud.dialogflow.cx.v3.VersionVariants.Builder, + com.google.cloud.dialogflow.cx.v3.VersionVariantsOrBuilder>( + (com.google.cloud.dialogflow.cx.v3.VersionVariants) variants_, + getParentForChildren(), + isClean()); + variants_ = null; + } + variantsCase_ = 2; + onChanged(); + ; + return versionVariantsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.Experiment.Definition) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.Experiment.Definition) + private static final com.google.cloud.dialogflow.cx.v3.Experiment.Definition DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.Experiment.Definition(); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Definition getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Definition parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Definition(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Experiment.Definition getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.Experiment.Result) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Version variants and metrics.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; + * + */ + java.util.List + getVersionMetricsList(); + /** + * + * + *
+     * Version variants and metrics.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; + * + */ + com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics getVersionMetrics(int index); + /** + * + * + *
+     * Version variants and metrics.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; + * + */ + int getVersionMetricsCount(); + /** + * + * + *
+     * Version variants and metrics.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; + * + */ + java.util.List< + ? extends com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetricsOrBuilder> + getVersionMetricsOrBuilderList(); + /** + * + * + *
+     * Version variants and metrics.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; + * + */ + com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetricsOrBuilder + getVersionMetricsOrBuilder(int index); + + /** + * + * + *
+     * The last time the experiment's stats data was updated. Will have default
+     * value if stats have never been computed for this experiment.
+     * 
+ * + * .google.protobuf.Timestamp last_update_time = 2; + * + * @return Whether the lastUpdateTime field is set. + */ + boolean hasLastUpdateTime(); + /** + * + * + *
+     * The last time the experiment's stats data was updated. Will have default
+     * value if stats have never been computed for this experiment.
+     * 
+ * + * .google.protobuf.Timestamp last_update_time = 2; + * + * @return The lastUpdateTime. + */ + com.google.protobuf.Timestamp getLastUpdateTime(); + /** + * + * + *
+     * The last time the experiment's stats data was updated. Will have default
+     * value if stats have never been computed for this experiment.
+     * 
+ * + * .google.protobuf.Timestamp last_update_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getLastUpdateTimeOrBuilder(); + } + /** + * + * + *
+   * The inference result which includes an objective metric to optimize and the
+   * confidence interval.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.Experiment.Result} + */ + public static final class Result extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.Experiment.Result) + ResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use Result.newBuilder() to construct. + private Result(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Result() { + versionMetrics_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Result(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Result( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + versionMetrics_ = + new java.util.ArrayList< + com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics>(); + mutable_bitField0_ |= 0x00000001; + } + versionMetrics_.add( + input.readMessage( + com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.parser(), + extensionRegistry)); + break; + } + case 18: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (lastUpdateTime_ != null) { + subBuilder = lastUpdateTime_.toBuilder(); + } + lastUpdateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(lastUpdateTime_); + lastUpdateTime_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + versionMetrics_ = java.util.Collections.unmodifiableList(versionMetrics_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Experiment.Result.class, + com.google.cloud.dialogflow.cx.v3.Experiment.Result.Builder.class); + } + + /** + * + * + *
+     * Types of ratio-based metric for Dialogflow experiment.
+     * 
+ * + * Protobuf enum {@code google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType} + */ + public enum MetricType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Metric unspecified.
+       * 
+ * + * METRIC_UNSPECIFIED = 0; + */ + METRIC_UNSPECIFIED(0), + /** + * + * + *
+       * Percentage of contained sessions without user calling back in 24 hours.
+       * 
+ * + * CONTAINED_SESSION_NO_CALLBACK_RATE = 1; + */ + CONTAINED_SESSION_NO_CALLBACK_RATE(1), + /** + * + * + *
+       * Percentage of sessions that were handed to a human agent.
+       * 
+ * + * LIVE_AGENT_HANDOFF_RATE = 2; + */ + LIVE_AGENT_HANDOFF_RATE(2), + /** + * + * + *
+       * Percentage of sessions with the same user calling back.
+       * 
+ * + * CALLBACK_SESSION_RATE = 3; + */ + CALLBACK_SESSION_RATE(3), + /** + * + * + *
+       * Percentage of sessions where user hung up.
+       * 
+ * + * ABANDONED_SESSION_RATE = 4; + */ + ABANDONED_SESSION_RATE(4), + /** + * + * + *
+       * Percentage of sessions reached Dialogflow 'END_PAGE' or
+       * 'END_SESSION'.
+       * 
+ * + * SESSION_END_RATE = 5; + */ + SESSION_END_RATE(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Metric unspecified.
+       * 
+ * + * METRIC_UNSPECIFIED = 0; + */ + public static final int METRIC_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * Percentage of contained sessions without user calling back in 24 hours.
+       * 
+ * + * CONTAINED_SESSION_NO_CALLBACK_RATE = 1; + */ + public static final int CONTAINED_SESSION_NO_CALLBACK_RATE_VALUE = 1; + /** + * + * + *
+       * Percentage of sessions that were handed to a human agent.
+       * 
+ * + * LIVE_AGENT_HANDOFF_RATE = 2; + */ + public static final int LIVE_AGENT_HANDOFF_RATE_VALUE = 2; + /** + * + * + *
+       * Percentage of sessions with the same user calling back.
+       * 
+ * + * CALLBACK_SESSION_RATE = 3; + */ + public static final int CALLBACK_SESSION_RATE_VALUE = 3; + /** + * + * + *
+       * Percentage of sessions where user hung up.
+       * 
+ * + * ABANDONED_SESSION_RATE = 4; + */ + public static final int ABANDONED_SESSION_RATE_VALUE = 4; + /** + * + * + *
+       * Percentage of sessions reached Dialogflow 'END_PAGE' or
+       * 'END_SESSION'.
+       * 
+ * + * SESSION_END_RATE = 5; + */ + public static final int SESSION_END_RATE_VALUE = 5; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static MetricType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static MetricType forNumber(int value) { + switch (value) { + case 0: + return METRIC_UNSPECIFIED; + case 1: + return CONTAINED_SESSION_NO_CALLBACK_RATE; + case 2: + return LIVE_AGENT_HANDOFF_RATE; + case 3: + return CALLBACK_SESSION_RATE; + case 4: + return ABANDONED_SESSION_RATE; + case 5: + return SESSION_END_RATE; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public MetricType findValueByNumber(int number) { + return MetricType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.Experiment.Result.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final MetricType[] VALUES = values(); + + public static MetricType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private MetricType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType) + } + + /** + * + * + *
+     * Types of count-based metric for Dialogflow experiment.
+     * 
+ * + * Protobuf enum {@code google.cloud.dialogflow.cx.v3.Experiment.Result.CountType} + */ + public enum CountType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Count type unspecified.
+       * 
+ * + * COUNT_TYPE_UNSPECIFIED = 0; + */ + COUNT_TYPE_UNSPECIFIED(0), + /** + * + * + *
+       * Total number of occurrences of a 'NO_MATCH'.
+       * 
+ * + * TOTAL_NO_MATCH_COUNT = 1; + */ + TOTAL_NO_MATCH_COUNT(1), + /** + * + * + *
+       * Total number of turn counts.
+       * 
+ * + * TOTAL_TURN_COUNT = 2; + */ + TOTAL_TURN_COUNT(2), + /** + * + * + *
+       * Average turn count in a session.
+       * 
+ * + * AVERAGE_TURN_COUNT = 3; + */ + AVERAGE_TURN_COUNT(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Count type unspecified.
+       * 
+ * + * COUNT_TYPE_UNSPECIFIED = 0; + */ + public static final int COUNT_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * Total number of occurrences of a 'NO_MATCH'.
+       * 
+ * + * TOTAL_NO_MATCH_COUNT = 1; + */ + public static final int TOTAL_NO_MATCH_COUNT_VALUE = 1; + /** + * + * + *
+       * Total number of turn counts.
+       * 
+ * + * TOTAL_TURN_COUNT = 2; + */ + public static final int TOTAL_TURN_COUNT_VALUE = 2; + /** + * + * + *
+       * Average turn count in a session.
+       * 
+ * + * AVERAGE_TURN_COUNT = 3; + */ + public static final int AVERAGE_TURN_COUNT_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static CountType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static CountType forNumber(int value) { + switch (value) { + case 0: + return COUNT_TYPE_UNSPECIFIED; + case 1: + return TOTAL_NO_MATCH_COUNT; + case 2: + return TOTAL_TURN_COUNT; + case 3: + return AVERAGE_TURN_COUNT; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public CountType findValueByNumber(int number) { + return CountType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.Experiment.Result.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final CountType[] VALUES = values(); + + public static CountType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private CountType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3.Experiment.Result.CountType) + } + + public interface ConfidenceIntervalOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * The confidence level used to construct the interval, i.e. there is X%
+       * chance that the true value is within this interval.
+       * 
+ * + * double confidence_level = 1; + * + * @return The confidenceLevel. + */ + double getConfidenceLevel(); + + /** + * + * + *
+       * The percent change between an experiment metric's value and the value
+       * for its control.
+       * 
+ * + * double ratio = 2; + * + * @return The ratio. + */ + double getRatio(); + + /** + * + * + *
+       * Lower bound of the interval.
+       * 
+ * + * double lower_bound = 3; + * + * @return The lowerBound. + */ + double getLowerBound(); + + /** + * + * + *
+       * Upper bound of the interval.
+       * 
+ * + * double upper_bound = 4; + * + * @return The upperBound. + */ + double getUpperBound(); + } + /** + * + * + *
+     * A confidence interval is a range of possible values for the experiment
+     * objective you are trying to measure.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval} + */ + public static final class ConfidenceInterval extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval) + ConfidenceIntervalOrBuilder { + private static final long serialVersionUID = 0L; + // Use ConfidenceInterval.newBuilder() to construct. + private ConfidenceInterval(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ConfidenceInterval() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ConfidenceInterval(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ConfidenceInterval( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 9: + { + confidenceLevel_ = input.readDouble(); + break; + } + case 17: + { + ratio_ = input.readDouble(); + break; + } + case 25: + { + lowerBound_ = input.readDouble(); + break; + } + case 33: + { + upperBound_ = input.readDouble(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_ConfidenceInterval_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_ConfidenceInterval_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval.class, + com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval.Builder + .class); + } + + public static final int CONFIDENCE_LEVEL_FIELD_NUMBER = 1; + private double confidenceLevel_; + /** + * + * + *
+       * The confidence level used to construct the interval, i.e. there is X%
+       * chance that the true value is within this interval.
+       * 
+ * + * double confidence_level = 1; + * + * @return The confidenceLevel. + */ + @java.lang.Override + public double getConfidenceLevel() { + return confidenceLevel_; + } + + public static final int RATIO_FIELD_NUMBER = 2; + private double ratio_; + /** + * + * + *
+       * The percent change between an experiment metric's value and the value
+       * for its control.
+       * 
+ * + * double ratio = 2; + * + * @return The ratio. + */ + @java.lang.Override + public double getRatio() { + return ratio_; + } + + public static final int LOWER_BOUND_FIELD_NUMBER = 3; + private double lowerBound_; + /** + * + * + *
+       * Lower bound of the interval.
+       * 
+ * + * double lower_bound = 3; + * + * @return The lowerBound. + */ + @java.lang.Override + public double getLowerBound() { + return lowerBound_; + } + + public static final int UPPER_BOUND_FIELD_NUMBER = 4; + private double upperBound_; + /** + * + * + *
+       * Upper bound of the interval.
+       * 
+ * + * double upper_bound = 4; + * + * @return The upperBound. + */ + @java.lang.Override + public double getUpperBound() { + return upperBound_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (confidenceLevel_ != 0D) { + output.writeDouble(1, confidenceLevel_); + } + if (ratio_ != 0D) { + output.writeDouble(2, ratio_); + } + if (lowerBound_ != 0D) { + output.writeDouble(3, lowerBound_); + } + if (upperBound_ != 0D) { + output.writeDouble(4, upperBound_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (confidenceLevel_ != 0D) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(1, confidenceLevel_); + } + if (ratio_ != 0D) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, ratio_); + } + if (lowerBound_ != 0D) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(3, lowerBound_); + } + if (upperBound_ != 0D) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(4, upperBound_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval other = + (com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval) obj; + + if (java.lang.Double.doubleToLongBits(getConfidenceLevel()) + != java.lang.Double.doubleToLongBits(other.getConfidenceLevel())) return false; + if (java.lang.Double.doubleToLongBits(getRatio()) + != java.lang.Double.doubleToLongBits(other.getRatio())) return false; + if (java.lang.Double.doubleToLongBits(getLowerBound()) + != java.lang.Double.doubleToLongBits(other.getLowerBound())) return false; + if (java.lang.Double.doubleToLongBits(getUpperBound()) + != java.lang.Double.doubleToLongBits(other.getUpperBound())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CONFIDENCE_LEVEL_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getConfidenceLevel())); + hash = (37 * hash) + RATIO_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getRatio())); + hash = (37 * hash) + LOWER_BOUND_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getLowerBound())); + hash = (37 * hash) + UPPER_BOUND_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getUpperBound())); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * A confidence interval is a range of possible values for the experiment
+       * objective you are trying to measure.
+       * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval) + com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceIntervalOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_ConfidenceInterval_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_ConfidenceInterval_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval.class, + com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval.Builder + .class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + confidenceLevel_ = 0D; + + ratio_ = 0D; + + lowerBound_ = 0D; + + upperBound_ = 0D; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_ConfidenceInterval_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval build() { + com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval + buildPartial() { + com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval result = + new com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval(this); + result.confidenceLevel_ = confidenceLevel_; + result.ratio_ = ratio_; + result.lowerBound_ = lowerBound_; + result.upperBound_ = upperBound_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval other) { + if (other + == com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval + .getDefaultInstance()) return this; + if (other.getConfidenceLevel() != 0D) { + setConfidenceLevel(other.getConfidenceLevel()); + } + if (other.getRatio() != 0D) { + setRatio(other.getRatio()); + } + if (other.getLowerBound() != 0D) { + setLowerBound(other.getLowerBound()); + } + if (other.getUpperBound() != 0D) { + setUpperBound(other.getUpperBound()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private double confidenceLevel_; + /** + * + * + *
+         * The confidence level used to construct the interval, i.e. there is X%
+         * chance that the true value is within this interval.
+         * 
+ * + * double confidence_level = 1; + * + * @return The confidenceLevel. + */ + @java.lang.Override + public double getConfidenceLevel() { + return confidenceLevel_; + } + /** + * + * + *
+         * The confidence level used to construct the interval, i.e. there is X%
+         * chance that the true value is within this interval.
+         * 
+ * + * double confidence_level = 1; + * + * @param value The confidenceLevel to set. + * @return This builder for chaining. + */ + public Builder setConfidenceLevel(double value) { + + confidenceLevel_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * The confidence level used to construct the interval, i.e. there is X%
+         * chance that the true value is within this interval.
+         * 
+ * + * double confidence_level = 1; + * + * @return This builder for chaining. + */ + public Builder clearConfidenceLevel() { + + confidenceLevel_ = 0D; + onChanged(); + return this; + } + + private double ratio_; + /** + * + * + *
+         * The percent change between an experiment metric's value and the value
+         * for its control.
+         * 
+ * + * double ratio = 2; + * + * @return The ratio. + */ + @java.lang.Override + public double getRatio() { + return ratio_; + } + /** + * + * + *
+         * The percent change between an experiment metric's value and the value
+         * for its control.
+         * 
+ * + * double ratio = 2; + * + * @param value The ratio to set. + * @return This builder for chaining. + */ + public Builder setRatio(double value) { + + ratio_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * The percent change between an experiment metric's value and the value
+         * for its control.
+         * 
+ * + * double ratio = 2; + * + * @return This builder for chaining. + */ + public Builder clearRatio() { + + ratio_ = 0D; + onChanged(); + return this; + } + + private double lowerBound_; + /** + * + * + *
+         * Lower bound of the interval.
+         * 
+ * + * double lower_bound = 3; + * + * @return The lowerBound. + */ + @java.lang.Override + public double getLowerBound() { + return lowerBound_; + } + /** + * + * + *
+         * Lower bound of the interval.
+         * 
+ * + * double lower_bound = 3; + * + * @param value The lowerBound to set. + * @return This builder for chaining. + */ + public Builder setLowerBound(double value) { + + lowerBound_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Lower bound of the interval.
+         * 
+ * + * double lower_bound = 3; + * + * @return This builder for chaining. + */ + public Builder clearLowerBound() { + + lowerBound_ = 0D; + onChanged(); + return this; + } + + private double upperBound_; + /** + * + * + *
+         * Upper bound of the interval.
+         * 
+ * + * double upper_bound = 4; + * + * @return The upperBound. + */ + @java.lang.Override + public double getUpperBound() { + return upperBound_; + } + /** + * + * + *
+         * Upper bound of the interval.
+         * 
+ * + * double upper_bound = 4; + * + * @param value The upperBound to set. + * @return This builder for chaining. + */ + public Builder setUpperBound(double value) { + + upperBound_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Upper bound of the interval.
+         * 
+ * + * double upper_bound = 4; + * + * @return This builder for chaining. + */ + public Builder clearUpperBound() { + + upperBound_ = 0D; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval) + private static final com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval(); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ConfidenceInterval parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ConfidenceInterval(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface MetricOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.Experiment.Result.Metric) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Ratio-based metric type. Only one of type or count_type is specified in
+       * each Metric.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType type = 1; + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
+       * Ratio-based metric type. Only one of type or count_type is specified in
+       * each Metric.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType type = 1; + * + * @return The type. + */ + com.google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType getType(); + + /** + * + * + *
+       * Count-based metric type. Only one of type or count_type is specified in
+       * each Metric.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Experiment.Result.CountType count_type = 5; + * + * @return The enum numeric value on the wire for countType. + */ + int getCountTypeValue(); + /** + * + * + *
+       * Count-based metric type. Only one of type or count_type is specified in
+       * each Metric.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Experiment.Result.CountType count_type = 5; + * + * @return The countType. + */ + com.google.cloud.dialogflow.cx.v3.Experiment.Result.CountType getCountType(); + + /** + * + * + *
+       * Ratio value of a metric.
+       * 
+ * + * double ratio = 2; + * + * @return The ratio. + */ + double getRatio(); + + /** + * + * + *
+       * Count value of a metric.
+       * 
+ * + * double count = 4; + * + * @return The count. + */ + double getCount(); + + /** + * + * + *
+       * The probability that the treatment is better than all other treatments
+       * in the experiment
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval confidence_interval = 3; + * + * + * @return Whether the confidenceInterval field is set. + */ + boolean hasConfidenceInterval(); + /** + * + * + *
+       * The probability that the treatment is better than all other treatments
+       * in the experiment
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval confidence_interval = 3; + * + * + * @return The confidenceInterval. + */ + com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval + getConfidenceInterval(); + /** + * + * + *
+       * The probability that the treatment is better than all other treatments
+       * in the experiment
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval confidence_interval = 3; + * + */ + com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceIntervalOrBuilder + getConfidenceIntervalOrBuilder(); + + public com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.ValueCase getValueCase(); + } + /** + * + * + *
+     * Metric and corresponding confidence intervals.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.Experiment.Result.Metric} + */ + public static final class Metric extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.Experiment.Result.Metric) + MetricOrBuilder { + private static final long serialVersionUID = 0L; + // Use Metric.newBuilder() to construct. + private Metric(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Metric() { + type_ = 0; + countType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Metric(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Metric( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } + case 17: + { + valueCase_ = 2; + value_ = input.readDouble(); + break; + } + case 26: + { + com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval.Builder + subBuilder = null; + if (confidenceInterval_ != null) { + subBuilder = confidenceInterval_.toBuilder(); + } + confidenceInterval_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(confidenceInterval_); + confidenceInterval_ = subBuilder.buildPartial(); + } + + break; + } + case 33: + { + valueCase_ = 4; + value_ = input.readDouble(); + break; + } + case 40: + { + int rawValue = input.readEnum(); + + countType_ = rawValue; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_Metric_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_Metric_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.class, + com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.Builder.class); + } + + private int valueCase_ = 0; + private java.lang.Object value_; + + public enum ValueCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + RATIO(2), + COUNT(4), + VALUE_NOT_SET(0); + private final int value; + + private ValueCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ValueCase valueOf(int value) { + return forNumber(value); + } + + public static ValueCase forNumber(int value) { + switch (value) { + case 2: + return RATIO; + case 4: + return COUNT; + case 0: + return VALUE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ValueCase getValueCase() { + return ValueCase.forNumber(valueCase_); + } + + public static final int TYPE_FIELD_NUMBER = 1; + private int type_; + /** + * + * + *
+       * Ratio-based metric type. Only one of type or count_type is specified in
+       * each Metric.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType type = 1; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+       * Ratio-based metric type. Only one of type or count_type is specified in
+       * each Metric.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType type = 1; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType getType() { + @SuppressWarnings("deprecation") + com.google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType result = + com.google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType.valueOf(type_); + return result == null + ? com.google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType.UNRECOGNIZED + : result; + } + + public static final int COUNT_TYPE_FIELD_NUMBER = 5; + private int countType_; + /** + * + * + *
+       * Count-based metric type. Only one of type or count_type is specified in
+       * each Metric.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Experiment.Result.CountType count_type = 5; + * + * @return The enum numeric value on the wire for countType. + */ + @java.lang.Override + public int getCountTypeValue() { + return countType_; + } + /** + * + * + *
+       * Count-based metric type. Only one of type or count_type is specified in
+       * each Metric.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Experiment.Result.CountType count_type = 5; + * + * @return The countType. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Experiment.Result.CountType getCountType() { + @SuppressWarnings("deprecation") + com.google.cloud.dialogflow.cx.v3.Experiment.Result.CountType result = + com.google.cloud.dialogflow.cx.v3.Experiment.Result.CountType.valueOf(countType_); + return result == null + ? com.google.cloud.dialogflow.cx.v3.Experiment.Result.CountType.UNRECOGNIZED + : result; + } + + public static final int RATIO_FIELD_NUMBER = 2; + /** + * + * + *
+       * Ratio value of a metric.
+       * 
+ * + * double ratio = 2; + * + * @return The ratio. + */ + @java.lang.Override + public double getRatio() { + if (valueCase_ == 2) { + return (java.lang.Double) value_; + } + return 0D; + } + + public static final int COUNT_FIELD_NUMBER = 4; + /** + * + * + *
+       * Count value of a metric.
+       * 
+ * + * double count = 4; + * + * @return The count. + */ + @java.lang.Override + public double getCount() { + if (valueCase_ == 4) { + return (java.lang.Double) value_; + } + return 0D; + } + + public static final int CONFIDENCE_INTERVAL_FIELD_NUMBER = 3; + private com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval + confidenceInterval_; + /** + * + * + *
+       * The probability that the treatment is better than all other treatments
+       * in the experiment
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval confidence_interval = 3; + * + * + * @return Whether the confidenceInterval field is set. + */ + @java.lang.Override + public boolean hasConfidenceInterval() { + return confidenceInterval_ != null; + } + /** + * + * + *
+       * The probability that the treatment is better than all other treatments
+       * in the experiment
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval confidence_interval = 3; + * + * + * @return The confidenceInterval. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval + getConfidenceInterval() { + return confidenceInterval_ == null + ? com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval + .getDefaultInstance() + : confidenceInterval_; + } + /** + * + * + *
+       * The probability that the treatment is better than all other treatments
+       * in the experiment
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval confidence_interval = 3; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceIntervalOrBuilder + getConfidenceIntervalOrBuilder() { + return getConfidenceInterval(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (type_ + != com.google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType.METRIC_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, type_); + } + if (valueCase_ == 2) { + output.writeDouble(2, (double) ((java.lang.Double) value_)); + } + if (confidenceInterval_ != null) { + output.writeMessage(3, getConfidenceInterval()); + } + if (valueCase_ == 4) { + output.writeDouble(4, (double) ((java.lang.Double) value_)); + } + if (countType_ + != com.google.cloud.dialogflow.cx.v3.Experiment.Result.CountType.COUNT_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(5, countType_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (type_ + != com.google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType.METRIC_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, type_); + } + if (valueCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeDoubleSize( + 2, (double) ((java.lang.Double) value_)); + } + if (confidenceInterval_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(3, getConfidenceInterval()); + } + if (valueCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeDoubleSize( + 4, (double) ((java.lang.Double) value_)); + } + if (countType_ + != com.google.cloud.dialogflow.cx.v3.Experiment.Result.CountType.COUNT_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, countType_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric other = + (com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric) obj; + + if (type_ != other.type_) return false; + if (countType_ != other.countType_) return false; + if (hasConfidenceInterval() != other.hasConfidenceInterval()) return false; + if (hasConfidenceInterval()) { + if (!getConfidenceInterval().equals(other.getConfidenceInterval())) return false; + } + if (!getValueCase().equals(other.getValueCase())) return false; + switch (valueCase_) { + case 2: + if (java.lang.Double.doubleToLongBits(getRatio()) + != java.lang.Double.doubleToLongBits(other.getRatio())) return false; + break; + case 4: + if (java.lang.Double.doubleToLongBits(getCount()) + != java.lang.Double.doubleToLongBits(other.getCount())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + COUNT_TYPE_FIELD_NUMBER; + hash = (53 * hash) + countType_; + if (hasConfidenceInterval()) { + hash = (37 * hash) + CONFIDENCE_INTERVAL_FIELD_NUMBER; + hash = (53 * hash) + getConfidenceInterval().hashCode(); + } + switch (valueCase_) { + case 2: + hash = (37 * hash) + RATIO_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getRatio())); + break; + case 4: + hash = (37 * hash) + COUNT_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getCount())); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * Metric and corresponding confidence intervals.
+       * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.Experiment.Result.Metric} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.Experiment.Result.Metric) + com.google.cloud.dialogflow.cx.v3.Experiment.Result.MetricOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_Metric_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_Metric_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.class, + com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + type_ = 0; + + countType_ = 0; + + if (confidenceIntervalBuilder_ == null) { + confidenceInterval_ = null; + } else { + confidenceInterval_ = null; + confidenceIntervalBuilder_ = null; + } + valueCase_ = 0; + value_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_Metric_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric build() { + com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric buildPartial() { + com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric result = + new com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric(this); + result.type_ = type_; + result.countType_ = countType_; + if (valueCase_ == 2) { + result.value_ = value_; + } + if (valueCase_ == 4) { + result.value_ = value_; + } + if (confidenceIntervalBuilder_ == null) { + result.confidenceInterval_ = confidenceInterval_; + } else { + result.confidenceInterval_ = confidenceIntervalBuilder_.build(); + } + result.valueCase_ = valueCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric other) { + if (other + == com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.getDefaultInstance()) + return this; + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (other.countType_ != 0) { + setCountTypeValue(other.getCountTypeValue()); + } + if (other.hasConfidenceInterval()) { + mergeConfidenceInterval(other.getConfidenceInterval()); + } + switch (other.getValueCase()) { + case RATIO: + { + setRatio(other.getRatio()); + break; + } + case COUNT: + { + setCount(other.getCount()); + break; + } + case VALUE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int valueCase_ = 0; + private java.lang.Object value_; + + public ValueCase getValueCase() { + return ValueCase.forNumber(valueCase_); + } + + public Builder clearValue() { + valueCase_ = 0; + value_ = null; + onChanged(); + return this; + } + + private int type_ = 0; + /** + * + * + *
+         * Ratio-based metric type. Only one of type or count_type is specified in
+         * each Metric.
+         * 
+ * + * .google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType type = 1; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+         * Ratio-based metric type. Only one of type or count_type is specified in
+         * each Metric.
+         * 
+ * + * .google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType type = 1; + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + + type_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Ratio-based metric type. Only one of type or count_type is specified in
+         * each Metric.
+         * 
+ * + * .google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType type = 1; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType getType() { + @SuppressWarnings("deprecation") + com.google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType result = + com.google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType.valueOf(type_); + return result == null + ? com.google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType.UNRECOGNIZED + : result; + } + /** + * + * + *
+         * Ratio-based metric type. Only one of type or count_type is specified in
+         * each Metric.
+         * 
+ * + * .google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType type = 1; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType( + com.google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+         * Ratio-based metric type. Only one of type or count_type is specified in
+         * each Metric.
+         * 
+ * + * .google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType type = 1; + * + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + private int countType_ = 0; + /** + * + * + *
+         * Count-based metric type. Only one of type or count_type is specified in
+         * each Metric.
+         * 
+ * + * .google.cloud.dialogflow.cx.v3.Experiment.Result.CountType count_type = 5; + * + * @return The enum numeric value on the wire for countType. + */ + @java.lang.Override + public int getCountTypeValue() { + return countType_; + } + /** + * + * + *
+         * Count-based metric type. Only one of type or count_type is specified in
+         * each Metric.
+         * 
+ * + * .google.cloud.dialogflow.cx.v3.Experiment.Result.CountType count_type = 5; + * + * @param value The enum numeric value on the wire for countType to set. + * @return This builder for chaining. + */ + public Builder setCountTypeValue(int value) { + + countType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Count-based metric type. Only one of type or count_type is specified in
+         * each Metric.
+         * 
+ * + * .google.cloud.dialogflow.cx.v3.Experiment.Result.CountType count_type = 5; + * + * @return The countType. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Experiment.Result.CountType getCountType() { + @SuppressWarnings("deprecation") + com.google.cloud.dialogflow.cx.v3.Experiment.Result.CountType result = + com.google.cloud.dialogflow.cx.v3.Experiment.Result.CountType.valueOf(countType_); + return result == null + ? com.google.cloud.dialogflow.cx.v3.Experiment.Result.CountType.UNRECOGNIZED + : result; + } + /** + * + * + *
+         * Count-based metric type. Only one of type or count_type is specified in
+         * each Metric.
+         * 
+ * + * .google.cloud.dialogflow.cx.v3.Experiment.Result.CountType count_type = 5; + * + * @param value The countType to set. + * @return This builder for chaining. + */ + public Builder setCountType( + com.google.cloud.dialogflow.cx.v3.Experiment.Result.CountType value) { + if (value == null) { + throw new NullPointerException(); + } + + countType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+         * Count-based metric type. Only one of type or count_type is specified in
+         * each Metric.
+         * 
+ * + * .google.cloud.dialogflow.cx.v3.Experiment.Result.CountType count_type = 5; + * + * @return This builder for chaining. + */ + public Builder clearCountType() { + + countType_ = 0; + onChanged(); + return this; + } + + /** + * + * + *
+         * Ratio value of a metric.
+         * 
+ * + * double ratio = 2; + * + * @return The ratio. + */ + public double getRatio() { + if (valueCase_ == 2) { + return (java.lang.Double) value_; + } + return 0D; + } + /** + * + * + *
+         * Ratio value of a metric.
+         * 
+ * + * double ratio = 2; + * + * @param value The ratio to set. + * @return This builder for chaining. + */ + public Builder setRatio(double value) { + valueCase_ = 2; + value_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Ratio value of a metric.
+         * 
+ * + * double ratio = 2; + * + * @return This builder for chaining. + */ + public Builder clearRatio() { + if (valueCase_ == 2) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+         * Count value of a metric.
+         * 
+ * + * double count = 4; + * + * @return The count. + */ + public double getCount() { + if (valueCase_ == 4) { + return (java.lang.Double) value_; + } + return 0D; + } + /** + * + * + *
+         * Count value of a metric.
+         * 
+ * + * double count = 4; + * + * @param value The count to set. + * @return This builder for chaining. + */ + public Builder setCount(double value) { + valueCase_ = 4; + value_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Count value of a metric.
+         * 
+ * + * double count = 4; + * + * @return This builder for chaining. + */ + public Builder clearCount() { + if (valueCase_ == 4) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + return this; + } + + private com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval + confidenceInterval_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval, + com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval.Builder, + com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceIntervalOrBuilder> + confidenceIntervalBuilder_; + /** + * + * + *
+         * The probability that the treatment is better than all other treatments
+         * in the experiment
+         * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval confidence_interval = 3; + * + * + * @return Whether the confidenceInterval field is set. + */ + public boolean hasConfidenceInterval() { + return confidenceIntervalBuilder_ != null || confidenceInterval_ != null; + } + /** + * + * + *
+         * The probability that the treatment is better than all other treatments
+         * in the experiment
+         * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval confidence_interval = 3; + * + * + * @return The confidenceInterval. + */ + public com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval + getConfidenceInterval() { + if (confidenceIntervalBuilder_ == null) { + return confidenceInterval_ == null + ? com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval + .getDefaultInstance() + : confidenceInterval_; + } else { + return confidenceIntervalBuilder_.getMessage(); + } + } + /** + * + * + *
+         * The probability that the treatment is better than all other treatments
+         * in the experiment
+         * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval confidence_interval = 3; + * + */ + public Builder setConfidenceInterval( + com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval value) { + if (confidenceIntervalBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + confidenceInterval_ = value; + onChanged(); + } else { + confidenceIntervalBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+         * The probability that the treatment is better than all other treatments
+         * in the experiment
+         * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval confidence_interval = 3; + * + */ + public Builder setConfidenceInterval( + com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval.Builder + builderForValue) { + if (confidenceIntervalBuilder_ == null) { + confidenceInterval_ = builderForValue.build(); + onChanged(); + } else { + confidenceIntervalBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+         * The probability that the treatment is better than all other treatments
+         * in the experiment
+         * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval confidence_interval = 3; + * + */ + public Builder mergeConfidenceInterval( + com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval value) { + if (confidenceIntervalBuilder_ == null) { + if (confidenceInterval_ != null) { + confidenceInterval_ = + com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval.newBuilder( + confidenceInterval_) + .mergeFrom(value) + .buildPartial(); + } else { + confidenceInterval_ = value; + } + onChanged(); + } else { + confidenceIntervalBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+         * The probability that the treatment is better than all other treatments
+         * in the experiment
+         * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval confidence_interval = 3; + * + */ + public Builder clearConfidenceInterval() { + if (confidenceIntervalBuilder_ == null) { + confidenceInterval_ = null; + onChanged(); + } else { + confidenceInterval_ = null; + confidenceIntervalBuilder_ = null; + } + + return this; + } + /** + * + * + *
+         * The probability that the treatment is better than all other treatments
+         * in the experiment
+         * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval confidence_interval = 3; + * + */ + public com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval.Builder + getConfidenceIntervalBuilder() { + + onChanged(); + return getConfidenceIntervalFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * The probability that the treatment is better than all other treatments
+         * in the experiment
+         * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval confidence_interval = 3; + * + */ + public com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceIntervalOrBuilder + getConfidenceIntervalOrBuilder() { + if (confidenceIntervalBuilder_ != null) { + return confidenceIntervalBuilder_.getMessageOrBuilder(); + } else { + return confidenceInterval_ == null + ? com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval + .getDefaultInstance() + : confidenceInterval_; + } + } + /** + * + * + *
+         * The probability that the treatment is better than all other treatments
+         * in the experiment
+         * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval confidence_interval = 3; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval, + com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval.Builder, + com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceIntervalOrBuilder> + getConfidenceIntervalFieldBuilder() { + if (confidenceIntervalBuilder_ == null) { + confidenceIntervalBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval, + com.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval.Builder, + com.google.cloud.dialogflow.cx.v3.Experiment.Result + .ConfidenceIntervalOrBuilder>( + getConfidenceInterval(), getParentForChildren(), isClean()); + confidenceInterval_ = null; + } + return confidenceIntervalBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.Experiment.Result.Metric) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.Experiment.Result.Metric) + private static final com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric(); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Metric parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Metric(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface VersionMetricsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * The name of the flow [Version][google.cloud.dialogflow.cx.v3.Version].
+       * Format: `projects/<Project Number>/locations/<Location
+       * ID>/agents/<Agent ID>/flows/<Flow ID>/versions/<Version ID>`.
+       * 
+ * + * string version = 1 [(.google.api.resource_reference) = { ... } + * + * @return The version. + */ + java.lang.String getVersion(); + /** + * + * + *
+       * The name of the flow [Version][google.cloud.dialogflow.cx.v3.Version].
+       * Format: `projects/<Project Number>/locations/<Location
+       * ID>/agents/<Agent ID>/flows/<Flow ID>/versions/<Version ID>`.
+       * 
+ * + * string version = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for version. + */ + com.google.protobuf.ByteString getVersionBytes(); + + /** + * + * + *
+       * The metrics and corresponding confidence intervals in the inference
+       * result.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; + */ + java.util.List getMetricsList(); + /** + * + * + *
+       * The metrics and corresponding confidence intervals in the inference
+       * result.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; + */ + com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric getMetrics(int index); + /** + * + * + *
+       * The metrics and corresponding confidence intervals in the inference
+       * result.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; + */ + int getMetricsCount(); + /** + * + * + *
+       * The metrics and corresponding confidence intervals in the inference
+       * result.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; + */ + java.util.List + getMetricsOrBuilderList(); + /** + * + * + *
+       * The metrics and corresponding confidence intervals in the inference
+       * result.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; + */ + com.google.cloud.dialogflow.cx.v3.Experiment.Result.MetricOrBuilder getMetricsOrBuilder( + int index); + + /** + * + * + *
+       * Number of sessions that were allocated to this version.
+       * 
+ * + * int32 session_count = 3; + * + * @return The sessionCount. + */ + int getSessionCount(); + } + /** + * + * + *
+     * Version variant and associated metrics.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics} + */ + public static final class VersionMetrics extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics) + VersionMetricsOrBuilder { + private static final long serialVersionUID = 0L; + // Use VersionMetrics.newBuilder() to construct. + private VersionMetrics(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VersionMetrics() { + version_ = ""; + metrics_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VersionMetrics(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private VersionMetrics( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + version_ = s; + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + metrics_ = + new java.util.ArrayList< + com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric>(); + mutable_bitField0_ |= 0x00000001; + } + metrics_.add( + input.readMessage( + com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.parser(), + extensionRegistry)); + break; + } + case 24: + { + sessionCount_ = input.readInt32(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + metrics_ = java.util.Collections.unmodifiableList(metrics_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_VersionMetrics_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_VersionMetrics_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.class, + com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.Builder.class); + } + + public static final int VERSION_FIELD_NUMBER = 1; + private volatile java.lang.Object version_; + /** + * + * + *
+       * The name of the flow [Version][google.cloud.dialogflow.cx.v3.Version].
+       * Format: `projects/<Project Number>/locations/<Location
+       * ID>/agents/<Agent ID>/flows/<Flow ID>/versions/<Version ID>`.
+       * 
+ * + * string version = 1 [(.google.api.resource_reference) = { ... } + * + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + /** + * + * + *
+       * The name of the flow [Version][google.cloud.dialogflow.cx.v3.Version].
+       * Format: `projects/<Project Number>/locations/<Location
+       * ID>/agents/<Agent ID>/flows/<Flow ID>/versions/<Version ID>`.
+       * 
+ * + * string version = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int METRICS_FIELD_NUMBER = 2; + private java.util.List metrics_; + /** + * + * + *
+       * The metrics and corresponding confidence intervals in the inference
+       * result.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; + */ + @java.lang.Override + public java.util.List + getMetricsList() { + return metrics_; + } + /** + * + * + *
+       * The metrics and corresponding confidence intervals in the inference
+       * result.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.dialogflow.cx.v3.Experiment.Result.MetricOrBuilder> + getMetricsOrBuilderList() { + return metrics_; + } + /** + * + * + *
+       * The metrics and corresponding confidence intervals in the inference
+       * result.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; + */ + @java.lang.Override + public int getMetricsCount() { + return metrics_.size(); + } + /** + * + * + *
+       * The metrics and corresponding confidence intervals in the inference
+       * result.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric getMetrics(int index) { + return metrics_.get(index); + } + /** + * + * + *
+       * The metrics and corresponding confidence intervals in the inference
+       * result.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Experiment.Result.MetricOrBuilder + getMetricsOrBuilder(int index) { + return metrics_.get(index); + } + + public static final int SESSION_COUNT_FIELD_NUMBER = 3; + private int sessionCount_; + /** + * + * + *
+       * Number of sessions that were allocated to this version.
+       * 
+ * + * int32 session_count = 3; + * + * @return The sessionCount. + */ + @java.lang.Override + public int getSessionCount() { + return sessionCount_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, version_); + } + for (int i = 0; i < metrics_.size(); i++) { + output.writeMessage(2, metrics_.get(i)); + } + if (sessionCount_ != 0) { + output.writeInt32(3, sessionCount_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, version_); + } + for (int i = 0; i < metrics_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, metrics_.get(i)); + } + if (sessionCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, sessionCount_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics other = + (com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics) obj; + + if (!getVersion().equals(other.getVersion())) return false; + if (!getMetricsList().equals(other.getMetricsList())) return false; + if (getSessionCount() != other.getSessionCount()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + if (getMetricsCount() > 0) { + hash = (37 * hash) + METRICS_FIELD_NUMBER; + hash = (53 * hash) + getMetricsList().hashCode(); + } + hash = (37 * hash) + SESSION_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getSessionCount(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * Version variant and associated metrics.
+       * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics) + com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetricsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_VersionMetrics_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_VersionMetrics_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.class, + com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.Builder.class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getMetricsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + version_ = ""; + + if (metricsBuilder_ == null) { + metrics_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + metricsBuilder_.clear(); + } + sessionCount_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_VersionMetrics_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics build() { + com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics buildPartial() { + com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics result = + new com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics(this); + int from_bitField0_ = bitField0_; + result.version_ = version_; + if (metricsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + metrics_ = java.util.Collections.unmodifiableList(metrics_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.metrics_ = metrics_; + } else { + result.metrics_ = metricsBuilder_.build(); + } + result.sessionCount_ = sessionCount_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics other) { + if (other + == com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics + .getDefaultInstance()) return this; + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + onChanged(); + } + if (metricsBuilder_ == null) { + if (!other.metrics_.isEmpty()) { + if (metrics_.isEmpty()) { + metrics_ = other.metrics_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureMetricsIsMutable(); + metrics_.addAll(other.metrics_); + } + onChanged(); + } + } else { + if (!other.metrics_.isEmpty()) { + if (metricsBuilder_.isEmpty()) { + metricsBuilder_.dispose(); + metricsBuilder_ = null; + metrics_ = other.metrics_; + bitField0_ = (bitField0_ & ~0x00000001); + metricsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getMetricsFieldBuilder() + : null; + } else { + metricsBuilder_.addAllMessages(other.metrics_); + } + } + } + if (other.getSessionCount() != 0) { + setSessionCount(other.getSessionCount()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object version_ = ""; + /** + * + * + *
+         * The name of the flow [Version][google.cloud.dialogflow.cx.v3.Version].
+         * Format: `projects/<Project Number>/locations/<Location
+         * ID>/agents/<Agent ID>/flows/<Flow ID>/versions/<Version ID>`.
+         * 
+ * + * string version = 1 [(.google.api.resource_reference) = { ... } + * + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * The name of the flow [Version][google.cloud.dialogflow.cx.v3.Version].
+         * Format: `projects/<Project Number>/locations/<Location
+         * ID>/agents/<Agent ID>/flows/<Flow ID>/versions/<Version ID>`.
+         * 
+ * + * string version = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for version. + */ + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * The name of the flow [Version][google.cloud.dialogflow.cx.v3.Version].
+         * Format: `projects/<Project Number>/locations/<Location
+         * ID>/agents/<Agent ID>/flows/<Flow ID>/versions/<Version ID>`.
+         * 
+ * + * string version = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + version_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * The name of the flow [Version][google.cloud.dialogflow.cx.v3.Version].
+         * Format: `projects/<Project Number>/locations/<Location
+         * ID>/agents/<Agent ID>/flows/<Flow ID>/versions/<Version ID>`.
+         * 
+ * + * string version = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearVersion() { + + version_ = getDefaultInstance().getVersion(); + onChanged(); + return this; + } + /** + * + * + *
+         * The name of the flow [Version][google.cloud.dialogflow.cx.v3.Version].
+         * Format: `projects/<Project Number>/locations/<Location
+         * ID>/agents/<Agent ID>/flows/<Flow ID>/versions/<Version ID>`.
+         * 
+ * + * string version = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + version_ = value; + onChanged(); + return this; + } + + private java.util.List + metrics_ = java.util.Collections.emptyList(); + + private void ensureMetricsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + metrics_ = + new java.util.ArrayList( + metrics_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric, + com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.Builder, + com.google.cloud.dialogflow.cx.v3.Experiment.Result.MetricOrBuilder> + metricsBuilder_; + + /** + * + * + *
+         * The metrics and corresponding confidence intervals in the inference
+         * result.
+         * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; + * + */ + public java.util.List + getMetricsList() { + if (metricsBuilder_ == null) { + return java.util.Collections.unmodifiableList(metrics_); + } else { + return metricsBuilder_.getMessageList(); + } + } + /** + * + * + *
+         * The metrics and corresponding confidence intervals in the inference
+         * result.
+         * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; + * + */ + public int getMetricsCount() { + if (metricsBuilder_ == null) { + return metrics_.size(); + } else { + return metricsBuilder_.getCount(); + } + } + /** + * + * + *
+         * The metrics and corresponding confidence intervals in the inference
+         * result.
+         * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric getMetrics(int index) { + if (metricsBuilder_ == null) { + return metrics_.get(index); + } else { + return metricsBuilder_.getMessage(index); + } + } + /** + * + * + *
+         * The metrics and corresponding confidence intervals in the inference
+         * result.
+         * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; + * + */ + public Builder setMetrics( + int index, com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric value) { + if (metricsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricsIsMutable(); + metrics_.set(index, value); + onChanged(); + } else { + metricsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+         * The metrics and corresponding confidence intervals in the inference
+         * result.
+         * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; + * + */ + public Builder setMetrics( + int index, + com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.Builder builderForValue) { + if (metricsBuilder_ == null) { + ensureMetricsIsMutable(); + metrics_.set(index, builderForValue.build()); + onChanged(); + } else { + metricsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * The metrics and corresponding confidence intervals in the inference
+         * result.
+         * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; + * + */ + public Builder addMetrics( + com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric value) { + if (metricsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricsIsMutable(); + metrics_.add(value); + onChanged(); + } else { + metricsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+         * The metrics and corresponding confidence intervals in the inference
+         * result.
+         * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; + * + */ + public Builder addMetrics( + int index, com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric value) { + if (metricsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricsIsMutable(); + metrics_.add(index, value); + onChanged(); + } else { + metricsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+         * The metrics and corresponding confidence intervals in the inference
+         * result.
+         * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; + * + */ + public Builder addMetrics( + com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.Builder builderForValue) { + if (metricsBuilder_ == null) { + ensureMetricsIsMutable(); + metrics_.add(builderForValue.build()); + onChanged(); + } else { + metricsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * The metrics and corresponding confidence intervals in the inference
+         * result.
+         * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; + * + */ + public Builder addMetrics( + int index, + com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.Builder builderForValue) { + if (metricsBuilder_ == null) { + ensureMetricsIsMutable(); + metrics_.add(index, builderForValue.build()); + onChanged(); + } else { + metricsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * The metrics and corresponding confidence intervals in the inference
+         * result.
+         * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; + * + */ + public Builder addAllMetrics( + java.lang.Iterable + values) { + if (metricsBuilder_ == null) { + ensureMetricsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, metrics_); + onChanged(); + } else { + metricsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+         * The metrics and corresponding confidence intervals in the inference
+         * result.
+         * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; + * + */ + public Builder clearMetrics() { + if (metricsBuilder_ == null) { + metrics_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + metricsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+         * The metrics and corresponding confidence intervals in the inference
+         * result.
+         * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; + * + */ + public Builder removeMetrics(int index) { + if (metricsBuilder_ == null) { + ensureMetricsIsMutable(); + metrics_.remove(index); + onChanged(); + } else { + metricsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+         * The metrics and corresponding confidence intervals in the inference
+         * result.
+         * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.Builder getMetricsBuilder( + int index) { + return getMetricsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+         * The metrics and corresponding confidence intervals in the inference
+         * result.
+         * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3.Experiment.Result.MetricOrBuilder + getMetricsOrBuilder(int index) { + if (metricsBuilder_ == null) { + return metrics_.get(index); + } else { + return metricsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+         * The metrics and corresponding confidence intervals in the inference
+         * result.
+         * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; + * + */ + public java.util.List< + ? extends com.google.cloud.dialogflow.cx.v3.Experiment.Result.MetricOrBuilder> + getMetricsOrBuilderList() { + if (metricsBuilder_ != null) { + return metricsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(metrics_); + } + } + /** + * + * + *
+         * The metrics and corresponding confidence intervals in the inference
+         * result.
+         * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.Builder + addMetricsBuilder() { + return getMetricsFieldBuilder() + .addBuilder( + com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.getDefaultInstance()); + } + /** + * + * + *
+         * The metrics and corresponding confidence intervals in the inference
+         * result.
+         * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.Builder addMetricsBuilder( + int index) { + return getMetricsFieldBuilder() + .addBuilder( + index, + com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.getDefaultInstance()); + } + /** + * + * + *
+         * The metrics and corresponding confidence intervals in the inference
+         * result.
+         * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; + * + */ + public java.util.List + getMetricsBuilderList() { + return getMetricsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric, + com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.Builder, + com.google.cloud.dialogflow.cx.v3.Experiment.Result.MetricOrBuilder> + getMetricsFieldBuilder() { + if (metricsBuilder_ == null) { + metricsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric, + com.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.Builder, + com.google.cloud.dialogflow.cx.v3.Experiment.Result.MetricOrBuilder>( + metrics_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + metrics_ = null; + } + return metricsBuilder_; + } + + private int sessionCount_; + /** + * + * + *
+         * Number of sessions that were allocated to this version.
+         * 
+ * + * int32 session_count = 3; + * + * @return The sessionCount. + */ + @java.lang.Override + public int getSessionCount() { + return sessionCount_; + } + /** + * + * + *
+         * Number of sessions that were allocated to this version.
+         * 
+ * + * int32 session_count = 3; + * + * @param value The sessionCount to set. + * @return This builder for chaining. + */ + public Builder setSessionCount(int value) { + + sessionCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Number of sessions that were allocated to this version.
+         * 
+ * + * int32 session_count = 3; + * + * @return This builder for chaining. + */ + public Builder clearSessionCount() { + + sessionCount_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics) + private static final com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics(); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VersionMetrics parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new VersionMetrics(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int VERSION_METRICS_FIELD_NUMBER = 1; + private java.util.List + versionMetrics_; + /** + * + * + *
+     * Version variants and metrics.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; + * + */ + @java.lang.Override + public java.util.List + getVersionMetricsList() { + return versionMetrics_; + } + /** + * + * + *
+     * Version variants and metrics.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetricsOrBuilder> + getVersionMetricsOrBuilderList() { + return versionMetrics_; + } + /** + * + * + *
+     * Version variants and metrics.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; + * + */ + @java.lang.Override + public int getVersionMetricsCount() { + return versionMetrics_.size(); + } + /** + * + * + *
+     * Version variants and metrics.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics getVersionMetrics( + int index) { + return versionMetrics_.get(index); + } + /** + * + * + *
+     * Version variants and metrics.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetricsOrBuilder + getVersionMetricsOrBuilder(int index) { + return versionMetrics_.get(index); + } + + public static final int LAST_UPDATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp lastUpdateTime_; + /** + * + * + *
+     * The last time the experiment's stats data was updated. Will have default
+     * value if stats have never been computed for this experiment.
+     * 
+ * + * .google.protobuf.Timestamp last_update_time = 2; + * + * @return Whether the lastUpdateTime field is set. + */ + @java.lang.Override + public boolean hasLastUpdateTime() { + return lastUpdateTime_ != null; + } + /** + * + * + *
+     * The last time the experiment's stats data was updated. Will have default
+     * value if stats have never been computed for this experiment.
+     * 
+ * + * .google.protobuf.Timestamp last_update_time = 2; + * + * @return The lastUpdateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getLastUpdateTime() { + return lastUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastUpdateTime_; + } + /** + * + * + *
+     * The last time the experiment's stats data was updated. Will have default
+     * value if stats have never been computed for this experiment.
+     * 
+ * + * .google.protobuf.Timestamp last_update_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getLastUpdateTimeOrBuilder() { + return getLastUpdateTime(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < versionMetrics_.size(); i++) { + output.writeMessage(1, versionMetrics_.get(i)); + } + if (lastUpdateTime_ != null) { + output.writeMessage(2, getLastUpdateTime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < versionMetrics_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, versionMetrics_.get(i)); + } + if (lastUpdateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getLastUpdateTime()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.Experiment.Result)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.Experiment.Result other = + (com.google.cloud.dialogflow.cx.v3.Experiment.Result) obj; + + if (!getVersionMetricsList().equals(other.getVersionMetricsList())) return false; + if (hasLastUpdateTime() != other.hasLastUpdateTime()) return false; + if (hasLastUpdateTime()) { + if (!getLastUpdateTime().equals(other.getLastUpdateTime())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getVersionMetricsCount() > 0) { + hash = (37 * hash) + VERSION_METRICS_FIELD_NUMBER; + hash = (53 * hash) + getVersionMetricsList().hashCode(); + } + if (hasLastUpdateTime()) { + hash = (37 * hash) + LAST_UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getLastUpdateTime().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Result parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Result parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Result parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Result parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Result parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Result parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Result parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Result parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Result parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Result parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Result parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Result parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3.Experiment.Result prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * The inference result which includes an objective metric to optimize and the
+     * confidence interval.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.Experiment.Result} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.Experiment.Result) + com.google.cloud.dialogflow.cx.v3.Experiment.ResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Experiment.Result.class, + com.google.cloud.dialogflow.cx.v3.Experiment.Result.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.Experiment.Result.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getVersionMetricsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (versionMetricsBuilder_ == null) { + versionMetrics_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + versionMetricsBuilder_.clear(); + } + if (lastUpdateTimeBuilder_ == null) { + lastUpdateTime_ = null; + } else { + lastUpdateTime_ = null; + lastUpdateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Experiment.Result getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.Experiment.Result.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Experiment.Result build() { + com.google.cloud.dialogflow.cx.v3.Experiment.Result result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Experiment.Result buildPartial() { + com.google.cloud.dialogflow.cx.v3.Experiment.Result result = + new com.google.cloud.dialogflow.cx.v3.Experiment.Result(this); + int from_bitField0_ = bitField0_; + if (versionMetricsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + versionMetrics_ = java.util.Collections.unmodifiableList(versionMetrics_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.versionMetrics_ = versionMetrics_; + } else { + result.versionMetrics_ = versionMetricsBuilder_.build(); + } + if (lastUpdateTimeBuilder_ == null) { + result.lastUpdateTime_ = lastUpdateTime_; + } else { + result.lastUpdateTime_ = lastUpdateTimeBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.Experiment.Result) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.Experiment.Result) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.Experiment.Result other) { + if (other == com.google.cloud.dialogflow.cx.v3.Experiment.Result.getDefaultInstance()) + return this; + if (versionMetricsBuilder_ == null) { + if (!other.versionMetrics_.isEmpty()) { + if (versionMetrics_.isEmpty()) { + versionMetrics_ = other.versionMetrics_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureVersionMetricsIsMutable(); + versionMetrics_.addAll(other.versionMetrics_); + } + onChanged(); + } + } else { + if (!other.versionMetrics_.isEmpty()) { + if (versionMetricsBuilder_.isEmpty()) { + versionMetricsBuilder_.dispose(); + versionMetricsBuilder_ = null; + versionMetrics_ = other.versionMetrics_; + bitField0_ = (bitField0_ & ~0x00000001); + versionMetricsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getVersionMetricsFieldBuilder() + : null; + } else { + versionMetricsBuilder_.addAllMessages(other.versionMetrics_); + } + } + } + if (other.hasLastUpdateTime()) { + mergeLastUpdateTime(other.getLastUpdateTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.Experiment.Result parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.Experiment.Result) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List + versionMetrics_ = java.util.Collections.emptyList(); + + private void ensureVersionMetricsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + versionMetrics_ = + new java.util.ArrayList< + com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics>( + versionMetrics_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics, + com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.Builder, + com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetricsOrBuilder> + versionMetricsBuilder_; + + /** + * + * + *
+       * Version variants and metrics.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; + * + */ + public java.util.List + getVersionMetricsList() { + if (versionMetricsBuilder_ == null) { + return java.util.Collections.unmodifiableList(versionMetrics_); + } else { + return versionMetricsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Version variants and metrics.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; + * + */ + public int getVersionMetricsCount() { + if (versionMetricsBuilder_ == null) { + return versionMetrics_.size(); + } else { + return versionMetricsBuilder_.getCount(); + } + } + /** + * + * + *
+       * Version variants and metrics.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics getVersionMetrics( + int index) { + if (versionMetricsBuilder_ == null) { + return versionMetrics_.get(index); + } else { + return versionMetricsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Version variants and metrics.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; + * + */ + public Builder setVersionMetrics( + int index, com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics value) { + if (versionMetricsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVersionMetricsIsMutable(); + versionMetrics_.set(index, value); + onChanged(); + } else { + versionMetricsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Version variants and metrics.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; + * + */ + public Builder setVersionMetrics( + int index, + com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.Builder + builderForValue) { + if (versionMetricsBuilder_ == null) { + ensureVersionMetricsIsMutable(); + versionMetrics_.set(index, builderForValue.build()); + onChanged(); + } else { + versionMetricsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Version variants and metrics.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; + * + */ + public Builder addVersionMetrics( + com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics value) { + if (versionMetricsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVersionMetricsIsMutable(); + versionMetrics_.add(value); + onChanged(); + } else { + versionMetricsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Version variants and metrics.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; + * + */ + public Builder addVersionMetrics( + int index, com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics value) { + if (versionMetricsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVersionMetricsIsMutable(); + versionMetrics_.add(index, value); + onChanged(); + } else { + versionMetricsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Version variants and metrics.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; + * + */ + public Builder addVersionMetrics( + com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.Builder + builderForValue) { + if (versionMetricsBuilder_ == null) { + ensureVersionMetricsIsMutable(); + versionMetrics_.add(builderForValue.build()); + onChanged(); + } else { + versionMetricsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Version variants and metrics.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; + * + */ + public Builder addVersionMetrics( + int index, + com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.Builder + builderForValue) { + if (versionMetricsBuilder_ == null) { + ensureVersionMetricsIsMutable(); + versionMetrics_.add(index, builderForValue.build()); + onChanged(); + } else { + versionMetricsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Version variants and metrics.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; + * + */ + public Builder addAllVersionMetrics( + java.lang.Iterable< + ? extends com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics> + values) { + if (versionMetricsBuilder_ == null) { + ensureVersionMetricsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, versionMetrics_); + onChanged(); + } else { + versionMetricsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Version variants and metrics.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; + * + */ + public Builder clearVersionMetrics() { + if (versionMetricsBuilder_ == null) { + versionMetrics_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + versionMetricsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Version variants and metrics.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; + * + */ + public Builder removeVersionMetrics(int index) { + if (versionMetricsBuilder_ == null) { + ensureVersionMetricsIsMutable(); + versionMetrics_.remove(index); + onChanged(); + } else { + versionMetricsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Version variants and metrics.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.Builder + getVersionMetricsBuilder(int index) { + return getVersionMetricsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Version variants and metrics.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetricsOrBuilder + getVersionMetricsOrBuilder(int index) { + if (versionMetricsBuilder_ == null) { + return versionMetrics_.get(index); + } else { + return versionMetricsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Version variants and metrics.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetricsOrBuilder> + getVersionMetricsOrBuilderList() { + if (versionMetricsBuilder_ != null) { + return versionMetricsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(versionMetrics_); + } + } + /** + * + * + *
+       * Version variants and metrics.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.Builder + addVersionMetricsBuilder() { + return getVersionMetricsFieldBuilder() + .addBuilder( + com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics + .getDefaultInstance()); + } + /** + * + * + *
+       * Version variants and metrics.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.Builder + addVersionMetricsBuilder(int index) { + return getVersionMetricsFieldBuilder() + .addBuilder( + index, + com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics + .getDefaultInstance()); + } + /** + * + * + *
+       * Version variants and metrics.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; + * + */ + public java.util.List< + com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.Builder> + getVersionMetricsBuilderList() { + return getVersionMetricsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics, + com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.Builder, + com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetricsOrBuilder> + getVersionMetricsFieldBuilder() { + if (versionMetricsBuilder_ == null) { + versionMetricsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics, + com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.Builder, + com.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetricsOrBuilder>( + versionMetrics_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + versionMetrics_ = null; + } + return versionMetricsBuilder_; + } + + private com.google.protobuf.Timestamp lastUpdateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + lastUpdateTimeBuilder_; + /** + * + * + *
+       * The last time the experiment's stats data was updated. Will have default
+       * value if stats have never been computed for this experiment.
+       * 
+ * + * .google.protobuf.Timestamp last_update_time = 2; + * + * @return Whether the lastUpdateTime field is set. + */ + public boolean hasLastUpdateTime() { + return lastUpdateTimeBuilder_ != null || lastUpdateTime_ != null; + } + /** + * + * + *
+       * The last time the experiment's stats data was updated. Will have default
+       * value if stats have never been computed for this experiment.
+       * 
+ * + * .google.protobuf.Timestamp last_update_time = 2; + * + * @return The lastUpdateTime. + */ + public com.google.protobuf.Timestamp getLastUpdateTime() { + if (lastUpdateTimeBuilder_ == null) { + return lastUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastUpdateTime_; + } else { + return lastUpdateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The last time the experiment's stats data was updated. Will have default
+       * value if stats have never been computed for this experiment.
+       * 
+ * + * .google.protobuf.Timestamp last_update_time = 2; + */ + public Builder setLastUpdateTime(com.google.protobuf.Timestamp value) { + if (lastUpdateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lastUpdateTime_ = value; + onChanged(); + } else { + lastUpdateTimeBuilder_.setMessage(value); + } + + 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.
+       * 
+ * + * .google.protobuf.Timestamp last_update_time = 2; + */ + public Builder setLastUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (lastUpdateTimeBuilder_ == null) { + lastUpdateTime_ = builderForValue.build(); + onChanged(); + } else { + lastUpdateTimeBuilder_.setMessage(builderForValue.build()); + } + + 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.
+       * 
+ * + * .google.protobuf.Timestamp last_update_time = 2; + */ + public Builder mergeLastUpdateTime(com.google.protobuf.Timestamp value) { + if (lastUpdateTimeBuilder_ == null) { + if (lastUpdateTime_ != null) { + lastUpdateTime_ = + com.google.protobuf.Timestamp.newBuilder(lastUpdateTime_) + .mergeFrom(value) + .buildPartial(); + } else { + lastUpdateTime_ = value; + } + onChanged(); + } else { + lastUpdateTimeBuilder_.mergeFrom(value); + } + + 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.
+       * 
+ * + * .google.protobuf.Timestamp last_update_time = 2; + */ + public Builder clearLastUpdateTime() { + if (lastUpdateTimeBuilder_ == null) { + lastUpdateTime_ = null; + onChanged(); + } else { + lastUpdateTime_ = null; + lastUpdateTimeBuilder_ = null; + } + + 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.
+       * 
+ * + * .google.protobuf.Timestamp last_update_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getLastUpdateTimeBuilder() { + + onChanged(); + return getLastUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The last time the experiment's stats data was updated. Will have default
+       * value if stats have never been computed for this experiment.
+       * 
+ * + * .google.protobuf.Timestamp last_update_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getLastUpdateTimeOrBuilder() { + if (lastUpdateTimeBuilder_ != null) { + return lastUpdateTimeBuilder_.getMessageOrBuilder(); + } else { + return lastUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastUpdateTime_; + } + } + /** + * + * + *
+       * The last time the experiment's stats data was updated. Will have default
+       * value if stats have never been computed for this experiment.
+       * 
+ * + * .google.protobuf.Timestamp last_update_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getLastUpdateTimeFieldBuilder() { + if (lastUpdateTimeBuilder_ == null) { + lastUpdateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getLastUpdateTime(), getParentForChildren(), isClean()); + lastUpdateTime_ = null; + } + return lastUpdateTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.Experiment.Result) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.Experiment.Result) + private static final com.google.cloud.dialogflow.cx.v3.Experiment.Result DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.Experiment.Result(); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment.Result getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Result parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Result(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Experiment.Result getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * The name of the experiment.
+   * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>/experiments/<Experiment ID>..
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the experiment.
+   * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>/experiments/<Experiment ID>..
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Required. The human-readable name of the experiment (unique in an environment). Limit
+   * of 64 characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The human-readable name of the experiment (unique in an environment). Limit
+   * of 64 characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + private volatile java.lang.Object description_; + /** + * + * + *
+   * The human-readable description of the experiment.
+   * 
+ * + * string description = 3; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * The human-readable description of the experiment.
+   * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 4; + private int state_; + /** + * + * + *
+   * The current state of the experiment.
+   * Transition triggered by Expriments.StartExperiment: PENDING->RUNNING.
+   * Transition triggered by Expriments.CancelExperiment: PENDING->CANCELLED or
+   * RUNNING->CANCELLED.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Experiment.State state = 4; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * The current state of the experiment.
+   * Transition triggered by Expriments.StartExperiment: PENDING->RUNNING.
+   * Transition triggered by Expriments.CancelExperiment: PENDING->CANCELLED or
+   * RUNNING->CANCELLED.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Experiment.State state = 4; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Experiment.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.dialogflow.cx.v3.Experiment.State result = + com.google.cloud.dialogflow.cx.v3.Experiment.State.valueOf(state_); + return result == null + ? com.google.cloud.dialogflow.cx.v3.Experiment.State.UNRECOGNIZED + : result; + } + + public static final int DEFINITION_FIELD_NUMBER = 5; + private com.google.cloud.dialogflow.cx.v3.Experiment.Definition definition_; + /** + * + * + *
+   * The definition of the experiment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Experiment.Definition definition = 5; + * + * @return Whether the definition field is set. + */ + @java.lang.Override + public boolean hasDefinition() { + return definition_ != null; + } + /** + * + * + *
+   * The definition of the experiment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Experiment.Definition definition = 5; + * + * @return The definition. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Experiment.Definition getDefinition() { + return definition_ == null + ? com.google.cloud.dialogflow.cx.v3.Experiment.Definition.getDefaultInstance() + : definition_; + } + /** + * + * + *
+   * The definition of the experiment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Experiment.Definition definition = 5; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Experiment.DefinitionOrBuilder getDefinitionOrBuilder() { + return getDefinition(); + } + + public static final int RESULT_FIELD_NUMBER = 6; + private com.google.cloud.dialogflow.cx.v3.Experiment.Result result_; + /** + * + * + *
+   * Inference result of the experiment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Experiment.Result result = 6; + * + * @return Whether the result field is set. + */ + @java.lang.Override + public boolean hasResult() { + return result_ != null; + } + /** + * + * + *
+   * Inference result of the experiment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Experiment.Result result = 6; + * + * @return The result. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Experiment.Result getResult() { + return result_ == null + ? com.google.cloud.dialogflow.cx.v3.Experiment.Result.getDefaultInstance() + : result_; + } + /** + * + * + *
+   * Inference result of the experiment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Experiment.Result result = 6; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Experiment.ResultOrBuilder getResultOrBuilder() { + return getResult(); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Creation time of this experiment.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7; + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Creation time of this experiment.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7; + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Creation time of this experiment.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int START_TIME_FIELD_NUMBER = 8; + private com.google.protobuf.Timestamp startTime_; + /** + * + * + *
+   * Start time of this experiment.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 8; + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return startTime_ != null; + } + /** + * + * + *
+   * Start time of this experiment.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 8; + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + * + * + *
+   * Start time of this experiment.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 8; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return getStartTime(); + } + + public static final int END_TIME_FIELD_NUMBER = 9; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+   * End time of this experiment.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 9; + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + * + * + *
+   * End time of this experiment.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 9; + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
+   * End time of this experiment.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 9; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return getEndTime(); + } + + public static final int LAST_UPDATE_TIME_FIELD_NUMBER = 10; + private com.google.protobuf.Timestamp lastUpdateTime_; + /** + * + * + *
+   * Last update time of this experiment.
+   * 
+ * + * .google.protobuf.Timestamp last_update_time = 10; + * + * @return Whether the lastUpdateTime field is set. + */ + @java.lang.Override + public boolean hasLastUpdateTime() { + return lastUpdateTime_ != null; + } + /** + * + * + *
+   * Last update time of this experiment.
+   * 
+ * + * .google.protobuf.Timestamp last_update_time = 10; + * + * @return The lastUpdateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getLastUpdateTime() { + return lastUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastUpdateTime_; + } + /** + * + * + *
+   * Last update time of this experiment.
+   * 
+ * + * .google.protobuf.Timestamp last_update_time = 10; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getLastUpdateTimeOrBuilder() { + return getLastUpdateTime(); + } + + public static final int EXPERIMENT_LENGTH_FIELD_NUMBER = 11; + private com.google.protobuf.Duration experimentLength_; + /** + * + * + *
+   * Maximum number of days to run the experiment.
+   * 
+ * + * .google.protobuf.Duration experiment_length = 11; + * + * @return Whether the experimentLength field is set. + */ + @java.lang.Override + public boolean hasExperimentLength() { + return experimentLength_ != null; + } + /** + * + * + *
+   * Maximum number of days to run the experiment.
+   * 
+ * + * .google.protobuf.Duration experiment_length = 11; + * + * @return The experimentLength. + */ + @java.lang.Override + public com.google.protobuf.Duration getExperimentLength() { + return experimentLength_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : experimentLength_; + } + /** + * + * + *
+   * Maximum number of days to run the experiment.
+   * 
+ * + * .google.protobuf.Duration experiment_length = 11; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getExperimentLengthOrBuilder() { + return getExperimentLength(); + } + + public static final int VARIANTS_HISTORY_FIELD_NUMBER = 12; + private java.util.List variantsHistory_; + /** + * + * + *
+   * The history of updates to the experiment variants.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; + */ + @java.lang.Override + public java.util.List + getVariantsHistoryList() { + return variantsHistory_; + } + /** + * + * + *
+   * The history of updates to the experiment variants.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; + */ + @java.lang.Override + public java.util.List + getVariantsHistoryOrBuilderList() { + return variantsHistory_; + } + /** + * + * + *
+   * The history of updates to the experiment variants.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; + */ + @java.lang.Override + public int getVariantsHistoryCount() { + return variantsHistory_.size(); + } + /** + * + * + *
+   * The history of updates to the experiment variants.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.VariantsHistory getVariantsHistory(int index) { + return variantsHistory_.get(index); + } + /** + * + * + *
+   * The history of updates to the experiment variants.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.VariantsHistoryOrBuilder getVariantsHistoryOrBuilder( + int index) { + return variantsHistory_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + if (state_ + != com.google.cloud.dialogflow.cx.v3.Experiment.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(4, state_); + } + if (definition_ != null) { + output.writeMessage(5, getDefinition()); + } + if (result_ != null) { + output.writeMessage(6, getResult()); + } + if (createTime_ != null) { + output.writeMessage(7, getCreateTime()); + } + if (startTime_ != null) { + output.writeMessage(8, getStartTime()); + } + if (endTime_ != null) { + output.writeMessage(9, getEndTime()); + } + if (lastUpdateTime_ != null) { + output.writeMessage(10, getLastUpdateTime()); + } + if (experimentLength_ != null) { + output.writeMessage(11, getExperimentLength()); + } + for (int i = 0; i < variantsHistory_.size(); i++) { + output.writeMessage(12, variantsHistory_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + if (state_ + != com.google.cloud.dialogflow.cx.v3.Experiment.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, state_); + } + if (definition_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getDefinition()); + } + if (result_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getResult()); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getCreateTime()); + } + if (startTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getStartTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getEndTime()); + } + if (lastUpdateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getLastUpdateTime()); + } + if (experimentLength_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getExperimentLength()); + } + for (int i = 0; i < variantsHistory_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, variantsHistory_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.Experiment)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.Experiment other = + (com.google.cloud.dialogflow.cx.v3.Experiment) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (state_ != other.state_) return false; + if (hasDefinition() != other.hasDefinition()) return false; + if (hasDefinition()) { + if (!getDefinition().equals(other.getDefinition())) return false; + } + if (hasResult() != other.hasResult()) return false; + if (hasResult()) { + if (!getResult().equals(other.getResult())) return false; + } + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (hasLastUpdateTime() != other.hasLastUpdateTime()) return false; + if (hasLastUpdateTime()) { + if (!getLastUpdateTime().equals(other.getLastUpdateTime())) return false; + } + if (hasExperimentLength() != other.hasExperimentLength()) return false; + if (hasExperimentLength()) { + if (!getExperimentLength().equals(other.getExperimentLength())) return false; + } + if (!getVariantsHistoryList().equals(other.getVariantsHistoryList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (hasDefinition()) { + hash = (37 * hash) + DEFINITION_FIELD_NUMBER; + hash = (53 * hash) + getDefinition().hashCode(); + } + if (hasResult()) { + hash = (37 * hash) + RESULT_FIELD_NUMBER; + hash = (53 * hash) + getResult().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + if (hasLastUpdateTime()) { + hash = (37 * hash) + LAST_UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getLastUpdateTime().hashCode(); + } + if (hasExperimentLength()) { + hash = (37 * hash) + EXPERIMENT_LENGTH_FIELD_NUMBER; + hash = (53 * hash) + getExperimentLength().hashCode(); + } + if (getVariantsHistoryCount() > 0) { + hash = (37 * hash) + VARIANTS_HISTORY_FIELD_NUMBER; + hash = (53 * hash) + getVariantsHistoryList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.dialogflow.cx.v3.Experiment prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Represents an experiment in an environment.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.Experiment} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.Experiment) + com.google.cloud.dialogflow.cx.v3.ExperimentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_Experiment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_Experiment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Experiment.class, + com.google.cloud.dialogflow.cx.v3.Experiment.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.Experiment.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getVariantsHistoryFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + displayName_ = ""; + + description_ = ""; + + state_ = 0; + + if (definitionBuilder_ == null) { + definition_ = null; + } else { + definition_ = null; + definitionBuilder_ = null; + } + if (resultBuilder_ == null) { + result_ = null; + } else { + result_ = null; + resultBuilder_ = null; + } + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (startTimeBuilder_ == null) { + startTime_ = null; + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + if (endTimeBuilder_ == null) { + endTime_ = null; + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + if (lastUpdateTimeBuilder_ == null) { + lastUpdateTime_ = null; + } else { + lastUpdateTime_ = null; + lastUpdateTimeBuilder_ = null; + } + if (experimentLengthBuilder_ == null) { + experimentLength_ = null; + } else { + experimentLength_ = null; + experimentLengthBuilder_ = null; + } + if (variantsHistoryBuilder_ == null) { + variantsHistory_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + variantsHistoryBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_Experiment_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Experiment getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.Experiment.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Experiment build() { + com.google.cloud.dialogflow.cx.v3.Experiment result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Experiment buildPartial() { + com.google.cloud.dialogflow.cx.v3.Experiment result = + new com.google.cloud.dialogflow.cx.v3.Experiment(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.displayName_ = displayName_; + result.description_ = description_; + result.state_ = state_; + if (definitionBuilder_ == null) { + result.definition_ = definition_; + } else { + result.definition_ = definitionBuilder_.build(); + } + if (resultBuilder_ == null) { + result.result_ = result_; + } else { + result.result_ = resultBuilder_.build(); + } + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (startTimeBuilder_ == null) { + result.startTime_ = startTime_; + } else { + result.startTime_ = startTimeBuilder_.build(); + } + if (endTimeBuilder_ == null) { + result.endTime_ = endTime_; + } else { + result.endTime_ = endTimeBuilder_.build(); + } + if (lastUpdateTimeBuilder_ == null) { + result.lastUpdateTime_ = lastUpdateTime_; + } else { + result.lastUpdateTime_ = lastUpdateTimeBuilder_.build(); + } + if (experimentLengthBuilder_ == null) { + result.experimentLength_ = experimentLength_; + } else { + result.experimentLength_ = experimentLengthBuilder_.build(); + } + if (variantsHistoryBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + variantsHistory_ = java.util.Collections.unmodifiableList(variantsHistory_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.variantsHistory_ = variantsHistory_; + } else { + result.variantsHistory_ = variantsHistoryBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.Experiment) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.Experiment) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.Experiment other) { + if (other == com.google.cloud.dialogflow.cx.v3.Experiment.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.hasDefinition()) { + mergeDefinition(other.getDefinition()); + } + if (other.hasResult()) { + mergeResult(other.getResult()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (other.hasLastUpdateTime()) { + mergeLastUpdateTime(other.getLastUpdateTime()); + } + if (other.hasExperimentLength()) { + mergeExperimentLength(other.getExperimentLength()); + } + if (variantsHistoryBuilder_ == null) { + if (!other.variantsHistory_.isEmpty()) { + if (variantsHistory_.isEmpty()) { + variantsHistory_ = other.variantsHistory_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureVariantsHistoryIsMutable(); + variantsHistory_.addAll(other.variantsHistory_); + } + onChanged(); + } + } else { + if (!other.variantsHistory_.isEmpty()) { + if (variantsHistoryBuilder_.isEmpty()) { + variantsHistoryBuilder_.dispose(); + variantsHistoryBuilder_ = null; + variantsHistory_ = other.variantsHistory_; + bitField0_ = (bitField0_ & ~0x00000001); + variantsHistoryBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getVariantsHistoryFieldBuilder() + : null; + } else { + variantsHistoryBuilder_.addAllMessages(other.variantsHistory_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.Experiment parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.dialogflow.cx.v3.Experiment) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The name of the experiment.
+     * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/experiments/<Experiment ID>..
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the experiment.
+     * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/experiments/<Experiment ID>..
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the experiment.
+     * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/experiments/<Experiment ID>..
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the experiment.
+     * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/experiments/<Experiment ID>..
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the experiment.
+     * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/experiments/<Experiment ID>..
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Required. The human-readable name of the experiment (unique in an environment). Limit
+     * of 64 characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The human-readable name of the experiment (unique in an environment). Limit
+     * of 64 characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The human-readable name of the experiment (unique in an environment). Limit
+     * of 64 characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The human-readable name of the experiment (unique in an environment). Limit
+     * of 64 characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The human-readable name of the experiment (unique in an environment). Limit
+     * of 64 characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * The human-readable description of the experiment.
+     * 
+ * + * string description = 3; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The human-readable description of the experiment.
+     * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The human-readable description of the experiment.
+     * 
+ * + * string description = 3; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The human-readable description of the experiment.
+     * 
+ * + * string description = 3; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+     * The human-readable description of the experiment.
+     * 
+ * + * string description = 3; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private int state_ = 0; + /** + * + * + *
+     * The current state of the experiment.
+     * Transition triggered by Expriments.StartExperiment: PENDING->RUNNING.
+     * Transition triggered by Expriments.CancelExperiment: PENDING->CANCELLED or
+     * RUNNING->CANCELLED.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Experiment.State state = 4; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * The current state of the experiment.
+     * Transition triggered by Expriments.StartExperiment: PENDING->RUNNING.
+     * Transition triggered by Expriments.CancelExperiment: PENDING->CANCELLED or
+     * RUNNING->CANCELLED.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Experiment.State state = 4; + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + + state_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The current state of the experiment.
+     * Transition triggered by Expriments.StartExperiment: PENDING->RUNNING.
+     * Transition triggered by Expriments.CancelExperiment: PENDING->CANCELLED or
+     * RUNNING->CANCELLED.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Experiment.State state = 4; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Experiment.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.dialogflow.cx.v3.Experiment.State result = + com.google.cloud.dialogflow.cx.v3.Experiment.State.valueOf(state_); + return result == null + ? com.google.cloud.dialogflow.cx.v3.Experiment.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The current state of the experiment.
+     * Transition triggered by Expriments.StartExperiment: PENDING->RUNNING.
+     * Transition triggered by Expriments.CancelExperiment: PENDING->CANCELLED or
+     * RUNNING->CANCELLED.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Experiment.State state = 4; + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.dialogflow.cx.v3.Experiment.State value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The current state of the experiment.
+     * Transition triggered by Expriments.StartExperiment: PENDING->RUNNING.
+     * Transition triggered by Expriments.CancelExperiment: PENDING->CANCELLED or
+     * RUNNING->CANCELLED.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Experiment.State state = 4; + * + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.dialogflow.cx.v3.Experiment.Definition definition_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Experiment.Definition, + com.google.cloud.dialogflow.cx.v3.Experiment.Definition.Builder, + com.google.cloud.dialogflow.cx.v3.Experiment.DefinitionOrBuilder> + definitionBuilder_; + /** + * + * + *
+     * The definition of the experiment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Experiment.Definition definition = 5; + * + * @return Whether the definition field is set. + */ + public boolean hasDefinition() { + return definitionBuilder_ != null || definition_ != null; + } + /** + * + * + *
+     * The definition of the experiment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Experiment.Definition definition = 5; + * + * @return The definition. + */ + public com.google.cloud.dialogflow.cx.v3.Experiment.Definition getDefinition() { + if (definitionBuilder_ == null) { + return definition_ == null + ? com.google.cloud.dialogflow.cx.v3.Experiment.Definition.getDefaultInstance() + : definition_; + } else { + return definitionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The definition of the experiment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Experiment.Definition definition = 5; + */ + public Builder setDefinition(com.google.cloud.dialogflow.cx.v3.Experiment.Definition value) { + if (definitionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + definition_ = value; + onChanged(); + } else { + definitionBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The definition of the experiment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Experiment.Definition definition = 5; + */ + public Builder setDefinition( + com.google.cloud.dialogflow.cx.v3.Experiment.Definition.Builder builderForValue) { + if (definitionBuilder_ == null) { + definition_ = builderForValue.build(); + onChanged(); + } else { + definitionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The definition of the experiment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Experiment.Definition definition = 5; + */ + public Builder mergeDefinition(com.google.cloud.dialogflow.cx.v3.Experiment.Definition value) { + if (definitionBuilder_ == null) { + if (definition_ != null) { + definition_ = + com.google.cloud.dialogflow.cx.v3.Experiment.Definition.newBuilder(definition_) + .mergeFrom(value) + .buildPartial(); + } else { + definition_ = value; + } + onChanged(); + } else { + definitionBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The definition of the experiment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Experiment.Definition definition = 5; + */ + public Builder clearDefinition() { + if (definitionBuilder_ == null) { + definition_ = null; + onChanged(); + } else { + definition_ = null; + definitionBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The definition of the experiment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Experiment.Definition definition = 5; + */ + public com.google.cloud.dialogflow.cx.v3.Experiment.Definition.Builder getDefinitionBuilder() { + + onChanged(); + return getDefinitionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The definition of the experiment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Experiment.Definition definition = 5; + */ + public com.google.cloud.dialogflow.cx.v3.Experiment.DefinitionOrBuilder + getDefinitionOrBuilder() { + if (definitionBuilder_ != null) { + return definitionBuilder_.getMessageOrBuilder(); + } else { + return definition_ == null + ? com.google.cloud.dialogflow.cx.v3.Experiment.Definition.getDefaultInstance() + : definition_; + } + } + /** + * + * + *
+     * The definition of the experiment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Experiment.Definition definition = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Experiment.Definition, + com.google.cloud.dialogflow.cx.v3.Experiment.Definition.Builder, + com.google.cloud.dialogflow.cx.v3.Experiment.DefinitionOrBuilder> + getDefinitionFieldBuilder() { + if (definitionBuilder_ == null) { + definitionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Experiment.Definition, + com.google.cloud.dialogflow.cx.v3.Experiment.Definition.Builder, + com.google.cloud.dialogflow.cx.v3.Experiment.DefinitionOrBuilder>( + getDefinition(), getParentForChildren(), isClean()); + definition_ = null; + } + return definitionBuilder_; + } + + private com.google.cloud.dialogflow.cx.v3.Experiment.Result result_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Experiment.Result, + com.google.cloud.dialogflow.cx.v3.Experiment.Result.Builder, + com.google.cloud.dialogflow.cx.v3.Experiment.ResultOrBuilder> + resultBuilder_; + /** + * + * + *
+     * Inference result of the experiment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Experiment.Result result = 6; + * + * @return Whether the result field is set. + */ + public boolean hasResult() { + return resultBuilder_ != null || result_ != null; + } + /** + * + * + *
+     * Inference result of the experiment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Experiment.Result result = 6; + * + * @return The result. + */ + public com.google.cloud.dialogflow.cx.v3.Experiment.Result getResult() { + if (resultBuilder_ == null) { + return result_ == null + ? com.google.cloud.dialogflow.cx.v3.Experiment.Result.getDefaultInstance() + : result_; + } else { + return resultBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Inference result of the experiment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Experiment.Result result = 6; + */ + public Builder setResult(com.google.cloud.dialogflow.cx.v3.Experiment.Result value) { + if (resultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + result_ = value; + onChanged(); + } else { + resultBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Inference result of the experiment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Experiment.Result result = 6; + */ + public Builder setResult( + com.google.cloud.dialogflow.cx.v3.Experiment.Result.Builder builderForValue) { + if (resultBuilder_ == null) { + result_ = builderForValue.build(); + onChanged(); + } else { + resultBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Inference result of the experiment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Experiment.Result result = 6; + */ + public Builder mergeResult(com.google.cloud.dialogflow.cx.v3.Experiment.Result value) { + if (resultBuilder_ == null) { + if (result_ != null) { + result_ = + com.google.cloud.dialogflow.cx.v3.Experiment.Result.newBuilder(result_) + .mergeFrom(value) + .buildPartial(); + } else { + result_ = value; + } + onChanged(); + } else { + resultBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Inference result of the experiment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Experiment.Result result = 6; + */ + public Builder clearResult() { + if (resultBuilder_ == null) { + result_ = null; + onChanged(); + } else { + result_ = null; + resultBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Inference result of the experiment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Experiment.Result result = 6; + */ + public com.google.cloud.dialogflow.cx.v3.Experiment.Result.Builder getResultBuilder() { + + onChanged(); + return getResultFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Inference result of the experiment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Experiment.Result result = 6; + */ + public com.google.cloud.dialogflow.cx.v3.Experiment.ResultOrBuilder getResultOrBuilder() { + if (resultBuilder_ != null) { + return resultBuilder_.getMessageOrBuilder(); + } else { + return result_ == null + ? com.google.cloud.dialogflow.cx.v3.Experiment.Result.getDefaultInstance() + : result_; + } + } + /** + * + * + *
+     * Inference result of the experiment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Experiment.Result result = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Experiment.Result, + com.google.cloud.dialogflow.cx.v3.Experiment.Result.Builder, + com.google.cloud.dialogflow.cx.v3.Experiment.ResultOrBuilder> + getResultFieldBuilder() { + if (resultBuilder_ == null) { + resultBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Experiment.Result, + com.google.cloud.dialogflow.cx.v3.Experiment.Result.Builder, + com.google.cloud.dialogflow.cx.v3.Experiment.ResultOrBuilder>( + getResult(), getParentForChildren(), isClean()); + result_ = null; + } + return resultBuilder_; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Creation time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Creation time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Creation time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Creation time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Creation time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Creation time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Creation time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Creation time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Creation time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + /** + * + * + *
+     * Start time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 8; + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return startTimeBuilder_ != null || startTime_ != null; + } + /** + * + * + *
+     * Start time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 8; + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Start time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 8; + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + onChanged(); + } else { + startTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Start time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 8; + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + onChanged(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Start time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 8; + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (startTime_ != null) { + startTime_ = + com.google.protobuf.Timestamp.newBuilder(startTime_).mergeFrom(value).buildPartial(); + } else { + startTime_ = value; + } + onChanged(); + } else { + startTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Start time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 8; + */ + public Builder clearStartTime() { + if (startTimeBuilder_ == null) { + startTime_ = null; + onChanged(); + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Start time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 8; + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Start time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 8; + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + /** + * + * + *
+     * Start time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + /** + * + * + *
+     * End time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 9; + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return endTimeBuilder_ != null || endTime_ != null; + } + /** + * + * + *
+     * End time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 9; + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * End time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 9; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + onChanged(); + } else { + endTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * End time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 9; + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + onChanged(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * End time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 9; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (endTime_ != null) { + endTime_ = + com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial(); + } else { + endTime_ = value; + } + onChanged(); + } else { + endTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * End time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 9; + */ + public Builder clearEndTime() { + if (endTimeBuilder_ == null) { + endTime_ = null; + onChanged(); + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * End time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 9; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * End time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 9; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
+     * End time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private com.google.protobuf.Timestamp lastUpdateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + lastUpdateTimeBuilder_; + /** + * + * + *
+     * Last update time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp last_update_time = 10; + * + * @return Whether the lastUpdateTime field is set. + */ + public boolean hasLastUpdateTime() { + return lastUpdateTimeBuilder_ != null || lastUpdateTime_ != null; + } + /** + * + * + *
+     * Last update time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp last_update_time = 10; + * + * @return The lastUpdateTime. + */ + public com.google.protobuf.Timestamp getLastUpdateTime() { + if (lastUpdateTimeBuilder_ == null) { + return lastUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastUpdateTime_; + } else { + return lastUpdateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Last update time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp last_update_time = 10; + */ + public Builder setLastUpdateTime(com.google.protobuf.Timestamp value) { + if (lastUpdateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lastUpdateTime_ = value; + onChanged(); + } else { + lastUpdateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Last update time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp last_update_time = 10; + */ + public Builder setLastUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (lastUpdateTimeBuilder_ == null) { + lastUpdateTime_ = builderForValue.build(); + onChanged(); + } else { + lastUpdateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Last update time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp last_update_time = 10; + */ + public Builder mergeLastUpdateTime(com.google.protobuf.Timestamp value) { + if (lastUpdateTimeBuilder_ == null) { + if (lastUpdateTime_ != null) { + lastUpdateTime_ = + com.google.protobuf.Timestamp.newBuilder(lastUpdateTime_) + .mergeFrom(value) + .buildPartial(); + } else { + lastUpdateTime_ = value; + } + onChanged(); + } else { + lastUpdateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Last update time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp last_update_time = 10; + */ + public Builder clearLastUpdateTime() { + if (lastUpdateTimeBuilder_ == null) { + lastUpdateTime_ = null; + onChanged(); + } else { + lastUpdateTime_ = null; + lastUpdateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Last update time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp last_update_time = 10; + */ + public com.google.protobuf.Timestamp.Builder getLastUpdateTimeBuilder() { + + onChanged(); + return getLastUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Last update time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp last_update_time = 10; + */ + public com.google.protobuf.TimestampOrBuilder getLastUpdateTimeOrBuilder() { + if (lastUpdateTimeBuilder_ != null) { + return lastUpdateTimeBuilder_.getMessageOrBuilder(); + } else { + return lastUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastUpdateTime_; + } + } + /** + * + * + *
+     * Last update time of this experiment.
+     * 
+ * + * .google.protobuf.Timestamp last_update_time = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getLastUpdateTimeFieldBuilder() { + if (lastUpdateTimeBuilder_ == null) { + lastUpdateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getLastUpdateTime(), getParentForChildren(), isClean()); + lastUpdateTime_ = null; + } + return lastUpdateTimeBuilder_; + } + + private com.google.protobuf.Duration experimentLength_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + experimentLengthBuilder_; + /** + * + * + *
+     * Maximum number of days to run the experiment.
+     * 
+ * + * .google.protobuf.Duration experiment_length = 11; + * + * @return Whether the experimentLength field is set. + */ + public boolean hasExperimentLength() { + return experimentLengthBuilder_ != null || experimentLength_ != null; + } + /** + * + * + *
+     * Maximum number of days to run the experiment.
+     * 
+ * + * .google.protobuf.Duration experiment_length = 11; + * + * @return The experimentLength. + */ + public com.google.protobuf.Duration getExperimentLength() { + if (experimentLengthBuilder_ == null) { + return experimentLength_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : experimentLength_; + } else { + return experimentLengthBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Maximum number of days to run the experiment.
+     * 
+ * + * .google.protobuf.Duration experiment_length = 11; + */ + public Builder setExperimentLength(com.google.protobuf.Duration value) { + if (experimentLengthBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + experimentLength_ = value; + onChanged(); + } else { + experimentLengthBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Maximum number of days to run the experiment.
+     * 
+ * + * .google.protobuf.Duration experiment_length = 11; + */ + public Builder setExperimentLength(com.google.protobuf.Duration.Builder builderForValue) { + if (experimentLengthBuilder_ == null) { + experimentLength_ = builderForValue.build(); + onChanged(); + } else { + experimentLengthBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Maximum number of days to run the experiment.
+     * 
+ * + * .google.protobuf.Duration experiment_length = 11; + */ + public Builder mergeExperimentLength(com.google.protobuf.Duration value) { + if (experimentLengthBuilder_ == null) { + if (experimentLength_ != null) { + experimentLength_ = + com.google.protobuf.Duration.newBuilder(experimentLength_) + .mergeFrom(value) + .buildPartial(); + } else { + experimentLength_ = value; + } + onChanged(); + } else { + experimentLengthBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Maximum number of days to run the experiment.
+     * 
+ * + * .google.protobuf.Duration experiment_length = 11; + */ + public Builder clearExperimentLength() { + if (experimentLengthBuilder_ == null) { + experimentLength_ = null; + onChanged(); + } else { + experimentLength_ = null; + experimentLengthBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Maximum number of days to run the experiment.
+     * 
+ * + * .google.protobuf.Duration experiment_length = 11; + */ + public com.google.protobuf.Duration.Builder getExperimentLengthBuilder() { + + onChanged(); + return getExperimentLengthFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Maximum number of days to run the experiment.
+     * 
+ * + * .google.protobuf.Duration experiment_length = 11; + */ + public com.google.protobuf.DurationOrBuilder getExperimentLengthOrBuilder() { + if (experimentLengthBuilder_ != null) { + return experimentLengthBuilder_.getMessageOrBuilder(); + } else { + return experimentLength_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : experimentLength_; + } + } + /** + * + * + *
+     * Maximum number of days to run the experiment.
+     * 
+ * + * .google.protobuf.Duration experiment_length = 11; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getExperimentLengthFieldBuilder() { + if (experimentLengthBuilder_ == null) { + experimentLengthBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getExperimentLength(), getParentForChildren(), isClean()); + experimentLength_ = null; + } + return experimentLengthBuilder_; + } + + private java.util.List variantsHistory_ = + java.util.Collections.emptyList(); + + private void ensureVariantsHistoryIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + variantsHistory_ = + new java.util.ArrayList( + variantsHistory_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.VariantsHistory, + com.google.cloud.dialogflow.cx.v3.VariantsHistory.Builder, + com.google.cloud.dialogflow.cx.v3.VariantsHistoryOrBuilder> + variantsHistoryBuilder_; + + /** + * + * + *
+     * The history of updates to the experiment variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; + */ + public java.util.List + getVariantsHistoryList() { + if (variantsHistoryBuilder_ == null) { + return java.util.Collections.unmodifiableList(variantsHistory_); + } else { + return variantsHistoryBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The history of updates to the experiment variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; + */ + public int getVariantsHistoryCount() { + if (variantsHistoryBuilder_ == null) { + return variantsHistory_.size(); + } else { + return variantsHistoryBuilder_.getCount(); + } + } + /** + * + * + *
+     * The history of updates to the experiment variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; + */ + public com.google.cloud.dialogflow.cx.v3.VariantsHistory getVariantsHistory(int index) { + if (variantsHistoryBuilder_ == null) { + return variantsHistory_.get(index); + } else { + return variantsHistoryBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The history of updates to the experiment variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; + */ + public Builder setVariantsHistory( + int index, com.google.cloud.dialogflow.cx.v3.VariantsHistory value) { + if (variantsHistoryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVariantsHistoryIsMutable(); + variantsHistory_.set(index, value); + onChanged(); + } else { + variantsHistoryBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The history of updates to the experiment variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; + */ + public Builder setVariantsHistory( + int index, com.google.cloud.dialogflow.cx.v3.VariantsHistory.Builder builderForValue) { + if (variantsHistoryBuilder_ == null) { + ensureVariantsHistoryIsMutable(); + variantsHistory_.set(index, builderForValue.build()); + onChanged(); + } else { + variantsHistoryBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The history of updates to the experiment variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; + */ + public Builder addVariantsHistory(com.google.cloud.dialogflow.cx.v3.VariantsHistory value) { + if (variantsHistoryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVariantsHistoryIsMutable(); + variantsHistory_.add(value); + onChanged(); + } else { + variantsHistoryBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The history of updates to the experiment variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; + */ + public Builder addVariantsHistory( + int index, com.google.cloud.dialogflow.cx.v3.VariantsHistory value) { + if (variantsHistoryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVariantsHistoryIsMutable(); + variantsHistory_.add(index, value); + onChanged(); + } else { + variantsHistoryBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The history of updates to the experiment variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; + */ + public Builder addVariantsHistory( + com.google.cloud.dialogflow.cx.v3.VariantsHistory.Builder builderForValue) { + if (variantsHistoryBuilder_ == null) { + ensureVariantsHistoryIsMutable(); + variantsHistory_.add(builderForValue.build()); + onChanged(); + } else { + variantsHistoryBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The history of updates to the experiment variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; + */ + public Builder addVariantsHistory( + int index, com.google.cloud.dialogflow.cx.v3.VariantsHistory.Builder builderForValue) { + if (variantsHistoryBuilder_ == null) { + ensureVariantsHistoryIsMutable(); + variantsHistory_.add(index, builderForValue.build()); + onChanged(); + } else { + variantsHistoryBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The history of updates to the experiment variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; + */ + public Builder addAllVariantsHistory( + java.lang.Iterable values) { + if (variantsHistoryBuilder_ == null) { + ensureVariantsHistoryIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, variantsHistory_); + onChanged(); + } else { + variantsHistoryBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The history of updates to the experiment variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; + */ + public Builder clearVariantsHistory() { + if (variantsHistoryBuilder_ == null) { + variantsHistory_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + variantsHistoryBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The history of updates to the experiment variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; + */ + public Builder removeVariantsHistory(int index) { + if (variantsHistoryBuilder_ == null) { + ensureVariantsHistoryIsMutable(); + variantsHistory_.remove(index); + onChanged(); + } else { + variantsHistoryBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The history of updates to the experiment variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; + */ + public com.google.cloud.dialogflow.cx.v3.VariantsHistory.Builder getVariantsHistoryBuilder( + int index) { + return getVariantsHistoryFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The history of updates to the experiment variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; + */ + public com.google.cloud.dialogflow.cx.v3.VariantsHistoryOrBuilder getVariantsHistoryOrBuilder( + int index) { + if (variantsHistoryBuilder_ == null) { + return variantsHistory_.get(index); + } else { + return variantsHistoryBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The history of updates to the experiment variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; + */ + public java.util.List + getVariantsHistoryOrBuilderList() { + if (variantsHistoryBuilder_ != null) { + return variantsHistoryBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(variantsHistory_); + } + } + /** + * + * + *
+     * The history of updates to the experiment variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; + */ + public com.google.cloud.dialogflow.cx.v3.VariantsHistory.Builder addVariantsHistoryBuilder() { + return getVariantsHistoryFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3.VariantsHistory.getDefaultInstance()); + } + /** + * + * + *
+     * The history of updates to the experiment variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; + */ + public com.google.cloud.dialogflow.cx.v3.VariantsHistory.Builder addVariantsHistoryBuilder( + int index) { + return getVariantsHistoryFieldBuilder() + .addBuilder( + index, com.google.cloud.dialogflow.cx.v3.VariantsHistory.getDefaultInstance()); + } + /** + * + * + *
+     * The history of updates to the experiment variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; + */ + public java.util.List + getVariantsHistoryBuilderList() { + return getVariantsHistoryFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.VariantsHistory, + com.google.cloud.dialogflow.cx.v3.VariantsHistory.Builder, + com.google.cloud.dialogflow.cx.v3.VariantsHistoryOrBuilder> + getVariantsHistoryFieldBuilder() { + if (variantsHistoryBuilder_ == null) { + variantsHistoryBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.VariantsHistory, + com.google.cloud.dialogflow.cx.v3.VariantsHistory.Builder, + com.google.cloud.dialogflow.cx.v3.VariantsHistoryOrBuilder>( + variantsHistory_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + variantsHistory_ = null; + } + return variantsHistoryBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.Experiment) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.Experiment) + private static final com.google.cloud.dialogflow.cx.v3.Experiment DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.Experiment(); + } + + public static com.google.cloud.dialogflow.cx.v3.Experiment getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Experiment parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Experiment(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Experiment getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentName.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentName.java new file mode 100644 index 000000000..2f8bac421 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentName.java @@ -0,0 +1,298 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.cx.v3; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class ExperimentName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_AGENT_ENVIRONMENT_EXPERIMENT = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String agent; + private final String environment; + private final String experiment; + + @Deprecated + protected ExperimentName() { + project = null; + location = null; + agent = null; + environment = null; + experiment = null; + } + + private ExperimentName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + agent = Preconditions.checkNotNull(builder.getAgent()); + environment = Preconditions.checkNotNull(builder.getEnvironment()); + experiment = Preconditions.checkNotNull(builder.getExperiment()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAgent() { + return agent; + } + + public String getEnvironment() { + return environment; + } + + public String getExperiment() { + return experiment; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ExperimentName of( + String project, String location, String agent, String environment, String experiment) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAgent(agent) + .setEnvironment(environment) + .setExperiment(experiment) + .build(); + } + + public static String format( + String project, String location, String agent, String environment, String experiment) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAgent(agent) + .setEnvironment(environment) + .setExperiment(experiment) + .build() + .toString(); + } + + public static ExperimentName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_AGENT_ENVIRONMENT_EXPERIMENT.validatedMatch( + formattedString, "ExperimentName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("agent"), + matchMap.get("environment"), + matchMap.get("experiment")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (ExperimentName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_AGENT_ENVIRONMENT_EXPERIMENT.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (agent != null) { + fieldMapBuilder.put("agent", agent); + } + if (environment != null) { + fieldMapBuilder.put("environment", environment); + } + if (experiment != null) { + fieldMapBuilder.put("experiment", experiment); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_AGENT_ENVIRONMENT_EXPERIMENT.instantiate( + "project", + project, + "location", + location, + "agent", + agent, + "environment", + environment, + "experiment", + experiment); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + ExperimentName that = ((ExperimentName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.agent, that.agent) + && Objects.equals(this.environment, that.environment) + && Objects.equals(this.experiment, that.experiment); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(agent); + h *= 1000003; + h ^= Objects.hashCode(environment); + h *= 1000003; + h ^= Objects.hashCode(experiment); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}. + */ + public static class Builder { + private String project; + private String location; + private String agent; + private String environment; + private String experiment; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAgent() { + return agent; + } + + public String getEnvironment() { + return environment; + } + + public String getExperiment() { + return experiment; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setAgent(String agent) { + this.agent = agent; + return this; + } + + public Builder setEnvironment(String environment) { + this.environment = environment; + return this; + } + + public Builder setExperiment(String experiment) { + this.experiment = experiment; + return this; + } + + private Builder(ExperimentName experimentName) { + project = experimentName.project; + location = experimentName.location; + agent = experimentName.agent; + environment = experimentName.environment; + experiment = experimentName.experiment; + } + + public ExperimentName build() { + return new ExperimentName(this); + } + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentOrBuilder.java new file mode 100644 index 000000000..82bf5eeae --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentOrBuilder.java @@ -0,0 +1,434 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/experiment.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface ExperimentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.Experiment) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The name of the experiment.
+   * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>/experiments/<Experiment ID>..
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The name of the experiment.
+   * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>/experiments/<Experiment ID>..
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The human-readable name of the experiment (unique in an environment). Limit
+   * of 64 characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Required. The human-readable name of the experiment (unique in an environment). Limit
+   * of 64 characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * The human-readable description of the experiment.
+   * 
+ * + * string description = 3; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * The human-readable description of the experiment.
+   * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * The current state of the experiment.
+   * Transition triggered by Expriments.StartExperiment: PENDING->RUNNING.
+   * Transition triggered by Expriments.CancelExperiment: PENDING->CANCELLED or
+   * RUNNING->CANCELLED.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Experiment.State state = 4; + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * The current state of the experiment.
+   * Transition triggered by Expriments.StartExperiment: PENDING->RUNNING.
+   * Transition triggered by Expriments.CancelExperiment: PENDING->CANCELLED or
+   * RUNNING->CANCELLED.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Experiment.State state = 4; + * + * @return The state. + */ + com.google.cloud.dialogflow.cx.v3.Experiment.State getState(); + + /** + * + * + *
+   * The definition of the experiment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Experiment.Definition definition = 5; + * + * @return Whether the definition field is set. + */ + boolean hasDefinition(); + /** + * + * + *
+   * The definition of the experiment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Experiment.Definition definition = 5; + * + * @return The definition. + */ + com.google.cloud.dialogflow.cx.v3.Experiment.Definition getDefinition(); + /** + * + * + *
+   * The definition of the experiment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Experiment.Definition definition = 5; + */ + com.google.cloud.dialogflow.cx.v3.Experiment.DefinitionOrBuilder getDefinitionOrBuilder(); + + /** + * + * + *
+   * Inference result of the experiment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Experiment.Result result = 6; + * + * @return Whether the result field is set. + */ + boolean hasResult(); + /** + * + * + *
+   * Inference result of the experiment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Experiment.Result result = 6; + * + * @return The result. + */ + com.google.cloud.dialogflow.cx.v3.Experiment.Result getResult(); + /** + * + * + *
+   * Inference result of the experiment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Experiment.Result result = 6; + */ + com.google.cloud.dialogflow.cx.v3.Experiment.ResultOrBuilder getResultOrBuilder(); + + /** + * + * + *
+   * Creation time of this experiment.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7; + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Creation time of this experiment.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7; + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Creation time of this experiment.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Start time of this experiment.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 8; + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + * + * + *
+   * Start time of this experiment.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 8; + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + * + * + *
+   * Start time of this experiment.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 8; + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
+   * End time of this experiment.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 9; + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+   * End time of this experiment.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 9; + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+   * End time of this experiment.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 9; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+   * Last update time of this experiment.
+   * 
+ * + * .google.protobuf.Timestamp last_update_time = 10; + * + * @return Whether the lastUpdateTime field is set. + */ + boolean hasLastUpdateTime(); + /** + * + * + *
+   * Last update time of this experiment.
+   * 
+ * + * .google.protobuf.Timestamp last_update_time = 10; + * + * @return The lastUpdateTime. + */ + com.google.protobuf.Timestamp getLastUpdateTime(); + /** + * + * + *
+   * Last update time of this experiment.
+   * 
+ * + * .google.protobuf.Timestamp last_update_time = 10; + */ + com.google.protobuf.TimestampOrBuilder getLastUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Maximum number of days to run the experiment.
+   * 
+ * + * .google.protobuf.Duration experiment_length = 11; + * + * @return Whether the experimentLength field is set. + */ + boolean hasExperimentLength(); + /** + * + * + *
+   * Maximum number of days to run the experiment.
+   * 
+ * + * .google.protobuf.Duration experiment_length = 11; + * + * @return The experimentLength. + */ + com.google.protobuf.Duration getExperimentLength(); + /** + * + * + *
+   * Maximum number of days to run the experiment.
+   * 
+ * + * .google.protobuf.Duration experiment_length = 11; + */ + com.google.protobuf.DurationOrBuilder getExperimentLengthOrBuilder(); + + /** + * + * + *
+   * The history of updates to the experiment variants.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; + */ + java.util.List getVariantsHistoryList(); + /** + * + * + *
+   * The history of updates to the experiment variants.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; + */ + com.google.cloud.dialogflow.cx.v3.VariantsHistory getVariantsHistory(int index); + /** + * + * + *
+   * The history of updates to the experiment variants.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; + */ + int getVariantsHistoryCount(); + /** + * + * + *
+   * The history of updates to the experiment variants.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; + */ + java.util.List + getVariantsHistoryOrBuilderList(); + /** + * + * + *
+   * The history of updates to the experiment variants.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; + */ + com.google.cloud.dialogflow.cx.v3.VariantsHistoryOrBuilder getVariantsHistoryOrBuilder(int index); +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentProto.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentProto.java new file mode 100644 index 000000000..44437e444 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentProto.java @@ -0,0 +1,433 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/experiment.proto + +package com.google.cloud.dialogflow.cx.v3; + +public final class ExperimentProto { + private ExperimentProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_Experiment_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_Experiment_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_Experiment_Definition_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_Experiment_Definition_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_ConfidenceInterval_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_ConfidenceInterval_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_Metric_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_Metric_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_VersionMetrics_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_VersionMetrics_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_VersionVariants_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_VersionVariants_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_VersionVariants_Variant_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_VersionVariants_Variant_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_VariantsHistory_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_VariantsHistory_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_ListExperimentsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_ListExperimentsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_ListExperimentsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_ListExperimentsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_GetExperimentRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_GetExperimentRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_CreateExperimentRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_CreateExperimentRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_UpdateExperimentRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_UpdateExperimentRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_DeleteExperimentRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_DeleteExperimentRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_StartExperimentRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_StartExperimentRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_StopExperimentRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_StopExperimentRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n.google/cloud/dialogflow/cx/v3/experime" + + "nt.proto\022\035google.cloud.dialogflow.cx.v3\032" + + "\034google/api/annotations.proto\032\027google/ap" + + "i/client.proto\032\037google/api/field_behavio" + + "r.proto\032\031google/api/resource.proto\032\036goog" + + "le/protobuf/duration.proto\032\033google/proto" + + "buf/empty.proto\032 google/protobuf/field_m" + + "ask.proto\032\037google/protobuf/timestamp.pro" + + "to\"\275\017\n\nExperiment\022\014\n\004name\030\001 \001(\t\022\031\n\014displ" + + "ay_name\030\002 \001(\tB\003\340A\002\022\023\n\013description\030\003 \001(\t\022" + + ">\n\005state\030\004 \001(\0162/.google.cloud.dialogflow" + + ".cx.v3.Experiment.State\022H\n\ndefinition\030\005 " + + "\001(\01324.google.cloud.dialogflow.cx.v3.Expe" + + "riment.Definition\022@\n\006result\030\006 \001(\01320.goog" + + "le.cloud.dialogflow.cx.v3.Experiment.Res" + + "ult\022/\n\013create_time\030\007 \001(\0132\032.google.protob" + + "uf.Timestamp\022.\n\nstart_time\030\010 \001(\0132\032.googl" + + "e.protobuf.Timestamp\022,\n\010end_time\030\t \001(\0132\032" + + ".google.protobuf.Timestamp\0224\n\020last_updat" + + "e_time\030\n \001(\0132\032.google.protobuf.Timestamp" + + "\0224\n\021experiment_length\030\013 \001(\0132\031.google.pro" + + "tobuf.Duration\022H\n\020variants_history\030\014 \003(\013" + + "2..google.cloud.dialogflow.cx.v3.Variant" + + "sHistory\032w\n\nDefinition\022\021\n\tcondition\030\001 \001(" + + "\t\022J\n\020version_variants\030\002 \001(\0132..google.clo" + + "ud.dialogflow.cx.v3.VersionVariantsH\000B\n\n" + + "\010variants\032\213\010\n\006Result\022X\n\017version_metrics\030" + + "\001 \003(\0132?.google.cloud.dialogflow.cx.v3.Ex" + + "periment.Result.VersionMetrics\0224\n\020last_u" + + "pdate_time\030\002 \001(\0132\032.google.protobuf.Times" + + "tamp\032g\n\022ConfidenceInterval\022\030\n\020confidence" + + "_level\030\001 \001(\001\022\r\n\005ratio\030\002 \001(\001\022\023\n\013lower_bou" + + "nd\030\003 \001(\001\022\023\n\013upper_bound\030\004 \001(\001\032\260\002\n\006Metric" + + "\022I\n\004type\030\001 \001(\0162;.google.cloud.dialogflow" + + ".cx.v3.Experiment.Result.MetricType\022N\n\nc" + + "ount_type\030\005 \001(\0162:.google.cloud.dialogflo" + + "w.cx.v3.Experiment.Result.CountType\022\017\n\005r" + + "atio\030\002 \001(\001H\000\022\017\n\005count\030\004 \001(\001H\000\022`\n\023confide" + + "nce_interval\030\003 \001(\0132C.google.cloud.dialog" + + "flow.cx.v3.Experiment.Result.ConfidenceI" + + "ntervalB\007\n\005value\032\252\001\n\016VersionMetrics\0227\n\007v" + + "ersion\030\001 \001(\tB&\372A#\n!dialogflow.googleapis" + + ".com/Version\022H\n\007metrics\030\002 \003(\01327.google.c" + + "loud.dialogflow.cx.v3.Experiment.Result." + + "Metric\022\025\n\rsession_count\030\003 \001(\005\"\266\001\n\nMetric" + + "Type\022\026\n\022METRIC_UNSPECIFIED\020\000\022&\n\"CONTAINE" + + "D_SESSION_NO_CALLBACK_RATE\020\001\022\033\n\027LIVE_AGE" + + "NT_HANDOFF_RATE\020\002\022\031\n\025CALLBACK_SESSION_RA" + + "TE\020\003\022\032\n\026ABANDONED_SESSION_RATE\020\004\022\024\n\020SESS" + + "ION_END_RATE\020\005\"o\n\tCountType\022\032\n\026COUNT_TYP" + + "E_UNSPECIFIED\020\000\022\030\n\024TOTAL_NO_MATCH_COUNT\020" + + "\001\022\024\n\020TOTAL_TURN_COUNT\020\002\022\026\n\022AVERAGE_TURN_" + + "COUNT\020\003\"@\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022" + + "\t\n\005DRAFT\020\001\022\013\n\007RUNNING\020\002\022\010\n\004DONE\020\003:\226\001\352A\222\001" + + "\n$dialogflow.googleapis.com/Experiment\022j" + + "projects/{project}/locations/{location}/" + + "agents/{agent}/environments/{environment" + + "}/experiments/{experiment}\"\255\001\n\017VersionVa" + + "riants\022H\n\010variants\030\001 \003(\01326.google.cloud." + + "dialogflow.cx.v3.VersionVariants.Variant" + + "\032P\n\007Variant\022\017\n\007version\030\001 \001(\t\022\032\n\022traffic_" + + "allocation\030\002 \001(\002\022\030\n\020is_control_group\030\003 \001" + + "(\010\"\232\001\n\017VariantsHistory\022J\n\020version_varian" + + "ts\030\001 \001(\0132..google.cloud.dialogflow.cx.v3" + + ".VersionVariantsH\000\022/\n\013update_time\030\002 \001(\0132" + + "\032.google.protobuf.TimestampB\n\n\010variants\"" + + "}\n\026ListExperimentsRequest\022<\n\006parent\030\001 \001(" + + "\tB,\340A\002\372A&\022$dialogflow.googleapis.com/Exp" + + "eriment\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token" + + "\030\003 \001(\t\"r\n\027ListExperimentsResponse\022>\n\013exp" + + "eriments\030\001 \003(\0132).google.cloud.dialogflow" + + ".cx.v3.Experiment\022\027\n\017next_page_token\030\002 \001" + + "(\t\"R\n\024GetExperimentRequest\022:\n\004name\030\001 \001(\t" + + "B,\340A\002\372A&\n$dialogflow.googleapis.com/Expe" + + "riment\"\233\001\n\027CreateExperimentRequest\022<\n\006pa" + + "rent\030\001 \001(\tB,\340A\002\372A&\022$dialogflow.googleapi" + + "s.com/Experiment\022B\n\nexperiment\030\002 \001(\0132).g" + + "oogle.cloud.dialogflow.cx.v3.ExperimentB" + + "\003\340A\002\"\223\001\n\027UpdateExperimentRequest\022B\n\nexpe" + + "riment\030\001 \001(\0132).google.cloud.dialogflow.c" + + "x.v3.ExperimentB\003\340A\002\0224\n\013update_mask\030\002 \001(" + + "\0132\032.google.protobuf.FieldMaskB\003\340A\002\"U\n\027De" + + "leteExperimentRequest\022:\n\004name\030\001 \001(\tB,\340A\002" + + "\372A&\n$dialogflow.googleapis.com/Experimen" + + "t\"T\n\026StartExperimentRequest\022:\n\004name\030\001 \001(" + + "\tB,\340A\002\372A&\n$dialogflow.googleapis.com/Exp" + + "eriment\"S\n\025StopExperimentRequest\022:\n\004name" + + "\030\001 \001(\tB,\340A\002\372A&\n$dialogflow.googleapis.co" + + "m/Experiment2\370\014\n\013Experiments\022\332\001\n\017ListExp" + + "eriments\0225.google.cloud.dialogflow.cx.v3" + + ".ListExperimentsRequest\0326.google.cloud.d" + + "ialogflow.cx.v3.ListExperimentsResponse\"" + + "X\202\323\344\223\002I\022G/v3/{parent=projects/*/location" + + "s/*/agents/*/environments/*}/experiments" + + "\332A\006parent\022\307\001\n\rGetExperiment\0223.google.clo" + + "ud.dialogflow.cx.v3.GetExperimentRequest" + + "\032).google.cloud.dialogflow.cx.v3.Experim" + + "ent\"V\202\323\344\223\002I\022G/v3/{name=projects/*/locati" + + "ons/*/agents/*/environments/*/experiment" + + "s/*}\332A\004name\022\346\001\n\020CreateExperiment\0226.googl" + + "e.cloud.dialogflow.cx.v3.CreateExperimen" + + "tRequest\032).google.cloud.dialogflow.cx.v3" + + ".Experiment\"o\202\323\344\223\002U\"G/v3/{parent=project" + + "s/*/locations/*/agents/*/environments/*}" + + "/experiments:\nexperiment\332A\021parent,experi" + + "ment\022\366\001\n\020UpdateExperiment\0226.google.cloud" + + ".dialogflow.cx.v3.UpdateExperimentReques" + + "t\032).google.cloud.dialogflow.cx.v3.Experi" + + "ment\"\177\202\323\344\223\002`2R/v3/{experiment.name=proje" + + "cts/*/locations/*/agents/*/environments/" + + "*/experiments/*}:\nexperiment\332A\026experimen" + + "t,update_mask\022\272\001\n\020DeleteExperiment\0226.goo" + + "gle.cloud.dialogflow.cx.v3.DeleteExperim" + + "entRequest\032\026.google.protobuf.Empty\"V\202\323\344\223" + + "\002I*G/v3/{name=projects/*/locations/*/age" + + "nts/*/environments/*/experiments/*}\332A\004na" + + "me\022\324\001\n\017StartExperiment\0225.google.cloud.di" + + "alogflow.cx.v3.StartExperimentRequest\032)." + + "google.cloud.dialogflow.cx.v3.Experiment" + + "\"_\202\323\344\223\002R\"M/v3/{name=projects/*/locations" + + "/*/agents/*/environments/*/experiments/*" + + "}:start:\001*\332A\004name\022\321\001\n\016StopExperiment\0224.g" + + "oogle.cloud.dialogflow.cx.v3.StopExperim" + + "entRequest\032).google.cloud.dialogflow.cx." + + "v3.Experiment\"^\202\323\344\223\002Q\"L/v3/{name=project" + + "s/*/locations/*/agents/*/environments/*/" + + "experiments/*}:stop:\001*\332A\004name\032x\312A\031dialog" + + "flow.googleapis.com\322AYhttps://www.google" + + "apis.com/auth/cloud-platform,https://www" + + ".googleapis.com/auth/dialogflowB\237\001\n!com." + + "google.cloud.dialogflow.cx.v3B\017Experimen" + + "tProtoP\001Z?google.golang.org/genproto/goo" + + "gleapis/cloud/dialogflow/cx/v3;cx\370\001\001\242\002\002D" + + "F\252\002\035Google.Cloud.Dialogflow.Cx.V3b\006proto" + + "3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.DurationProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_dialogflow_cx_v3_Experiment_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_dialogflow_cx_v3_Experiment_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_Experiment_descriptor, + new java.lang.String[] { + "Name", + "DisplayName", + "Description", + "State", + "Definition", + "Result", + "CreateTime", + "StartTime", + "EndTime", + "LastUpdateTime", + "ExperimentLength", + "VariantsHistory", + }); + internal_static_google_cloud_dialogflow_cx_v3_Experiment_Definition_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_Experiment_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_dialogflow_cx_v3_Experiment_Definition_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_Experiment_Definition_descriptor, + new java.lang.String[] { + "Condition", "VersionVariants", "Variants", + }); + internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_Experiment_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_descriptor, + new java.lang.String[] { + "VersionMetrics", "LastUpdateTime", + }); + internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_ConfidenceInterval_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_ConfidenceInterval_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_ConfidenceInterval_descriptor, + new java.lang.String[] { + "ConfidenceLevel", "Ratio", "LowerBound", "UpperBound", + }); + internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_Metric_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_Metric_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_Metric_descriptor, + new java.lang.String[] { + "Type", "CountType", "Ratio", "Count", "ConfidenceInterval", "Value", + }); + internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_VersionMetrics_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_VersionMetrics_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_Experiment_Result_VersionMetrics_descriptor, + new java.lang.String[] { + "Version", "Metrics", "SessionCount", + }); + internal_static_google_cloud_dialogflow_cx_v3_VersionVariants_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_dialogflow_cx_v3_VersionVariants_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_VersionVariants_descriptor, + new java.lang.String[] { + "Variants", + }); + internal_static_google_cloud_dialogflow_cx_v3_VersionVariants_Variant_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_VersionVariants_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_dialogflow_cx_v3_VersionVariants_Variant_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_VersionVariants_Variant_descriptor, + new java.lang.String[] { + "Version", "TrafficAllocation", "IsControlGroup", + }); + internal_static_google_cloud_dialogflow_cx_v3_VariantsHistory_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_dialogflow_cx_v3_VariantsHistory_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_VariantsHistory_descriptor, + new java.lang.String[] { + "VersionVariants", "UpdateTime", "Variants", + }); + internal_static_google_cloud_dialogflow_cx_v3_ListExperimentsRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_dialogflow_cx_v3_ListExperimentsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_ListExperimentsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_cloud_dialogflow_cx_v3_ListExperimentsResponse_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_dialogflow_cx_v3_ListExperimentsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_ListExperimentsResponse_descriptor, + new java.lang.String[] { + "Experiments", "NextPageToken", + }); + internal_static_google_cloud_dialogflow_cx_v3_GetExperimentRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_dialogflow_cx_v3_GetExperimentRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_GetExperimentRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_dialogflow_cx_v3_CreateExperimentRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_dialogflow_cx_v3_CreateExperimentRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_CreateExperimentRequest_descriptor, + new java.lang.String[] { + "Parent", "Experiment", + }); + internal_static_google_cloud_dialogflow_cx_v3_UpdateExperimentRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_dialogflow_cx_v3_UpdateExperimentRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_UpdateExperimentRequest_descriptor, + new java.lang.String[] { + "Experiment", "UpdateMask", + }); + internal_static_google_cloud_dialogflow_cx_v3_DeleteExperimentRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_dialogflow_cx_v3_DeleteExperimentRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_DeleteExperimentRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_dialogflow_cx_v3_StartExperimentRequest_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_dialogflow_cx_v3_StartExperimentRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_StartExperimentRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_dialogflow_cx_v3_StopExperimentRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_dialogflow_cx_v3_StopExperimentRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_StopExperimentRequest_descriptor, + new java.lang.String[] { + "Name", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.DurationProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Form.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Form.java index 08fb41e92..5ad0d80ad 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Form.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Form.java @@ -308,9 +308,9 @@ public interface ParameterOrBuilder * * *
-     * Indicates whether the parameter content should be redacted in text and
-     * audio. If the flag is set to true, the parameter content will be replaced
-     * by parameter name in both request and response.
+     * 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.
@@ -2885,9 +2885,9 @@ public com.google.protobuf.ValueOrBuilder getDefaultValueOrBuilder() {
      *
      *
      * 
-     * Indicates whether the parameter content should be redacted in text and
-     * audio. If the flag is set to true, the parameter content will be replaced
-     * by parameter name in both request and response.
+     * 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.
@@ -4109,9 +4109,9 @@ public com.google.protobuf.ValueOrBuilder getDefaultValueOrBuilder() {
        *
        *
        * 
-       * Indicates whether the parameter content should be redacted in text and
-       * audio. If the flag is set to true, the parameter content will be replaced
-       * by parameter name in both request and response.
+       * 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.
@@ -4129,9 +4129,9 @@ public boolean getRedact() {
        *
        *
        * 
-       * Indicates whether the parameter content should be redacted in text and
-       * audio. If the flag is set to true, the parameter content will be replaced
-       * by parameter name in both request and response.
+       * 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.
@@ -4152,9 +4152,9 @@ public Builder setRedact(boolean value) {
        *
        *
        * 
-       * Indicates whether the parameter content should be redacted in text and
-       * audio. If the flag is set to true, the parameter content will be replaced
-       * by parameter name in both request and response.
+       * 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.
diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetExperimentRequest.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetExperimentRequest.java
new file mode 100644
index 000000000..5a7f0cdee
--- /dev/null
+++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetExperimentRequest.java
@@ -0,0 +1,665 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by the protocol buffer compiler.  DO NOT EDIT!
+// source: google/cloud/dialogflow/cx/v3/experiment.proto
+
+package com.google.cloud.dialogflow.cx.v3;
+
+/**
+ *
+ *
+ * 
+ * The request message for [Experiments.GetExperiment][google.cloud.dialogflow.cx.v3.Experiments.GetExperiment].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.GetExperimentRequest} + */ +public final class GetExperimentRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.GetExperimentRequest) + GetExperimentRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetExperimentRequest.newBuilder() to construct. + private GetExperimentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetExperimentRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetExperimentRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetExperimentRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_GetExperimentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_GetExperimentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.GetExperimentRequest.class, + com.google.cloud.dialogflow.cx.v3.GetExperimentRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment].
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment].
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.GetExperimentRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.GetExperimentRequest other = + (com.google.cloud.dialogflow.cx.v3.GetExperimentRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.GetExperimentRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.GetExperimentRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.GetExperimentRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.GetExperimentRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.GetExperimentRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.GetExperimentRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.GetExperimentRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.GetExperimentRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.GetExperimentRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.GetExperimentRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.GetExperimentRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.GetExperimentRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3.GetExperimentRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for [Experiments.GetExperiment][google.cloud.dialogflow.cx.v3.Experiments.GetExperiment].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.GetExperimentRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.GetExperimentRequest) + com.google.cloud.dialogflow.cx.v3.GetExperimentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_GetExperimentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_GetExperimentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.GetExperimentRequest.class, + com.google.cloud.dialogflow.cx.v3.GetExperimentRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.GetExperimentRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_GetExperimentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.GetExperimentRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.GetExperimentRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.GetExperimentRequest build() { + com.google.cloud.dialogflow.cx.v3.GetExperimentRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.GetExperimentRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3.GetExperimentRequest result = + new com.google.cloud.dialogflow.cx.v3.GetExperimentRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.GetExperimentRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.GetExperimentRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.GetExperimentRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3.GetExperimentRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.GetExperimentRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.GetExperimentRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment].
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment].
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment].
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment].
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment].
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.GetExperimentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.GetExperimentRequest) + private static final com.google.cloud.dialogflow.cx.v3.GetExperimentRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.GetExperimentRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3.GetExperimentRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetExperimentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetExperimentRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.GetExperimentRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetExperimentRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetExperimentRequestOrBuilder.java new file mode 100644 index 000000000..539db127a --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetExperimentRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/experiment.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface GetExperimentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.GetExperimentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment].
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment].
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Intent.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Intent.java index 24840390c..e24505e05 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Intent.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Intent.java @@ -2889,9 +2889,9 @@ public interface ParameterOrBuilder * * *
-     * Indicates whether the parameter content should be redacted in text and
-     * audio. If the flag is set to true, the parameter content will be replaced
-     * by parameter name in both request and response.
+     * 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.
@@ -3154,9 +3154,9 @@ public boolean getIsList() {
      *
      *
      * 
-     * Indicates whether the parameter content should be redacted in text and
-     * audio. If the flag is set to true, the parameter content will be replaced
-     * by parameter name in both request and response.
+     * 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.
@@ -3853,9 +3853,9 @@ public Builder clearIsList() {
        *
        *
        * 
-       * Indicates whether the parameter content should be redacted in text and
-       * audio. If the flag is set to true, the parameter content will be replaced
-       * by parameter name in both request and response.
+       * 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.
@@ -3873,9 +3873,9 @@ public boolean getRedact() {
        *
        *
        * 
-       * Indicates whether the parameter content should be redacted in text and
-       * audio. If the flag is set to true, the parameter content will be replaced
-       * by parameter name in both request and response.
+       * 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.
@@ -3896,9 +3896,9 @@ public Builder setRedact(boolean value) {
        *
        *
        * 
-       * Indicates whether the parameter content should be redacted in text and
-       * audio. If the flag is set to true, the parameter content will be replaced
-       * by parameter name in both request and response.
+       * 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.
diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListExperimentsRequest.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListExperimentsRequest.java
new file mode 100644
index 000000000..ab70e7930
--- /dev/null
+++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListExperimentsRequest.java
@@ -0,0 +1,938 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by the protocol buffer compiler.  DO NOT EDIT!
+// source: google/cloud/dialogflow/cx/v3/experiment.proto
+
+package com.google.cloud.dialogflow.cx.v3;
+
+/**
+ *
+ *
+ * 
+ * The request message for [Experiments.ListExperiments][google.cloud.dialogflow.cx.v3.Experiments.ListExperiments].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ListExperimentsRequest} + */ +public final class ListExperimentsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ListExperimentsRequest) + ListExperimentsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListExperimentsRequest.newBuilder() to construct. + private ListExperimentsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListExperimentsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListExperimentsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListExperimentsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: + { + pageSize_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_ListExperimentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_ListExperimentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest.class, + com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to list all environments for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to list all environments for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * The maximum number of items to return in a single page. By default 20 and
+   * at most 100.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * The next_page_token value returned from a previous list request.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The next_page_token value returned from a previous list request.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest other = + (com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for [Experiments.ListExperiments][google.cloud.dialogflow.cx.v3.Experiments.ListExperiments].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ListExperimentsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ListExperimentsRequest) + com.google.cloud.dialogflow.cx.v3.ListExperimentsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_ListExperimentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_ListExperimentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest.class, + com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_ListExperimentsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest build() { + com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest result = + new com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to list all environments for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to list all environments for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to list all environments for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to list all environments for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to list all environments for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of items to return in a single page. By default 20 and
+     * at most 100.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of items to return in a single page. By default 20 and
+     * at most 100.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of items to return in a single page. By default 20 and
+     * at most 100.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The next_page_token value returned from a previous list request.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The next_page_token value returned from a previous list request.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The next_page_token value returned from a previous list request.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The next_page_token value returned from a previous list request.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The next_page_token value returned from a previous list request.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.ListExperimentsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ListExperimentsRequest) + private static final com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListExperimentsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListExperimentsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListExperimentsRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListExperimentsRequestOrBuilder.java new file mode 100644 index 000000000..fc5ffe75b --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListExperimentsRequestOrBuilder.java @@ -0,0 +1,97 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/experiment.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface ListExperimentsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ListExperimentsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to list all environments for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to list all environments for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of items to return in a single page. By default 20 and
+   * at most 100.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The next_page_token value returned from a previous list request.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The next_page_token value returned from a previous list request.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListExperimentsResponse.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListExperimentsResponse.java new file mode 100644 index 000000000..a9458ea36 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListExperimentsResponse.java @@ -0,0 +1,1209 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/experiment.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The response message for [Experiments.ListExperiments][google.cloud.dialogflow.cx.v3.Experiments.ListExperiments].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ListExperimentsResponse} + */ +public final class ListExperimentsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ListExperimentsResponse) + ListExperimentsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListExperimentsResponse.newBuilder() to construct. + private ListExperimentsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListExperimentsResponse() { + experiments_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListExperimentsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListExperimentsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + experiments_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + experiments_.add( + input.readMessage( + com.google.cloud.dialogflow.cx.v3.Experiment.parser(), extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + experiments_ = java.util.Collections.unmodifiableList(experiments_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_ListExperimentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_ListExperimentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse.class, + com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse.Builder.class); + } + + public static final int EXPERIMENTS_FIELD_NUMBER = 1; + private java.util.List 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.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; + */ + @java.lang.Override + public java.util.List getExperimentsList() { + return 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.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; + */ + @java.lang.Override + public java.util.List + getExperimentsOrBuilderList() { + return 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.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; + */ + @java.lang.Override + public int getExperimentsCount() { + return experiments_.size(); + } + /** + * + * + *
+   * 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.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Experiment getExperiments(int index) { + return experiments_.get(index); + } + /** + * + * + *
+   * 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.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ExperimentOrBuilder getExperimentsOrBuilder(int index) { + return experiments_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < experiments_.size(); i++) { + output.writeMessage(1, experiments_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < experiments_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, experiments_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse other = + (com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse) obj; + + if (!getExperimentsList().equals(other.getExperimentsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getExperimentsCount() > 0) { + hash = (37 * hash) + EXPERIMENTS_FIELD_NUMBER; + hash = (53 * hash) + getExperimentsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The response message for [Experiments.ListExperiments][google.cloud.dialogflow.cx.v3.Experiments.ListExperiments].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ListExperimentsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ListExperimentsResponse) + com.google.cloud.dialogflow.cx.v3.ListExperimentsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_ListExperimentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_ListExperimentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse.class, + com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getExperimentsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (experimentsBuilder_ == null) { + experiments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + experimentsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_ListExperimentsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse build() { + com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse buildPartial() { + com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse result = + new com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse(this); + int from_bitField0_ = bitField0_; + if (experimentsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + experiments_ = java.util.Collections.unmodifiableList(experiments_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.experiments_ = experiments_; + } else { + result.experiments_ = experimentsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse other) { + if (other == com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse.getDefaultInstance()) + return this; + if (experimentsBuilder_ == null) { + if (!other.experiments_.isEmpty()) { + if (experiments_.isEmpty()) { + experiments_ = other.experiments_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureExperimentsIsMutable(); + experiments_.addAll(other.experiments_); + } + onChanged(); + } + } else { + if (!other.experiments_.isEmpty()) { + if (experimentsBuilder_.isEmpty()) { + experimentsBuilder_.dispose(); + experimentsBuilder_ = null; + experiments_ = other.experiments_; + bitField0_ = (bitField0_ & ~0x00000001); + experimentsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getExperimentsFieldBuilder() + : null; + } else { + experimentsBuilder_.addAllMessages(other.experiments_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List experiments_ = + java.util.Collections.emptyList(); + + private void ensureExperimentsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + experiments_ = + new java.util.ArrayList(experiments_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Experiment, + com.google.cloud.dialogflow.cx.v3.Experiment.Builder, + com.google.cloud.dialogflow.cx.v3.ExperimentOrBuilder> + experimentsBuilder_; + + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; + */ + public java.util.List getExperimentsList() { + if (experimentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(experiments_); + } else { + return experimentsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; + */ + public int getExperimentsCount() { + if (experimentsBuilder_ == null) { + return experiments_.size(); + } else { + return experimentsBuilder_.getCount(); + } + } + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; + */ + public com.google.cloud.dialogflow.cx.v3.Experiment getExperiments(int index) { + if (experimentsBuilder_ == null) { + return experiments_.get(index); + } else { + return experimentsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; + */ + public Builder setExperiments(int index, com.google.cloud.dialogflow.cx.v3.Experiment value) { + if (experimentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExperimentsIsMutable(); + experiments_.set(index, value); + onChanged(); + } else { + experimentsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; + */ + public Builder setExperiments( + int index, com.google.cloud.dialogflow.cx.v3.Experiment.Builder builderForValue) { + if (experimentsBuilder_ == null) { + ensureExperimentsIsMutable(); + experiments_.set(index, builderForValue.build()); + onChanged(); + } else { + experimentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; + */ + public Builder addExperiments(com.google.cloud.dialogflow.cx.v3.Experiment value) { + if (experimentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExperimentsIsMutable(); + experiments_.add(value); + onChanged(); + } else { + experimentsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; + */ + public Builder addExperiments(int index, com.google.cloud.dialogflow.cx.v3.Experiment value) { + if (experimentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExperimentsIsMutable(); + experiments_.add(index, value); + onChanged(); + } else { + experimentsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; + */ + public Builder addExperiments( + com.google.cloud.dialogflow.cx.v3.Experiment.Builder builderForValue) { + if (experimentsBuilder_ == null) { + ensureExperimentsIsMutable(); + experiments_.add(builderForValue.build()); + onChanged(); + } else { + experimentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; + */ + public Builder addExperiments( + int index, com.google.cloud.dialogflow.cx.v3.Experiment.Builder builderForValue) { + if (experimentsBuilder_ == null) { + ensureExperimentsIsMutable(); + experiments_.add(index, builderForValue.build()); + onChanged(); + } else { + experimentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; + */ + public Builder addAllExperiments( + java.lang.Iterable values) { + if (experimentsBuilder_ == null) { + ensureExperimentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, experiments_); + onChanged(); + } else { + experimentsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; + */ + public Builder clearExperiments() { + if (experimentsBuilder_ == null) { + experiments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + experimentsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; + */ + public Builder removeExperiments(int index) { + if (experimentsBuilder_ == null) { + ensureExperimentsIsMutable(); + experiments_.remove(index); + onChanged(); + } else { + experimentsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; + */ + public com.google.cloud.dialogflow.cx.v3.Experiment.Builder getExperimentsBuilder(int index) { + return getExperimentsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; + */ + public com.google.cloud.dialogflow.cx.v3.ExperimentOrBuilder getExperimentsOrBuilder( + int index) { + if (experimentsBuilder_ == null) { + return experiments_.get(index); + } else { + return experimentsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; + */ + public java.util.List + getExperimentsOrBuilderList() { + if (experimentsBuilder_ != null) { + return experimentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(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.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; + */ + public com.google.cloud.dialogflow.cx.v3.Experiment.Builder addExperimentsBuilder() { + return getExperimentsFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3.Experiment.getDefaultInstance()); + } + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; + */ + public com.google.cloud.dialogflow.cx.v3.Experiment.Builder addExperimentsBuilder(int index) { + return getExperimentsFieldBuilder() + .addBuilder(index, com.google.cloud.dialogflow.cx.v3.Experiment.getDefaultInstance()); + } + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; + */ + public java.util.List + getExperimentsBuilderList() { + return getExperimentsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Experiment, + com.google.cloud.dialogflow.cx.v3.Experiment.Builder, + com.google.cloud.dialogflow.cx.v3.ExperimentOrBuilder> + getExperimentsFieldBuilder() { + if (experimentsBuilder_ == null) { + experimentsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Experiment, + com.google.cloud.dialogflow.cx.v3.Experiment.Builder, + com.google.cloud.dialogflow.cx.v3.ExperimentOrBuilder>( + experiments_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + experiments_ = null; + } + return experimentsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.ListExperimentsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ListExperimentsResponse) + private static final com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse(); + } + + public static com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListExperimentsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListExperimentsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListExperimentsResponseOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListExperimentsResponseOrBuilder.java new file mode 100644 index 000000000..38837a57b --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListExperimentsResponseOrBuilder.java @@ -0,0 +1,119 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/experiment.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface ListExperimentsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ListExperimentsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * 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.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; + */ + java.util.List getExperimentsList(); + /** + * + * + *
+   * 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.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; + */ + com.google.cloud.dialogflow.cx.v3.Experiment getExperiments(int index); + /** + * + * + *
+   * 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.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; + */ + int getExperimentsCount(); + /** + * + * + *
+   * 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.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; + */ + java.util.List + getExperimentsOrBuilderList(); + /** + * + * + *
+   * 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.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; + */ + com.google.cloud.dialogflow.cx.v3.ExperimentOrBuilder getExperimentsOrBuilder(int index); + + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessage.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessage.java index 9e7fe3b1f..08cc3a086 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessage.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessage.java @@ -3889,37 +3889,81 @@ public com.google.protobuf.Parser getParserForType() { } } - public interface EndInteractionOrBuilder + public interface PlayAudioOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction) - com.google.protobuf.MessageOrBuilder {} + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. URI of the audio clip. Dialogflow does not impose any validation on this
+     * value. It is specific to the client that reads it.
+     * 
+ * + * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The audioUri. + */ + java.lang.String getAudioUri(); + /** + * + * + *
+     * Required. URI of the audio clip. Dialogflow does not impose any validation on this
+     * value. It is specific to the client that reads it.
+     * 
+ * + * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for audioUri. + */ + com.google.protobuf.ByteString getAudioUriBytes(); + + /** + * + * + *
+     * 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.
+     * 
+ * + * bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The allowPlaybackInterruption. + */ + boolean getAllowPlaybackInterruption(); + } /** * * *
-   * Indicates that interaction with the Dialogflow agent has ended.
-   * This message is generated by Dialogflow only and not supposed to be
-   * defined by the user.
+   * Specifies an audio clip to be played by the client as part of the response.
    * 
* - * Protobuf type {@code google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction} + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio} */ - public static final class EndInteraction extends com.google.protobuf.GeneratedMessageV3 + public static final class PlayAudio extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction) - EndInteractionOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) + PlayAudioOrBuilder { private static final long serialVersionUID = 0L; - // Use EndInteraction.newBuilder() to construct. - private EndInteraction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use PlayAudio.newBuilder() to construct. + private PlayAudio(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private EndInteraction() {} + private PlayAudio() { + audioUri_ = ""; + } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new EndInteraction(); + return new PlayAudio(); } @java.lang.Override @@ -3927,7 +3971,7 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private EndInteraction( + private PlayAudio( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -3945,6 +3989,18 @@ private EndInteraction( case 0: done = true; break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + audioUri_ = s; + break; + } + case 16: + { + allowPlaybackInterruption_ = input.readBool(); + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -3966,17 +4022,89 @@ private EndInteraction( public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_EndInteraction_descriptor; + .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_EndInteraction_fieldAccessorTable + .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction.class, - com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction.Builder.class); + com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.class, + com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.Builder.class); + } + + public static final int AUDIO_URI_FIELD_NUMBER = 1; + private volatile java.lang.Object audioUri_; + /** + * + * + *
+     * Required. URI of the audio clip. Dialogflow does not impose any validation on this
+     * value. It is specific to the client that reads it.
+     * 
+ * + * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The audioUri. + */ + @java.lang.Override + public java.lang.String getAudioUri() { + java.lang.Object ref = audioUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + audioUri_ = s; + return s; + } + } + /** + * + * + *
+     * Required. URI of the audio clip. Dialogflow does not impose any validation on this
+     * value. It is specific to the client that reads it.
+     * 
+ * + * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for audioUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAudioUriBytes() { + java.lang.Object ref = audioUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + audioUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ALLOW_PLAYBACK_INTERRUPTION_FIELD_NUMBER = 2; + private boolean allowPlaybackInterruption_; + /** + * + * + *
+     * 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.
+     * 
+ * + * bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The allowPlaybackInterruption. + */ + @java.lang.Override + public boolean getAllowPlaybackInterruption() { + return allowPlaybackInterruption_; } private byte memoizedIsInitialized = -1; @@ -3993,6 +4121,12 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getAudioUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, audioUri_); + } + if (allowPlaybackInterruption_ != false) { + output.writeBool(2, allowPlaybackInterruption_); + } unknownFields.writeTo(output); } @@ -4002,6 +4136,13 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; + if (!getAudioUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, audioUri_); + } + if (allowPlaybackInterruption_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(2, allowPlaybackInterruption_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -4012,12 +4153,14 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction)) { + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio)) { return super.equals(obj); } - com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction other = - (com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction) obj; + com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio other = + (com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) obj; + if (!getAudioUri().equals(other.getAudioUri())) return false; + if (getAllowPlaybackInterruption() != other.getAllowPlaybackInterruption()) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -4029,77 +4172,80 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + AUDIO_URI_FIELD_NUMBER; + hash = (53 * hash) + getAudioUri().hashCode(); + hash = (37 * hash) + ALLOW_PLAYBACK_INTERRUPTION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowPlaybackInterruption()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -4117,7 +4263,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction prototype) { + com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -4136,35 +4282,32 @@ protected Builder newBuilderForType( * * *
-     * Indicates that interaction with the Dialogflow agent has ended.
-     * This message is generated by Dialogflow only and not supposed to be
-     * defined by the user.
+     * Specifies an audio clip to be played by the client as part of the response.
      * 
* - * Protobuf type {@code google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction} + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction) - com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteractionOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) + com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudioOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_EndInteraction_descriptor; + .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_EndInteraction_fieldAccessorTable + .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction.class, - com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction.Builder.class); + com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.class, + com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.Builder.class); } - // Construct using - // com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction.newBuilder() + // Construct using com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -4181,25 +4324,28 @@ private void maybeForceBuilderInitialization() { @java.lang.Override public Builder clear() { super.clear(); + audioUri_ = ""; + + allowPlaybackInterruption_ = false; + return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_EndInteraction_descriptor; + .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_descriptor; } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio getDefaultInstanceForType() { - return com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction - .getDefaultInstance(); + return com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.getDefaultInstance(); } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction build() { - com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction result = buildPartial(); + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio build() { + com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -4207,9 +4353,11 @@ public com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction build() } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction buildPartial() { - com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction result = - new com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction(this); + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio buildPartial() { + com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio result = + new com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio(this); + result.audioUri_ = audioUri_; + result.allowPlaybackInterruption_ = allowPlaybackInterruption_; onBuilt(); return result; } @@ -4251,20 +4399,25 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction) { - return mergeFrom( - (com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction) other); + if (other instanceof com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom( - com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction other) { + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio other) { if (other - == com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction - .getDefaultInstance()) return this; + == com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.getDefaultInstance()) + return this; + if (!other.getAudioUri().isEmpty()) { + audioUri_ = other.audioUri_; + onChanged(); + } + if (other.getAllowPlaybackInterruption() != false) { + setAllowPlaybackInterruption(other.getAllowPlaybackInterruption()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -4280,12 +4433,12 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction parsedMessage = null; + com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = - (com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction) + (com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { @@ -4296,6 +4449,178 @@ public Builder mergeFrom( return this; } + private java.lang.Object audioUri_ = ""; + /** + * + * + *
+       * Required. URI of the audio clip. Dialogflow does not impose any validation on this
+       * value. It is specific to the client that reads it.
+       * 
+ * + * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The audioUri. + */ + public java.lang.String getAudioUri() { + java.lang.Object ref = audioUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + audioUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. URI of the audio clip. Dialogflow does not impose any validation on this
+       * value. It is specific to the client that reads it.
+       * 
+ * + * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for audioUri. + */ + public com.google.protobuf.ByteString getAudioUriBytes() { + java.lang.Object ref = audioUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + audioUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. URI of the audio clip. Dialogflow does not impose any validation on this
+       * value. It is specific to the client that reads it.
+       * 
+ * + * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The audioUri to set. + * @return This builder for chaining. + */ + public Builder setAudioUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + audioUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. URI of the audio clip. Dialogflow does not impose any validation on this
+       * value. It is specific to the client that reads it.
+       * 
+ * + * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearAudioUri() { + + audioUri_ = getDefaultInstance().getAudioUri(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. URI of the audio clip. Dialogflow does not impose any validation on this
+       * value. It is specific to the client that reads it.
+       * 
+ * + * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for audioUri to set. + * @return This builder for chaining. + */ + public Builder setAudioUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + audioUri_ = value; + onChanged(); + return this; + } + + private boolean allowPlaybackInterruption_; + /** + * + * + *
+       * 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.
+       * 
+ * + * bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The allowPlaybackInterruption. + */ + @java.lang.Override + public boolean getAllowPlaybackInterruption() { + return allowPlaybackInterruption_; + } + /** + * + * + *
+       * 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.
+       * 
+ * + * bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The allowPlaybackInterruption to set. + * @return This builder for chaining. + */ + public Builder setAllowPlaybackInterruption(boolean value) { + + allowPlaybackInterruption_ = value; + onChanged(); + 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.
+       * 
+ * + * bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearAllowPlaybackInterruption() { + + allowPlaybackInterruption_ = false; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -4308,124 +4633,78 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction) + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) } - // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction) - private static final com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) + private static final com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction(); + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio(); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction - getDefaultInstance() { + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public EndInteraction parsePartialFrom( + public PlayAudio parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new EndInteraction(input, extensionRegistry); + return new PlayAudio(input, extensionRegistry); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction - getDefaultInstanceForType() { + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface PlayAudioOrBuilder + public interface EndInteractionOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Required. URI of the audio clip. Dialogflow does not impose any validation on this
-     * value. It is specific to the client that reads it.
-     * 
- * - * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The audioUri. - */ - java.lang.String getAudioUri(); - /** - * - * - *
-     * Required. URI of the audio clip. Dialogflow does not impose any validation on this
-     * value. It is specific to the client that reads it.
-     * 
- * - * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for audioUri. - */ - com.google.protobuf.ByteString getAudioUriBytes(); - - /** - * - * - *
-     * 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.
-     * 
- * - * bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The allowPlaybackInterruption. - */ - boolean getAllowPlaybackInterruption(); - } + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction) + com.google.protobuf.MessageOrBuilder {} /** * * *
-   * Specifies an audio clip to be played by the client as part of the response.
+   * Indicates that interaction with the Dialogflow agent has ended.
+   * This message is generated by Dialogflow only and not supposed to be
+   * defined by the user.
    * 
* - * Protobuf type {@code google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio} + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction} */ - public static final class PlayAudio extends com.google.protobuf.GeneratedMessageV3 + public static final class EndInteraction extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) - PlayAudioOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction) + EndInteractionOrBuilder { private static final long serialVersionUID = 0L; - // Use PlayAudio.newBuilder() to construct. - private PlayAudio(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use EndInteraction.newBuilder() to construct. + private EndInteraction(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private PlayAudio() { - audioUri_ = ""; - } + private EndInteraction() {} @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new PlayAudio(); + return new EndInteraction(); } @java.lang.Override @@ -4433,7 +4712,7 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PlayAudio( + private EndInteraction( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -4451,18 +4730,6 @@ private PlayAudio( case 0: done = true; break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - audioUri_ = s; - break; - } - case 16: - { - allowPlaybackInterruption_ = input.readBool(); - break; - } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -4484,89 +4751,17 @@ private PlayAudio( public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_descriptor; + .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_EndInteraction_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_fieldAccessorTable + .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_EndInteraction_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.class, - com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.Builder.class); - } - - public static final int AUDIO_URI_FIELD_NUMBER = 1; - private volatile java.lang.Object audioUri_; - /** - * - * - *
-     * Required. URI of the audio clip. Dialogflow does not impose any validation on this
-     * value. It is specific to the client that reads it.
-     * 
- * - * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The audioUri. - */ - @java.lang.Override - public java.lang.String getAudioUri() { - java.lang.Object ref = audioUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - audioUri_ = s; - return s; - } - } - /** - * - * - *
-     * Required. URI of the audio clip. Dialogflow does not impose any validation on this
-     * value. It is specific to the client that reads it.
-     * 
- * - * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for audioUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getAudioUriBytes() { - java.lang.Object ref = audioUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - audioUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ALLOW_PLAYBACK_INTERRUPTION_FIELD_NUMBER = 2; - private boolean allowPlaybackInterruption_; - /** - * - * - *
-     * 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.
-     * 
- * - * bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The allowPlaybackInterruption. - */ - @java.lang.Override - public boolean getAllowPlaybackInterruption() { - return allowPlaybackInterruption_; + com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction.class, + com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction.Builder.class); } private byte memoizedIsInitialized = -1; @@ -4583,12 +4778,6 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getAudioUriBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, audioUri_); - } - if (allowPlaybackInterruption_ != false) { - output.writeBool(2, allowPlaybackInterruption_); - } unknownFields.writeTo(output); } @@ -4598,13 +4787,6 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getAudioUriBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, audioUri_); - } - if (allowPlaybackInterruption_ != false) { - size += - com.google.protobuf.CodedOutputStream.computeBoolSize(2, allowPlaybackInterruption_); - } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -4615,14 +4797,12 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio)) { + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction)) { return super.equals(obj); } - com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio other = - (com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) obj; + com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction other = + (com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction) obj; - if (!getAudioUri().equals(other.getAudioUri())) return false; - if (getAllowPlaybackInterruption() != other.getAllowPlaybackInterruption()) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -4634,80 +4814,77 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + AUDIO_URI_FIELD_NUMBER; - hash = (53 * hash) + getAudioUri().hashCode(); - hash = (37 * hash) + ALLOW_PLAYBACK_INTERRUPTION_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowPlaybackInterruption()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -4725,7 +4902,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio prototype) { + com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -4744,32 +4921,35 @@ protected Builder newBuilderForType( * * *
-     * Specifies an audio clip to be played by the client as part of the response.
+     * Indicates that interaction with the Dialogflow agent has ended.
+     * This message is generated by Dialogflow only and not supposed to be
+     * defined by the user.
      * 
* - * Protobuf type {@code google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio} + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) - com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudioOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction) + com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteractionOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_descriptor; + .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_EndInteraction_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_fieldAccessorTable + .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_EndInteraction_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.class, - com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.Builder.class); + com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction.class, + com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction.Builder.class); } - // Construct using com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.newBuilder() + // Construct using + // com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -4786,28 +4966,25 @@ private void maybeForceBuilderInitialization() { @java.lang.Override public Builder clear() { super.clear(); - audioUri_ = ""; - - allowPlaybackInterruption_ = false; - return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_descriptor; + .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_EndInteraction_descriptor; } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction getDefaultInstanceForType() { - return com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.getDefaultInstance(); + return com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction + .getDefaultInstance(); } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio build() { - com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio result = buildPartial(); + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction build() { + com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -4815,11 +4992,9 @@ public com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio build() { } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio buildPartial() { - com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio result = - new com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio(this); - result.audioUri_ = audioUri_; - result.allowPlaybackInterruption_ = allowPlaybackInterruption_; + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction buildPartial() { + com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction result = + new com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction(this); onBuilt(); return result; } @@ -4861,25 +5036,20 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) { - return mergeFrom((com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) other); + if (other instanceof com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio other) { + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction other) { if (other - == com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.getDefaultInstance()) - return this; - if (!other.getAudioUri().isEmpty()) { - audioUri_ = other.audioUri_; - onChanged(); - } - if (other.getAllowPlaybackInterruption() != false) { - setAllowPlaybackInterruption(other.getAllowPlaybackInterruption()); - } + == com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction + .getDefaultInstance()) return this; this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -4895,12 +5065,12 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parsedMessage = null; + com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = - (com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) + (com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { @@ -4911,178 +5081,6 @@ public Builder mergeFrom( return this; } - private java.lang.Object audioUri_ = ""; - /** - * - * - *
-       * Required. URI of the audio clip. Dialogflow does not impose any validation on this
-       * value. It is specific to the client that reads it.
-       * 
- * - * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The audioUri. - */ - public java.lang.String getAudioUri() { - java.lang.Object ref = audioUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - audioUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-       * Required. URI of the audio clip. Dialogflow does not impose any validation on this
-       * value. It is specific to the client that reads it.
-       * 
- * - * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for audioUri. - */ - public com.google.protobuf.ByteString getAudioUriBytes() { - java.lang.Object ref = audioUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - audioUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-       * Required. URI of the audio clip. Dialogflow does not impose any validation on this
-       * value. It is specific to the client that reads it.
-       * 
- * - * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The audioUri to set. - * @return This builder for chaining. - */ - public Builder setAudioUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - audioUri_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Required. URI of the audio clip. Dialogflow does not impose any validation on this
-       * value. It is specific to the client that reads it.
-       * 
- * - * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearAudioUri() { - - audioUri_ = getDefaultInstance().getAudioUri(); - onChanged(); - return this; - } - /** - * - * - *
-       * Required. URI of the audio clip. Dialogflow does not impose any validation on this
-       * value. It is specific to the client that reads it.
-       * 
- * - * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for audioUri to set. - * @return This builder for chaining. - */ - public Builder setAudioUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - audioUri_ = value; - onChanged(); - return this; - } - - private boolean allowPlaybackInterruption_; - /** - * - * - *
-       * 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.
-       * 
- * - * bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The allowPlaybackInterruption. - */ - @java.lang.Override - public boolean getAllowPlaybackInterruption() { - return allowPlaybackInterruption_; - } - /** - * - * - *
-       * 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.
-       * 
- * - * bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The allowPlaybackInterruption to set. - * @return This builder for chaining. - */ - public Builder setAllowPlaybackInterruption(boolean value) { - - allowPlaybackInterruption_ = value; - onChanged(); - 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.
-       * 
- * - * bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearAllowPlaybackInterruption() { - - allowPlaybackInterruption_ = false; - onChanged(); - return this; - } - @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -5095,43 +5093,45 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction) } - // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) - private static final com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction) + private static final com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio(); + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction(); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio getDefaultInstance() { + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction + getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public PlayAudio parsePartialFrom( + public EndInteraction parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PlayAudio(input, extensionRegistry); + return new EndInteraction(input, extensionRegistry); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio getDefaultInstanceForType() { + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction + getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessageProto.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessageProto.java index 64f09b7b1..a629c1c90 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessageProto.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessageProto.java @@ -47,14 +47,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_OutputAudioText_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_OutputAudioText_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_EndInteraction_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_EndInteraction_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_EndInteraction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_EndInteraction_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -101,9 +101,9 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "gle.protobuf.Struct\032e\n\017OutputAudioText\022\016" + "\n\004text\030\001 \001(\tH\000\022\016\n\004ssml\030\002 \001(\tH\000\022(\n\033allow_" + "playback_interruption\030\003 \001(\010B\003\340A\003B\010\n\006sour" - + "ce\032\020\n\016EndInteraction\032M\n\tPlayAudio\022\026\n\taud" - + "io_uri\030\001 \001(\tB\003\340A\002\022(\n\033allow_playback_inte" - + "rruption\030\002 \001(\010B\003\340A\003\032\301\001\n\nMixedAudio\022S\n\010se" + + "ce\032M\n\tPlayAudio\022\026\n\taudio_uri\030\001 \001(\tB\003\340A\002\022" + + "(\n\033allow_playback_interruption\030\002 \001(\010B\003\340A" + + "\003\032\020\n\016EndInteraction\032\301\001\n\nMixedAudio\022S\n\010se" + "gments\030\001 \003(\0132A.google.cloud.dialogflow.c" + "x.v3.ResponseMessage.MixedAudio.Segment\032" + "^\n\007Segment\022\017\n\005audio\030\001 \001(\014H\000\022\r\n\003uri\030\002 \001(\t" @@ -179,24 +179,24 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Text", "Ssml", "AllowPlaybackInterruption", "Source", }); - internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_EndInteraction_descriptor = - internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_descriptor - .getNestedTypes() - .get(4); - internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_EndInteraction_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_EndInteraction_descriptor, - new java.lang.String[] {}); internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_descriptor = internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_descriptor .getNestedTypes() - .get(5); + .get(4); internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_descriptor, new java.lang.String[] { "AudioUri", "AllowPlaybackInterruption", }); + internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_EndInteraction_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_descriptor + .getNestedTypes() + .get(5); + internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_EndInteraction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_EndInteraction_descriptor, + new java.lang.String[] {}); internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_descriptor = internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_descriptor .getNestedTypes() diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StartExperimentRequest.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StartExperimentRequest.java new file mode 100644 index 000000000..9239e124f --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StartExperimentRequest.java @@ -0,0 +1,665 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/experiment.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The request message for [Experiments.StartExperiment][google.cloud.dialogflow.cx.v3.Experiments.StartExperiment].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.StartExperimentRequest} + */ +public final class StartExperimentRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.StartExperimentRequest) + StartExperimentRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use StartExperimentRequest.newBuilder() to construct. + private StartExperimentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private StartExperimentRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new StartExperimentRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private StartExperimentRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_StartExperimentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_StartExperimentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.StartExperimentRequest.class, + com.google.cloud.dialogflow.cx.v3.StartExperimentRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Resource name of the experiment to start.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Resource name of the experiment to start.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.StartExperimentRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.StartExperimentRequest other = + (com.google.cloud.dialogflow.cx.v3.StartExperimentRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.StartExperimentRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.StartExperimentRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.StartExperimentRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.StartExperimentRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.StartExperimentRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.StartExperimentRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.StartExperimentRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.StartExperimentRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.StartExperimentRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.StartExperimentRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.StartExperimentRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.StartExperimentRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3.StartExperimentRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for [Experiments.StartExperiment][google.cloud.dialogflow.cx.v3.Experiments.StartExperiment].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.StartExperimentRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.StartExperimentRequest) + com.google.cloud.dialogflow.cx.v3.StartExperimentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_StartExperimentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_StartExperimentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.StartExperimentRequest.class, + com.google.cloud.dialogflow.cx.v3.StartExperimentRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.StartExperimentRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_StartExperimentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.StartExperimentRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.StartExperimentRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.StartExperimentRequest build() { + com.google.cloud.dialogflow.cx.v3.StartExperimentRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.StartExperimentRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3.StartExperimentRequest result = + new com.google.cloud.dialogflow.cx.v3.StartExperimentRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.StartExperimentRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.StartExperimentRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.StartExperimentRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3.StartExperimentRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.StartExperimentRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.StartExperimentRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Resource name of the experiment to start.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Resource name of the experiment to start.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Resource name of the experiment to start.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Resource name of the experiment to start.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Resource name of the experiment to start.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.StartExperimentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.StartExperimentRequest) + private static final com.google.cloud.dialogflow.cx.v3.StartExperimentRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.StartExperimentRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3.StartExperimentRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StartExperimentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StartExperimentRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.StartExperimentRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StartExperimentRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StartExperimentRequestOrBuilder.java new file mode 100644 index 000000000..543e2dd5f --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StartExperimentRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/experiment.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface StartExperimentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.StartExperimentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Resource name of the experiment to start.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Resource name of the experiment to start.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StopExperimentRequest.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StopExperimentRequest.java new file mode 100644 index 000000000..bca0d3e01 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StopExperimentRequest.java @@ -0,0 +1,665 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/experiment.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The request message for [Experiments.StopExperiment][google.cloud.dialogflow.cx.v3.Experiments.StopExperiment].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.StopExperimentRequest} + */ +public final class StopExperimentRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.StopExperimentRequest) + StopExperimentRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use StopExperimentRequest.newBuilder() to construct. + private StopExperimentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private StopExperimentRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new StopExperimentRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private StopExperimentRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_StopExperimentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_StopExperimentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.StopExperimentRequest.class, + com.google.cloud.dialogflow.cx.v3.StopExperimentRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Resource name of the experiment to stop.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Resource name of the experiment to stop.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.StopExperimentRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.StopExperimentRequest other = + (com.google.cloud.dialogflow.cx.v3.StopExperimentRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.StopExperimentRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.StopExperimentRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.StopExperimentRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.StopExperimentRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.StopExperimentRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.StopExperimentRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.StopExperimentRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.StopExperimentRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.StopExperimentRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.StopExperimentRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.StopExperimentRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.StopExperimentRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3.StopExperimentRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for [Experiments.StopExperiment][google.cloud.dialogflow.cx.v3.Experiments.StopExperiment].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.StopExperimentRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.StopExperimentRequest) + com.google.cloud.dialogflow.cx.v3.StopExperimentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_StopExperimentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_StopExperimentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.StopExperimentRequest.class, + com.google.cloud.dialogflow.cx.v3.StopExperimentRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.StopExperimentRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_StopExperimentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.StopExperimentRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.StopExperimentRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.StopExperimentRequest build() { + com.google.cloud.dialogflow.cx.v3.StopExperimentRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.StopExperimentRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3.StopExperimentRequest result = + new com.google.cloud.dialogflow.cx.v3.StopExperimentRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.StopExperimentRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.StopExperimentRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.StopExperimentRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3.StopExperimentRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.StopExperimentRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.StopExperimentRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Resource name of the experiment to stop.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Resource name of the experiment to stop.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Resource name of the experiment to stop.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Resource name of the experiment to stop.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Resource name of the experiment to stop.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.StopExperimentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.StopExperimentRequest) + private static final com.google.cloud.dialogflow.cx.v3.StopExperimentRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.StopExperimentRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3.StopExperimentRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StopExperimentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StopExperimentRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.StopExperimentRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StopExperimentRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StopExperimentRequestOrBuilder.java new file mode 100644 index 000000000..263361f38 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StopExperimentRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/experiment.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface StopExperimentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.StopExperimentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Resource name of the experiment to stop.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Resource name of the experiment to stop.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseProto.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseProto.java index 424e8fa5b..c8a130bc0 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseProto.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseProto.java @@ -207,217 +207,217 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "tCaseResult:u\352Ar\n\"dialogflow.googleapis." + "com/TestCase\022Lprojects/{project}/locatio" + "ns/{location}/agents/{agent}/testCases/{" - + "test_case}\"\256\003\n\016TestCaseResult\022\014\n\004name\030\001 " - + "\001(\t\022B\n\013environment\030\002 \001(\tB-\340A\001\372A\'\n%dialog" - + "flow.googleapis.com/Environment\022K\n\022conve" - + "rsation_turns\030\003 \003(\0132/.google.cloud.dialo" - + "gflow.cx.v3.ConversationTurn\022>\n\013test_res" - + "ult\030\004 \001(\0162).google.cloud.dialogflow.cx.v" - + "3.TestResult\022-\n\ttest_time\030\005 \001(\0132\032.google" - + ".protobuf.Timestamp:\215\001\352A\211\001\n(dialogflow.g" - + "oogleapis.com/TestCaseResult\022]projects/{" - + "project}/locations/{location}/agents/{ag" - + "ent}/testCases/{test_case}/results/{resu" - + "lt}\"\\\n\nTestConfig\022\033\n\023tracking_parameters" - + "\030\001 \003(\t\0221\n\004flow\030\002 \001(\tB#\372A \n\036dialogflow.go" - + "ogleapis.com/Flow\"\234\006\n\020ConversationTurn\022M" - + "\n\nuser_input\030\001 \001(\01329.google.cloud.dialog" - + "flow.cx.v3.ConversationTurn.UserInput\022`\n" - + "\024virtual_agent_output\030\002 \001(\0132B.google.clo" - + "ud.dialogflow.cx.v3.ConversationTurn.Vir" - + "tualAgentOutput\032\227\001\n\tUserInput\0228\n\005input\030\005" - + " \001(\0132).google.cloud.dialogflow.cx.v3.Que" - + "ryInput\0224\n\023injected_parameters\030\002 \001(\0132\027.g" - + "oogle.protobuf.Struct\022\032\n\022is_webhook_enab" - + "led\030\003 \001(\010\032\274\003\n\022VirtualAgentOutput\0223\n\022sess" - + "ion_parameters\030\004 \001(\0132\027.google.protobuf.S" - + "truct\022J\n\013differences\030\005 \003(\01320.google.clou" - + "d.dialogflow.cx.v3.TestRunDifferenceB\003\340A" - + "\003\0228\n\017diagnostic_info\030\006 \001(\0132\027.google.prot" - + "obuf.StructB\006\340A\002\340A\004\022?\n\020triggered_intent\030" - + "\007 \001(\0132%.google.cloud.dialogflow.cx.v3.In" - + "tent\0229\n\014current_page\030\010 \001(\0132#.google.clou" - + "d.dialogflow.cx.v3.Page\022K\n\016text_response" - + "s\030\t \003(\01323.google.cloud.dialogflow.cx.v3." - + "ResponseMessage.Text\022\"\n\006status\030\n \001(\0132\022.g" - + "oogle.rpc.Status\"\315\001\n\021TestRunDifference\022G" - + "\n\004type\030\001 \001(\01629.google.cloud.dialogflow.c" - + "x.v3.TestRunDifference.DiffType\022\023\n\013descr" - + "iption\030\002 \001(\t\"Z\n\010DiffType\022\031\n\025DIFF_TYPE_UN" - + "SPECIFIED\020\000\022\n\n\006INTENT\020\001\022\010\n\004PAGE\020\002\022\016\n\nPAR" - + "AMETERS\020\003\022\r\n\tUTTERANCE\020\004\"\363\004\n\022TransitionC" - + "overage\022Q\n\013transitions\030\001 \003(\0132<.google.cl" - + "oud.dialogflow.cx.v3.TransitionCoverage." - + "Transition\022\026\n\016coverage_score\030\002 \001(\002\032\202\001\n\016T" - + "ransitionNode\0223\n\004page\030\001 \001(\0132#.google.clo" - + "ud.dialogflow.cx.v3.PageH\000\0223\n\004flow\030\002 \001(\013" - + "2#.google.cloud.dialogflow.cx.v3.FlowH\000B" - + "\006\n\004kind\032\354\002\n\nTransition\022P\n\006source\030\001 \001(\0132@" - + ".google.cloud.dialogflow.cx.v3.Transitio" - + "nCoverage.TransitionNode\022\r\n\005index\030\004 \001(\005\022" - + "P\n\006target\030\002 \001(\0132@.google.cloud.dialogflo" - + "w.cx.v3.TransitionCoverage.TransitionNod" - + "e\022\017\n\007covered\030\003 \001(\010\022J\n\020transition_route\030\005" - + " \001(\0132..google.cloud.dialogflow.cx.v3.Tra" - + "nsitionRouteH\000\022D\n\revent_handler\030\006 \001(\0132+." - + "google.cloud.dialogflow.cx.v3.EventHandl" - + "erH\000B\010\n\006detail\"\301\001\n\016IntentCoverage\022E\n\007int" - + "ents\030\001 \003(\01324.google.cloud.dialogflow.cx." - + "v3.IntentCoverage.Intent\022\026\n\016coverage_sco" - + "re\030\002 \001(\002\032P\n\006Intent\0225\n\006intent\030\001 \001(\tB%\372A\"\n" - + " dialogflow.googleapis.com/Intent\022\017\n\007cov" - + "ered\030\002 \001(\010\"\373\001\n\030CalculateCoverageRequest\022" - + "6\n\005agent\030\003 \001(\tB\'\340A\002\372A!\n\037dialogflow.googl" - + "eapis.com/Agent\022W\n\004type\030\002 \001(\0162D.google.c" - + "loud.dialogflow.cx.v3.CalculateCoverageR" - + "equest.CoverageTypeB\003\340A\002\"N\n\014CoverageType" - + "\022\035\n\031COVERAGE_TYPE_UNSPECIFIED\020\000\022\n\n\006INTEN" - + "T\020\001\022\023\n\017PAGE_TRANSITION\020\002\"\375\001\n\031CalculateCo" - + "verageResponse\0223\n\005agent\030\005 \001(\tB$\372A!\n\037dial" - + "ogflow.googleapis.com/Agent\022H\n\017intent_co" - + "verage\030\002 \001(\0132-.google.cloud.dialogflow.c" - + "x.v3.IntentCoverageH\000\022P\n\023transition_cove" - + "rage\030\004 \001(\01321.google.cloud.dialogflow.cx." - + "v3.TransitionCoverageH\000B\017\n\rcoverage_type" - + "\"\216\002\n\024ListTestCasesRequest\022:\n\006parent\030\001 \001(" - + "\tB*\340A\002\372A$\022\"dialogflow.googleapis.com/Tes" - + "tCase\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003" - + " \001(\t\022N\n\004view\030\004 \001(\0162@.google.cloud.dialog" - + "flow.cx.v3.ListTestCasesRequest.TestCase" - + "View\"C\n\014TestCaseView\022\036\n\032TEST_CASE_VIEW_U" - + "NSPECIFIED\020\000\022\t\n\005BASIC\020\001\022\010\n\004FULL\020\002\"m\n\025Lis" - + "tTestCasesResponse\022;\n\ntest_cases\030\001 \003(\0132\'" - + ".google.cloud.dialogflow.cx.v3.TestCase\022" - + "\027\n\017next_page_token\030\002 \001(\t\"\224\001\n\033BatchDelete" - + "TestCasesRequest\022:\n\006parent\030\001 \001(\tB*\340A\002\372A$" - + "\022\"dialogflow.googleapis.com/TestCase\0229\n\005" - + "names\030\003 \003(\tB*\340A\002\372A$\n\"dialogflow.googleap" - + "is.com/TestCase\"\224\001\n\025CreateTestCaseReques" - + "t\022:\n\006parent\030\001 \001(\tB*\340A\002\372A$\022\"dialogflow.go" - + "ogleapis.com/TestCase\022?\n\ttest_case\030\002 \001(\013" - + "2\'.google.cloud.dialogflow.cx.v3.TestCas" - + "eB\003\340A\002\"\216\001\n\025UpdateTestCaseRequest\022?\n\ttest" - + "_case\030\001 \001(\0132\'.google.cloud.dialogflow.cx" - + ".v3.TestCaseB\003\340A\002\0224\n\013update_mask\030\002 \001(\0132\032" - + ".google.protobuf.FieldMaskB\003\340A\002\"N\n\022GetTe" - + "stCaseRequest\0228\n\004name\030\001 \001(\tB*\340A\002\372A$\n\"dia" - + "logflow.googleapis.com/TestCase\"\222\001\n\022RunT" - + "estCaseRequest\0228\n\004name\030\001 \001(\tB*\340A\002\372A$\n\"di" - + "alogflow.googleapis.com/TestCase\022B\n\013envi" - + "ronment\030\002 \001(\tB-\340A\001\372A\'\n%dialogflow.google" - + "apis.com/Environment\"T\n\023RunTestCaseRespo" - + "nse\022=\n\006result\030\002 \001(\0132-.google.cloud.dialo" - + "gflow.cx.v3.TestCaseResult\"\025\n\023RunTestCas" - + "eMetadata\"\332\001\n\030BatchRunTestCasesRequest\022:" + + "test_case}\"\253\003\n\016TestCaseResult\022\014\n\004name\030\001 " + + "\001(\t\022?\n\013environment\030\002 \001(\tB*\372A\'\n%dialogflo" + + "w.googleapis.com/Environment\022K\n\022conversa" + + "tion_turns\030\003 \003(\0132/.google.cloud.dialogfl" + + "ow.cx.v3.ConversationTurn\022>\n\013test_result" + + "\030\004 \001(\0162).google.cloud.dialogflow.cx.v3.T" + + "estResult\022-\n\ttest_time\030\005 \001(\0132\032.google.pr" + + "otobuf.Timestamp:\215\001\352A\211\001\n(dialogflow.goog" + + "leapis.com/TestCaseResult\022]projects/{pro" + + "ject}/locations/{location}/agents/{agent" + + "}/testCases/{test_case}/results/{result}" + + "\"\\\n\nTestConfig\022\033\n\023tracking_parameters\030\001 " + + "\003(\t\0221\n\004flow\030\002 \001(\tB#\372A \n\036dialogflow.googl" + + "eapis.com/Flow\"\234\006\n\020ConversationTurn\022M\n\nu" + + "ser_input\030\001 \001(\01329.google.cloud.dialogflo" + + "w.cx.v3.ConversationTurn.UserInput\022`\n\024vi" + + "rtual_agent_output\030\002 \001(\0132B.google.cloud." + + "dialogflow.cx.v3.ConversationTurn.Virtua" + + "lAgentOutput\032\227\001\n\tUserInput\0228\n\005input\030\005 \001(" + + "\0132).google.cloud.dialogflow.cx.v3.QueryI" + + "nput\0224\n\023injected_parameters\030\002 \001(\0132\027.goog" + + "le.protobuf.Struct\022\032\n\022is_webhook_enabled" + + "\030\003 \001(\010\032\274\003\n\022VirtualAgentOutput\0223\n\022session" + + "_parameters\030\004 \001(\0132\027.google.protobuf.Stru" + + "ct\022J\n\013differences\030\005 \003(\01320.google.cloud.d" + + "ialogflow.cx.v3.TestRunDifferenceB\003\340A\003\0228" + + "\n\017diagnostic_info\030\006 \001(\0132\027.google.protobu" + + "f.StructB\006\340A\002\340A\004\022?\n\020triggered_intent\030\007 \001" + + "(\0132%.google.cloud.dialogflow.cx.v3.Inten" + + "t\0229\n\014current_page\030\010 \001(\0132#.google.cloud.d" + + "ialogflow.cx.v3.Page\022K\n\016text_responses\030\t" + + " \003(\01323.google.cloud.dialogflow.cx.v3.Res" + + "ponseMessage.Text\022\"\n\006status\030\n \001(\0132\022.goog" + + "le.rpc.Status\"\315\001\n\021TestRunDifference\022G\n\004t" + + "ype\030\001 \001(\01629.google.cloud.dialogflow.cx.v" + + "3.TestRunDifference.DiffType\022\023\n\013descript" + + "ion\030\002 \001(\t\"Z\n\010DiffType\022\031\n\025DIFF_TYPE_UNSPE" + + "CIFIED\020\000\022\n\n\006INTENT\020\001\022\010\n\004PAGE\020\002\022\016\n\nPARAME" + + "TERS\020\003\022\r\n\tUTTERANCE\020\004\"\363\004\n\022TransitionCove" + + "rage\022Q\n\013transitions\030\001 \003(\0132<.google.cloud" + + ".dialogflow.cx.v3.TransitionCoverage.Tra" + + "nsition\022\026\n\016coverage_score\030\002 \001(\002\032\202\001\n\016Tran" + + "sitionNode\0223\n\004page\030\001 \001(\0132#.google.cloud." + + "dialogflow.cx.v3.PageH\000\0223\n\004flow\030\002 \001(\0132#." + + "google.cloud.dialogflow.cx.v3.FlowH\000B\006\n\004" + + "kind\032\354\002\n\nTransition\022P\n\006source\030\001 \001(\0132@.go" + + "ogle.cloud.dialogflow.cx.v3.TransitionCo" + + "verage.TransitionNode\022\r\n\005index\030\004 \001(\005\022P\n\006" + + "target\030\002 \001(\0132@.google.cloud.dialogflow.c" + + "x.v3.TransitionCoverage.TransitionNode\022\017" + + "\n\007covered\030\003 \001(\010\022J\n\020transition_route\030\005 \001(" + + "\0132..google.cloud.dialogflow.cx.v3.Transi" + + "tionRouteH\000\022D\n\revent_handler\030\006 \001(\0132+.goo" + + "gle.cloud.dialogflow.cx.v3.EventHandlerH" + + "\000B\010\n\006detail\"\301\001\n\016IntentCoverage\022E\n\007intent" + + "s\030\001 \003(\01324.google.cloud.dialogflow.cx.v3." + + "IntentCoverage.Intent\022\026\n\016coverage_score\030" + + "\002 \001(\002\032P\n\006Intent\0225\n\006intent\030\001 \001(\tB%\372A\"\n di" + + "alogflow.googleapis.com/Intent\022\017\n\007covere" + + "d\030\002 \001(\010\"\373\001\n\030CalculateCoverageRequest\0226\n\005" + + "agent\030\003 \001(\tB\'\340A\002\372A!\n\037dialogflow.googleap" + + "is.com/Agent\022W\n\004type\030\002 \001(\0162D.google.clou" + + "d.dialogflow.cx.v3.CalculateCoverageRequ" + + "est.CoverageTypeB\003\340A\002\"N\n\014CoverageType\022\035\n" + + "\031COVERAGE_TYPE_UNSPECIFIED\020\000\022\n\n\006INTENT\020\001" + + "\022\023\n\017PAGE_TRANSITION\020\002\"\375\001\n\031CalculateCover" + + "ageResponse\0223\n\005agent\030\005 \001(\tB$\372A!\n\037dialogf" + + "low.googleapis.com/Agent\022H\n\017intent_cover" + + "age\030\002 \001(\0132-.google.cloud.dialogflow.cx.v" + + "3.IntentCoverageH\000\022P\n\023transition_coverag" + + "e\030\004 \001(\01321.google.cloud.dialogflow.cx.v3." + + "TransitionCoverageH\000B\017\n\rcoverage_type\"\216\002" + + "\n\024ListTestCasesRequest\022:\n\006parent\030\001 \001(\tB*" + + "\340A\002\372A$\022\"dialogflow.googleapis.com/TestCa" + + "se\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(" + + "\t\022N\n\004view\030\004 \001(\0162@.google.cloud.dialogflo" + + "w.cx.v3.ListTestCasesRequest.TestCaseVie" + + "w\"C\n\014TestCaseView\022\036\n\032TEST_CASE_VIEW_UNSP" + + "ECIFIED\020\000\022\t\n\005BASIC\020\001\022\010\n\004FULL\020\002\"m\n\025ListTe" + + "stCasesResponse\022;\n\ntest_cases\030\001 \003(\0132\'.go" + + "ogle.cloud.dialogflow.cx.v3.TestCase\022\027\n\017" + + "next_page_token\030\002 \001(\t\"\224\001\n\033BatchDeleteTes" + + "tCasesRequest\022:\n\006parent\030\001 \001(\tB*\340A\002\372A$\022\"d" + + "ialogflow.googleapis.com/TestCase\0229\n\005nam" + + "es\030\003 \003(\tB*\340A\002\372A$\n\"dialogflow.googleapis." + + "com/TestCase\"\224\001\n\025CreateTestCaseRequest\022:" + "\n\006parent\030\001 \001(\tB*\340A\002\372A$\022\"dialogflow.googl" - + "eapis.com/TestCase\022B\n\013environment\030\002 \001(\tB" - + "-\340A\001\372A\'\n%dialogflow.googleapis.com/Envir" - + "onment\022>\n\ntest_cases\030\003 \003(\tB*\340A\002\372A$\n\"dial" - + "ogflow.googleapis.com/TestCase\"[\n\031BatchR" - + "unTestCasesResponse\022>\n\007results\030\001 \003(\0132-.g" - + "oogle.cloud.dialogflow.cx.v3.TestCaseRes" - + "ult\"U\n\031BatchRunTestCasesMetadata\0228\n\006erro" - + "rs\030\001 \003(\0132(.google.cloud.dialogflow.cx.v3" - + ".TestError\"\232\001\n\tTestError\022:\n\ttest_case\030\001 " - + "\001(\tB\'\372A$\n\"dialogflow.googleapis.com/Test" - + "Case\022\"\n\006status\030\002 \001(\0132\022.google.rpc.Status" - + "\022-\n\ttest_time\030\003 \001(\0132\032.google.protobuf.Ti" - + "mestamp\"\204\001\n\026ImportTestCasesRequest\022:\n\006pa" - + "rent\030\001 \001(\tB*\340A\002\372A$\022\"dialogflow.googleapi" - + "s.com/TestCase\022\021\n\007gcs_uri\030\002 \001(\tH\000\022\021\n\007con" - + "tent\030\003 \001(\014H\000B\010\n\006source\"Q\n\027ImportTestCase" - + "sResponse\0226\n\005names\030\001 \003(\tB\'\372A$\n\"dialogflo" - + "w.googleapis.com/TestCase\"W\n\027ImportTestC" - + "asesMetadata\022<\n\006errors\030\001 \003(\0132,.google.cl" - + "oud.dialogflow.cx.v3.TestCaseError\"o\n\rTe" - + "stCaseError\022:\n\ttest_case\030\001 \001(\0132\'.google." - + "cloud.dialogflow.cx.v3.TestCase\022\"\n\006statu" - + "s\030\002 \001(\0132\022.google.rpc.Status\"\234\002\n\026ExportTe" - + "stCasesRequest\022:\n\006parent\030\001 \001(\tB*\340A\002\372A$\022\"" - + "dialogflow.googleapis.com/TestCase\022\021\n\007gc" - + "s_uri\030\002 \001(\tH\000\022U\n\013data_format\030\003 \001(\0162@.goo" - + "gle.cloud.dialogflow.cx.v3.ExportTestCas" - + "esRequest.DataFormat\022\016\n\006filter\030\004 \001(\t\"=\n\n" - + "DataFormat\022\033\n\027DATA_FORMAT_UNSPECIFIED\020\000\022" - + "\010\n\004BLOB\020\001\022\010\n\004JSON\020\002B\r\n\013destination\"N\n\027Ex" - + "portTestCasesResponse\022\021\n\007gcs_uri\030\001 \001(\tH\000" - + "\022\021\n\007content\030\002 \001(\014H\000B\r\n\013destination\"\031\n\027Ex" - + "portTestCasesMetadata\"\225\001\n\032ListTestCaseRe" - + "sultsRequest\022@\n\006parent\030\001 \001(\tB0\340A\002\372A*\022(di" - + "alogflow.googleapis.com/TestCaseResult\022\021" - + "\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\016\n" - + "\006filter\030\004 \001(\t\"\200\001\n\033ListTestCaseResultsRes" - + "ponse\022H\n\021test_case_results\030\001 \003(\0132-.googl" - + "e.cloud.dialogflow.cx.v3.TestCaseResult\022" - + "\027\n\017next_page_token\030\002 \001(\t*A\n\nTestResult\022\033" - + "\n\027TEST_RESULT_UNSPECIFIED\020\000\022\n\n\006PASSED\020\001\022" - + "\n\n\006FAILED\020\0022\301\023\n\tTestCases\022\303\001\n\rListTestCa" - + "ses\0223.google.cloud.dialogflow.cx.v3.List" - + "TestCasesRequest\0324.google.cloud.dialogfl" - + "ow.cx.v3.ListTestCasesResponse\"G\202\323\344\223\0028\0226" + + "eapis.com/TestCase\022?\n\ttest_case\030\002 \001(\0132\'." + + "google.cloud.dialogflow.cx.v3.TestCaseB\003" + + "\340A\002\"\216\001\n\025UpdateTestCaseRequest\022?\n\ttest_ca" + + "se\030\001 \001(\0132\'.google.cloud.dialogflow.cx.v3" + + ".TestCaseB\003\340A\002\0224\n\013update_mask\030\002 \001(\0132\032.go" + + "ogle.protobuf.FieldMaskB\003\340A\002\"N\n\022GetTestC" + + "aseRequest\0228\n\004name\030\001 \001(\tB*\340A\002\372A$\n\"dialog" + + "flow.googleapis.com/TestCase\"\222\001\n\022RunTest" + + "CaseRequest\0228\n\004name\030\001 \001(\tB*\340A\002\372A$\n\"dialo" + + "gflow.googleapis.com/TestCase\022B\n\013environ" + + "ment\030\002 \001(\tB-\340A\001\372A\'\n%dialogflow.googleapi" + + "s.com/Environment\"T\n\023RunTestCaseResponse" + + "\022=\n\006result\030\002 \001(\0132-.google.cloud.dialogfl" + + "ow.cx.v3.TestCaseResult\"\025\n\023RunTestCaseMe" + + "tadata\"\332\001\n\030BatchRunTestCasesRequest\022:\n\006p" + + "arent\030\001 \001(\tB*\340A\002\372A$\022\"dialogflow.googleap" + + "is.com/TestCase\022B\n\013environment\030\002 \001(\tB-\340A" + + "\001\372A\'\n%dialogflow.googleapis.com/Environm" + + "ent\022>\n\ntest_cases\030\003 \003(\tB*\340A\002\372A$\n\"dialogf" + + "low.googleapis.com/TestCase\"[\n\031BatchRunT" + + "estCasesResponse\022>\n\007results\030\001 \003(\0132-.goog" + + "le.cloud.dialogflow.cx.v3.TestCaseResult" + + "\"U\n\031BatchRunTestCasesMetadata\0228\n\006errors\030" + + "\001 \003(\0132(.google.cloud.dialogflow.cx.v3.Te" + + "stError\"\232\001\n\tTestError\022:\n\ttest_case\030\001 \001(\t" + + "B\'\372A$\n\"dialogflow.googleapis.com/TestCas" + + "e\022\"\n\006status\030\002 \001(\0132\022.google.rpc.Status\022-\n" + + "\ttest_time\030\003 \001(\0132\032.google.protobuf.Times" + + "tamp\"\204\001\n\026ImportTestCasesRequest\022:\n\006paren" + + "t\030\001 \001(\tB*\340A\002\372A$\022\"dialogflow.googleapis.c" + + "om/TestCase\022\021\n\007gcs_uri\030\002 \001(\tH\000\022\021\n\007conten" + + "t\030\003 \001(\014H\000B\010\n\006source\"Q\n\027ImportTestCasesRe" + + "sponse\0226\n\005names\030\001 \003(\tB\'\372A$\n\"dialogflow.g" + + "oogleapis.com/TestCase\"W\n\027ImportTestCase" + + "sMetadata\022<\n\006errors\030\001 \003(\0132,.google.cloud" + + ".dialogflow.cx.v3.TestCaseError\"o\n\rTestC" + + "aseError\022:\n\ttest_case\030\001 \001(\0132\'.google.clo" + + "ud.dialogflow.cx.v3.TestCase\022\"\n\006status\030\002" + + " \001(\0132\022.google.rpc.Status\"\234\002\n\026ExportTestC" + + "asesRequest\022:\n\006parent\030\001 \001(\tB*\340A\002\372A$\022\"dia" + + "logflow.googleapis.com/TestCase\022\021\n\007gcs_u" + + "ri\030\002 \001(\tH\000\022U\n\013data_format\030\003 \001(\0162@.google" + + ".cloud.dialogflow.cx.v3.ExportTestCasesR" + + "equest.DataFormat\022\016\n\006filter\030\004 \001(\t\"=\n\nDat" + + "aFormat\022\033\n\027DATA_FORMAT_UNSPECIFIED\020\000\022\010\n\004" + + "BLOB\020\001\022\010\n\004JSON\020\002B\r\n\013destination\"N\n\027Expor" + + "tTestCasesResponse\022\021\n\007gcs_uri\030\001 \001(\tH\000\022\021\n" + + "\007content\030\002 \001(\014H\000B\r\n\013destination\"\031\n\027Expor" + + "tTestCasesMetadata\"\225\001\n\032ListTestCaseResul" + + "tsRequest\022@\n\006parent\030\001 \001(\tB0\340A\002\372A*\022(dialo" + + "gflow.googleapis.com/TestCaseResult\022\021\n\tp" + + "age_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\016\n\006fi" + + "lter\030\004 \001(\t\"\200\001\n\033ListTestCaseResultsRespon" + + "se\022H\n\021test_case_results\030\001 \003(\0132-.google.c" + + "loud.dialogflow.cx.v3.TestCaseResult\022\027\n\017" + + "next_page_token\030\002 \001(\t*A\n\nTestResult\022\033\n\027T" + + "EST_RESULT_UNSPECIFIED\020\000\022\n\n\006PASSED\020\001\022\n\n\006" + + "FAILED\020\0022\301\023\n\tTestCases\022\303\001\n\rListTestCases" + + "\0223.google.cloud.dialogflow.cx.v3.ListTes" + + "tCasesRequest\0324.google.cloud.dialogflow." + + "cx.v3.ListTestCasesResponse\"G\202\323\344\223\0028\0226/v3" + + "/{parent=projects/*/locations/*/agents/*" + + "}/testCases\332A\006parent\022\302\001\n\024BatchDeleteTest" + + "Cases\022:.google.cloud.dialogflow.cx.v3.Ba" + + "tchDeleteTestCasesRequest\032\026.google.proto" + + "buf.Empty\"V\202\323\344\223\002G\"B/v3/{parent=projects/" + + "*/locations/*/agents/*}/testCases:batchD" + + "elete:\001*\332A\006parent\022\260\001\n\013GetTestCase\0221.goog" + + "le.cloud.dialogflow.cx.v3.GetTestCaseReq" + + "uest\032\'.google.cloud.dialogflow.cx.v3.Tes" + + "tCase\"E\202\323\344\223\0028\0226/v3/{name=projects/*/loca" + + "tions/*/agents/*/testCases/*}\332A\004name\022\315\001\n" + + "\016CreateTestCase\0224.google.cloud.dialogflo" + + "w.cx.v3.CreateTestCaseRequest\032\'.google.c" + + "loud.dialogflow.cx.v3.TestCase\"\\\202\323\344\223\002C\"6" + "/v3/{parent=projects/*/locations/*/agent" - + "s/*}/testCases\332A\006parent\022\302\001\n\024BatchDeleteT" - + "estCases\022:.google.cloud.dialogflow.cx.v3" - + ".BatchDeleteTestCasesRequest\032\026.google.pr" - + "otobuf.Empty\"V\202\323\344\223\002G\"B/v3/{parent=projec" - + "ts/*/locations/*/agents/*}/testCases:bat" - + "chDelete:\001*\332A\006parent\022\260\001\n\013GetTestCase\0221.g" - + "oogle.cloud.dialogflow.cx.v3.GetTestCase" - + "Request\032\'.google.cloud.dialogflow.cx.v3." - + "TestCase\"E\202\323\344\223\0028\0226/v3/{name=projects/*/l" - + "ocations/*/agents/*/testCases/*}\332A\004name\022" - + "\315\001\n\016CreateTestCase\0224.google.cloud.dialog" - + "flow.cx.v3.CreateTestCaseRequest\032\'.googl" - + "e.cloud.dialogflow.cx.v3.TestCase\"\\\202\323\344\223\002" - + "C\"6/v3/{parent=projects/*/locations/*/ag" - + "ents/*}/testCases:\ttest_case\332A\020parent,te" - + "st_case\022\334\001\n\016UpdateTestCase\0224.google.clou" - + "d.dialogflow.cx.v3.UpdateTestCaseRequest" - + "\032\'.google.cloud.dialogflow.cx.v3.TestCas" - + "e\"k\202\323\344\223\002M2@/v3/{test_case.name=projects/" - + "*/locations/*/agents/*/testCases/*}:\ttes" - + "t_case\332A\025test_case,update_mask\022\312\001\n\013RunTe" - + "stCase\0221.google.cloud.dialogflow.cx.v3.R" - + "unTestCaseRequest\032\035.google.longrunning.O" - + "peration\"i\202\323\344\223\0026\"1/v3/projects/*/locatio" - + "ns/*/agents/*/testCases:run:\001*\312A*\n\023RunTe" - + "stCaseResponse\022\023RunTestCaseMetadata\022\361\001\n\021" - + "BatchRunTestCases\0227.google.cloud.dialogf" - + "low.cx.v3.BatchRunTestCasesRequest\032\035.goo" - + "gle.longrunning.Operation\"\203\001\202\323\344\223\002D\"?/v3/" - + "{parent=projects/*/locations/*/agents/*}" - + "/testCases:batchRun:\001*\312A6\n\031BatchRunTestC" - + "asesResponse\022\031BatchRunTestCasesMetadata\022" - + "\327\001\n\021CalculateCoverage\0227.google.cloud.dia" - + "logflow.cx.v3.CalculateCoverageRequest\0328" - + ".google.cloud.dialogflow.cx.v3.Calculate" - + "CoverageResponse\"O\202\323\344\223\002I\022G/v3/{agent=pro" - + "jects/*/locations/*/agents/*}/testCases:" - + "calculateCoverage\022\346\001\n\017ImportTestCases\0225." - + "google.cloud.dialogflow.cx.v3.ImportTest" - + "CasesRequest\032\035.google.longrunning.Operat" - + "ion\"}\202\323\344\223\002B\"=/v3/{parent=projects/*/loca" - + "tions/*/agents/*}/testCases:import:\001*\312A2" - + "\n\027ImportTestCasesResponse\022\027ImportTestCas" - + "esMetadata\022\346\001\n\017ExportTestCases\0225.google." - + "cloud.dialogflow.cx.v3.ExportTestCasesRe" - + "quest\032\035.google.longrunning.Operation\"}\202\323" - + "\344\223\002B\"=/v3/{parent=projects/*/locations/*" - + "/agents/*}/testCases:export:\001*\312A2\n\027Expor" - + "tTestCasesResponse\022\027ExportTestCasesMetad" - + "ata\022\337\001\n\023ListTestCaseResults\0229.google.clo" - + "ud.dialogflow.cx.v3.ListTestCaseResultsR" - + "equest\032:.google.cloud.dialogflow.cx.v3.L" - + "istTestCaseResultsResponse\"Q\202\323\344\223\002B\022@/v3/" - + "{parent=projects/*/locations/*/agents/*/" - + "testCases/*}/results\332A\006parent\032x\312A\031dialog" - + "flow.googleapis.com\322AYhttps://www.google" - + "apis.com/auth/cloud-platform,https://www" - + ".googleapis.com/auth/dialogflowB\235\001\n!com." - + "google.cloud.dialogflow.cx.v3B\rTestCaseP" - + "rotoP\001Z?google.golang.org/genproto/googl" - + "eapis/cloud/dialogflow/cx/v3;cx\370\001\001\242\002\002DF\252" - + "\002\035Google.Cloud.Dialogflow.Cx.V3b\006proto3" + + "s/*}/testCases:\ttest_case\332A\020parent,test_" + + "case\022\334\001\n\016UpdateTestCase\0224.google.cloud.d" + + "ialogflow.cx.v3.UpdateTestCaseRequest\032\'." + + "google.cloud.dialogflow.cx.v3.TestCase\"k" + + "\202\323\344\223\002M2@/v3/{test_case.name=projects/*/l" + + "ocations/*/agents/*/testCases/*}:\ttest_c" + + "ase\332A\025test_case,update_mask\022\312\001\n\013RunTestC" + + "ase\0221.google.cloud.dialogflow.cx.v3.RunT" + + "estCaseRequest\032\035.google.longrunning.Oper" + + "ation\"i\202\323\344\223\0026\"1/v3/projects/*/locations/" + + "*/agents/*/testCases:run:\001*\312A*\n\023RunTestC" + + "aseResponse\022\023RunTestCaseMetadata\022\361\001\n\021Bat" + + "chRunTestCases\0227.google.cloud.dialogflow" + + ".cx.v3.BatchRunTestCasesRequest\032\035.google" + + ".longrunning.Operation\"\203\001\202\323\344\223\002D\"?/v3/{pa" + + "rent=projects/*/locations/*/agents/*}/te" + + "stCases:batchRun:\001*\312A6\n\031BatchRunTestCase" + + "sResponse\022\031BatchRunTestCasesMetadata\022\327\001\n" + + "\021CalculateCoverage\0227.google.cloud.dialog" + + "flow.cx.v3.CalculateCoverageRequest\0328.go" + + "ogle.cloud.dialogflow.cx.v3.CalculateCov" + + "erageResponse\"O\202\323\344\223\002I\022G/v3/{agent=projec" + + "ts/*/locations/*/agents/*}/testCases:cal" + + "culateCoverage\022\346\001\n\017ImportTestCases\0225.goo" + + "gle.cloud.dialogflow.cx.v3.ImportTestCas" + + "esRequest\032\035.google.longrunning.Operation" + + "\"}\202\323\344\223\002B\"=/v3/{parent=projects/*/locatio" + + "ns/*/agents/*}/testCases:import:\001*\312A2\n\027I" + + "mportTestCasesResponse\022\027ImportTestCasesM" + + "etadata\022\346\001\n\017ExportTestCases\0225.google.clo" + + "ud.dialogflow.cx.v3.ExportTestCasesReque" + + "st\032\035.google.longrunning.Operation\"}\202\323\344\223\002" + + "B\"=/v3/{parent=projects/*/locations/*/ag" + + "ents/*}/testCases:export:\001*\312A2\n\027ExportTe" + + "stCasesResponse\022\027ExportTestCasesMetadata" + + "\022\337\001\n\023ListTestCaseResults\0229.google.cloud." + + "dialogflow.cx.v3.ListTestCaseResultsRequ" + + "est\032:.google.cloud.dialogflow.cx.v3.List" + + "TestCaseResultsResponse\"Q\202\323\344\223\002B\022@/v3/{pa" + + "rent=projects/*/locations/*/agents/*/tes" + + "tCases/*}/results\332A\006parent\032x\312A\031dialogflo" + + "w.googleapis.com\322AYhttps://www.googleapi" + + "s.com/auth/cloud-platform,https://www.go" + + "ogleapis.com/auth/dialogflowB\235\001\n!com.goo" + + "gle.cloud.dialogflow.cx.v3B\rTestCaseProt" + + "oP\001Z?google.golang.org/genproto/googleap" + + "is/cloud/dialogflow/cx/v3;cx\370\001\001\242\002\002DF\252\002\035G" + + "oogle.Cloud.Dialogflow.Cx.V3b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseResult.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseResult.java index 73d4c5eec..ac4cc3476 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseResult.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseResult.java @@ -219,13 +219,11 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-   * Optional. Environment where the test was run. If not set, it indicates the draft
+   * Environment where the test was run. If not set, it indicates the draft
    * environment.
    * 
* - * - * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * + * string environment = 2 [(.google.api.resource_reference) = { ... } * * @return The environment. */ @@ -245,13 +243,11 @@ public java.lang.String getEnvironment() { * * *
-   * Optional. Environment where the test was run. If not set, it indicates the draft
+   * Environment where the test was run. If not set, it indicates the draft
    * environment.
    * 
* - * - * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * + * string environment = 2 [(.google.api.resource_reference) = { ... } * * @return The bytes for environment. */ @@ -984,13 +980,11 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * * *
-     * Optional. Environment where the test was run. If not set, it indicates the draft
+     * Environment where the test was run. If not set, it indicates the draft
      * environment.
      * 
* - * - * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * + * string environment = 2 [(.google.api.resource_reference) = { ... } * * @return The environment. */ @@ -1009,13 +1003,11 @@ public java.lang.String getEnvironment() { * * *
-     * Optional. Environment where the test was run. If not set, it indicates the draft
+     * Environment where the test was run. If not set, it indicates the draft
      * environment.
      * 
* - * - * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * + * string environment = 2 [(.google.api.resource_reference) = { ... } * * @return The bytes for environment. */ @@ -1034,13 +1026,11 @@ public com.google.protobuf.ByteString getEnvironmentBytes() { * * *
-     * Optional. Environment where the test was run. If not set, it indicates the draft
+     * Environment where the test was run. If not set, it indicates the draft
      * environment.
      * 
* - * - * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * + * string environment = 2 [(.google.api.resource_reference) = { ... } * * @param value The environment to set. * @return This builder for chaining. @@ -1058,13 +1048,11 @@ public Builder setEnvironment(java.lang.String value) { * * *
-     * Optional. Environment where the test was run. If not set, it indicates the draft
+     * Environment where the test was run. If not set, it indicates the draft
      * environment.
      * 
* - * - * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * + * string environment = 2 [(.google.api.resource_reference) = { ... } * * @return This builder for chaining. */ @@ -1078,13 +1066,11 @@ public Builder clearEnvironment() { * * *
-     * Optional. Environment where the test was run. If not set, it indicates the draft
+     * Environment where the test was run. If not set, it indicates the draft
      * environment.
      * 
* - * - * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * + * string environment = 2 [(.google.api.resource_reference) = { ... } * * @param value The bytes for environment to set. * @return This builder for chaining. diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseResultOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseResultOrBuilder.java index 378c46ae4..d54fa7f7d 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseResultOrBuilder.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseResultOrBuilder.java @@ -56,13 +56,11 @@ public interface TestCaseResultOrBuilder * * *
-   * Optional. Environment where the test was run. If not set, it indicates the draft
+   * Environment where the test was run. If not set, it indicates the draft
    * environment.
    * 
* - * - * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * + * string environment = 2 [(.google.api.resource_reference) = { ... } * * @return The environment. */ @@ -71,13 +69,11 @@ public interface TestCaseResultOrBuilder * * *
-   * Optional. Environment where the test was run. If not set, it indicates the draft
+   * Environment where the test was run. If not set, it indicates the draft
    * environment.
    * 
* - * - * string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * + * string environment = 2 [(.google.api.resource_reference) = { ... } * * @return The bytes for environment. */ diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateExperimentRequest.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateExperimentRequest.java new file mode 100644 index 000000000..659984826 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateExperimentRequest.java @@ -0,0 +1,1043 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/experiment.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The request message for [Experiments.UpdateExperiment][google.cloud.dialogflow.cx.v3.Experiments.UpdateExperiment].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.UpdateExperimentRequest} + */ +public final class UpdateExperimentRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.UpdateExperimentRequest) + UpdateExperimentRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateExperimentRequest.newBuilder() to construct. + private UpdateExperimentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateExperimentRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateExperimentRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateExperimentRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.dialogflow.cx.v3.Experiment.Builder subBuilder = null; + if (experiment_ != null) { + subBuilder = experiment_.toBuilder(); + } + experiment_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.Experiment.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(experiment_); + experiment_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_UpdateExperimentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_UpdateExperimentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest.class, + com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest.Builder.class); + } + + public static final int EXPERIMENT_FIELD_NUMBER = 1; + private com.google.cloud.dialogflow.cx.v3.Experiment experiment_; + /** + * + * + *
+   * Required. The experiment to update.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the experiment field is set. + */ + @java.lang.Override + public boolean hasExperiment() { + return experiment_ != null; + } + /** + * + * + *
+   * Required. The experiment to update.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The experiment. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Experiment getExperiment() { + return experiment_ == null + ? com.google.cloud.dialogflow.cx.v3.Experiment.getDefaultInstance() + : experiment_; + } + /** + * + * + *
+   * Required. The experiment to update.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ExperimentOrBuilder getExperimentOrBuilder() { + return getExperiment(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. The mask to control which fields get updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Required. The mask to control which fields get updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Required. The mask to control which fields get updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (experiment_ != null) { + output.writeMessage(1, getExperiment()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (experiment_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getExperiment()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest other = + (com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest) obj; + + if (hasExperiment() != other.hasExperiment()) return false; + if (hasExperiment()) { + if (!getExperiment().equals(other.getExperiment())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasExperiment()) { + hash = (37 * hash) + EXPERIMENT_FIELD_NUMBER; + hash = (53 * hash) + getExperiment().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for [Experiments.UpdateExperiment][google.cloud.dialogflow.cx.v3.Experiments.UpdateExperiment].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.UpdateExperimentRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.UpdateExperimentRequest) + com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_UpdateExperimentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_UpdateExperimentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest.class, + com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (experimentBuilder_ == null) { + experiment_ = null; + } else { + experiment_ = null; + experimentBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_UpdateExperimentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest build() { + com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest result = + new com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest(this); + if (experimentBuilder_ == null) { + result.experiment_ = experiment_; + } else { + result.experiment_ = experimentBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest.getDefaultInstance()) + return this; + if (other.hasExperiment()) { + mergeExperiment(other.getExperiment()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.dialogflow.cx.v3.Experiment experiment_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Experiment, + com.google.cloud.dialogflow.cx.v3.Experiment.Builder, + com.google.cloud.dialogflow.cx.v3.ExperimentOrBuilder> + experimentBuilder_; + /** + * + * + *
+     * Required. The experiment to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the experiment field is set. + */ + public boolean hasExperiment() { + return experimentBuilder_ != null || experiment_ != null; + } + /** + * + * + *
+     * Required. The experiment to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The experiment. + */ + public com.google.cloud.dialogflow.cx.v3.Experiment getExperiment() { + if (experimentBuilder_ == null) { + return experiment_ == null + ? com.google.cloud.dialogflow.cx.v3.Experiment.getDefaultInstance() + : experiment_; + } else { + return experimentBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The experiment to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setExperiment(com.google.cloud.dialogflow.cx.v3.Experiment value) { + if (experimentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + experiment_ = value; + onChanged(); + } else { + experimentBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The experiment to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setExperiment( + com.google.cloud.dialogflow.cx.v3.Experiment.Builder builderForValue) { + if (experimentBuilder_ == null) { + experiment_ = builderForValue.build(); + onChanged(); + } else { + experimentBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The experiment to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeExperiment(com.google.cloud.dialogflow.cx.v3.Experiment value) { + if (experimentBuilder_ == null) { + if (experiment_ != null) { + experiment_ = + com.google.cloud.dialogflow.cx.v3.Experiment.newBuilder(experiment_) + .mergeFrom(value) + .buildPartial(); + } else { + experiment_ = value; + } + onChanged(); + } else { + experimentBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The experiment to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearExperiment() { + if (experimentBuilder_ == null) { + experiment_ = null; + onChanged(); + } else { + experiment_ = null; + experimentBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The experiment to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3.Experiment.Builder getExperimentBuilder() { + + onChanged(); + return getExperimentFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The experiment to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3.ExperimentOrBuilder getExperimentOrBuilder() { + if (experimentBuilder_ != null) { + return experimentBuilder_.getMessageOrBuilder(); + } else { + return experiment_ == null + ? com.google.cloud.dialogflow.cx.v3.Experiment.getDefaultInstance() + : experiment_; + } + } + /** + * + * + *
+     * Required. The experiment to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Experiment, + com.google.cloud.dialogflow.cx.v3.Experiment.Builder, + com.google.cloud.dialogflow.cx.v3.ExperimentOrBuilder> + getExperimentFieldBuilder() { + if (experimentBuilder_ == null) { + experimentBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Experiment, + com.google.cloud.dialogflow.cx.v3.Experiment.Builder, + com.google.cloud.dialogflow.cx.v3.ExperimentOrBuilder>( + getExperiment(), getParentForChildren(), isClean()); + experiment_ = null; + } + return experimentBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Required. The mask to control which fields get updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * Required. The mask to control which fields get updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The mask to control which fields get updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The mask to control which fields get updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The mask to control which fields get updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The mask to control which fields get updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The mask to control which fields get updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The mask to control which fields get updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Required. The mask to control which fields get updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.UpdateExperimentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.UpdateExperimentRequest) + private static final com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateExperimentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateExperimentRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateExperimentRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateExperimentRequestOrBuilder.java new file mode 100644 index 000000000..0cc72b00a --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateExperimentRequestOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/experiment.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface UpdateExperimentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.UpdateExperimentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The experiment to update.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the experiment field is set. + */ + boolean hasExperiment(); + /** + * + * + *
+   * Required. The experiment to update.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The experiment. + */ + com.google.cloud.dialogflow.cx.v3.Experiment getExperiment(); + /** + * + * + *
+   * Required. The experiment to update.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.dialogflow.cx.v3.ExperimentOrBuilder getExperimentOrBuilder(); + + /** + * + * + *
+   * Required. The mask to control which fields get updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. The mask to control which fields get updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. The mask to control which fields get updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VariantsHistory.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VariantsHistory.java new file mode 100644 index 000000000..db5e15059 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VariantsHistory.java @@ -0,0 +1,1111 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/experiment.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The history of variants update.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.VariantsHistory} + */ +public final class VariantsHistory extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.VariantsHistory) + VariantsHistoryOrBuilder { + private static final long serialVersionUID = 0L; + // Use VariantsHistory.newBuilder() to construct. + private VariantsHistory(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VariantsHistory() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VariantsHistory(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private VariantsHistory( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.dialogflow.cx.v3.VersionVariants.Builder subBuilder = null; + if (variantsCase_ == 1) { + subBuilder = + ((com.google.cloud.dialogflow.cx.v3.VersionVariants) variants_).toBuilder(); + } + variants_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.VersionVariants.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.dialogflow.cx.v3.VersionVariants) variants_); + variants_ = subBuilder.buildPartial(); + } + variantsCase_ = 1; + break; + } + case 18: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_VariantsHistory_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_VariantsHistory_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.VariantsHistory.class, + com.google.cloud.dialogflow.cx.v3.VariantsHistory.Builder.class); + } + + private int variantsCase_ = 0; + private java.lang.Object variants_; + + public enum VariantsCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + VERSION_VARIANTS(1), + VARIANTS_NOT_SET(0); + private final int value; + + private VariantsCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static VariantsCase valueOf(int value) { + return forNumber(value); + } + + public static VariantsCase forNumber(int value) { + switch (value) { + case 1: + return VERSION_VARIANTS; + case 0: + return VARIANTS_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public VariantsCase getVariantsCase() { + return VariantsCase.forNumber(variantsCase_); + } + + public static final int VERSION_VARIANTS_FIELD_NUMBER = 1; + /** + * + * + *
+   * The flow versions as the variants.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 1; + * + * @return Whether the versionVariants field is set. + */ + @java.lang.Override + public boolean hasVersionVariants() { + return variantsCase_ == 1; + } + /** + * + * + *
+   * The flow versions as the variants.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 1; + * + * @return The versionVariants. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.VersionVariants getVersionVariants() { + if (variantsCase_ == 1) { + return (com.google.cloud.dialogflow.cx.v3.VersionVariants) variants_; + } + return com.google.cloud.dialogflow.cx.v3.VersionVariants.getDefaultInstance(); + } + /** + * + * + *
+   * The flow versions as the variants.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.VersionVariantsOrBuilder getVersionVariantsOrBuilder() { + if (variantsCase_ == 1) { + return (com.google.cloud.dialogflow.cx.v3.VersionVariants) variants_; + } + return com.google.cloud.dialogflow.cx.v3.VersionVariants.getDefaultInstance(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Update time of the variants.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Update time of the variants.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Update time of the variants.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (variantsCase_ == 1) { + output.writeMessage(1, (com.google.cloud.dialogflow.cx.v3.VersionVariants) variants_); + } + if (updateTime_ != null) { + output.writeMessage(2, getUpdateTime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (variantsCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.dialogflow.cx.v3.VersionVariants) variants_); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateTime()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.VariantsHistory)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.VariantsHistory other = + (com.google.cloud.dialogflow.cx.v3.VariantsHistory) obj; + + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getVariantsCase().equals(other.getVariantsCase())) return false; + switch (variantsCase_) { + case 1: + if (!getVersionVariants().equals(other.getVersionVariants())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + switch (variantsCase_) { + case 1: + hash = (37 * hash) + VERSION_VARIANTS_FIELD_NUMBER; + hash = (53 * hash) + getVersionVariants().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.VariantsHistory parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.VariantsHistory parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.VariantsHistory parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.VariantsHistory parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.VariantsHistory parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.VariantsHistory parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.VariantsHistory parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.VariantsHistory parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.VariantsHistory parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.VariantsHistory parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.VariantsHistory parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.VariantsHistory parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.dialogflow.cx.v3.VariantsHistory prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The history of variants update.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.VariantsHistory} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.VariantsHistory) + com.google.cloud.dialogflow.cx.v3.VariantsHistoryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_VariantsHistory_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_VariantsHistory_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.VariantsHistory.class, + com.google.cloud.dialogflow.cx.v3.VariantsHistory.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.VariantsHistory.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + variantsCase_ = 0; + variants_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_VariantsHistory_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.VariantsHistory getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.VariantsHistory.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.VariantsHistory build() { + com.google.cloud.dialogflow.cx.v3.VariantsHistory result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.VariantsHistory buildPartial() { + com.google.cloud.dialogflow.cx.v3.VariantsHistory result = + new com.google.cloud.dialogflow.cx.v3.VariantsHistory(this); + if (variantsCase_ == 1) { + if (versionVariantsBuilder_ == null) { + result.variants_ = variants_; + } else { + result.variants_ = versionVariantsBuilder_.build(); + } + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + result.variantsCase_ = variantsCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.VariantsHistory) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.VariantsHistory) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.VariantsHistory other) { + if (other == com.google.cloud.dialogflow.cx.v3.VariantsHistory.getDefaultInstance()) + return this; + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + switch (other.getVariantsCase()) { + case VERSION_VARIANTS: + { + mergeVersionVariants(other.getVersionVariants()); + break; + } + case VARIANTS_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.VariantsHistory parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.VariantsHistory) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int variantsCase_ = 0; + private java.lang.Object variants_; + + public VariantsCase getVariantsCase() { + return VariantsCase.forNumber(variantsCase_); + } + + public Builder clearVariants() { + variantsCase_ = 0; + variants_ = null; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.VersionVariants, + com.google.cloud.dialogflow.cx.v3.VersionVariants.Builder, + com.google.cloud.dialogflow.cx.v3.VersionVariantsOrBuilder> + versionVariantsBuilder_; + /** + * + * + *
+     * The flow versions as the variants.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 1; + * + * @return Whether the versionVariants field is set. + */ + @java.lang.Override + public boolean hasVersionVariants() { + return variantsCase_ == 1; + } + /** + * + * + *
+     * The flow versions as the variants.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 1; + * + * @return The versionVariants. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.VersionVariants getVersionVariants() { + if (versionVariantsBuilder_ == null) { + if (variantsCase_ == 1) { + return (com.google.cloud.dialogflow.cx.v3.VersionVariants) variants_; + } + return com.google.cloud.dialogflow.cx.v3.VersionVariants.getDefaultInstance(); + } else { + if (variantsCase_ == 1) { + return versionVariantsBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3.VersionVariants.getDefaultInstance(); + } + } + /** + * + * + *
+     * The flow versions as the variants.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 1; + */ + public Builder setVersionVariants(com.google.cloud.dialogflow.cx.v3.VersionVariants value) { + if (versionVariantsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + variants_ = value; + onChanged(); + } else { + versionVariantsBuilder_.setMessage(value); + } + variantsCase_ = 1; + return this; + } + /** + * + * + *
+     * The flow versions as the variants.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 1; + */ + public Builder setVersionVariants( + com.google.cloud.dialogflow.cx.v3.VersionVariants.Builder builderForValue) { + if (versionVariantsBuilder_ == null) { + variants_ = builderForValue.build(); + onChanged(); + } else { + versionVariantsBuilder_.setMessage(builderForValue.build()); + } + variantsCase_ = 1; + return this; + } + /** + * + * + *
+     * The flow versions as the variants.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 1; + */ + public Builder mergeVersionVariants(com.google.cloud.dialogflow.cx.v3.VersionVariants value) { + if (versionVariantsBuilder_ == null) { + if (variantsCase_ == 1 + && variants_ + != com.google.cloud.dialogflow.cx.v3.VersionVariants.getDefaultInstance()) { + variants_ = + com.google.cloud.dialogflow.cx.v3.VersionVariants.newBuilder( + (com.google.cloud.dialogflow.cx.v3.VersionVariants) variants_) + .mergeFrom(value) + .buildPartial(); + } else { + variants_ = value; + } + onChanged(); + } else { + if (variantsCase_ == 1) { + versionVariantsBuilder_.mergeFrom(value); + } + versionVariantsBuilder_.setMessage(value); + } + variantsCase_ = 1; + return this; + } + /** + * + * + *
+     * The flow versions as the variants.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 1; + */ + public Builder clearVersionVariants() { + if (versionVariantsBuilder_ == null) { + if (variantsCase_ == 1) { + variantsCase_ = 0; + variants_ = null; + onChanged(); + } + } else { + if (variantsCase_ == 1) { + variantsCase_ = 0; + variants_ = null; + } + versionVariantsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The flow versions as the variants.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 1; + */ + public com.google.cloud.dialogflow.cx.v3.VersionVariants.Builder getVersionVariantsBuilder() { + return getVersionVariantsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The flow versions as the variants.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.VersionVariantsOrBuilder + getVersionVariantsOrBuilder() { + if ((variantsCase_ == 1) && (versionVariantsBuilder_ != null)) { + return versionVariantsBuilder_.getMessageOrBuilder(); + } else { + if (variantsCase_ == 1) { + return (com.google.cloud.dialogflow.cx.v3.VersionVariants) variants_; + } + return com.google.cloud.dialogflow.cx.v3.VersionVariants.getDefaultInstance(); + } + } + /** + * + * + *
+     * The flow versions as the variants.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.VersionVariants, + com.google.cloud.dialogflow.cx.v3.VersionVariants.Builder, + com.google.cloud.dialogflow.cx.v3.VersionVariantsOrBuilder> + getVersionVariantsFieldBuilder() { + if (versionVariantsBuilder_ == null) { + if (!(variantsCase_ == 1)) { + variants_ = com.google.cloud.dialogflow.cx.v3.VersionVariants.getDefaultInstance(); + } + versionVariantsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.VersionVariants, + com.google.cloud.dialogflow.cx.v3.VersionVariants.Builder, + com.google.cloud.dialogflow.cx.v3.VersionVariantsOrBuilder>( + (com.google.cloud.dialogflow.cx.v3.VersionVariants) variants_, + getParentForChildren(), + isClean()); + variants_ = null; + } + variantsCase_ = 1; + onChanged(); + ; + return versionVariantsBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Update time of the variants.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Update time of the variants.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Update time of the variants.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Update time of the variants.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Update time of the variants.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Update time of the variants.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Update time of the variants.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Update time of the variants.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Update time of the variants.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.VariantsHistory) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.VariantsHistory) + private static final com.google.cloud.dialogflow.cx.v3.VariantsHistory DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.VariantsHistory(); + } + + public static com.google.cloud.dialogflow.cx.v3.VariantsHistory getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VariantsHistory parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new VariantsHistory(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.VariantsHistory getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VariantsHistoryOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VariantsHistoryOrBuilder.java new file mode 100644 index 000000000..ef8cc5f7f --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VariantsHistoryOrBuilder.java @@ -0,0 +1,97 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/experiment.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface VariantsHistoryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.VariantsHistory) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The flow versions as the variants.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 1; + * + * @return Whether the versionVariants field is set. + */ + boolean hasVersionVariants(); + /** + * + * + *
+   * The flow versions as the variants.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 1; + * + * @return The versionVariants. + */ + com.google.cloud.dialogflow.cx.v3.VersionVariants getVersionVariants(); + /** + * + * + *
+   * The flow versions as the variants.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 1; + */ + com.google.cloud.dialogflow.cx.v3.VersionVariantsOrBuilder getVersionVariantsOrBuilder(); + + /** + * + * + *
+   * Update time of the variants.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Update time of the variants.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Update time of the variants.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + public com.google.cloud.dialogflow.cx.v3.VariantsHistory.VariantsCase getVariantsCase(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VersionVariants.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VersionVariants.java new file mode 100644 index 000000000..8724079e6 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VersionVariants.java @@ -0,0 +1,1854 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/experiment.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * A list of flow version variants.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.VersionVariants} + */ +public final class VersionVariants extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.VersionVariants) + VersionVariantsOrBuilder { + private static final long serialVersionUID = 0L; + // Use VersionVariants.newBuilder() to construct. + private VersionVariants(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VersionVariants() { + variants_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VersionVariants(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private VersionVariants( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + variants_ = + new java.util.ArrayList< + com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant>(); + mutable_bitField0_ |= 0x00000001; + } + variants_.add( + input.readMessage( + com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + variants_ = java.util.Collections.unmodifiableList(variants_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_VersionVariants_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_VersionVariants_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.VersionVariants.class, + com.google.cloud.dialogflow.cx.v3.VersionVariants.Builder.class); + } + + public interface VariantOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.VersionVariants.Variant) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The name of the flow version.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>/versions/<Version ID>`.
+     * 
+ * + * string version = 1; + * + * @return The version. + */ + java.lang.String getVersion(); + /** + * + * + *
+     * The name of the flow version.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>/versions/<Version ID>`.
+     * 
+ * + * string version = 1; + * + * @return The bytes for version. + */ + com.google.protobuf.ByteString getVersionBytes(); + + /** + * + * + *
+     * 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.
+     * 
+ * + * float traffic_allocation = 2; + * + * @return The trafficAllocation. + */ + float getTrafficAllocation(); + + /** + * + * + *
+     * Whether the variant is for the control group.
+     * 
+ * + * bool is_control_group = 3; + * + * @return The isControlGroup. + */ + boolean getIsControlGroup(); + } + /** + * + * + *
+   * A single flow version with specified traffic allocation.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.VersionVariants.Variant} + */ + public static final class Variant extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.VersionVariants.Variant) + VariantOrBuilder { + private static final long serialVersionUID = 0L; + // Use Variant.newBuilder() to construct. + private Variant(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Variant() { + version_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Variant(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Variant( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + version_ = s; + break; + } + case 21: + { + trafficAllocation_ = input.readFloat(); + break; + } + case 24: + { + isControlGroup_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_VersionVariants_Variant_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_VersionVariants_Variant_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant.class, + com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant.Builder.class); + } + + public static final int VERSION_FIELD_NUMBER = 1; + private volatile java.lang.Object version_; + /** + * + * + *
+     * The name of the flow version.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>/versions/<Version ID>`.
+     * 
+ * + * string version = 1; + * + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + /** + * + * + *
+     * The name of the flow version.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>/versions/<Version ID>`.
+     * 
+ * + * string version = 1; + * + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TRAFFIC_ALLOCATION_FIELD_NUMBER = 2; + private float trafficAllocation_; + /** + * + * + *
+     * 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.
+     * 
+ * + * float traffic_allocation = 2; + * + * @return The trafficAllocation. + */ + @java.lang.Override + public float getTrafficAllocation() { + return trafficAllocation_; + } + + public static final int IS_CONTROL_GROUP_FIELD_NUMBER = 3; + private boolean isControlGroup_; + /** + * + * + *
+     * Whether the variant is for the control group.
+     * 
+ * + * bool is_control_group = 3; + * + * @return The isControlGroup. + */ + @java.lang.Override + public boolean getIsControlGroup() { + return isControlGroup_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, version_); + } + if (trafficAllocation_ != 0F) { + output.writeFloat(2, trafficAllocation_); + } + if (isControlGroup_ != false) { + output.writeBool(3, isControlGroup_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, version_); + } + if (trafficAllocation_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, trafficAllocation_); + } + if (isControlGroup_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, isControlGroup_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant other = + (com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant) obj; + + if (!getVersion().equals(other.getVersion())) return false; + if (java.lang.Float.floatToIntBits(getTrafficAllocation()) + != java.lang.Float.floatToIntBits(other.getTrafficAllocation())) return false; + if (getIsControlGroup() != other.getIsControlGroup()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + hash = (37 * hash) + TRAFFIC_ALLOCATION_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getTrafficAllocation()); + hash = (37 * hash) + IS_CONTROL_GROUP_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsControlGroup()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * A single flow version with specified traffic allocation.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.VersionVariants.Variant} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.VersionVariants.Variant) + com.google.cloud.dialogflow.cx.v3.VersionVariants.VariantOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_VersionVariants_Variant_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_VersionVariants_Variant_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant.class, + com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + version_ = ""; + + trafficAllocation_ = 0F; + + isControlGroup_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_VersionVariants_Variant_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant build() { + com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant buildPartial() { + com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant result = + new com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant(this); + result.version_ = version_; + result.trafficAllocation_ = trafficAllocation_; + result.isControlGroup_ = isControlGroup_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant other) { + if (other == com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant.getDefaultInstance()) + return this; + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + onChanged(); + } + if (other.getTrafficAllocation() != 0F) { + setTrafficAllocation(other.getTrafficAllocation()); + } + if (other.getIsControlGroup() != false) { + setIsControlGroup(other.getIsControlGroup()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object version_ = ""; + /** + * + * + *
+       * The name of the flow version.
+       * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+       * ID>/flows/<Flow ID>/versions/<Version ID>`.
+       * 
+ * + * string version = 1; + * + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The name of the flow version.
+       * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+       * ID>/flows/<Flow ID>/versions/<Version ID>`.
+       * 
+ * + * string version = 1; + * + * @return The bytes for version. + */ + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The name of the flow version.
+       * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+       * ID>/flows/<Flow ID>/versions/<Version ID>`.
+       * 
+ * + * string version = 1; + * + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + version_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The name of the flow version.
+       * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+       * ID>/flows/<Flow ID>/versions/<Version ID>`.
+       * 
+ * + * string version = 1; + * + * @return This builder for chaining. + */ + public Builder clearVersion() { + + version_ = getDefaultInstance().getVersion(); + onChanged(); + return this; + } + /** + * + * + *
+       * The name of the flow version.
+       * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+       * ID>/flows/<Flow ID>/versions/<Version ID>`.
+       * 
+ * + * string version = 1; + * + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + version_ = value; + onChanged(); + return this; + } + + private float trafficAllocation_; + /** + * + * + *
+       * 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.
+       * 
+ * + * float traffic_allocation = 2; + * + * @return The trafficAllocation. + */ + @java.lang.Override + public float getTrafficAllocation() { + return trafficAllocation_; + } + /** + * + * + *
+       * 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.
+       * 
+ * + * float traffic_allocation = 2; + * + * @param value The trafficAllocation to set. + * @return This builder for chaining. + */ + public Builder setTrafficAllocation(float value) { + + trafficAllocation_ = value; + onChanged(); + 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.
+       * 
+ * + * float traffic_allocation = 2; + * + * @return This builder for chaining. + */ + public Builder clearTrafficAllocation() { + + trafficAllocation_ = 0F; + onChanged(); + return this; + } + + private boolean isControlGroup_; + /** + * + * + *
+       * Whether the variant is for the control group.
+       * 
+ * + * bool is_control_group = 3; + * + * @return The isControlGroup. + */ + @java.lang.Override + public boolean getIsControlGroup() { + return isControlGroup_; + } + /** + * + * + *
+       * Whether the variant is for the control group.
+       * 
+ * + * bool is_control_group = 3; + * + * @param value The isControlGroup to set. + * @return This builder for chaining. + */ + public Builder setIsControlGroup(boolean value) { + + isControlGroup_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Whether the variant is for the control group.
+       * 
+ * + * bool is_control_group = 3; + * + * @return This builder for chaining. + */ + public Builder clearIsControlGroup() { + + isControlGroup_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.VersionVariants.Variant) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.VersionVariants.Variant) + private static final com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant(); + } + + public static com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Variant parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Variant(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int VARIANTS_FIELD_NUMBER = 1; + private java.util.List variants_; + /** + * + * + *
+   * A list of flow version variants.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; + */ + @java.lang.Override + public java.util.List + getVariantsList() { + return variants_; + } + /** + * + * + *
+   * A list of flow version variants.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.dialogflow.cx.v3.VersionVariants.VariantOrBuilder> + getVariantsOrBuilderList() { + return variants_; + } + /** + * + * + *
+   * A list of flow version variants.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; + */ + @java.lang.Override + public int getVariantsCount() { + return variants_.size(); + } + /** + * + * + *
+   * A list of flow version variants.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant getVariants(int index) { + return variants_.get(index); + } + /** + * + * + *
+   * A list of flow version variants.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.VersionVariants.VariantOrBuilder getVariantsOrBuilder( + int index) { + return variants_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < variants_.size(); i++) { + output.writeMessage(1, variants_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < variants_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, variants_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.VersionVariants)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.VersionVariants other = + (com.google.cloud.dialogflow.cx.v3.VersionVariants) obj; + + if (!getVariantsList().equals(other.getVariantsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getVariantsCount() > 0) { + hash = (37 * hash) + VARIANTS_FIELD_NUMBER; + hash = (53 * hash) + getVariantsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.VersionVariants parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.VersionVariants parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.VersionVariants parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.VersionVariants parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.VersionVariants parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.VersionVariants parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.VersionVariants parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.VersionVariants parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.VersionVariants parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.VersionVariants parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.VersionVariants parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.VersionVariants parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.dialogflow.cx.v3.VersionVariants prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A list of flow version variants.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.VersionVariants} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.VersionVariants) + com.google.cloud.dialogflow.cx.v3.VersionVariantsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_VersionVariants_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_VersionVariants_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.VersionVariants.class, + com.google.cloud.dialogflow.cx.v3.VersionVariants.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.VersionVariants.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getVariantsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (variantsBuilder_ == null) { + variants_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + variantsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_VersionVariants_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.VersionVariants getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.VersionVariants.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.VersionVariants build() { + com.google.cloud.dialogflow.cx.v3.VersionVariants result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.VersionVariants buildPartial() { + com.google.cloud.dialogflow.cx.v3.VersionVariants result = + new com.google.cloud.dialogflow.cx.v3.VersionVariants(this); + int from_bitField0_ = bitField0_; + if (variantsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + variants_ = java.util.Collections.unmodifiableList(variants_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.variants_ = variants_; + } else { + result.variants_ = variantsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.VersionVariants) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.VersionVariants) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.VersionVariants other) { + if (other == com.google.cloud.dialogflow.cx.v3.VersionVariants.getDefaultInstance()) + return this; + if (variantsBuilder_ == null) { + if (!other.variants_.isEmpty()) { + if (variants_.isEmpty()) { + variants_ = other.variants_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureVariantsIsMutable(); + variants_.addAll(other.variants_); + } + onChanged(); + } + } else { + if (!other.variants_.isEmpty()) { + if (variantsBuilder_.isEmpty()) { + variantsBuilder_.dispose(); + variantsBuilder_ = null; + variants_ = other.variants_; + bitField0_ = (bitField0_ & ~0x00000001); + variantsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getVariantsFieldBuilder() + : null; + } else { + variantsBuilder_.addAllMessages(other.variants_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.VersionVariants parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.VersionVariants) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List variants_ = + java.util.Collections.emptyList(); + + private void ensureVariantsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + variants_ = + new java.util.ArrayList( + variants_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant, + com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant.Builder, + com.google.cloud.dialogflow.cx.v3.VersionVariants.VariantOrBuilder> + variantsBuilder_; + + /** + * + * + *
+     * A list of flow version variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; + */ + public java.util.List + getVariantsList() { + if (variantsBuilder_ == null) { + return java.util.Collections.unmodifiableList(variants_); + } else { + return variantsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of flow version variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; + */ + public int getVariantsCount() { + if (variantsBuilder_ == null) { + return variants_.size(); + } else { + return variantsBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of flow version variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; + */ + public com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant getVariants(int index) { + if (variantsBuilder_ == null) { + return variants_.get(index); + } else { + return variantsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of flow version variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; + */ + public Builder setVariants( + int index, com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant value) { + if (variantsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVariantsIsMutable(); + variants_.set(index, value); + onChanged(); + } else { + variantsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of flow version variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; + */ + public Builder setVariants( + int index, + com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant.Builder builderForValue) { + if (variantsBuilder_ == null) { + ensureVariantsIsMutable(); + variants_.set(index, builderForValue.build()); + onChanged(); + } else { + variantsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of flow version variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; + */ + public Builder addVariants(com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant value) { + if (variantsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVariantsIsMutable(); + variants_.add(value); + onChanged(); + } else { + variantsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of flow version variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; + */ + public Builder addVariants( + int index, com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant value) { + if (variantsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVariantsIsMutable(); + variants_.add(index, value); + onChanged(); + } else { + variantsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of flow version variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; + */ + public Builder addVariants( + com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant.Builder builderForValue) { + if (variantsBuilder_ == null) { + ensureVariantsIsMutable(); + variants_.add(builderForValue.build()); + onChanged(); + } else { + variantsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of flow version variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; + */ + public Builder addVariants( + int index, + com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant.Builder builderForValue) { + if (variantsBuilder_ == null) { + ensureVariantsIsMutable(); + variants_.add(index, builderForValue.build()); + onChanged(); + } else { + variantsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of flow version variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; + */ + public Builder addAllVariants( + java.lang.Iterable + values) { + if (variantsBuilder_ == null) { + ensureVariantsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, variants_); + onChanged(); + } else { + variantsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of flow version variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; + */ + public Builder clearVariants() { + if (variantsBuilder_ == null) { + variants_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + variantsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of flow version variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; + */ + public Builder removeVariants(int index) { + if (variantsBuilder_ == null) { + ensureVariantsIsMutable(); + variants_.remove(index); + onChanged(); + } else { + variantsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of flow version variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; + */ + public com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant.Builder getVariantsBuilder( + int index) { + return getVariantsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of flow version variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; + */ + public com.google.cloud.dialogflow.cx.v3.VersionVariants.VariantOrBuilder getVariantsOrBuilder( + int index) { + if (variantsBuilder_ == null) { + return variants_.get(index); + } else { + return variantsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of flow version variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; + */ + public java.util.List< + ? extends com.google.cloud.dialogflow.cx.v3.VersionVariants.VariantOrBuilder> + getVariantsOrBuilderList() { + if (variantsBuilder_ != null) { + return variantsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(variants_); + } + } + /** + * + * + *
+     * A list of flow version variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; + */ + public com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant.Builder addVariantsBuilder() { + return getVariantsFieldBuilder() + .addBuilder( + com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant.getDefaultInstance()); + } + /** + * + * + *
+     * A list of flow version variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; + */ + public com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant.Builder addVariantsBuilder( + int index) { + return getVariantsFieldBuilder() + .addBuilder( + index, + com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant.getDefaultInstance()); + } + /** + * + * + *
+     * A list of flow version variants.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; + */ + public java.util.List + getVariantsBuilderList() { + return getVariantsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant, + com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant.Builder, + com.google.cloud.dialogflow.cx.v3.VersionVariants.VariantOrBuilder> + getVariantsFieldBuilder() { + if (variantsBuilder_ == null) { + variantsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant, + com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant.Builder, + com.google.cloud.dialogflow.cx.v3.VersionVariants.VariantOrBuilder>( + variants_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + variants_ = null; + } + return variantsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.VersionVariants) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.VersionVariants) + private static final com.google.cloud.dialogflow.cx.v3.VersionVariants DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.VersionVariants(); + } + + public static com.google.cloud.dialogflow.cx.v3.VersionVariants getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VersionVariants parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new VersionVariants(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.VersionVariants getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VersionVariantsOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VersionVariantsOrBuilder.java new file mode 100644 index 000000000..11dfaea8f --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VersionVariantsOrBuilder.java @@ -0,0 +1,78 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/experiment.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface VersionVariantsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.VersionVariants) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of flow version variants.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; + */ + java.util.List getVariantsList(); + /** + * + * + *
+   * A list of flow version variants.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; + */ + com.google.cloud.dialogflow.cx.v3.VersionVariants.Variant getVariants(int index); + /** + * + * + *
+   * A list of flow version variants.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; + */ + int getVariantsCount(); + /** + * + * + *
+   * A list of flow version variants.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; + */ + java.util.List + getVariantsOrBuilderList(); + /** + * + * + *
+   * A list of flow version variants.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; + */ + com.google.cloud.dialogflow.cx.v3.VersionVariants.VariantOrBuilder getVariantsOrBuilder( + int index); +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/WebhookProto.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/WebhookProto.java index d00abd8f2..59411d9ae 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/WebhookProto.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/WebhookProto.java @@ -160,7 +160,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\002\022/\n\013update_mask\030\002 \001(\0132\032.google.protobuf" + ".FieldMask\"^\n\024DeleteWebhookRequest\0227\n\004na" + "me\030\001 \001(\tB)\340A\002\372A#\n!dialogflow.googleapis." - + "com/Webhook\022\r\n\005force\030\002 \001(\010\"\371\006\n\016WebhookRe" + + "com/Webhook\022\r\n\005force\030\002 \001(\010\"\243\007\n\016WebhookRe" + "quest\022!\n\031detect_intent_response_id\030\001 \001(\t" + "\022W\n\020fulfillment_info\030\006 \001(\0132=.google.clou" + "d.dialogflow.cx.v3.WebhookRequest.Fulfil" @@ -172,88 +172,89 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "v3.SessionInfo\022@\n\010messages\030\007 \003(\0132..googl" + "e.cloud.dialogflow.cx.v3.ResponseMessage" + "\022(\n\007payload\030\010 \001(\0132\027.google.protobuf.Stru" - + "ct\032\036\n\017FulfillmentInfo\022\013\n\003tag\030\001 \001(\t\032\221\003\n\nI" + + "ct\032\036\n\017FulfillmentInfo\022\013\n\003tag\030\001 \001(\t\032\273\003\n\nI" + "ntentInfo\022B\n\023last_matched_intent\030\001 \001(\tB%" - + "\372A\"\n dialogflow.googleapis.com/Intent\022\\\n" - + "\nparameters\030\002 \003(\0132H.google.cloud.dialogf" - + "low.cx.v3.WebhookRequest.IntentInfo.Para" - + "metersEntry\032^\n\024IntentParameterValue\022\026\n\016o" - + "riginal_value\030\001 \001(\t\022.\n\016resolved_value\030\002 " - + "\001(\0132\026.google.protobuf.Value\032\200\001\n\017Paramete" - + "rsEntry\022\013\n\003key\030\001 \001(\t\022\\\n\005value\030\002 \001(\0132M.go" - + "ogle.cloud.dialogflow.cx.v3.WebhookReque" - + "st.IntentInfo.IntentParameterValue:\0028\001\"\257" - + "\005\n\017WebhookResponse\022`\n\024fulfillment_respon" - + "se\030\001 \001(\0132B.google.cloud.dialogflow.cx.v3" - + ".WebhookResponse.FulfillmentResponse\022:\n\t" - + "page_info\030\002 \001(\0132\'.google.cloud.dialogflo" - + "w.cx.v3.PageInfo\022@\n\014session_info\030\003 \001(\0132*" - + ".google.cloud.dialogflow.cx.v3.SessionIn" - + "fo\022(\n\007payload\030\004 \001(\0132\027.google.protobuf.St" - + "ruct\022:\n\013target_page\030\005 \001(\tB#\372A \n\036dialogfl" - + "ow.googleapis.com/PageH\000\022:\n\013target_flow\030" - + "\006 \001(\tB#\372A \n\036dialogflow.googleapis.com/Fl" - + "owH\000\032\213\002\n\023FulfillmentResponse\022@\n\010messages" - + "\030\001 \003(\0132..google.cloud.dialogflow.cx.v3.R" - + "esponseMessage\022h\n\016merge_behavior\030\002 \001(\0162P" - + ".google.cloud.dialogflow.cx.v3.WebhookRe" - + "sponse.FulfillmentResponse.MergeBehavior" - + "\"H\n\rMergeBehavior\022\036\n\032MERGE_BEHAVIOR_UNSP" - + "ECIFIED\020\000\022\n\n\006APPEND\020\001\022\013\n\007REPLACE\020\002B\014\n\ntr" - + "ansition\"\235\004\n\010PageInfo\0229\n\014current_page\030\001 " - + "\001(\tB#\372A \n\036dialogflow.googleapis.com/Page" - + "\022C\n\tform_info\030\003 \001(\01320.google.cloud.dialo" - + "gflow.cx.v3.PageInfo.FormInfo\032\220\003\n\010FormIn" - + "fo\022V\n\016parameter_info\030\002 \003(\0132>.google.clou" - + "d.dialogflow.cx.v3.PageInfo.FormInfo.Par" - + "ameterInfo\032\253\002\n\rParameterInfo\022\024\n\014display_" - + "name\030\001 \001(\t\022\020\n\010required\030\002 \001(\010\022\\\n\005state\030\003 " - + "\001(\0162M.google.cloud.dialogflow.cx.v3.Page" - + "Info.FormInfo.ParameterInfo.ParameterSta" - + "te\022%\n\005value\030\004 \001(\0132\026.google.protobuf.Valu" - + "e\022\026\n\016just_collected\030\005 \001(\010\"U\n\016ParameterSt" - + "ate\022\037\n\033PARAMETER_STATE_UNSPECIFIED\020\000\022\t\n\005" - + "EMPTY\020\001\022\013\n\007INVALID\020\002\022\n\n\006FILLED\020\003\"\341\001\n\013Ses" - + "sionInfo\0227\n\007session\030\001 \001(\tB&\372A#\n!dialogfl" - + "ow.googleapis.com/Session\022N\n\nparameters\030" - + "\002 \003(\0132:.google.cloud.dialogflow.cx.v3.Se" - + "ssionInfo.ParametersEntry\032I\n\017ParametersE" - + "ntry\022\013\n\003key\030\001 \001(\t\022%\n\005value\030\002 \001(\0132\026.googl" - + "e.protobuf.Value:\0028\0012\267\010\n\010Webhooks\022\277\001\n\014Li" - + "stWebhooks\0222.google.cloud.dialogflow.cx." - + "v3.ListWebhooksRequest\0323.google.cloud.di" - + "alogflow.cx.v3.ListWebhooksResponse\"F\202\323\344" - + "\223\0027\0225/v3/{parent=projects/*/locations/*/" - + "agents/*}/webhooks\332A\006parent\022\254\001\n\nGetWebho" - + "ok\0220.google.cloud.dialogflow.cx.v3.GetWe" - + "bhookRequest\032&.google.cloud.dialogflow.c" - + "x.v3.Webhook\"D\202\323\344\223\0027\0225/v3/{name=projects" - + "/*/locations/*/agents/*/webhooks/*}\332A\004na" - + "me\022\305\001\n\rCreateWebhook\0223.google.cloud.dial" - + "ogflow.cx.v3.CreateWebhookRequest\032&.goog" - + "le.cloud.dialogflow.cx.v3.Webhook\"W\202\323\344\223\002" - + "@\"5/v3/{parent=projects/*/locations/*/ag" - + "ents/*}/webhooks:\007webhook\332A\016parent,webho" - + "ok\022\322\001\n\rUpdateWebhook\0223.google.cloud.dial" - + "ogflow.cx.v3.UpdateWebhookRequest\032&.goog" - + "le.cloud.dialogflow.cx.v3.Webhook\"d\202\323\344\223\002" - + "H2=/v3/{webhook.name=projects/*/location" - + "s/*/agents/*/webhooks/*}:\007webhook\332A\023webh" - + "ook,update_mask\022\242\001\n\rDeleteWebhook\0223.goog" - + "le.cloud.dialogflow.cx.v3.DeleteWebhookR" - + "equest\032\026.google.protobuf.Empty\"D\202\323\344\223\0027*5" - + "/v3/{name=projects/*/locations/*/agents/" - + "*/webhooks/*}\332A\004name\032x\312A\031dialogflow.goog" - + "leapis.com\322AYhttps://www.googleapis.com/" - + "auth/cloud-platform,https://www.googleap" - + "is.com/auth/dialogflowB\233\002\n!com.google.cl" - + "oud.dialogflow.cx.v3B\014WebhookProtoP\001Z?go" - + "ogle.golang.org/genproto/googleapis/clou" - + "d/dialogflow/cx/v3;cx\370\001\001\242\002\002DF\252\002\035Google.C" - + "loud.Dialogflow.Cx.V3\352A|\n\'servicedirecto" - + "ry.googleapis.com/Service\022Qprojects/{pro" - + "ject}/locations/{location}/namespaces/{n" - + "amespace}/services/{service}b\006proto3" + + "\372A\"\n dialogflow.googleapis.com/Intent\022\024\n" + + "\014display_name\030\003 \001(\t\022\\\n\nparameters\030\002 \003(\0132" + + "H.google.cloud.dialogflow.cx.v3.WebhookR" + + "equest.IntentInfo.ParametersEntry\022\022\n\ncon" + + "fidence\030\004 \001(\002\032^\n\024IntentParameterValue\022\026\n" + + "\016original_value\030\001 \001(\t\022.\n\016resolved_value\030" + + "\002 \001(\0132\026.google.protobuf.Value\032\200\001\n\017Parame" + + "tersEntry\022\013\n\003key\030\001 \001(\t\022\\\n\005value\030\002 \001(\0132M." + + "google.cloud.dialogflow.cx.v3.WebhookReq" + + "uest.IntentInfo.IntentParameterValue:\0028\001" + + "\"\257\005\n\017WebhookResponse\022`\n\024fulfillment_resp" + + "onse\030\001 \001(\0132B.google.cloud.dialogflow.cx." + + "v3.WebhookResponse.FulfillmentResponse\022:" + + "\n\tpage_info\030\002 \001(\0132\'.google.cloud.dialogf" + + "low.cx.v3.PageInfo\022@\n\014session_info\030\003 \001(\013" + + "2*.google.cloud.dialogflow.cx.v3.Session" + + "Info\022(\n\007payload\030\004 \001(\0132\027.google.protobuf." + + "Struct\022:\n\013target_page\030\005 \001(\tB#\372A \n\036dialog" + + "flow.googleapis.com/PageH\000\022:\n\013target_flo" + + "w\030\006 \001(\tB#\372A \n\036dialogflow.googleapis.com/" + + "FlowH\000\032\213\002\n\023FulfillmentResponse\022@\n\010messag" + + "es\030\001 \003(\0132..google.cloud.dialogflow.cx.v3" + + ".ResponseMessage\022h\n\016merge_behavior\030\002 \001(\016" + + "2P.google.cloud.dialogflow.cx.v3.Webhook" + + "Response.FulfillmentResponse.MergeBehavi" + + "or\"H\n\rMergeBehavior\022\036\n\032MERGE_BEHAVIOR_UN" + + "SPECIFIED\020\000\022\n\n\006APPEND\020\001\022\013\n\007REPLACE\020\002B\014\n\n" + + "transition\"\235\004\n\010PageInfo\0229\n\014current_page\030" + + "\001 \001(\tB#\372A \n\036dialogflow.googleapis.com/Pa" + + "ge\022C\n\tform_info\030\003 \001(\01320.google.cloud.dia" + + "logflow.cx.v3.PageInfo.FormInfo\032\220\003\n\010Form" + + "Info\022V\n\016parameter_info\030\002 \003(\0132>.google.cl" + + "oud.dialogflow.cx.v3.PageInfo.FormInfo.P" + + "arameterInfo\032\253\002\n\rParameterInfo\022\024\n\014displa" + + "y_name\030\001 \001(\t\022\020\n\010required\030\002 \001(\010\022\\\n\005state\030" + + "\003 \001(\0162M.google.cloud.dialogflow.cx.v3.Pa" + + "geInfo.FormInfo.ParameterInfo.ParameterS" + + "tate\022%\n\005value\030\004 \001(\0132\026.google.protobuf.Va" + + "lue\022\026\n\016just_collected\030\005 \001(\010\"U\n\016Parameter" + + "State\022\037\n\033PARAMETER_STATE_UNSPECIFIED\020\000\022\t" + + "\n\005EMPTY\020\001\022\013\n\007INVALID\020\002\022\n\n\006FILLED\020\003\"\341\001\n\013S" + + "essionInfo\0227\n\007session\030\001 \001(\tB&\372A#\n!dialog" + + "flow.googleapis.com/Session\022N\n\nparameter" + + "s\030\002 \003(\0132:.google.cloud.dialogflow.cx.v3." + + "SessionInfo.ParametersEntry\032I\n\017Parameter" + + "sEntry\022\013\n\003key\030\001 \001(\t\022%\n\005value\030\002 \001(\0132\026.goo" + + "gle.protobuf.Value:\0028\0012\267\010\n\010Webhooks\022\277\001\n\014" + + "ListWebhooks\0222.google.cloud.dialogflow.c" + + "x.v3.ListWebhooksRequest\0323.google.cloud." + + "dialogflow.cx.v3.ListWebhooksResponse\"F\202" + + "\323\344\223\0027\0225/v3/{parent=projects/*/locations/" + + "*/agents/*}/webhooks\332A\006parent\022\254\001\n\nGetWeb" + + "hook\0220.google.cloud.dialogflow.cx.v3.Get" + + "WebhookRequest\032&.google.cloud.dialogflow" + + ".cx.v3.Webhook\"D\202\323\344\223\0027\0225/v3/{name=projec" + + "ts/*/locations/*/agents/*/webhooks/*}\332A\004" + + "name\022\305\001\n\rCreateWebhook\0223.google.cloud.di" + + "alogflow.cx.v3.CreateWebhookRequest\032&.go" + + "ogle.cloud.dialogflow.cx.v3.Webhook\"W\202\323\344" + + "\223\002@\"5/v3/{parent=projects/*/locations/*/" + + "agents/*}/webhooks:\007webhook\332A\016parent,web" + + "hook\022\322\001\n\rUpdateWebhook\0223.google.cloud.di" + + "alogflow.cx.v3.UpdateWebhookRequest\032&.go" + + "ogle.cloud.dialogflow.cx.v3.Webhook\"d\202\323\344" + + "\223\002H2=/v3/{webhook.name=projects/*/locati" + + "ons/*/agents/*/webhooks/*}:\007webhook\332A\023we" + + "bhook,update_mask\022\242\001\n\rDeleteWebhook\0223.go" + + "ogle.cloud.dialogflow.cx.v3.DeleteWebhoo" + + "kRequest\032\026.google.protobuf.Empty\"D\202\323\344\223\0027" + + "*5/v3/{name=projects/*/locations/*/agent" + + "s/*/webhooks/*}\332A\004name\032x\312A\031dialogflow.go" + + "ogleapis.com\322AYhttps://www.googleapis.co" + + "m/auth/cloud-platform,https://www.google" + + "apis.com/auth/dialogflowB\233\002\n!com.google." + + "cloud.dialogflow.cx.v3B\014WebhookProtoP\001Z?" + + "google.golang.org/genproto/googleapis/cl" + + "oud/dialogflow/cx/v3;cx\370\001\001\242\002\002DF\252\002\035Google" + + ".Cloud.Dialogflow.Cx.V3\352A|\n\'servicedirec" + + "tory.googleapis.com/Service\022Qprojects/{p" + + "roject}/locations/{location}/namespaces/" + + "{namespace}/services/{service}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -375,7 +376,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_WebhookRequest_IntentInfo_descriptor, new java.lang.String[] { - "LastMatchedIntent", "Parameters", + "LastMatchedIntent", "DisplayName", "Parameters", "Confidence", }); internal_static_google_cloud_dialogflow_cx_v3_WebhookRequest_IntentInfo_IntentParameterValue_descriptor = internal_static_google_cloud_dialogflow_cx_v3_WebhookRequest_IntentInfo_descriptor diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/WebhookRequest.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/WebhookRequest.java index 69fd14d36..4e8fe4aeb 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/WebhookRequest.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/WebhookRequest.java @@ -917,6 +917,31 @@ public interface IntentInfoOrBuilder */ com.google.protobuf.ByteString getLastMatchedIntentBytes(); + /** + * + * + *
+     * Always present. The display name of the last matched [intent][google.cloud.dialogflow.cx.v3.Intent].
+     * 
+ * + * string display_name = 3; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+     * Always present. The display name of the last matched [intent][google.cloud.dialogflow.cx.v3.Intent].
+     * 
+ * + * string display_name = 3; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + /** * * @@ -1006,6 +1031,20 @@ public interface IntentInfoOrBuilder */ com.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue getParametersOrThrow(java.lang.String key); + + /** + * + * + *
+     * The confidence of the matched intent. Values range from 0.0 (completely
+     * uncertain) to 1.0 (completely certain).
+     * 
+ * + * float confidence = 4; + * + * @return The confidence. + */ + float getConfidence(); } /** * @@ -1028,6 +1067,7 @@ private IntentInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { private IntentInfo() { lastMatchedIntent_ = ""; + displayName_ = ""; } @java.lang.Override @@ -1086,6 +1126,18 @@ private IntentInfo( parameters_.getMutableMap().put(parameters__.getKey(), parameters__.getValue()); break; } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 37: + { + confidence_ = input.readFloat(); + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -2203,6 +2255,55 @@ public com.google.protobuf.ByteString getLastMatchedIntentBytes() { } } + public static final int DISPLAY_NAME_FIELD_NUMBER = 3; + private volatile java.lang.Object displayName_; + /** + * + * + *
+     * Always present. The display name of the last matched [intent][google.cloud.dialogflow.cx.v3.Intent].
+     * 
+ * + * string display_name = 3; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+     * Always present. The display name of the last matched [intent][google.cloud.dialogflow.cx.v3.Intent].
+     * 
+ * + * string display_name = 3; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int PARAMETERS_FIELD_NUMBER = 2; private static final class ParametersDefaultEntryHolder { @@ -2353,6 +2454,25 @@ public boolean containsParameters(java.lang.String key) { return map.get(key); } + public static final int CONFIDENCE_FIELD_NUMBER = 4; + private float confidence_; + /** + * + * + *
+     * The confidence of the matched intent. Values range from 0.0 (completely
+     * uncertain) to 1.0 (completely certain).
+     * 
+ * + * float confidence = 4; + * + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -2372,6 +2492,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetParameters(), ParametersDefaultEntryHolder.defaultEntry, 2); + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, displayName_); + } + if (confidence_ != 0F) { + output.writeFloat(4, confidence_); + } unknownFields.writeTo(output); } @@ -2399,6 +2525,12 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, parameters__); } + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, displayName_); + } + if (confidence_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(4, confidence_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -2416,7 +2548,10 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo) obj; if (!getLastMatchedIntent().equals(other.getLastMatchedIntent())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; if (!internalGetParameters().equals(other.internalGetParameters())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits(other.getConfidence())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -2430,10 +2565,14 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + LAST_MATCHED_INTENT_FIELD_NUMBER; hash = (53 * hash) + getLastMatchedIntent().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); if (!internalGetParameters().getMap().isEmpty()) { hash = (37 * hash) + PARAMETERS_FIELD_NUMBER; hash = (53 * hash) + internalGetParameters().hashCode(); } + hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getConfidence()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -2604,7 +2743,11 @@ public Builder clear() { super.clear(); lastMatchedIntent_ = ""; + displayName_ = ""; + internalGetMutableParameters().clear(); + confidence_ = 0F; + return this; } @@ -2635,8 +2778,10 @@ public com.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo buildPartial( new com.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo(this); int from_bitField0_ = bitField0_; result.lastMatchedIntent_ = lastMatchedIntent_; + result.displayName_ = displayName_; result.parameters_ = internalGetParameters(); result.parameters_.makeImmutable(); + result.confidence_ = confidence_; onBuilt(); return result; } @@ -2694,7 +2839,14 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.WebhookRequest.Intent lastMatchedIntent_ = other.lastMatchedIntent_; onChanged(); } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } internalGetMutableParameters().mergeFrom(other.internalGetParameters()); + if (other.getConfidence() != 0F) { + setConfidence(other.getConfidence()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -2844,6 +2996,112 @@ public Builder setLastMatchedIntentBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object displayName_ = ""; + /** + * + * + *
+       * Always present. The display name of the last matched [intent][google.cloud.dialogflow.cx.v3.Intent].
+       * 
+ * + * string display_name = 3; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Always present. The display name of the last matched [intent][google.cloud.dialogflow.cx.v3.Intent].
+       * 
+ * + * string display_name = 3; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Always present. The display name of the last matched [intent][google.cloud.dialogflow.cx.v3.Intent].
+       * 
+ * + * string display_name = 3; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Always present. The display name of the last matched [intent][google.cloud.dialogflow.cx.v3.Intent].
+       * 
+ * + * string display_name = 3; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+       * Always present. The display name of the last matched [intent][google.cloud.dialogflow.cx.v3.Intent].
+       * 
+ * + * string display_name = 3; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + private com.google.protobuf.MapField< java.lang.String, com.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue> @@ -3071,6 +3329,61 @@ public Builder putAllParameters( return this; } + private float confidence_; + /** + * + * + *
+       * The confidence of the matched intent. Values range from 0.0 (completely
+       * uncertain) to 1.0 (completely certain).
+       * 
+ * + * float confidence = 4; + * + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + /** + * + * + *
+       * The confidence of the matched intent. Values range from 0.0 (completely
+       * uncertain) to 1.0 (completely certain).
+       * 
+ * + * float confidence = 4; + * + * @param value The confidence to set. + * @return This builder for chaining. + */ + public Builder setConfidence(float value) { + + confidence_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The confidence of the matched intent. Values range from 0.0 (completely
+       * uncertain) to 1.0 (completely certain).
+       * 
+ * + * float confidence = 4; + * + * @return This builder for chaining. + */ + public Builder clearConfidence() { + + confidence_ = 0F; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/entity_type.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/entity_type.proto index 9ae35dfb0..3e7f4e361 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/entity_type.proto +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/entity_type.proto @@ -204,6 +204,11 @@ message EntityType { // Enables fuzzy entity extraction during classification. bool enable_fuzzy_extraction = 7; + + // 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. + bool redact = 9; } // The request message for [EntityTypes.ListEntityTypes][google.cloud.dialogflow.cx.v3.EntityTypes.ListEntityTypes]. diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/experiment.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/experiment.proto new file mode 100644 index 000000000..712fcf404 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/experiment.proto @@ -0,0 +1,436 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dialogflow.cx.v3; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3"; +option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3;cx"; +option java_multiple_files = true; +option java_outer_classname = "ExperimentProto"; +option java_package = "com.google.cloud.dialogflow.cx.v3"; +option objc_class_prefix = "DF"; + +// Service for managing [Experiments][google.cloud.dialogflow.cx.v3.Experiment]. +service Experiments { + option (google.api.default_host) = "dialogflow.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/dialogflow"; + + // Returns the list of all experiments in the specified [Environment][google.cloud.dialogflow.cx.v3.Environment]. + rpc ListExperiments(ListExperimentsRequest) returns (ListExperimentsResponse) { + option (google.api.http) = { + get: "/v3/{parent=projects/*/locations/*/agents/*/environments/*}/experiments" + }; + option (google.api.method_signature) = "parent"; + } + + // Retrieves the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. + rpc GetExperiment(GetExperimentRequest) returns (Experiment) { + option (google.api.http) = { + get: "/v3/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates an [Experiment][google.cloud.dialogflow.cx.v3.Experiment] in the specified [Environment][google.cloud.dialogflow.cx.v3.Environment]. + rpc CreateExperiment(CreateExperimentRequest) returns (Experiment) { + option (google.api.http) = { + post: "/v3/{parent=projects/*/locations/*/agents/*/environments/*}/experiments" + body: "experiment" + }; + option (google.api.method_signature) = "parent,experiment"; + } + + // Updates the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. + rpc UpdateExperiment(UpdateExperimentRequest) returns (Experiment) { + option (google.api.http) = { + patch: "/v3/{experiment.name=projects/*/locations/*/agents/*/environments/*/experiments/*}" + body: "experiment" + }; + option (google.api.method_signature) = "experiment,update_mask"; + } + + // Deletes the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. + rpc DeleteExperiment(DeleteExperimentRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v3/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Starts the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. This rpc only changes the state of + // experiment from PENDING to RUNNING. + rpc StartExperiment(StartExperimentRequest) returns (Experiment) { + option (google.api.http) = { + post: "/v3/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}:start" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Stops the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. This rpc only changes the state of + // experiment from RUNNING to DONE. + rpc StopExperiment(StopExperimentRequest) returns (Experiment) { + option (google.api.http) = { + post: "/v3/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}:stop" + body: "*" + }; + option (google.api.method_signature) = "name"; + } +} + +// Represents an experiment in an environment. +message Experiment { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/Experiment" + pattern: "projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}" + }; + + // Definition of the experiment. + message Definition { + // 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). + string condition = 1; + + // The variants of the experiment. We currently only support single variant + // experiment. + oneof variants { + // The flow versions as the variants of this experiment. + VersionVariants version_variants = 2; + } + } + + // The inference result which includes an objective metric to optimize and the + // confidence interval. + message Result { + // A confidence interval is a range of possible values for the experiment + // objective you are trying to measure. + message ConfidenceInterval { + // The confidence level used to construct the interval, i.e. there is X% + // chance that the true value is within this interval. + double confidence_level = 1; + + // The percent change between an experiment metric's value and the value + // for its control. + double ratio = 2; + + // Lower bound of the interval. + double lower_bound = 3; + + // Upper bound of the interval. + double upper_bound = 4; + } + + // Metric and corresponding confidence intervals. + message Metric { + // Ratio-based metric type. Only one of type or count_type is specified in + // each Metric. + MetricType type = 1; + + // Count-based metric type. Only one of type or count_type is specified in + // each Metric. + CountType count_type = 5; + + // The actual value of the metric. + oneof value { + // Ratio value of a metric. + double ratio = 2; + + // Count value of a metric. + double count = 4; + } + + // The probability that the treatment is better than all other treatments + // in the experiment + ConfidenceInterval confidence_interval = 3; + } + + // Version variant and associated metrics. + message VersionMetrics { + // The name of the flow [Version][google.cloud.dialogflow.cx.v3.Version]. + // Format: `projects//locations//agents//flows//versions/`. + string version = 1 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Version" + }]; + + // The metrics and corresponding confidence intervals in the inference + // result. + repeated Metric metrics = 2; + + // Number of sessions that were allocated to this version. + int32 session_count = 3; + } + + // Types of ratio-based metric for Dialogflow experiment. + enum MetricType { + // Metric unspecified. + METRIC_UNSPECIFIED = 0; + + // Percentage of contained sessions without user calling back in 24 hours. + CONTAINED_SESSION_NO_CALLBACK_RATE = 1; + + // Percentage of sessions that were handed to a human agent. + LIVE_AGENT_HANDOFF_RATE = 2; + + // Percentage of sessions with the same user calling back. + CALLBACK_SESSION_RATE = 3; + + // Percentage of sessions where user hung up. + ABANDONED_SESSION_RATE = 4; + + // Percentage of sessions reached Dialogflow 'END_PAGE' or + // 'END_SESSION'. + SESSION_END_RATE = 5; + } + + // Types of count-based metric for Dialogflow experiment. + enum CountType { + // Count type unspecified. + COUNT_TYPE_UNSPECIFIED = 0; + + // Total number of occurrences of a 'NO_MATCH'. + TOTAL_NO_MATCH_COUNT = 1; + + // Total number of turn counts. + TOTAL_TURN_COUNT = 2; + + // Average turn count in a session. + AVERAGE_TURN_COUNT = 3; + } + + // Version variants and metrics. + repeated VersionMetrics version_metrics = 1; + + // The last time the experiment's stats data was updated. Will have default + // value if stats have never been computed for this experiment. + google.protobuf.Timestamp last_update_time = 2; + } + + // The state of the experiment. + enum State { + // State unspecified. + STATE_UNSPECIFIED = 0; + + // The experiment is created but not started yet. + DRAFT = 1; + + // The experiment is running. + RUNNING = 2; + + // The experiment is done. + DONE = 3; + } + + // The name of the experiment. + // Format: projects//locations//agents//environments//experiments/.. + string name = 1; + + // Required. The human-readable name of the experiment (unique in an environment). Limit + // of 64 characters. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // The human-readable description of the experiment. + string description = 3; + + // The current state of the experiment. + // Transition triggered by Expriments.StartExperiment: PENDING->RUNNING. + // Transition triggered by Expriments.CancelExperiment: PENDING->CANCELLED or + // RUNNING->CANCELLED. + State state = 4; + + // The definition of the experiment. + Definition definition = 5; + + // Inference result of the experiment. + Result result = 6; + + // Creation time of this experiment. + google.protobuf.Timestamp create_time = 7; + + // Start time of this experiment. + google.protobuf.Timestamp start_time = 8; + + // End time of this experiment. + google.protobuf.Timestamp end_time = 9; + + // Last update time of this experiment. + google.protobuf.Timestamp last_update_time = 10; + + // Maximum number of days to run the experiment. + google.protobuf.Duration experiment_length = 11; + + // The history of updates to the experiment variants. + repeated VariantsHistory variants_history = 12; +} + +// A list of flow version variants. +message VersionVariants { + // A single flow version with specified traffic allocation. + message Variant { + // The name of the flow version. + // Format: `projects//locations//agents//flows//versions/`. + string version = 1; + + // 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. + float traffic_allocation = 2; + + // Whether the variant is for the control group. + bool is_control_group = 3; + } + + // A list of flow version variants. + repeated Variant variants = 1; +} + +// The history of variants update. +message VariantsHistory { + // The variants updated. We currently only support single variant + // experiment. + oneof variants { + // The flow versions as the variants. + VersionVariants version_variants = 1; + } + + // Update time of the variants. + google.protobuf.Timestamp update_time = 2; +} + +// The request message for [Experiments.ListExperiments][google.cloud.dialogflow.cx.v3.Experiments.ListExperiments]. +message ListExperimentsRequest { + // Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to list all environments for. + // Format: `projects//locations//agents//environments/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Experiment" + } + ]; + + // The maximum number of items to return in a single page. By default 20 and + // at most 100. + int32 page_size = 2; + + // The next_page_token value returned from a previous list request. + string page_token = 3; +} + +// The response message for [Experiments.ListExperiments][google.cloud.dialogflow.cx.v3.Experiments.ListExperiments]. +message ListExperimentsResponse { + // 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. + repeated Experiment experiments = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// The request message for [Experiments.GetExperiment][google.cloud.dialogflow.cx.v3.Experiments.GetExperiment]. +message GetExperimentRequest { + // Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment]. + // Format: `projects//locations//agents//environments//experiments/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Experiment" + } + ]; +} + +// The request message for [Experiments.CreateExperiment][google.cloud.dialogflow.cx.v3.Experiments.CreateExperiment]. +message CreateExperimentRequest { + // 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/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Experiment" + } + ]; + + // Required. The experiment to create. + Experiment experiment = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The request message for [Experiments.UpdateExperiment][google.cloud.dialogflow.cx.v3.Experiments.UpdateExperiment]. +message UpdateExperimentRequest { + // Required. The experiment to update. + Experiment experiment = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The mask to control which fields get updated. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The request message for [Experiments.DeleteExperiment][google.cloud.dialogflow.cx.v3.Experiments.DeleteExperiment]. +message DeleteExperimentRequest { + // Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment] to delete. + // Format: `projects//locations//agents//environments//experiments/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Experiment" + } + ]; +} + +// The request message for [Experiments.StartExperiment][google.cloud.dialogflow.cx.v3.Experiments.StartExperiment]. +message StartExperimentRequest { + // Required. Resource name of the experiment to start. + // Format: `projects//locations//agents//environments//experiments/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Experiment" + } + ]; +} + +// The request message for [Experiments.StopExperiment][google.cloud.dialogflow.cx.v3.Experiments.StopExperiment]. +message StopExperimentRequest { + // Required. Resource name of the experiment to stop. + // Format: `projects//locations//agents//environments//experiments/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Experiment" + } + ]; +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/intent.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/intent.proto index 73004154c..519cbd09d 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/intent.proto +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/intent.proto @@ -155,9 +155,9 @@ message Intent { // Indicates whether the parameter represents a list of values. bool is_list = 3; - // Indicates whether the parameter content should be redacted in text and - // audio. If the flag is set to true, the parameter content will be replaced - // by parameter name in both request and response. + // 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. diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/page.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/page.proto index 42d2b741c..213dc8b13 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/page.proto +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/page.proto @@ -242,9 +242,9 @@ message Form { // the default value will be ignored. google.protobuf.Value default_value = 9; - // Indicates whether the parameter content should be redacted in text and - // audio. If the flag is set to true, the parameter content will be replaced - // by parameter name in both request and response. + // 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. diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/response_message.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/response_message.proto index fb54ec9b6..29094abdb 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/response_message.proto +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/response_message.proto @@ -113,13 +113,6 @@ message ResponseMessage { bool allow_playback_interruption = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } - // Indicates that interaction with the Dialogflow agent has ended. - // This message is generated by Dialogflow only and not supposed to be - // defined by the user. - message EndInteraction { - - } - // Specifies an audio clip to be played by the client as part of the response. message PlayAudio { // Required. URI of the audio clip. Dialogflow does not impose any validation on this @@ -132,6 +125,13 @@ message ResponseMessage { bool allow_playback_interruption = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } + // Indicates that interaction with the Dialogflow agent has ended. + // This message is generated by Dialogflow only and not supposed to be + // defined by the user. + message EndInteraction { + + } + // Represents an audio message that is composed of both segments // synthesized from the Dialogflow agent prompts and ones hosted externally // at the specified URIs. diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/test_case.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/test_case.proto index 0f26e6de1..3707cc3ad 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/test_case.proto +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/test_case.proto @@ -210,14 +210,11 @@ message TestCaseResult { // /results/`. string name = 1; - // Optional. Environment where the test was run. If not set, it indicates the draft + // Environment where the test was run. If not set, it indicates the draft // environment. - string environment = 2 [ - (google.api.field_behavior) = OPTIONAL, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/Environment" - } - ]; + string environment = 2 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Environment" + }]; // The conversation turns uttered during the test case replay in chronological // order. diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/webhook.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/webhook.proto index b97bb72d3..664f6d06d 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/webhook.proto +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/webhook.proto @@ -259,11 +259,18 @@ message WebhookRequest { type: "dialogflow.googleapis.com/Intent" }]; + // Always present. The display name of the last matched [intent][google.cloud.dialogflow.cx.v3.Intent]. + string display_name = 3; + // 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. map parameters = 2; + + // The confidence of the matched intent. Values range from 0.0 (completely + // uncertain) to 1.0 (completely certain). + float confidence = 4; } // Always present. The unique identifier of the [DetectIntentResponse][google.cloud.dialogflow.cx.v3.DetectIntentResponse] that diff --git a/synth.metadata b/synth.metadata index 223344e14..5e03d2ec2 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,16 +11,16 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "ed71e24d908d7064311bf3e63282e68d2f683f04", - "internalRef": "354550974" + "sha": "c71a9c4ff7bc5179f2e94af31bc95ce4922575ff", + "internalRef": "354553780" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "ed71e24d908d7064311bf3e63282e68d2f683f04", - "internalRef": "354550974" + "sha": "c71a9c4ff7bc5179f2e94af31bc95ce4922575ff", + "internalRef": "354553780" } }, { @@ -124,6 +124,8 @@ "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityTypesSettings.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/EnvironmentsClient.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/EnvironmentsSettings.java", + "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentsClient.java", + "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentsSettings.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowsClient.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowsSettings.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/IntentsClient.java", @@ -151,6 +153,8 @@ "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/EntityTypesStubSettings.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/EnvironmentsStub.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/EnvironmentsStubSettings.java", + "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/ExperimentsStub.java", + "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/ExperimentsStubSettings.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/FlowsStub.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/FlowsStubSettings.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcAgentsCallableFactory.java", @@ -159,6 +163,8 @@ "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcEntityTypesStub.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcEnvironmentsCallableFactory.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcEnvironmentsStub.java", + "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcExperimentsCallableFactory.java", + "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcExperimentsStub.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcFlowsCallableFactory.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcFlowsStub.java", "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcIntentsCallableFactory.java", @@ -285,6 +291,7 @@ "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/AgentsClientTest.java", "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/EntityTypesClientTest.java", "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/EnvironmentsClientTest.java", + "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/ExperimentsClientTest.java", "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/FlowsClientTest.java", "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/IntentsClientTest.java", "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockAgents.java", @@ -293,6 +300,8 @@ "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockEntityTypesImpl.java", "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockEnvironments.java", "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockEnvironmentsImpl.java", + "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockExperiments.java", + "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockExperimentsImpl.java", "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockFlows.java", "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockFlowsImpl.java", "google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockIntents.java", @@ -366,6 +375,7 @@ "grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentsGrpc.java", "grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityTypesGrpc.java", "grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EnvironmentsGrpc.java", + "grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentsGrpc.java", "grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowsGrpc.java", "grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/IntentsGrpc.java", "grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PagesGrpc.java", @@ -423,6 +433,8 @@ "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateEntityTypeRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateEnvironmentRequest.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateEnvironmentRequestOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateExperimentRequest.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateExperimentRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateFlowRequest.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateFlowRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateIntentRequest.java", @@ -449,6 +461,8 @@ "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeleteEntityTypeRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeleteEnvironmentRequest.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeleteEnvironmentRequestOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeleteExperimentRequest.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeleteExperimentRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeleteFlowRequest.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeleteFlowRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeleteIntentRequest.java", @@ -483,6 +497,10 @@ "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EventHandlerOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EventInput.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EventInputOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Experiment.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentName.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentProto.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportAgentRequest.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportAgentRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportAgentResponse.java", @@ -517,6 +535,8 @@ "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetEntityTypeRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetEnvironmentRequest.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetEnvironmentRequestOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetExperimentRequest.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetExperimentRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetFlowRequest.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetFlowRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetFlowValidationResultRequest.java", @@ -566,6 +586,10 @@ "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListEnvironmentsRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListEnvironmentsResponse.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListEnvironmentsResponseOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListExperimentsRequest.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListExperimentsRequestOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListExperimentsResponse.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListExperimentsResponseOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListFlowsRequest.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListFlowsRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListFlowsResponse.java", @@ -669,6 +693,10 @@ "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SpeechWordInfo.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SpeechWordInfoOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SsmlVoiceGender.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StartExperimentRequest.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StartExperimentRequestOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StopExperimentRequest.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StopExperimentRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StreamingDetectIntentRequest.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StreamingDetectIntentRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StreamingDetectIntentResponse.java", @@ -711,6 +739,8 @@ "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateEntityTypeRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateEnvironmentRequest.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateEnvironmentRequestOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateExperimentRequest.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateExperimentRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateFlowRequest.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateFlowRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateIntentRequest.java", @@ -736,10 +766,14 @@ "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidationMessage.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidationMessageOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ValidationMessageProto.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VariantsHistory.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VariantsHistoryOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Version.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VersionName.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VersionOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VersionProto.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VersionVariants.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VersionVariantsOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VoiceSelectionParams.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VoiceSelectionParamsOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Webhook.java", @@ -754,6 +788,7 @@ "proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/audio_config.proto", "proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/entity_type.proto", "proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/environment.proto", + "proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/experiment.proto", "proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/flow.proto", "proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/fulfillment.proto", "proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/intent.proto", From 9e396c0d0d070a62a756d46374e095290e6e4535 Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Tue, 16 Feb 2021 19:14:58 -0800 Subject: [PATCH 07/12] feat: generate sample code in the Java microgenerator Committer: @miraleung PiperOrigin-RevId: 356341083 Source-Author: Google APIs Source-Date: Mon Feb 8 13:33:28 2021 -0800 Source-Repo: googleapis/googleapis Source-Sha: 8d8c008e56f1af31d57f75561e0f1848ffb29eeb Source-Link: https://github.com/googleapis/googleapis/commit/8d8c008e56f1af31d57f75561e0f1848ffb29eeb --- .../cloud/dialogflow/cx/v3/AgentsClient.java | 396 +++++++++++++ .../dialogflow/cx/v3/EntityTypesClient.java | 281 +++++++++ .../dialogflow/cx/v3/EnvironmentsClient.java | 383 ++++++++++++ .../dialogflow/cx/v3/ExperimentsClient.java | 388 +++++++++++++ .../cloud/dialogflow/cx/v3/FlowsClient.java | 388 +++++++++++++ .../cloud/dialogflow/cx/v3/IntentsClient.java | 252 ++++++++ .../cloud/dialogflow/cx/v3/PagesClient.java | 266 +++++++++ .../cx/v3/SecuritySettingsServiceClient.java | 301 ++++++++++ .../cx/v3/SessionEntityTypesClient.java | 302 ++++++++++ .../dialogflow/cx/v3/SessionsClient.java | 138 +++++ .../dialogflow/cx/v3/TestCasesClient.java | 549 ++++++++++++++++++ .../cx/v3/TransitionRouteGroupsClient.java | 363 ++++++++++++ .../dialogflow/cx/v3/VersionsClient.java | 349 +++++++++++ .../dialogflow/cx/v3/WebhooksClient.java | 250 ++++++++ .../cloud/dialogflow/cx/v3/package-info.java | 120 ++++ .../dialogflow/cx/v3beta1/AgentsClient.java | 396 +++++++++++++ .../cx/v3beta1/EntityTypesClient.java | 281 +++++++++ .../cx/v3beta1/EnvironmentsClient.java | 383 ++++++++++++ .../cx/v3beta1/ExperimentsClient.java | 388 +++++++++++++ .../dialogflow/cx/v3beta1/FlowsClient.java | 388 +++++++++++++ .../dialogflow/cx/v3beta1/IntentsClient.java | 252 ++++++++ .../dialogflow/cx/v3beta1/PagesClient.java | 266 +++++++++ .../SecuritySettingsServiceClient.java | 301 ++++++++++ .../cx/v3beta1/SessionEntityTypesClient.java | 302 ++++++++++ .../dialogflow/cx/v3beta1/SessionsClient.java | 138 +++++ .../cx/v3beta1/TestCasesClient.java | 549 ++++++++++++++++++ .../v3beta1/TransitionRouteGroupsClient.java | 363 ++++++++++++ .../dialogflow/cx/v3beta1/VersionsClient.java | 349 +++++++++++ .../dialogflow/cx/v3beta1/WebhooksClient.java | 250 ++++++++ .../dialogflow/cx/v3beta1/package-info.java | 120 ++++ synth.metadata | 8 +- 31 files changed, 9456 insertions(+), 4 deletions(-) diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentsClient.java index e62dd01ce..1c0bf1c41 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentsClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentsClient.java @@ -48,6 +48,13 @@ *

This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: * + *

{@code
+ * try (AgentsClient agentsClient = AgentsClient.create()) {
+ *   AgentName name = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+ *   Agent response = agentsClient.getAgent(name);
+ * }
+ * }
+ * *

Note: close() needs to be called on the AgentsClient object to clean up resources such as * threads. In the example above, try-with-resources is used, which automatically calls close(). * @@ -159,6 +166,17 @@ public final OperationsClient getOperationsClient() { /** * Returns the list of all agents in the specified location. * + *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (Agent element : agentsClient.listAgents(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The location to list all agents for. Format: `projects/<Project * ID>/locations/<Location ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -173,6 +191,17 @@ public final ListAgentsPagedResponse listAgents(LocationName parent) { /** * Returns the list of all agents in the specified location. * + *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   String parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString();
+   *   for (Agent element : agentsClient.listAgents(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The location to list all agents for. Format: `projects/<Project * ID>/locations/<Location ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -186,6 +215,22 @@ public final ListAgentsPagedResponse listAgents(String parent) { /** * Returns the list of all agents in the specified location. * + *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   ListAgentsRequest request =
+   *       ListAgentsRequest.newBuilder()
+   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Agent element : agentsClient.listAgents(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -198,6 +243,22 @@ public final ListAgentsPagedResponse listAgents(ListAgentsRequest request) { * Returns the list of all agents in the specified location. * *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   ListAgentsRequest request =
+   *       ListAgentsRequest.newBuilder()
+   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future = agentsClient.listAgentsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Agent element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listAgentsPagedCallable() { return stub.listAgentsPagedCallable(); @@ -208,6 +269,23 @@ public final UnaryCallable listAgent * Returns the list of all agents in the specified location. * *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   while (true) {
+   *     ListAgentsResponse response = agentsClient.listAgentsCallable().call(request);
+   *     for (Agent element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listAgentsCallable() { return stub.listAgentsCallable(); @@ -217,6 +295,15 @@ public final UnaryCallable listAgentsCall /** * Retrieves the specified agent. * + *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   AgentName name = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+   *   Agent response = agentsClient.getAgent(name);
+   * }
+   * }
+ * * @param name Required. The name of the agent. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -231,6 +318,15 @@ public final Agent getAgent(AgentName name) { /** * Retrieves the specified agent. * + *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   String name = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString();
+   *   Agent response = agentsClient.getAgent(name);
+   * }
+   * }
+ * * @param name Required. The name of the agent. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -244,6 +340,18 @@ public final Agent getAgent(String name) { /** * Retrieves the specified agent. * + *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   GetAgentRequest request =
+   *       GetAgentRequest.newBuilder()
+   *           .setName(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .build();
+   *   Agent response = agentsClient.getAgent(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -256,6 +364,18 @@ public final Agent getAgent(GetAgentRequest request) { * Retrieves the specified agent. * *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   GetAgentRequest request =
+   *       GetAgentRequest.newBuilder()
+   *           .setName(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .build();
+   *   ApiFuture future = agentsClient.getAgentCallable().futureCall(request);
+   *   // Do something.
+   *   Agent response = future.get();
+   * }
+   * }
*/ public final UnaryCallable getAgentCallable() { return stub.getAgentCallable(); @@ -265,6 +385,16 @@ public final UnaryCallable getAgentCallable() { /** * Creates an agent in the specified location. * + *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   Agent agent = Agent.newBuilder().build();
+   *   Agent response = agentsClient.createAgent(parent, agent);
+   * }
+   * }
+ * * @param parent Required. The location to create a agent for. Format: `projects/<Project * ID>/locations/<Location ID>`. * @param agent Required. The agent to create. @@ -283,6 +413,16 @@ public final Agent createAgent(LocationName parent, Agent agent) { /** * Creates an agent in the specified location. * + *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   String parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString();
+   *   Agent agent = Agent.newBuilder().build();
+   *   Agent response = agentsClient.createAgent(parent, agent);
+   * }
+   * }
+ * * @param parent Required. The location to create a agent for. Format: `projects/<Project * ID>/locations/<Location ID>`. * @param agent Required. The agent to create. @@ -298,6 +438,19 @@ public final Agent createAgent(String parent, Agent agent) { /** * Creates an agent in the specified location. * + *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   CreateAgentRequest request =
+   *       CreateAgentRequest.newBuilder()
+   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setAgent(Agent.newBuilder().build())
+   *           .build();
+   *   Agent response = agentsClient.createAgent(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -310,6 +463,19 @@ public final Agent createAgent(CreateAgentRequest request) { * Creates an agent in the specified location. * *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   CreateAgentRequest request =
+   *       CreateAgentRequest.newBuilder()
+   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setAgent(Agent.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = agentsClient.createAgentCallable().futureCall(request);
+   *   // Do something.
+   *   Agent response = future.get();
+   * }
+   * }
*/ public final UnaryCallable createAgentCallable() { return stub.createAgentCallable(); @@ -319,6 +485,16 @@ public final UnaryCallable createAgentCallable() { /** * Updates the specified agent. * + *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   Agent agent = Agent.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Agent response = agentsClient.updateAgent(agent, updateMask);
+   * }
+   * }
+ * * @param agent Required. The agent to update. * @param updateMask The mask to control which fields get updated. If the mask is not present, all * fields will be updated. @@ -334,6 +510,19 @@ public final Agent updateAgent(Agent agent, FieldMask updateMask) { /** * Updates the specified agent. * + *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   UpdateAgentRequest request =
+   *       UpdateAgentRequest.newBuilder()
+   *           .setAgent(Agent.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Agent response = agentsClient.updateAgent(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -346,6 +535,19 @@ public final Agent updateAgent(UpdateAgentRequest request) { * Updates the specified agent. * *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   UpdateAgentRequest request =
+   *       UpdateAgentRequest.newBuilder()
+   *           .setAgent(Agent.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = agentsClient.updateAgentCallable().futureCall(request);
+   *   // Do something.
+   *   Agent response = future.get();
+   * }
+   * }
*/ public final UnaryCallable updateAgentCallable() { return stub.updateAgentCallable(); @@ -355,6 +557,15 @@ public final UnaryCallable updateAgentCallable() { /** * Deletes the specified agent. * + *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   AgentName name = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+   *   agentsClient.deleteAgent(name);
+   * }
+   * }
+ * * @param name Required. The name of the agent to delete. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -369,6 +580,15 @@ public final void deleteAgent(AgentName name) { /** * Deletes the specified agent. * + *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   String name = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString();
+   *   agentsClient.deleteAgent(name);
+   * }
+   * }
+ * * @param name Required. The name of the agent to delete. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -382,6 +602,18 @@ public final void deleteAgent(String name) { /** * Deletes the specified agent. * + *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   DeleteAgentRequest request =
+   *       DeleteAgentRequest.newBuilder()
+   *           .setName(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .build();
+   *   agentsClient.deleteAgent(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -394,6 +626,18 @@ public final void deleteAgent(DeleteAgentRequest request) { * Deletes the specified agent. * *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   DeleteAgentRequest request =
+   *       DeleteAgentRequest.newBuilder()
+   *           .setName(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .build();
+   *   ApiFuture future = agentsClient.deleteAgentCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final UnaryCallable deleteAgentCallable() { return stub.deleteAgentCallable(); @@ -403,6 +647,19 @@ public final UnaryCallable deleteAgentCallable() { /** * Exports the specified agent to a binary file. * + *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   ExportAgentRequest request =
+   *       ExportAgentRequest.newBuilder()
+   *           .setName(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setAgentUri("agentUri1469149223")
+   *           .build();
+   *   ExportAgentResponse response = agentsClient.exportAgentAsync(request).get();
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -416,6 +673,20 @@ public final OperationFuture exportAgentAsync( * Exports the specified agent to a binary file. * *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   ExportAgentRequest request =
+   *       ExportAgentRequest.newBuilder()
+   *           .setName(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setAgentUri("agentUri1469149223")
+   *           .build();
+   *   OperationFuture future =
+   *       agentsClient.exportAgentOperationCallable().futureCall(request);
+   *   // Do something.
+   *   ExportAgentResponse response = future.get();
+   * }
+   * }
*/ public final OperationCallable exportAgentOperationCallable() { @@ -427,6 +698,19 @@ public final OperationFuture exportAgentAsync( * Exports the specified agent to a binary file. * *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   ExportAgentRequest request =
+   *       ExportAgentRequest.newBuilder()
+   *           .setName(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setAgentUri("agentUri1469149223")
+   *           .build();
+   *   ApiFuture future = agentsClient.exportAgentCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
*/ public final UnaryCallable exportAgentCallable() { return stub.exportAgentCallable(); @@ -439,6 +723,18 @@ public final UnaryCallable exportAgentCallable() *

Replaces the current agent with a new one. Note that all existing resources in agent (e.g. * intents, entity types, flows) will be removed. * + *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   RestoreAgentRequest request =
+   *       RestoreAgentRequest.newBuilder()
+   *           .setName(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .build();
+   *   agentsClient.restoreAgentAsync(request).get();
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -454,6 +750,19 @@ public final OperationFuture restoreAgentAsync(RestoreAgentReques * intents, entity types, flows) will be removed. * *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   RestoreAgentRequest request =
+   *       RestoreAgentRequest.newBuilder()
+   *           .setName(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .build();
+   *   OperationFuture future =
+   *       agentsClient.restoreAgentOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final OperationCallable restoreAgentOperationCallable() { @@ -468,6 +777,18 @@ public final OperationFuture restoreAgentAsync(RestoreAgentReques * intents, entity types, flows) will be removed. * *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   RestoreAgentRequest request =
+   *       RestoreAgentRequest.newBuilder()
+   *           .setName(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .build();
+   *   ApiFuture future = agentsClient.restoreAgentCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final UnaryCallable restoreAgentCallable() { return stub.restoreAgentCallable(); @@ -479,6 +800,19 @@ public final UnaryCallable restoreAgentCallable( * version is validated. Please call this API after the training is completed to get the complete * validation results. * + *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   ValidateAgentRequest request =
+   *       ValidateAgentRequest.newBuilder()
+   *           .setName(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   AgentValidationResult response = agentsClient.validateAgent(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -493,6 +827,20 @@ public final AgentValidationResult validateAgent(ValidateAgentRequest request) { * validation results. * *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   ValidateAgentRequest request =
+   *       ValidateAgentRequest.newBuilder()
+   *           .setName(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   ApiFuture future =
+   *       agentsClient.validateAgentCallable().futureCall(request);
+   *   // Do something.
+   *   AgentValidationResult response = future.get();
+   * }
+   * }
*/ public final UnaryCallable validateAgentCallable() { return stub.validateAgentCallable(); @@ -503,6 +851,16 @@ public final UnaryCallable validate * Gets the latest agent validation result. Agent validation is performed when ValidateAgent is * called. * + *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   AgentValidationResultName name =
+   *       AgentValidationResultName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+   *   AgentValidationResult response = agentsClient.getAgentValidationResult(name);
+   * }
+   * }
+ * * @param name Required. The agent name. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/validationResult`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -520,6 +878,15 @@ public final AgentValidationResult getAgentValidationResult(AgentValidationResul * Gets the latest agent validation result. Agent validation is performed when ValidateAgent is * called. * + *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   String name = AgentValidationResultName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString();
+   *   AgentValidationResult response = agentsClient.getAgentValidationResult(name);
+   * }
+   * }
+ * * @param name Required. The agent name. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/validationResult`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -535,6 +902,20 @@ public final AgentValidationResult getAgentValidationResult(String name) { * Gets the latest agent validation result. Agent validation is performed when ValidateAgent is * called. * + *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   GetAgentValidationResultRequest request =
+   *       GetAgentValidationResultRequest.newBuilder()
+   *           .setName(
+   *               AgentValidationResultName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   AgentValidationResult response = agentsClient.getAgentValidationResult(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -549,6 +930,21 @@ public final AgentValidationResult getAgentValidationResult( * called. * *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   GetAgentValidationResultRequest request =
+   *       GetAgentValidationResultRequest.newBuilder()
+   *           .setName(
+   *               AgentValidationResultName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   ApiFuture future =
+   *       agentsClient.getAgentValidationResultCallable().futureCall(request);
+   *   // Do something.
+   *   AgentValidationResult response = future.get();
+   * }
+   * }
*/ public final UnaryCallable getAgentValidationResultCallable() { diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityTypesClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityTypesClient.java index b14b15718..fd25db6df 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityTypesClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityTypesClient.java @@ -44,6 +44,14 @@ *

This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: * + *

{@code
+ * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+ *   EntityTypeName name =
+ *       EntityTypeName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENTITY_TYPE]");
+ *   EntityType response = entityTypesClient.getEntityType(name);
+ * }
+ * }
+ * *

Note: close() needs to be called on the EntityTypesClient object to clean up resources such as * threads. In the example above, try-with-resources is used, which automatically calls close(). * @@ -146,6 +154,17 @@ public EntityTypesStub getStub() { /** * Returns the list of all entity types in the specified agent. * + *

Sample code: + * + *

{@code
+   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+   *   for (EntityType element : entityTypesClient.listEntityTypes(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The agent to list all entity types for. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -162,6 +181,18 @@ public final ListEntityTypesPagedResponse listEntityTypes(AgentName parent) { /** * Returns the list of all entity types in the specified agent. * + *

Sample code: + * + *

{@code
+   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   String parent =
+   *       EntityTypeName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENTITY_TYPE]").toString();
+   *   for (EntityType element : entityTypesClient.listEntityTypes(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The agent to list all entity types for. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -175,6 +206,25 @@ public final ListEntityTypesPagedResponse listEntityTypes(String parent) { /** * Returns the list of all entity types in the specified agent. * + *

Sample code: + * + *

{@code
+   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   ListEntityTypesRequest request =
+   *       ListEntityTypesRequest.newBuilder()
+   *           .setParent(
+   *               EntityTypeName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENTITY_TYPE]")
+   *                   .toString())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (EntityType element : entityTypesClient.listEntityTypes(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -187,6 +237,26 @@ public final ListEntityTypesPagedResponse listEntityTypes(ListEntityTypesRequest * Returns the list of all entity types in the specified agent. * *

Sample code: + * + *

{@code
+   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   ListEntityTypesRequest request =
+   *       ListEntityTypesRequest.newBuilder()
+   *           .setParent(
+   *               EntityTypeName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENTITY_TYPE]")
+   *                   .toString())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       entityTypesClient.listEntityTypesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (EntityType element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listEntityTypesPagedCallable() { @@ -198,6 +268,24 @@ public final ListEntityTypesPagedResponse listEntityTypes(ListEntityTypesRequest * Returns the list of all entity types in the specified agent. * *

Sample code: + * + *

{@code
+   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   while (true) {
+   *     ListEntityTypesResponse response =
+   *         entityTypesClient.listEntityTypesCallable().call(request);
+   *     for (EntityType element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listEntityTypesCallable() { @@ -208,6 +296,16 @@ public final ListEntityTypesPagedResponse listEntityTypes(ListEntityTypesRequest /** * Retrieves the specified entity type. * + *

Sample code: + * + *

{@code
+   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   EntityTypeName name =
+   *       EntityTypeName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENTITY_TYPE]");
+   *   EntityType response = entityTypesClient.getEntityType(name);
+   * }
+   * }
+ * * @param name Required. The name of the entity type. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/entityTypes/<Entity Type * ID>`. @@ -223,6 +321,16 @@ public final EntityType getEntityType(EntityTypeName name) { /** * Retrieves the specified entity type. * + *

Sample code: + * + *

{@code
+   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   String name =
+   *       EntityTypeName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENTITY_TYPE]").toString();
+   *   EntityType response = entityTypesClient.getEntityType(name);
+   * }
+   * }
+ * * @param name Required. The name of the entity type. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/entityTypes/<Entity Type * ID>`. @@ -237,6 +345,21 @@ public final EntityType getEntityType(String name) { /** * Retrieves the specified entity type. * + *

Sample code: + * + *

{@code
+   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   GetEntityTypeRequest request =
+   *       GetEntityTypeRequest.newBuilder()
+   *           .setName(
+   *               EntityTypeName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENTITY_TYPE]")
+   *                   .toString())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   EntityType response = entityTypesClient.getEntityType(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -249,6 +372,21 @@ public final EntityType getEntityType(GetEntityTypeRequest request) { * Retrieves the specified entity type. * *

Sample code: + * + *

{@code
+   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   GetEntityTypeRequest request =
+   *       GetEntityTypeRequest.newBuilder()
+   *           .setName(
+   *               EntityTypeName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENTITY_TYPE]")
+   *                   .toString())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   ApiFuture future = entityTypesClient.getEntityTypeCallable().futureCall(request);
+   *   // Do something.
+   *   EntityType response = future.get();
+   * }
+   * }
*/ public final UnaryCallable getEntityTypeCallable() { return stub.getEntityTypeCallable(); @@ -258,6 +396,16 @@ public final UnaryCallable getEntityTypeCallab /** * Creates an entity type in the specified agent. * + *

Sample code: + * + *

{@code
+   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+   *   EntityType entityType = EntityType.newBuilder().build();
+   *   EntityType response = entityTypesClient.createEntityType(parent, entityType);
+   * }
+   * }
+ * * @param parent Required. The agent to create a entity type for. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>`. * @param entityType Required. The entity type to create. @@ -276,6 +424,17 @@ public final EntityType createEntityType(AgentName parent, EntityType entityType /** * Creates an entity type in the specified agent. * + *

Sample code: + * + *

{@code
+   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   String parent =
+   *       EntityTypeName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENTITY_TYPE]").toString();
+   *   EntityType entityType = EntityType.newBuilder().build();
+   *   EntityType response = entityTypesClient.createEntityType(parent, entityType);
+   * }
+   * }
+ * * @param parent Required. The agent to create a entity type for. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>`. * @param entityType Required. The entity type to create. @@ -291,6 +450,22 @@ public final EntityType createEntityType(String parent, EntityType entityType) { /** * Creates an entity type in the specified agent. * + *

Sample code: + * + *

{@code
+   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   CreateEntityTypeRequest request =
+   *       CreateEntityTypeRequest.newBuilder()
+   *           .setParent(
+   *               EntityTypeName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENTITY_TYPE]")
+   *                   .toString())
+   *           .setEntityType(EntityType.newBuilder().build())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   EntityType response = entityTypesClient.createEntityType(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -303,6 +478,23 @@ public final EntityType createEntityType(CreateEntityTypeRequest request) { * Creates an entity type in the specified agent. * *

Sample code: + * + *

{@code
+   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   CreateEntityTypeRequest request =
+   *       CreateEntityTypeRequest.newBuilder()
+   *           .setParent(
+   *               EntityTypeName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENTITY_TYPE]")
+   *                   .toString())
+   *           .setEntityType(EntityType.newBuilder().build())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   ApiFuture future =
+   *       entityTypesClient.createEntityTypeCallable().futureCall(request);
+   *   // Do something.
+   *   EntityType response = future.get();
+   * }
+   * }
*/ public final UnaryCallable createEntityTypeCallable() { return stub.createEntityTypeCallable(); @@ -312,6 +504,16 @@ public final UnaryCallable createEntityType /** * Updates the specified entity type. * + *

Sample code: + * + *

{@code
+   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   EntityType entityType = EntityType.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   EntityType response = entityTypesClient.updateEntityType(entityType, updateMask);
+   * }
+   * }
+ * * @param entityType Required. The entity type to update. * @param updateMask The mask to control which fields get updated. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -329,6 +531,20 @@ public final EntityType updateEntityType(EntityType entityType, FieldMask update /** * Updates the specified entity type. * + *

Sample code: + * + *

{@code
+   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   UpdateEntityTypeRequest request =
+   *       UpdateEntityTypeRequest.newBuilder()
+   *           .setEntityType(EntityType.newBuilder().build())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   EntityType response = entityTypesClient.updateEntityType(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -341,6 +557,21 @@ public final EntityType updateEntityType(UpdateEntityTypeRequest request) { * Updates the specified entity type. * *

Sample code: + * + *

{@code
+   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   UpdateEntityTypeRequest request =
+   *       UpdateEntityTypeRequest.newBuilder()
+   *           .setEntityType(EntityType.newBuilder().build())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       entityTypesClient.updateEntityTypeCallable().futureCall(request);
+   *   // Do something.
+   *   EntityType response = future.get();
+   * }
+   * }
*/ public final UnaryCallable updateEntityTypeCallable() { return stub.updateEntityTypeCallable(); @@ -350,6 +581,16 @@ public final UnaryCallable updateEntityType /** * Deletes the specified entity type. * + *

Sample code: + * + *

{@code
+   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   EntityTypeName name =
+   *       EntityTypeName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENTITY_TYPE]");
+   *   entityTypesClient.deleteEntityType(name);
+   * }
+   * }
+ * * @param name Required. The name of the entity type to delete. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/entityTypes/<Entity Type * ID>`. @@ -365,6 +606,16 @@ public final void deleteEntityType(EntityTypeName name) { /** * Deletes the specified entity type. * + *

Sample code: + * + *

{@code
+   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   String name =
+   *       EntityTypeName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENTITY_TYPE]").toString();
+   *   entityTypesClient.deleteEntityType(name);
+   * }
+   * }
+ * * @param name Required. The name of the entity type to delete. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/entityTypes/<Entity Type * ID>`. @@ -379,6 +630,21 @@ public final void deleteEntityType(String name) { /** * Deletes the specified entity type. * + *

Sample code: + * + *

{@code
+   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   DeleteEntityTypeRequest request =
+   *       DeleteEntityTypeRequest.newBuilder()
+   *           .setName(
+   *               EntityTypeName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENTITY_TYPE]")
+   *                   .toString())
+   *           .setForce(true)
+   *           .build();
+   *   entityTypesClient.deleteEntityType(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -391,6 +657,21 @@ public final void deleteEntityType(DeleteEntityTypeRequest request) { * Deletes the specified entity type. * *

Sample code: + * + *

{@code
+   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   DeleteEntityTypeRequest request =
+   *       DeleteEntityTypeRequest.newBuilder()
+   *           .setName(
+   *               EntityTypeName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENTITY_TYPE]")
+   *                   .toString())
+   *           .setForce(true)
+   *           .build();
+   *   ApiFuture future = entityTypesClient.deleteEntityTypeCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final UnaryCallable deleteEntityTypeCallable() { return stub.deleteEntityTypeCallable(); diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/EnvironmentsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/EnvironmentsClient.java index 138e4358c..ebbe55f11 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/EnvironmentsClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/EnvironmentsClient.java @@ -49,6 +49,14 @@ *

This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: * + *

{@code
+ * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+ *   EnvironmentName name =
+ *       EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]");
+ *   Environment response = environmentsClient.getEnvironment(name);
+ * }
+ * }
+ * *

Note: close() needs to be called on the EnvironmentsClient object to clean up resources such * as threads. In the example above, try-with-resources is used, which automatically calls close(). * @@ -163,6 +171,17 @@ public final OperationsClient getOperationsClient() { * Returns the list of all environments in the specified * [Agent][google.cloud.dialogflow.cx.v3.Agent]. * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+   *   for (Environment element : environmentsClient.listEnvironments(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to list all * environments for. Format: `projects/<Project ID>/locations/<Location * ID>/agents/<Agent ID>`. @@ -181,6 +200,18 @@ public final ListEnvironmentsPagedResponse listEnvironments(AgentName parent) { * Returns the list of all environments in the specified * [Agent][google.cloud.dialogflow.cx.v3.Agent]. * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   String parent =
+   *       EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]").toString();
+   *   for (Environment element : environmentsClient.listEnvironments(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to list all * environments for. Format: `projects/<Project ID>/locations/<Location * ID>/agents/<Agent ID>`. @@ -197,6 +228,24 @@ public final ListEnvironmentsPagedResponse listEnvironments(String parent) { * Returns the list of all environments in the specified * [Agent][google.cloud.dialogflow.cx.v3.Agent]. * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   ListEnvironmentsRequest request =
+   *       ListEnvironmentsRequest.newBuilder()
+   *           .setParent(
+   *               EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Environment element : environmentsClient.listEnvironments(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -210,6 +259,25 @@ public final ListEnvironmentsPagedResponse listEnvironments(ListEnvironmentsRequ * [Agent][google.cloud.dialogflow.cx.v3.Agent]. * *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   ListEnvironmentsRequest request =
+   *       ListEnvironmentsRequest.newBuilder()
+   *           .setParent(
+   *               EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       environmentsClient.listEnvironmentsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Environment element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listEnvironmentsPagedCallable() { @@ -222,6 +290,24 @@ public final ListEnvironmentsPagedResponse listEnvironments(ListEnvironmentsRequ * [Agent][google.cloud.dialogflow.cx.v3.Agent]. * *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   while (true) {
+   *     ListEnvironmentsResponse response =
+   *         environmentsClient.listEnvironmentsCallable().call(request);
+   *     for (Environment element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listEnvironmentsCallable() { @@ -232,6 +318,16 @@ public final ListEnvironmentsPagedResponse listEnvironments(ListEnvironmentsRequ /** * Retrieves the specified [Environment][google.cloud.dialogflow.cx.v3.Environment]. * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   EnvironmentName name =
+   *       EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]");
+   *   Environment response = environmentsClient.getEnvironment(name);
+   * }
+   * }
+ * * @param name Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment]. * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent * ID>/environments/<Environment ID>`. @@ -247,6 +343,16 @@ public final Environment getEnvironment(EnvironmentName name) { /** * Retrieves the specified [Environment][google.cloud.dialogflow.cx.v3.Environment]. * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   String name =
+   *       EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]").toString();
+   *   Environment response = environmentsClient.getEnvironment(name);
+   * }
+   * }
+ * * @param name Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment]. * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent * ID>/environments/<Environment ID>`. @@ -261,6 +367,20 @@ public final Environment getEnvironment(String name) { /** * Retrieves the specified [Environment][google.cloud.dialogflow.cx.v3.Environment]. * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   GetEnvironmentRequest request =
+   *       GetEnvironmentRequest.newBuilder()
+   *           .setName(
+   *               EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]")
+   *                   .toString())
+   *           .build();
+   *   Environment response = environmentsClient.getEnvironment(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -273,6 +393,21 @@ public final Environment getEnvironment(GetEnvironmentRequest request) { * Retrieves the specified [Environment][google.cloud.dialogflow.cx.v3.Environment]. * *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   GetEnvironmentRequest request =
+   *       GetEnvironmentRequest.newBuilder()
+   *           .setName(
+   *               EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       environmentsClient.getEnvironmentCallable().futureCall(request);
+   *   // Do something.
+   *   Environment response = future.get();
+   * }
+   * }
*/ public final UnaryCallable getEnvironmentCallable() { return stub.getEnvironmentCallable(); @@ -283,6 +418,16 @@ public final UnaryCallable getEnvironmentCal * Creates an [Environment][google.cloud.dialogflow.cx.v3.Environment] in the specified * [Agent][google.cloud.dialogflow.cx.v3.Agent]. * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+   *   Environment environment = Environment.newBuilder().build();
+   *   Environment response = environmentsClient.createEnvironmentAsync(parent, environment).get();
+   * }
+   * }
+ * * @param parent Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to create an * [Environment][google.cloud.dialogflow.cx.v3.Environment] for. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>`. @@ -304,6 +449,17 @@ public final OperationFuture createEnvironmentAsync( * Creates an [Environment][google.cloud.dialogflow.cx.v3.Environment] in the specified * [Agent][google.cloud.dialogflow.cx.v3.Agent]. * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   String parent =
+   *       EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]").toString();
+   *   Environment environment = Environment.newBuilder().build();
+   *   Environment response = environmentsClient.createEnvironmentAsync(parent, environment).get();
+   * }
+   * }
+ * * @param parent Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to create an * [Environment][google.cloud.dialogflow.cx.v3.Environment] for. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>`. @@ -322,6 +478,21 @@ public final OperationFuture createEnvironmentAsync( * Creates an [Environment][google.cloud.dialogflow.cx.v3.Environment] in the specified * [Agent][google.cloud.dialogflow.cx.v3.Agent]. * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   CreateEnvironmentRequest request =
+   *       CreateEnvironmentRequest.newBuilder()
+   *           .setParent(
+   *               EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]")
+   *                   .toString())
+   *           .setEnvironment(Environment.newBuilder().build())
+   *           .build();
+   *   Environment response = environmentsClient.createEnvironmentAsync(request).get();
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -336,6 +507,22 @@ public final OperationFuture createEnvironmentAsync( * [Agent][google.cloud.dialogflow.cx.v3.Agent]. * *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   CreateEnvironmentRequest request =
+   *       CreateEnvironmentRequest.newBuilder()
+   *           .setParent(
+   *               EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]")
+   *                   .toString())
+   *           .setEnvironment(Environment.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       environmentsClient.createEnvironmentOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Environment response = future.get();
+   * }
+   * }
*/ public final OperationCallable createEnvironmentOperationCallable() { @@ -348,6 +535,22 @@ public final OperationFuture createEnvironmentAsync( * [Agent][google.cloud.dialogflow.cx.v3.Agent]. * *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   CreateEnvironmentRequest request =
+   *       CreateEnvironmentRequest.newBuilder()
+   *           .setParent(
+   *               EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]")
+   *                   .toString())
+   *           .setEnvironment(Environment.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       environmentsClient.createEnvironmentCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
*/ public final UnaryCallable createEnvironmentCallable() { return stub.createEnvironmentCallable(); @@ -357,6 +560,17 @@ public final UnaryCallable createEnvironmen /** * Updates the specified [Environment][google.cloud.dialogflow.cx.v3.Environment]. * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   Environment environment = Environment.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Environment response =
+   *       environmentsClient.updateEnvironmentAsync(environment, updateMask).get();
+   * }
+   * }
+ * * @param environment Required. The environment to update. * @param updateMask Required. The mask to control which fields get updated. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -375,6 +589,19 @@ public final OperationFuture updateEnvironmentAsync( /** * Updates the specified [Environment][google.cloud.dialogflow.cx.v3.Environment]. * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   UpdateEnvironmentRequest request =
+   *       UpdateEnvironmentRequest.newBuilder()
+   *           .setEnvironment(Environment.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Environment response = environmentsClient.updateEnvironmentAsync(request).get();
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -388,6 +615,20 @@ public final OperationFuture updateEnvironmentAsync( * Updates the specified [Environment][google.cloud.dialogflow.cx.v3.Environment]. * *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   UpdateEnvironmentRequest request =
+   *       UpdateEnvironmentRequest.newBuilder()
+   *           .setEnvironment(Environment.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       environmentsClient.updateEnvironmentOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Environment response = future.get();
+   * }
+   * }
*/ public final OperationCallable updateEnvironmentOperationCallable() { @@ -399,6 +640,20 @@ public final OperationFuture updateEnvironmentAsync( * Updates the specified [Environment][google.cloud.dialogflow.cx.v3.Environment]. * *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   UpdateEnvironmentRequest request =
+   *       UpdateEnvironmentRequest.newBuilder()
+   *           .setEnvironment(Environment.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       environmentsClient.updateEnvironmentCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
*/ public final UnaryCallable updateEnvironmentCallable() { return stub.updateEnvironmentCallable(); @@ -408,6 +663,16 @@ public final UnaryCallable updateEnvironmen /** * Deletes the specified [Environment][google.cloud.dialogflow.cx.v3.Environment]. * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   EnvironmentName name =
+   *       EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]");
+   *   environmentsClient.deleteEnvironment(name);
+   * }
+   * }
+ * * @param name Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment] * to delete. Format: `projects/<Project ID>/locations/<Location * ID>/agents/<Agent ID>/environments/<Environment ID>`. @@ -425,6 +690,16 @@ public final void deleteEnvironment(EnvironmentName name) { /** * Deletes the specified [Environment][google.cloud.dialogflow.cx.v3.Environment]. * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   String name =
+   *       EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]").toString();
+   *   environmentsClient.deleteEnvironment(name);
+   * }
+   * }
+ * * @param name Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment] * to delete. Format: `projects/<Project ID>/locations/<Location * ID>/agents/<Agent ID>/environments/<Environment ID>`. @@ -439,6 +714,20 @@ public final void deleteEnvironment(String name) { /** * Deletes the specified [Environment][google.cloud.dialogflow.cx.v3.Environment]. * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   DeleteEnvironmentRequest request =
+   *       DeleteEnvironmentRequest.newBuilder()
+   *           .setName(
+   *               EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]")
+   *                   .toString())
+   *           .build();
+   *   environmentsClient.deleteEnvironment(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -451,6 +740,20 @@ public final void deleteEnvironment(DeleteEnvironmentRequest request) { * Deletes the specified [Environment][google.cloud.dialogflow.cx.v3.Environment]. * *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   DeleteEnvironmentRequest request =
+   *       DeleteEnvironmentRequest.newBuilder()
+   *           .setName(
+   *               EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future = environmentsClient.deleteEnvironmentCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final UnaryCallable deleteEnvironmentCallable() { return stub.deleteEnvironmentCallable(); @@ -460,6 +763,18 @@ public final UnaryCallable deleteEnvironmentCal /** * Looks up the history of the specified [Environment][google.cloud.dialogflow.cx.v3.Environment]. * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   EnvironmentName name =
+   *       EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]");
+   *   for (Environment element : environmentsClient.lookupEnvironmentHistory(name).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param name Required. Resource name of the environment to look up the history for. Format: * `projects/<Project ID>/locations/<Location ID>/agents/<Agent * ID>/environments/<Environment ID>`. @@ -478,6 +793,18 @@ public final LookupEnvironmentHistoryPagedResponse lookupEnvironmentHistory( /** * Looks up the history of the specified [Environment][google.cloud.dialogflow.cx.v3.Environment]. * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   String name =
+   *       EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]").toString();
+   *   for (Environment element : environmentsClient.lookupEnvironmentHistory(name).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param name Required. Resource name of the environment to look up the history for. Format: * `projects/<Project ID>/locations/<Location ID>/agents/<Agent * ID>/environments/<Environment ID>`. @@ -493,6 +820,25 @@ public final LookupEnvironmentHistoryPagedResponse lookupEnvironmentHistory(Stri /** * Looks up the history of the specified [Environment][google.cloud.dialogflow.cx.v3.Environment]. * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   LookupEnvironmentHistoryRequest request =
+   *       LookupEnvironmentHistoryRequest.newBuilder()
+   *           .setName(
+   *               EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Environment element :
+   *       environmentsClient.lookupEnvironmentHistory(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -506,6 +852,25 @@ public final LookupEnvironmentHistoryPagedResponse lookupEnvironmentHistory( * Looks up the history of the specified [Environment][google.cloud.dialogflow.cx.v3.Environment]. * *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   LookupEnvironmentHistoryRequest request =
+   *       LookupEnvironmentHistoryRequest.newBuilder()
+   *           .setName(
+   *               EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       environmentsClient.lookupEnvironmentHistoryPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Environment element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable lookupEnvironmentHistoryPagedCallable() { @@ -517,6 +882,24 @@ public final LookupEnvironmentHistoryPagedResponse lookupEnvironmentHistory( * Looks up the history of the specified [Environment][google.cloud.dialogflow.cx.v3.Environment]. * *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   while (true) {
+   *     LookupEnvironmentHistoryResponse response =
+   *         environmentsClient.lookupEnvironmentHistoryCallable().call(request);
+   *     for (Environment element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
*/ public final UnaryCallable lookupEnvironmentHistoryCallable() { diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentsClient.java index 9c917cfc5..ed4017a64 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentsClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentsClient.java @@ -44,6 +44,14 @@ *

This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: * + *

{@code
+ * try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
+ *   ExperimentName name =
+ *       ExperimentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]");
+ *   Experiment response = experimentsClient.getExperiment(name);
+ * }
+ * }
+ * *

Note: close() needs to be called on the ExperimentsClient object to clean up resources such as * threads. In the example above, try-with-resources is used, which automatically calls close(). * @@ -147,6 +155,18 @@ public ExperimentsStub getStub() { * Returns the list of all experiments in the specified * [Environment][google.cloud.dialogflow.cx.v3.Environment]. * + *

Sample code: + * + *

{@code
+   * try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
+   *   EnvironmentName parent =
+   *       EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]");
+   *   for (Experiment element : experimentsClient.listExperiments(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to list * all environments for. Format: `projects/<Project ID>/locations/<Location * ID>/agents/<Agent ID>/environments/<Environment ID>`. @@ -165,6 +185,19 @@ public final ListExperimentsPagedResponse listExperiments(EnvironmentName parent * Returns the list of all experiments in the specified * [Environment][google.cloud.dialogflow.cx.v3.Environment]. * + *

Sample code: + * + *

{@code
+   * try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
+   *   String parent =
+   *       ExperimentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]")
+   *           .toString();
+   *   for (Experiment element : experimentsClient.listExperiments(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to list * all environments for. Format: `projects/<Project ID>/locations/<Location * ID>/agents/<Agent ID>/environments/<Environment ID>`. @@ -180,6 +213,25 @@ public final ListExperimentsPagedResponse listExperiments(String parent) { * Returns the list of all experiments in the specified * [Environment][google.cloud.dialogflow.cx.v3.Environment]. * + *

Sample code: + * + *

{@code
+   * try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
+   *   ListExperimentsRequest request =
+   *       ListExperimentsRequest.newBuilder()
+   *           .setParent(
+   *               ExperimentName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Experiment element : experimentsClient.listExperiments(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -193,6 +245,26 @@ public final ListExperimentsPagedResponse listExperiments(ListExperimentsRequest * [Environment][google.cloud.dialogflow.cx.v3.Environment]. * *

Sample code: + * + *

{@code
+   * try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
+   *   ListExperimentsRequest request =
+   *       ListExperimentsRequest.newBuilder()
+   *           .setParent(
+   *               ExperimentName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       experimentsClient.listExperimentsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Experiment element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listExperimentsPagedCallable() { @@ -205,6 +277,24 @@ public final ListExperimentsPagedResponse listExperiments(ListExperimentsRequest * [Environment][google.cloud.dialogflow.cx.v3.Environment]. * *

Sample code: + * + *

{@code
+   * try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
+   *   while (true) {
+   *     ListExperimentsResponse response =
+   *         experimentsClient.listExperimentsCallable().call(request);
+   *     for (Experiment element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listExperimentsCallable() { @@ -215,6 +305,16 @@ public final ListExperimentsPagedResponse listExperiments(ListExperimentsRequest /** * Retrieves the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. * + *

Sample code: + * + *

{@code
+   * try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
+   *   ExperimentName name =
+   *       ExperimentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]");
+   *   Experiment response = experimentsClient.getExperiment(name);
+   * }
+   * }
+ * * @param name Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment]. * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent * ID>/environments/<Environment ID>/experiments/<Experiment ID>`. @@ -230,6 +330,17 @@ public final Experiment getExperiment(ExperimentName name) { /** * Retrieves the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. * + *

Sample code: + * + *

{@code
+   * try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
+   *   String name =
+   *       ExperimentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]")
+   *           .toString();
+   *   Experiment response = experimentsClient.getExperiment(name);
+   * }
+   * }
+ * * @param name Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment]. * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent * ID>/environments/<Environment ID>/experiments/<Experiment ID>`. @@ -244,6 +355,21 @@ public final Experiment getExperiment(String name) { /** * Retrieves the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. * + *

Sample code: + * + *

{@code
+   * try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
+   *   GetExperimentRequest request =
+   *       GetExperimentRequest.newBuilder()
+   *           .setName(
+   *               ExperimentName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]")
+   *                   .toString())
+   *           .build();
+   *   Experiment response = experimentsClient.getExperiment(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -256,6 +382,21 @@ public final Experiment getExperiment(GetExperimentRequest request) { * Retrieves the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. * *

Sample code: + * + *

{@code
+   * try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
+   *   GetExperimentRequest request =
+   *       GetExperimentRequest.newBuilder()
+   *           .setName(
+   *               ExperimentName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future = experimentsClient.getExperimentCallable().futureCall(request);
+   *   // Do something.
+   *   Experiment response = future.get();
+   * }
+   * }
*/ public final UnaryCallable getExperimentCallable() { return stub.getExperimentCallable(); @@ -266,6 +407,17 @@ public final UnaryCallable getExperimentCallab * Creates an [Experiment][google.cloud.dialogflow.cx.v3.Experiment] in the specified * [Environment][google.cloud.dialogflow.cx.v3.Environment]. * + *

Sample code: + * + *

{@code
+   * try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
+   *   EnvironmentName parent =
+   *       EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]");
+   *   Experiment experiment = Experiment.newBuilder().build();
+   *   Experiment response = experimentsClient.createExperiment(parent, experiment);
+   * }
+   * }
+ * * @param parent Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to create an * [Environment][google.cloud.dialogflow.cx.v3.Environment] for. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment @@ -287,6 +439,18 @@ public final Experiment createExperiment(EnvironmentName parent, Experiment expe * Creates an [Experiment][google.cloud.dialogflow.cx.v3.Experiment] in the specified * [Environment][google.cloud.dialogflow.cx.v3.Environment]. * + *

Sample code: + * + *

{@code
+   * try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
+   *   String parent =
+   *       ExperimentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]")
+   *           .toString();
+   *   Experiment experiment = Experiment.newBuilder().build();
+   *   Experiment response = experimentsClient.createExperiment(parent, experiment);
+   * }
+   * }
+ * * @param parent Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to create an * [Environment][google.cloud.dialogflow.cx.v3.Environment] for. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment @@ -305,6 +469,22 @@ public final Experiment createExperiment(String parent, Experiment experiment) { * Creates an [Experiment][google.cloud.dialogflow.cx.v3.Experiment] in the specified * [Environment][google.cloud.dialogflow.cx.v3.Environment]. * + *

Sample code: + * + *

{@code
+   * try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
+   *   CreateExperimentRequest request =
+   *       CreateExperimentRequest.newBuilder()
+   *           .setParent(
+   *               ExperimentName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]")
+   *                   .toString())
+   *           .setExperiment(Experiment.newBuilder().build())
+   *           .build();
+   *   Experiment response = experimentsClient.createExperiment(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -318,6 +498,23 @@ public final Experiment createExperiment(CreateExperimentRequest request) { * [Environment][google.cloud.dialogflow.cx.v3.Environment]. * *

Sample code: + * + *

{@code
+   * try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
+   *   CreateExperimentRequest request =
+   *       CreateExperimentRequest.newBuilder()
+   *           .setParent(
+   *               ExperimentName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]")
+   *                   .toString())
+   *           .setExperiment(Experiment.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       experimentsClient.createExperimentCallable().futureCall(request);
+   *   // Do something.
+   *   Experiment response = future.get();
+   * }
+   * }
*/ public final UnaryCallable createExperimentCallable() { return stub.createExperimentCallable(); @@ -327,6 +524,16 @@ public final UnaryCallable createExperiment /** * Updates the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. * + *

Sample code: + * + *

{@code
+   * try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
+   *   Experiment experiment = Experiment.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Experiment response = experimentsClient.updateExperiment(experiment, updateMask);
+   * }
+   * }
+ * * @param experiment Required. The experiment to update. * @param updateMask Required. The mask to control which fields get updated. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -344,6 +551,19 @@ public final Experiment updateExperiment(Experiment experiment, FieldMask update /** * Updates the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. * + *

Sample code: + * + *

{@code
+   * try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
+   *   UpdateExperimentRequest request =
+   *       UpdateExperimentRequest.newBuilder()
+   *           .setExperiment(Experiment.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Experiment response = experimentsClient.updateExperiment(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -356,6 +576,20 @@ public final Experiment updateExperiment(UpdateExperimentRequest request) { * Updates the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. * *

Sample code: + * + *

{@code
+   * try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
+   *   UpdateExperimentRequest request =
+   *       UpdateExperimentRequest.newBuilder()
+   *           .setExperiment(Experiment.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       experimentsClient.updateExperimentCallable().futureCall(request);
+   *   // Do something.
+   *   Experiment response = future.get();
+   * }
+   * }
*/ public final UnaryCallable updateExperimentCallable() { return stub.updateExperimentCallable(); @@ -365,6 +599,16 @@ public final UnaryCallable updateExperiment /** * Deletes the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. * + *

Sample code: + * + *

{@code
+   * try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
+   *   ExperimentName name =
+   *       ExperimentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]");
+   *   experimentsClient.deleteExperiment(name);
+   * }
+   * }
+ * * @param name Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment] * to delete. Format: `projects/<Project ID>/locations/<Location * ID>/agents/<Agent ID>/environments/<Environment @@ -381,6 +625,17 @@ public final void deleteExperiment(ExperimentName name) { /** * Deletes the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. * + *

Sample code: + * + *

{@code
+   * try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
+   *   String name =
+   *       ExperimentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]")
+   *           .toString();
+   *   experimentsClient.deleteExperiment(name);
+   * }
+   * }
+ * * @param name Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment] * to delete. Format: `projects/<Project ID>/locations/<Location * ID>/agents/<Agent ID>/environments/<Environment @@ -396,6 +651,21 @@ public final void deleteExperiment(String name) { /** * Deletes the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. * + *

Sample code: + * + *

{@code
+   * try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
+   *   DeleteExperimentRequest request =
+   *       DeleteExperimentRequest.newBuilder()
+   *           .setName(
+   *               ExperimentName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]")
+   *                   .toString())
+   *           .build();
+   *   experimentsClient.deleteExperiment(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -408,6 +678,21 @@ public final void deleteExperiment(DeleteExperimentRequest request) { * Deletes the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. * *

Sample code: + * + *

{@code
+   * try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
+   *   DeleteExperimentRequest request =
+   *       DeleteExperimentRequest.newBuilder()
+   *           .setName(
+   *               ExperimentName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future = experimentsClient.deleteExperimentCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final UnaryCallable deleteExperimentCallable() { return stub.deleteExperimentCallable(); @@ -418,6 +703,16 @@ public final UnaryCallable deleteExperimentCalla * Starts the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. This rpc only * changes the state of experiment from PENDING to RUNNING. * + *

Sample code: + * + *

{@code
+   * try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
+   *   ExperimentName name =
+   *       ExperimentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]");
+   *   Experiment response = experimentsClient.startExperiment(name);
+   * }
+   * }
+ * * @param name Required. Resource name of the experiment to start. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment * ID>/experiments/<Experiment ID>`. @@ -434,6 +729,17 @@ public final Experiment startExperiment(ExperimentName name) { * Starts the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. This rpc only * changes the state of experiment from PENDING to RUNNING. * + *

Sample code: + * + *

{@code
+   * try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
+   *   String name =
+   *       ExperimentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]")
+   *           .toString();
+   *   Experiment response = experimentsClient.startExperiment(name);
+   * }
+   * }
+ * * @param name Required. Resource name of the experiment to start. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment * ID>/experiments/<Experiment ID>`. @@ -449,6 +755,21 @@ public final Experiment startExperiment(String name) { * Starts the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. This rpc only * changes the state of experiment from PENDING to RUNNING. * + *

Sample code: + * + *

{@code
+   * try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
+   *   StartExperimentRequest request =
+   *       StartExperimentRequest.newBuilder()
+   *           .setName(
+   *               ExperimentName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]")
+   *                   .toString())
+   *           .build();
+   *   Experiment response = experimentsClient.startExperiment(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -462,6 +783,22 @@ public final Experiment startExperiment(StartExperimentRequest request) { * changes the state of experiment from PENDING to RUNNING. * *

Sample code: + * + *

{@code
+   * try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
+   *   StartExperimentRequest request =
+   *       StartExperimentRequest.newBuilder()
+   *           .setName(
+   *               ExperimentName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       experimentsClient.startExperimentCallable().futureCall(request);
+   *   // Do something.
+   *   Experiment response = future.get();
+   * }
+   * }
*/ public final UnaryCallable startExperimentCallable() { return stub.startExperimentCallable(); @@ -472,6 +809,16 @@ public final UnaryCallable startExperimentCa * Stops the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. This rpc only * changes the state of experiment from RUNNING to DONE. * + *

Sample code: + * + *

{@code
+   * try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
+   *   ExperimentName name =
+   *       ExperimentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]");
+   *   Experiment response = experimentsClient.stopExperiment(name);
+   * }
+   * }
+ * * @param name Required. Resource name of the experiment to stop. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment * ID>/experiments/<Experiment ID>`. @@ -488,6 +835,17 @@ public final Experiment stopExperiment(ExperimentName name) { * Stops the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. This rpc only * changes the state of experiment from RUNNING to DONE. * + *

Sample code: + * + *

{@code
+   * try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
+   *   String name =
+   *       ExperimentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]")
+   *           .toString();
+   *   Experiment response = experimentsClient.stopExperiment(name);
+   * }
+   * }
+ * * @param name Required. Resource name of the experiment to stop. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment * ID>/experiments/<Experiment ID>`. @@ -503,6 +861,21 @@ public final Experiment stopExperiment(String name) { * Stops the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. This rpc only * changes the state of experiment from RUNNING to DONE. * + *

Sample code: + * + *

{@code
+   * try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
+   *   StopExperimentRequest request =
+   *       StopExperimentRequest.newBuilder()
+   *           .setName(
+   *               ExperimentName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]")
+   *                   .toString())
+   *           .build();
+   *   Experiment response = experimentsClient.stopExperiment(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -516,6 +889,21 @@ public final Experiment stopExperiment(StopExperimentRequest request) { * changes the state of experiment from RUNNING to DONE. * *

Sample code: + * + *

{@code
+   * try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
+   *   StopExperimentRequest request =
+   *       StopExperimentRequest.newBuilder()
+   *           .setName(
+   *               ExperimentName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future = experimentsClient.stopExperimentCallable().futureCall(request);
+   *   // Do something.
+   *   Experiment response = future.get();
+   * }
+   * }
*/ public final UnaryCallable stopExperimentCallable() { return stub.stopExperimentCallable(); diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowsClient.java index 672fd5b56..4beb8ef24 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowsClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowsClient.java @@ -48,6 +48,14 @@ *

This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: * + *

{@code
+ * try (FlowsClient flowsClient = FlowsClient.create()) {
+ *   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+ *   Flow flow = Flow.newBuilder().build();
+ *   Flow response = flowsClient.createFlow(parent, flow);
+ * }
+ * }
+ * *

Note: close() needs to be called on the FlowsClient object to clean up resources such as * threads. In the example above, try-with-resources is used, which automatically calls close(). * @@ -159,6 +167,16 @@ public final OperationsClient getOperationsClient() { /** * Creates a flow in the specified agent. * + *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+   *   Flow flow = Flow.newBuilder().build();
+   *   Flow response = flowsClient.createFlow(parent, flow);
+   * }
+   * }
+ * * @param parent Required. The agent to create a flow for. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>`. * @param flow Required. The flow to create. @@ -177,6 +195,16 @@ public final Flow createFlow(AgentName parent, Flow flow) { /** * Creates a flow in the specified agent. * + *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   String parent = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString();
+   *   Flow flow = Flow.newBuilder().build();
+   *   Flow response = flowsClient.createFlow(parent, flow);
+   * }
+   * }
+ * * @param parent Required. The agent to create a flow for. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>`. * @param flow Required. The flow to create. @@ -192,6 +220,20 @@ public final Flow createFlow(String parent, Flow flow) { /** * Creates a flow in the specified agent. * + *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   CreateFlowRequest request =
+   *       CreateFlowRequest.newBuilder()
+   *           .setParent(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString())
+   *           .setFlow(Flow.newBuilder().build())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   Flow response = flowsClient.createFlow(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -204,6 +246,20 @@ public final Flow createFlow(CreateFlowRequest request) { * Creates a flow in the specified agent. * *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   CreateFlowRequest request =
+   *       CreateFlowRequest.newBuilder()
+   *           .setParent(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString())
+   *           .setFlow(Flow.newBuilder().build())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   ApiFuture future = flowsClient.createFlowCallable().futureCall(request);
+   *   // Do something.
+   *   Flow response = future.get();
+   * }
+   * }
*/ public final UnaryCallable createFlowCallable() { return stub.createFlowCallable(); @@ -213,6 +269,15 @@ public final UnaryCallable createFlowCallable() { /** * Deletes a specified flow. * + *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   FlowName name = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]");
+   *   flowsClient.deleteFlow(name);
+   * }
+   * }
+ * * @param name Required. The name of the flow to delete. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -227,6 +292,15 @@ public final void deleteFlow(FlowName name) { /** * Deletes a specified flow. * + *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   String name = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString();
+   *   flowsClient.deleteFlow(name);
+   * }
+   * }
+ * * @param name Required. The name of the flow to delete. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -240,6 +314,19 @@ public final void deleteFlow(String name) { /** * Deletes a specified flow. * + *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   DeleteFlowRequest request =
+   *       DeleteFlowRequest.newBuilder()
+   *           .setName(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString())
+   *           .setForce(true)
+   *           .build();
+   *   flowsClient.deleteFlow(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -252,6 +339,19 @@ public final void deleteFlow(DeleteFlowRequest request) { * Deletes a specified flow. * *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   DeleteFlowRequest request =
+   *       DeleteFlowRequest.newBuilder()
+   *           .setName(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString())
+   *           .setForce(true)
+   *           .build();
+   *   ApiFuture future = flowsClient.deleteFlowCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final UnaryCallable deleteFlowCallable() { return stub.deleteFlowCallable(); @@ -261,6 +361,17 @@ public final UnaryCallable deleteFlowCallable() { /** * Returns the list of all flows in the specified agent. * + *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+   *   for (Flow element : flowsClient.listFlows(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The agent containing the flows. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -275,6 +386,17 @@ public final ListFlowsPagedResponse listFlows(AgentName parent) { /** * Returns the list of all flows in the specified agent. * + *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   String parent = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString();
+   *   for (Flow element : flowsClient.listFlows(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The agent containing the flows. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -288,6 +410,23 @@ public final ListFlowsPagedResponse listFlows(String parent) { /** * Returns the list of all flows in the specified agent. * + *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   ListFlowsRequest request =
+   *       ListFlowsRequest.newBuilder()
+   *           .setParent(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   for (Flow element : flowsClient.listFlows(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -300,6 +439,23 @@ public final ListFlowsPagedResponse listFlows(ListFlowsRequest request) { * Returns the list of all flows in the specified agent. * *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   ListFlowsRequest request =
+   *       ListFlowsRequest.newBuilder()
+   *           .setParent(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   ApiFuture future = flowsClient.listFlowsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Flow element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listFlowsPagedCallable() { return stub.listFlowsPagedCallable(); @@ -310,6 +466,23 @@ public final UnaryCallable listFlowsPa * Returns the list of all flows in the specified agent. * *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   while (true) {
+   *     ListFlowsResponse response = flowsClient.listFlowsCallable().call(request);
+   *     for (Flow element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listFlowsCallable() { return stub.listFlowsCallable(); @@ -319,6 +492,15 @@ public final UnaryCallable listFlowsCallabl /** * Retrieves the specified flow. * + *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   FlowName name = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]");
+   *   Flow response = flowsClient.getFlow(name);
+   * }
+   * }
+ * * @param name Required. The name of the flow to get. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -333,6 +515,15 @@ public final Flow getFlow(FlowName name) { /** * Retrieves the specified flow. * + *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   String name = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString();
+   *   Flow response = flowsClient.getFlow(name);
+   * }
+   * }
+ * * @param name Required. The name of the flow to get. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -346,6 +537,19 @@ public final Flow getFlow(String name) { /** * Retrieves the specified flow. * + *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   GetFlowRequest request =
+   *       GetFlowRequest.newBuilder()
+   *           .setName(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   Flow response = flowsClient.getFlow(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -358,6 +562,19 @@ public final Flow getFlow(GetFlowRequest request) { * Retrieves the specified flow. * *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   GetFlowRequest request =
+   *       GetFlowRequest.newBuilder()
+   *           .setName(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   ApiFuture future = flowsClient.getFlowCallable().futureCall(request);
+   *   // Do something.
+   *   Flow response = future.get();
+   * }
+   * }
*/ public final UnaryCallable getFlowCallable() { return stub.getFlowCallable(); @@ -367,6 +584,16 @@ public final UnaryCallable getFlowCallable() { /** * Updates the specified flow. * + *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   Flow flow = Flow.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Flow response = flowsClient.updateFlow(flow, updateMask);
+   * }
+   * }
+ * * @param flow Required. The flow to update. * @param updateMask Required. The mask to control which fields get updated. If `update_mask` is * not specified, an error will be returned. @@ -382,6 +609,20 @@ public final Flow updateFlow(Flow flow, FieldMask updateMask) { /** * Updates the specified flow. * + *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   UpdateFlowRequest request =
+   *       UpdateFlowRequest.newBuilder()
+   *           .setFlow(Flow.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   Flow response = flowsClient.updateFlow(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -394,6 +635,20 @@ public final Flow updateFlow(UpdateFlowRequest request) { * Updates the specified flow. * *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   UpdateFlowRequest request =
+   *       UpdateFlowRequest.newBuilder()
+   *           .setFlow(Flow.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   ApiFuture future = flowsClient.updateFlowCallable().futureCall(request);
+   *   // Do something.
+   *   Flow response = future.get();
+   * }
+   * }
*/ public final UnaryCallable updateFlowCallable() { return stub.updateFlowCallable(); @@ -403,6 +658,15 @@ public final UnaryCallable updateFlowCallable() { /** * Trains the specified flow. Note that only the flow in 'draft' environment is trained. * + *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   FlowName name = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]");
+   *   flowsClient.trainFlowAsync(name).get();
+   * }
+   * }
+ * * @param name Required. The flow to train. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -417,6 +681,15 @@ public final OperationFuture trainFlowAsync(FlowName name) { /** * Trains the specified flow. Note that only the flow in 'draft' environment is trained. * + *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   String name = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString();
+   *   flowsClient.trainFlowAsync(name).get();
+   * }
+   * }
+ * * @param name Required. The flow to train. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -430,6 +703,18 @@ public final OperationFuture trainFlowAsync(String name) { /** * Trains the specified flow. Note that only the flow in 'draft' environment is trained. * + *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   TrainFlowRequest request =
+   *       TrainFlowRequest.newBuilder()
+   *           .setName(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString())
+   *           .build();
+   *   flowsClient.trainFlowAsync(request).get();
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -442,6 +727,19 @@ public final OperationFuture trainFlowAsync(TrainFlowRequest requ * Trains the specified flow. Note that only the flow in 'draft' environment is trained. * *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   TrainFlowRequest request =
+   *       TrainFlowRequest.newBuilder()
+   *           .setName(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString())
+   *           .build();
+   *   OperationFuture future =
+   *       flowsClient.trainFlowOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final OperationCallable trainFlowOperationCallable() { return stub.trainFlowOperationCallable(); @@ -452,6 +750,18 @@ public final OperationCallable trainFlowOperati * Trains the specified flow. Note that only the flow in 'draft' environment is trained. * *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   TrainFlowRequest request =
+   *       TrainFlowRequest.newBuilder()
+   *           .setName(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString())
+   *           .build();
+   *   ApiFuture future = flowsClient.trainFlowCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final UnaryCallable trainFlowCallable() { return stub.trainFlowCallable(); @@ -462,6 +772,19 @@ public final UnaryCallable trainFlowCallable() { * 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. * + *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   ValidateFlowRequest request =
+   *       ValidateFlowRequest.newBuilder()
+   *           .setName(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   FlowValidationResult response = flowsClient.validateFlow(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -475,6 +798,20 @@ public final FlowValidationResult validateFlow(ValidateFlowRequest request) { * after the training is completed to get the complete validation results. * *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   ValidateFlowRequest request =
+   *       ValidateFlowRequest.newBuilder()
+   *           .setName(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   ApiFuture future =
+   *       flowsClient.validateFlowCallable().futureCall(request);
+   *   // Do something.
+   *   FlowValidationResult response = future.get();
+   * }
+   * }
*/ public final UnaryCallable validateFlowCallable() { return stub.validateFlowCallable(); @@ -485,6 +822,16 @@ public final UnaryCallable validateFl * Gets the latest flow validation result. Flow validation is performed when ValidateFlow is * called. * + *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   FlowValidationResultName name =
+   *       FlowValidationResultName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]");
+   *   FlowValidationResult response = flowsClient.getFlowValidationResult(name);
+   * }
+   * }
+ * * @param name Required. The flow name. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow * ID>/validationResult`. @@ -503,6 +850,16 @@ public final FlowValidationResult getFlowValidationResult(FlowValidationResultNa * Gets the latest flow validation result. Flow validation is performed when ValidateFlow is * called. * + *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   String name =
+   *       FlowValidationResultName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString();
+   *   FlowValidationResult response = flowsClient.getFlowValidationResult(name);
+   * }
+   * }
+ * * @param name Required. The flow name. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow * ID>/validationResult`. @@ -519,6 +876,21 @@ public final FlowValidationResult getFlowValidationResult(String name) { * Gets the latest flow validation result. Flow validation is performed when ValidateFlow is * called. * + *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   GetFlowValidationResultRequest request =
+   *       GetFlowValidationResultRequest.newBuilder()
+   *           .setName(
+   *               FlowValidationResultName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]")
+   *                   .toString())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   FlowValidationResult response = flowsClient.getFlowValidationResult(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -533,6 +905,22 @@ public final FlowValidationResult getFlowValidationResult( * called. * *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   GetFlowValidationResultRequest request =
+   *       GetFlowValidationResultRequest.newBuilder()
+   *           .setName(
+   *               FlowValidationResultName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]")
+   *                   .toString())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   ApiFuture future =
+   *       flowsClient.getFlowValidationResultCallable().futureCall(request);
+   *   // Do something.
+   *   FlowValidationResult response = future.get();
+   * }
+   * }
*/ public final UnaryCallable getFlowValidationResultCallable() { diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/IntentsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/IntentsClient.java index dfb20ff88..c6f18d644 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/IntentsClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/IntentsClient.java @@ -43,6 +43,13 @@ *

This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: * + *

{@code
+ * try (IntentsClient intentsClient = IntentsClient.create()) {
+ *   IntentName name = IntentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[INTENT]");
+ *   Intent response = intentsClient.getIntent(name);
+ * }
+ * }
+ * *

Note: close() needs to be called on the IntentsClient object to clean up resources such as * threads. In the example above, try-with-resources is used, which automatically calls close(). * @@ -143,6 +150,17 @@ public IntentsStub getStub() { /** * Returns the list of all intents in the specified agent. * + *

Sample code: + * + *

{@code
+   * try (IntentsClient intentsClient = IntentsClient.create()) {
+   *   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+   *   for (Intent element : intentsClient.listIntents(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The agent to list all intents for. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -159,6 +177,17 @@ public final ListIntentsPagedResponse listIntents(AgentName parent) { /** * Returns the list of all intents in the specified agent. * + *

Sample code: + * + *

{@code
+   * try (IntentsClient intentsClient = IntentsClient.create()) {
+   *   String parent = IntentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[INTENT]").toString();
+   *   for (Intent element : intentsClient.listIntents(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The agent to list all intents for. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -172,6 +201,23 @@ public final ListIntentsPagedResponse listIntents(String parent) { /** * Returns the list of all intents in the specified agent. * + *

Sample code: + * + *

{@code
+   * try (IntentsClient intentsClient = IntentsClient.create()) {
+   *   ListIntentsRequest request =
+   *       ListIntentsRequest.newBuilder()
+   *           .setParent(IntentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[INTENT]").toString())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Intent element : intentsClient.listIntents(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -184,6 +230,23 @@ public final ListIntentsPagedResponse listIntents(ListIntentsRequest request) { * Returns the list of all intents in the specified agent. * *

Sample code: + * + *

{@code
+   * try (IntentsClient intentsClient = IntentsClient.create()) {
+   *   ListIntentsRequest request =
+   *       ListIntentsRequest.newBuilder()
+   *           .setParent(IntentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[INTENT]").toString())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future = intentsClient.listIntentsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Intent element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listIntentsPagedCallable() { @@ -195,6 +258,23 @@ public final ListIntentsPagedResponse listIntents(ListIntentsRequest request) { * Returns the list of all intents in the specified agent. * *

Sample code: + * + *

{@code
+   * try (IntentsClient intentsClient = IntentsClient.create()) {
+   *   while (true) {
+   *     ListIntentsResponse response = intentsClient.listIntentsCallable().call(request);
+   *     for (Intent element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listIntentsCallable() { return stub.listIntentsCallable(); @@ -204,6 +284,15 @@ public final UnaryCallable listIntentsC /** * Retrieves the specified intent. * + *

Sample code: + * + *

{@code
+   * try (IntentsClient intentsClient = IntentsClient.create()) {
+   *   IntentName name = IntentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[INTENT]");
+   *   Intent response = intentsClient.getIntent(name);
+   * }
+   * }
+ * * @param name Required. The name of the intent. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/intents/<Intent ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -218,6 +307,15 @@ public final Intent getIntent(IntentName name) { /** * Retrieves the specified intent. * + *

Sample code: + * + *

{@code
+   * try (IntentsClient intentsClient = IntentsClient.create()) {
+   *   String name = IntentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[INTENT]").toString();
+   *   Intent response = intentsClient.getIntent(name);
+   * }
+   * }
+ * * @param name Required. The name of the intent. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/intents/<Intent ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -231,6 +329,19 @@ public final Intent getIntent(String name) { /** * Retrieves the specified intent. * + *

Sample code: + * + *

{@code
+   * try (IntentsClient intentsClient = IntentsClient.create()) {
+   *   GetIntentRequest request =
+   *       GetIntentRequest.newBuilder()
+   *           .setName(IntentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[INTENT]").toString())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   Intent response = intentsClient.getIntent(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -243,6 +354,19 @@ public final Intent getIntent(GetIntentRequest request) { * Retrieves the specified intent. * *

Sample code: + * + *

{@code
+   * try (IntentsClient intentsClient = IntentsClient.create()) {
+   *   GetIntentRequest request =
+   *       GetIntentRequest.newBuilder()
+   *           .setName(IntentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[INTENT]").toString())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   ApiFuture future = intentsClient.getIntentCallable().futureCall(request);
+   *   // Do something.
+   *   Intent response = future.get();
+   * }
+   * }
*/ public final UnaryCallable getIntentCallable() { return stub.getIntentCallable(); @@ -252,6 +376,16 @@ public final UnaryCallable getIntentCallable() { /** * Creates an intent in the specified agent. * + *

Sample code: + * + *

{@code
+   * try (IntentsClient intentsClient = IntentsClient.create()) {
+   *   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+   *   Intent intent = Intent.newBuilder().build();
+   *   Intent response = intentsClient.createIntent(parent, intent);
+   * }
+   * }
+ * * @param parent Required. The agent to create an intent for. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>`. * @param intent Required. The intent to create. @@ -270,6 +404,16 @@ public final Intent createIntent(AgentName parent, Intent intent) { /** * Creates an intent in the specified agent. * + *

Sample code: + * + *

{@code
+   * try (IntentsClient intentsClient = IntentsClient.create()) {
+   *   String parent = IntentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[INTENT]").toString();
+   *   Intent intent = Intent.newBuilder().build();
+   *   Intent response = intentsClient.createIntent(parent, intent);
+   * }
+   * }
+ * * @param parent Required. The agent to create an intent for. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>`. * @param intent Required. The intent to create. @@ -285,6 +429,20 @@ public final Intent createIntent(String parent, Intent intent) { /** * Creates an intent in the specified agent. * + *

Sample code: + * + *

{@code
+   * try (IntentsClient intentsClient = IntentsClient.create()) {
+   *   CreateIntentRequest request =
+   *       CreateIntentRequest.newBuilder()
+   *           .setParent(IntentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[INTENT]").toString())
+   *           .setIntent(Intent.newBuilder().build())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   Intent response = intentsClient.createIntent(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -297,6 +455,20 @@ public final Intent createIntent(CreateIntentRequest request) { * Creates an intent in the specified agent. * *

Sample code: + * + *

{@code
+   * try (IntentsClient intentsClient = IntentsClient.create()) {
+   *   CreateIntentRequest request =
+   *       CreateIntentRequest.newBuilder()
+   *           .setParent(IntentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[INTENT]").toString())
+   *           .setIntent(Intent.newBuilder().build())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   ApiFuture future = intentsClient.createIntentCallable().futureCall(request);
+   *   // Do something.
+   *   Intent response = future.get();
+   * }
+   * }
*/ public final UnaryCallable createIntentCallable() { return stub.createIntentCallable(); @@ -306,6 +478,16 @@ public final UnaryCallable createIntentCallable() { /** * Updates the specified intent. * + *

Sample code: + * + *

{@code
+   * try (IntentsClient intentsClient = IntentsClient.create()) {
+   *   Intent intent = Intent.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Intent response = intentsClient.updateIntent(intent, updateMask);
+   * }
+   * }
+ * * @param intent Required. The intent to update. * @param updateMask The mask to control which fields get updated. If the mask is not present, all * fields will be updated. @@ -321,6 +503,20 @@ public final Intent updateIntent(Intent intent, FieldMask updateMask) { /** * Updates the specified intent. * + *

Sample code: + * + *

{@code
+   * try (IntentsClient intentsClient = IntentsClient.create()) {
+   *   UpdateIntentRequest request =
+   *       UpdateIntentRequest.newBuilder()
+   *           .setIntent(Intent.newBuilder().build())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Intent response = intentsClient.updateIntent(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -333,6 +529,20 @@ public final Intent updateIntent(UpdateIntentRequest request) { * Updates the specified intent. * *

Sample code: + * + *

{@code
+   * try (IntentsClient intentsClient = IntentsClient.create()) {
+   *   UpdateIntentRequest request =
+   *       UpdateIntentRequest.newBuilder()
+   *           .setIntent(Intent.newBuilder().build())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = intentsClient.updateIntentCallable().futureCall(request);
+   *   // Do something.
+   *   Intent response = future.get();
+   * }
+   * }
*/ public final UnaryCallable updateIntentCallable() { return stub.updateIntentCallable(); @@ -342,6 +552,15 @@ public final UnaryCallable updateIntentCallable() { /** * Deletes the specified intent. * + *

Sample code: + * + *

{@code
+   * try (IntentsClient intentsClient = IntentsClient.create()) {
+   *   IntentName name = IntentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[INTENT]");
+   *   intentsClient.deleteIntent(name);
+   * }
+   * }
+ * * @param name Required. The name of the intent to delete. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/intents/<Intent ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -356,6 +575,15 @@ public final void deleteIntent(IntentName name) { /** * Deletes the specified intent. * + *

Sample code: + * + *

{@code
+   * try (IntentsClient intentsClient = IntentsClient.create()) {
+   *   String name = IntentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[INTENT]").toString();
+   *   intentsClient.deleteIntent(name);
+   * }
+   * }
+ * * @param name Required. The name of the intent to delete. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/intents/<Intent ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -369,6 +597,18 @@ public final void deleteIntent(String name) { /** * Deletes the specified intent. * + *

Sample code: + * + *

{@code
+   * try (IntentsClient intentsClient = IntentsClient.create()) {
+   *   DeleteIntentRequest request =
+   *       DeleteIntentRequest.newBuilder()
+   *           .setName(IntentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[INTENT]").toString())
+   *           .build();
+   *   intentsClient.deleteIntent(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -381,6 +621,18 @@ public final void deleteIntent(DeleteIntentRequest request) { * Deletes the specified intent. * *

Sample code: + * + *

{@code
+   * try (IntentsClient intentsClient = IntentsClient.create()) {
+   *   DeleteIntentRequest request =
+   *       DeleteIntentRequest.newBuilder()
+   *           .setName(IntentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[INTENT]").toString())
+   *           .build();
+   *   ApiFuture future = intentsClient.deleteIntentCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final UnaryCallable deleteIntentCallable() { return stub.deleteIntentCallable(); diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/PagesClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/PagesClient.java index a879948f4..7062627dc 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/PagesClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/PagesClient.java @@ -43,6 +43,13 @@ *

This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: * + *

{@code
+ * try (PagesClient pagesClient = PagesClient.create()) {
+ *   PageName name = PageName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]");
+ *   Page response = pagesClient.getPage(name);
+ * }
+ * }
+ * *

Note: close() needs to be called on the PagesClient object to clean up resources such as * threads. In the example above, try-with-resources is used, which automatically calls close(). * @@ -143,6 +150,17 @@ public PagesStub getStub() { /** * Returns the list of all pages in the specified flow. * + *

Sample code: + * + *

{@code
+   * try (PagesClient pagesClient = PagesClient.create()) {
+   *   FlowName parent = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]");
+   *   for (Page element : pagesClient.listPages(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The flow to list all pages for. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -157,6 +175,18 @@ public final ListPagesPagedResponse listPages(FlowName parent) { /** * Returns the list of all pages in the specified flow. * + *

Sample code: + * + *

{@code
+   * try (PagesClient pagesClient = PagesClient.create()) {
+   *   String parent =
+   *       PageName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]").toString();
+   *   for (Page element : pagesClient.listPages(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The flow to list all pages for. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -170,6 +200,24 @@ public final ListPagesPagedResponse listPages(String parent) { /** * Returns the list of all pages in the specified flow. * + *

Sample code: + * + *

{@code
+   * try (PagesClient pagesClient = PagesClient.create()) {
+   *   ListPagesRequest request =
+   *       ListPagesRequest.newBuilder()
+   *           .setParent(
+   *               PageName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]").toString())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Page element : pagesClient.listPages(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -182,6 +230,24 @@ public final ListPagesPagedResponse listPages(ListPagesRequest request) { * Returns the list of all pages in the specified flow. * *

Sample code: + * + *

{@code
+   * try (PagesClient pagesClient = PagesClient.create()) {
+   *   ListPagesRequest request =
+   *       ListPagesRequest.newBuilder()
+   *           .setParent(
+   *               PageName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]").toString())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future = pagesClient.listPagesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Page element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listPagesPagedCallable() { return stub.listPagesPagedCallable(); @@ -192,6 +258,23 @@ public final UnaryCallable listPagesPa * Returns the list of all pages in the specified flow. * *

Sample code: + * + *

{@code
+   * try (PagesClient pagesClient = PagesClient.create()) {
+   *   while (true) {
+   *     ListPagesResponse response = pagesClient.listPagesCallable().call(request);
+   *     for (Page element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listPagesCallable() { return stub.listPagesCallable(); @@ -201,6 +284,15 @@ public final UnaryCallable listPagesCallabl /** * Retrieves the specified page. * + *

Sample code: + * + *

{@code
+   * try (PagesClient pagesClient = PagesClient.create()) {
+   *   PageName name = PageName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]");
+   *   Page response = pagesClient.getPage(name);
+   * }
+   * }
+ * * @param name Required. The name of the page. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow * ID>/pages/<Page ID>`. @@ -216,6 +308,16 @@ public final Page getPage(PageName name) { /** * Retrieves the specified page. * + *

Sample code: + * + *

{@code
+   * try (PagesClient pagesClient = PagesClient.create()) {
+   *   String name =
+   *       PageName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]").toString();
+   *   Page response = pagesClient.getPage(name);
+   * }
+   * }
+ * * @param name Required. The name of the page. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow * ID>/pages/<Page ID>`. @@ -230,6 +332,20 @@ public final Page getPage(String name) { /** * Retrieves the specified page. * + *

Sample code: + * + *

{@code
+   * try (PagesClient pagesClient = PagesClient.create()) {
+   *   GetPageRequest request =
+   *       GetPageRequest.newBuilder()
+   *           .setName(
+   *               PageName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]").toString())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   Page response = pagesClient.getPage(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -242,6 +358,20 @@ public final Page getPage(GetPageRequest request) { * Retrieves the specified page. * *

Sample code: + * + *

{@code
+   * try (PagesClient pagesClient = PagesClient.create()) {
+   *   GetPageRequest request =
+   *       GetPageRequest.newBuilder()
+   *           .setName(
+   *               PageName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]").toString())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   ApiFuture future = pagesClient.getPageCallable().futureCall(request);
+   *   // Do something.
+   *   Page response = future.get();
+   * }
+   * }
*/ public final UnaryCallable getPageCallable() { return stub.getPageCallable(); @@ -251,6 +381,16 @@ public final UnaryCallable getPageCallable() { /** * Creates a page in the specified flow. * + *

Sample code: + * + *

{@code
+   * try (PagesClient pagesClient = PagesClient.create()) {
+   *   FlowName parent = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]");
+   *   Page page = Page.newBuilder().build();
+   *   Page response = pagesClient.createPage(parent, page);
+   * }
+   * }
+ * * @param parent Required. The flow to create a page for. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>`. * @param page Required. The page to create. @@ -269,6 +409,17 @@ public final Page createPage(FlowName parent, Page page) { /** * Creates a page in the specified flow. * + *

Sample code: + * + *

{@code
+   * try (PagesClient pagesClient = PagesClient.create()) {
+   *   String parent =
+   *       PageName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]").toString();
+   *   Page page = Page.newBuilder().build();
+   *   Page response = pagesClient.createPage(parent, page);
+   * }
+   * }
+ * * @param parent Required. The flow to create a page for. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>`. * @param page Required. The page to create. @@ -284,6 +435,21 @@ public final Page createPage(String parent, Page page) { /** * Creates a page in the specified flow. * + *

Sample code: + * + *

{@code
+   * try (PagesClient pagesClient = PagesClient.create()) {
+   *   CreatePageRequest request =
+   *       CreatePageRequest.newBuilder()
+   *           .setParent(
+   *               PageName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]").toString())
+   *           .setPage(Page.newBuilder().build())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   Page response = pagesClient.createPage(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -296,6 +462,21 @@ public final Page createPage(CreatePageRequest request) { * Creates a page in the specified flow. * *

Sample code: + * + *

{@code
+   * try (PagesClient pagesClient = PagesClient.create()) {
+   *   CreatePageRequest request =
+   *       CreatePageRequest.newBuilder()
+   *           .setParent(
+   *               PageName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]").toString())
+   *           .setPage(Page.newBuilder().build())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   ApiFuture future = pagesClient.createPageCallable().futureCall(request);
+   *   // Do something.
+   *   Page response = future.get();
+   * }
+   * }
*/ public final UnaryCallable createPageCallable() { return stub.createPageCallable(); @@ -305,6 +486,16 @@ public final UnaryCallable createPageCallable() { /** * Updates the specified page. * + *

Sample code: + * + *

{@code
+   * try (PagesClient pagesClient = PagesClient.create()) {
+   *   Page page = Page.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Page response = pagesClient.updatePage(page, updateMask);
+   * }
+   * }
+ * * @param page Required. The page to update. * @param updateMask The mask to control which fields get updated. If the mask is not present, all * fields will be updated. @@ -320,6 +511,20 @@ public final Page updatePage(Page page, FieldMask updateMask) { /** * Updates the specified page. * + *

Sample code: + * + *

{@code
+   * try (PagesClient pagesClient = PagesClient.create()) {
+   *   UpdatePageRequest request =
+   *       UpdatePageRequest.newBuilder()
+   *           .setPage(Page.newBuilder().build())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Page response = pagesClient.updatePage(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -332,6 +537,20 @@ public final Page updatePage(UpdatePageRequest request) { * Updates the specified page. * *

Sample code: + * + *

{@code
+   * try (PagesClient pagesClient = PagesClient.create()) {
+   *   UpdatePageRequest request =
+   *       UpdatePageRequest.newBuilder()
+   *           .setPage(Page.newBuilder().build())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = pagesClient.updatePageCallable().futureCall(request);
+   *   // Do something.
+   *   Page response = future.get();
+   * }
+   * }
*/ public final UnaryCallable updatePageCallable() { return stub.updatePageCallable(); @@ -341,6 +560,15 @@ public final UnaryCallable updatePageCallable() { /** * Deletes the specified page. * + *

Sample code: + * + *

{@code
+   * try (PagesClient pagesClient = PagesClient.create()) {
+   *   PageName name = PageName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]");
+   *   pagesClient.deletePage(name);
+   * }
+   * }
+ * * @param name Required. The name of the page to delete. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/Flows/<flow * ID>/pages/<Page ID>`. @@ -356,6 +584,16 @@ public final void deletePage(PageName name) { /** * Deletes the specified page. * + *

Sample code: + * + *

{@code
+   * try (PagesClient pagesClient = PagesClient.create()) {
+   *   String name =
+   *       PageName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]").toString();
+   *   pagesClient.deletePage(name);
+   * }
+   * }
+ * * @param name Required. The name of the page to delete. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/Flows/<flow * ID>/pages/<Page ID>`. @@ -370,6 +608,20 @@ public final void deletePage(String name) { /** * Deletes the specified page. * + *

Sample code: + * + *

{@code
+   * try (PagesClient pagesClient = PagesClient.create()) {
+   *   DeletePageRequest request =
+   *       DeletePageRequest.newBuilder()
+   *           .setName(
+   *               PageName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]").toString())
+   *           .setForce(true)
+   *           .build();
+   *   pagesClient.deletePage(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -382,6 +634,20 @@ public final void deletePage(DeletePageRequest request) { * Deletes the specified page. * *

Sample code: + * + *

{@code
+   * try (PagesClient pagesClient = PagesClient.create()) {
+   *   DeletePageRequest request =
+   *       DeletePageRequest.newBuilder()
+   *           .setName(
+   *               PageName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]").toString())
+   *           .setForce(true)
+   *           .build();
+   *   ApiFuture future = pagesClient.deletePageCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final UnaryCallable deletePageCallable() { return stub.deletePageCallable(); diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/SecuritySettingsServiceClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/SecuritySettingsServiceClient.java index 4560f26c0..0122c6d43 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/SecuritySettingsServiceClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/SecuritySettingsServiceClient.java @@ -43,6 +43,16 @@ *

This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: * + *

{@code
+ * try (SecuritySettingsServiceClient securitySettingsServiceClient =
+ *     SecuritySettingsServiceClient.create()) {
+ *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ *   SecuritySettings securitySettings = SecuritySettings.newBuilder().build();
+ *   SecuritySettings response =
+ *       securitySettingsServiceClient.createSecuritySettings(parent, securitySettings);
+ * }
+ * }
+ * *

Note: close() needs to be called on the SecuritySettingsServiceClient object to clean up * resources such as threads. In the example above, try-with-resources is used, which automatically * calls close(). @@ -150,6 +160,18 @@ public SecuritySettingsServiceStub getStub() { /** * Create security settings in the specified location. * + *

Sample code: + * + *

{@code
+   * try (SecuritySettingsServiceClient securitySettingsServiceClient =
+   *     SecuritySettingsServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   SecuritySettings securitySettings = SecuritySettings.newBuilder().build();
+   *   SecuritySettings response =
+   *       securitySettingsServiceClient.createSecuritySettings(parent, securitySettings);
+   * }
+   * }
+ * * @param parent Required. The location to create an * [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] for. Format: * `projects/<Project ID>/locations/<Location ID>`. @@ -170,6 +192,19 @@ public final SecuritySettings createSecuritySettings( /** * Create security settings in the specified location. * + *

Sample code: + * + *

{@code
+   * try (SecuritySettingsServiceClient securitySettingsServiceClient =
+   *     SecuritySettingsServiceClient.create()) {
+   *   String parent =
+   *       SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]").toString();
+   *   SecuritySettings securitySettings = SecuritySettings.newBuilder().build();
+   *   SecuritySettings response =
+   *       securitySettingsServiceClient.createSecuritySettings(parent, securitySettings);
+   * }
+   * }
+ * * @param parent Required. The location to create an * [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] for. Format: * `projects/<Project ID>/locations/<Location ID>`. @@ -190,6 +225,22 @@ public final SecuritySettings createSecuritySettings( /** * Create security settings in the specified location. * + *

Sample code: + * + *

{@code
+   * try (SecuritySettingsServiceClient securitySettingsServiceClient =
+   *     SecuritySettingsServiceClient.create()) {
+   *   CreateSecuritySettingsRequest request =
+   *       CreateSecuritySettingsRequest.newBuilder()
+   *           .setParent(
+   *               SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]")
+   *                   .toString())
+   *           .setSecuritySettings(SecuritySettings.newBuilder().build())
+   *           .build();
+   *   SecuritySettings response = securitySettingsServiceClient.createSecuritySettings(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -202,6 +253,23 @@ public final SecuritySettings createSecuritySettings(CreateSecuritySettingsReque * Create security settings in the specified location. * *

Sample code: + * + *

{@code
+   * try (SecuritySettingsServiceClient securitySettingsServiceClient =
+   *     SecuritySettingsServiceClient.create()) {
+   *   CreateSecuritySettingsRequest request =
+   *       CreateSecuritySettingsRequest.newBuilder()
+   *           .setParent(
+   *               SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]")
+   *                   .toString())
+   *           .setSecuritySettings(SecuritySettings.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       securitySettingsServiceClient.createSecuritySettingsCallable().futureCall(request);
+   *   // Do something.
+   *   SecuritySettings response = future.get();
+   * }
+   * }
*/ public final UnaryCallable createSecuritySettingsCallable() { @@ -213,6 +281,17 @@ public final SecuritySettings createSecuritySettings(CreateSecuritySettingsReque * Retrieves the specified [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings]. The * returned settings may be stale by up to 1 minute. * + *

Sample code: + * + *

{@code
+   * try (SecuritySettingsServiceClient securitySettingsServiceClient =
+   *     SecuritySettingsServiceClient.create()) {
+   *   SecuritySettingsName name =
+   *       SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]");
+   *   SecuritySettings response = securitySettingsServiceClient.getSecuritySettings(name);
+   * }
+   * }
+ * * @param name Required. Resource name of the settings. Format: `projects/<Project * ID>/locations/<Location ID>/securitySettings/<security settings ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -230,6 +309,17 @@ public final SecuritySettings getSecuritySettings(SecuritySettingsName name) { * Retrieves the specified [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings]. The * returned settings may be stale by up to 1 minute. * + *

Sample code: + * + *

{@code
+   * try (SecuritySettingsServiceClient securitySettingsServiceClient =
+   *     SecuritySettingsServiceClient.create()) {
+   *   String name =
+   *       SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]").toString();
+   *   SecuritySettings response = securitySettingsServiceClient.getSecuritySettings(name);
+   * }
+   * }
+ * * @param name Required. Resource name of the settings. Format: `projects/<Project * ID>/locations/<Location ID>/securitySettings/<security settings ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -245,6 +335,21 @@ public final SecuritySettings getSecuritySettings(String name) { * Retrieves the specified [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings]. The * returned settings may be stale by up to 1 minute. * + *

Sample code: + * + *

{@code
+   * try (SecuritySettingsServiceClient securitySettingsServiceClient =
+   *     SecuritySettingsServiceClient.create()) {
+   *   GetSecuritySettingsRequest request =
+   *       GetSecuritySettingsRequest.newBuilder()
+   *           .setName(
+   *               SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]")
+   *                   .toString())
+   *           .build();
+   *   SecuritySettings response = securitySettingsServiceClient.getSecuritySettings(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -258,6 +363,22 @@ public final SecuritySettings getSecuritySettings(GetSecuritySettingsRequest req * returned settings may be stale by up to 1 minute. * *

Sample code: + * + *

{@code
+   * try (SecuritySettingsServiceClient securitySettingsServiceClient =
+   *     SecuritySettingsServiceClient.create()) {
+   *   GetSecuritySettingsRequest request =
+   *       GetSecuritySettingsRequest.newBuilder()
+   *           .setName(
+   *               SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       securitySettingsServiceClient.getSecuritySettingsCallable().futureCall(request);
+   *   // Do something.
+   *   SecuritySettings response = future.get();
+   * }
+   * }
*/ public final UnaryCallable getSecuritySettingsCallable() { @@ -268,6 +389,18 @@ public final SecuritySettings getSecuritySettings(GetSecuritySettingsRequest req /** * Updates the specified [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings]. * + *

Sample code: + * + *

{@code
+   * try (SecuritySettingsServiceClient securitySettingsServiceClient =
+   *     SecuritySettingsServiceClient.create()) {
+   *   SecuritySettings securitySettings = SecuritySettings.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   SecuritySettings response =
+   *       securitySettingsServiceClient.updateSecuritySettings(securitySettings, updateMask);
+   * }
+   * }
+ * * @param securitySettings Required. [SecuritySettings] object that contains values for each of * the fields to update. * @param updateMask Required. The mask to control which fields get updated. If the mask is not @@ -288,6 +421,20 @@ public final SecuritySettings updateSecuritySettings( /** * Updates the specified [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings]. * + *

Sample code: + * + *

{@code
+   * try (SecuritySettingsServiceClient securitySettingsServiceClient =
+   *     SecuritySettingsServiceClient.create()) {
+   *   UpdateSecuritySettingsRequest request =
+   *       UpdateSecuritySettingsRequest.newBuilder()
+   *           .setSecuritySettings(SecuritySettings.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   SecuritySettings response = securitySettingsServiceClient.updateSecuritySettings(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -300,6 +447,21 @@ public final SecuritySettings updateSecuritySettings(UpdateSecuritySettingsReque * Updates the specified [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings]. * *

Sample code: + * + *

{@code
+   * try (SecuritySettingsServiceClient securitySettingsServiceClient =
+   *     SecuritySettingsServiceClient.create()) {
+   *   UpdateSecuritySettingsRequest request =
+   *       UpdateSecuritySettingsRequest.newBuilder()
+   *           .setSecuritySettings(SecuritySettings.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       securitySettingsServiceClient.updateSecuritySettingsCallable().futureCall(request);
+   *   // Do something.
+   *   SecuritySettings response = future.get();
+   * }
+   * }
*/ public final UnaryCallable updateSecuritySettingsCallable() { @@ -310,6 +472,19 @@ public final SecuritySettings updateSecuritySettings(UpdateSecuritySettingsReque /** * Returns the list of all security settings in the specified location. * + *

Sample code: + * + *

{@code
+   * try (SecuritySettingsServiceClient securitySettingsServiceClient =
+   *     SecuritySettingsServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (SecuritySettings element :
+   *       securitySettingsServiceClient.listSecuritySettings(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The location to list all security settings for. Format: * `projects/<Project ID>/locations/<Location ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -326,6 +501,20 @@ public final ListSecuritySettingsPagedResponse listSecuritySettings(LocationName /** * Returns the list of all security settings in the specified location. * + *

Sample code: + * + *

{@code
+   * try (SecuritySettingsServiceClient securitySettingsServiceClient =
+   *     SecuritySettingsServiceClient.create()) {
+   *   String parent =
+   *       SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]").toString();
+   *   for (SecuritySettings element :
+   *       securitySettingsServiceClient.listSecuritySettings(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The location to list all security settings for. Format: * `projects/<Project ID>/locations/<Location ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -340,6 +529,26 @@ public final ListSecuritySettingsPagedResponse listSecuritySettings(String paren /** * Returns the list of all security settings in the specified location. * + *

Sample code: + * + *

{@code
+   * try (SecuritySettingsServiceClient securitySettingsServiceClient =
+   *     SecuritySettingsServiceClient.create()) {
+   *   ListSecuritySettingsRequest request =
+   *       ListSecuritySettingsRequest.newBuilder()
+   *           .setParent(
+   *               SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (SecuritySettings element :
+   *       securitySettingsServiceClient.listSecuritySettings(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -353,6 +562,26 @@ public final ListSecuritySettingsPagedResponse listSecuritySettings( * Returns the list of all security settings in the specified location. * *

Sample code: + * + *

{@code
+   * try (SecuritySettingsServiceClient securitySettingsServiceClient =
+   *     SecuritySettingsServiceClient.create()) {
+   *   ListSecuritySettingsRequest request =
+   *       ListSecuritySettingsRequest.newBuilder()
+   *           .setParent(
+   *               SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       securitySettingsServiceClient.listSecuritySettingsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (SecuritySettings element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listSecuritySettingsPagedCallable() { @@ -364,6 +593,25 @@ public final ListSecuritySettingsPagedResponse listSecuritySettings( * Returns the list of all security settings in the specified location. * *

Sample code: + * + *

{@code
+   * try (SecuritySettingsServiceClient securitySettingsServiceClient =
+   *     SecuritySettingsServiceClient.create()) {
+   *   while (true) {
+   *     ListSecuritySettingsResponse response =
+   *         securitySettingsServiceClient.listSecuritySettingsCallable().call(request);
+   *     for (SecuritySettings element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listSecuritySettingsCallable() { @@ -374,6 +622,17 @@ public final ListSecuritySettingsPagedResponse listSecuritySettings( /** * Deletes the specified [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings]. * + *

Sample code: + * + *

{@code
+   * try (SecuritySettingsServiceClient securitySettingsServiceClient =
+   *     SecuritySettingsServiceClient.create()) {
+   *   SecuritySettingsName name =
+   *       SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]");
+   *   securitySettingsServiceClient.deleteSecuritySettings(name);
+   * }
+   * }
+ * * @param name Required. The name of the * [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] to delete. Format: * `projects/<Project ID>/locations/<Location ID>/securitySettings/<Security @@ -392,6 +651,17 @@ public final void deleteSecuritySettings(SecuritySettingsName name) { /** * Deletes the specified [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings]. * + *

Sample code: + * + *

{@code
+   * try (SecuritySettingsServiceClient securitySettingsServiceClient =
+   *     SecuritySettingsServiceClient.create()) {
+   *   String name =
+   *       SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]").toString();
+   *   securitySettingsServiceClient.deleteSecuritySettings(name);
+   * }
+   * }
+ * * @param name Required. The name of the * [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] to delete. Format: * `projects/<Project ID>/locations/<Location ID>/securitySettings/<Security @@ -408,6 +678,21 @@ public final void deleteSecuritySettings(String name) { /** * Deletes the specified [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings]. * + *

Sample code: + * + *

{@code
+   * try (SecuritySettingsServiceClient securitySettingsServiceClient =
+   *     SecuritySettingsServiceClient.create()) {
+   *   DeleteSecuritySettingsRequest request =
+   *       DeleteSecuritySettingsRequest.newBuilder()
+   *           .setName(
+   *               SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]")
+   *                   .toString())
+   *           .build();
+   *   securitySettingsServiceClient.deleteSecuritySettings(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -420,6 +705,22 @@ public final void deleteSecuritySettings(DeleteSecuritySettingsRequest request) * Deletes the specified [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings]. * *

Sample code: + * + *

{@code
+   * try (SecuritySettingsServiceClient securitySettingsServiceClient =
+   *     SecuritySettingsServiceClient.create()) {
+   *   DeleteSecuritySettingsRequest request =
+   *       DeleteSecuritySettingsRequest.newBuilder()
+   *           .setName(
+   *               SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       securitySettingsServiceClient.deleteSecuritySettingsCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final UnaryCallable deleteSecuritySettingsCallable() { diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionEntityTypesClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionEntityTypesClient.java index b11b16975..90104eedd 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionEntityTypesClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionEntityTypesClient.java @@ -44,6 +44,15 @@ *

This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: * + *

{@code
+ * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
+ *   SessionEntityTypeName name =
+ *       SessionEntityTypeName.ofProjectLocationAgentSessionEntityTypeName(
+ *           "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]", "[ENTITY_TYPE]");
+ *   SessionEntityType response = sessionEntityTypesClient.getSessionEntityType(name);
+ * }
+ * }
+ * *

Note: close() needs to be called on the SessionEntityTypesClient object to clean up resources * such as threads. In the example above, try-with-resources is used, which automatically calls * close(). @@ -150,6 +159,20 @@ public SessionEntityTypesStub getStub() { /** * Returns the list of all session entity types in the specified session. * + *

Sample code: + * + *

{@code
+   * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
+   *   SessionName parent =
+   *       SessionName.ofProjectLocationAgentSessionName(
+   *           "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]");
+   *   for (SessionEntityType element :
+   *       sessionEntityTypesClient.listSessionEntityTypes(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The session to list all session entity types from. Format: * `projects/<Project ID>/locations/<Location ID>/agents/<Agent * ID>/sessions/<Session ID>` or `projects/<Project ID>/locations/<Location @@ -169,6 +192,21 @@ public final ListSessionEntityTypesPagedResponse listSessionEntityTypes(SessionN /** * Returns the list of all session entity types in the specified session. * + *

Sample code: + * + *

{@code
+   * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
+   *   String parent =
+   *       SessionEntityTypeName.ofProjectLocationAgentSessionEntityTypeName(
+   *               "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]", "[ENTITY_TYPE]")
+   *           .toString();
+   *   for (SessionEntityType element :
+   *       sessionEntityTypesClient.listSessionEntityTypes(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The session to list all session entity types from. Format: * `projects/<Project ID>/locations/<Location ID>/agents/<Agent * ID>/sessions/<Session ID>` or `projects/<Project ID>/locations/<Location @@ -186,6 +224,26 @@ public final ListSessionEntityTypesPagedResponse listSessionEntityTypes(String p /** * Returns the list of all session entity types in the specified session. * + *

Sample code: + * + *

{@code
+   * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
+   *   ListSessionEntityTypesRequest request =
+   *       ListSessionEntityTypesRequest.newBuilder()
+   *           .setParent(
+   *               SessionEntityTypeName.ofProjectLocationAgentSessionEntityTypeName(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]", "[ENTITY_TYPE]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (SessionEntityType element :
+   *       sessionEntityTypesClient.listSessionEntityTypes(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -199,6 +257,26 @@ public final ListSessionEntityTypesPagedResponse listSessionEntityTypes( * Returns the list of all session entity types in the specified session. * *

Sample code: + * + *

{@code
+   * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
+   *   ListSessionEntityTypesRequest request =
+   *       ListSessionEntityTypesRequest.newBuilder()
+   *           .setParent(
+   *               SessionEntityTypeName.ofProjectLocationAgentSessionEntityTypeName(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]", "[ENTITY_TYPE]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       sessionEntityTypesClient.listSessionEntityTypesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (SessionEntityType element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listSessionEntityTypesPagedCallable() { @@ -210,6 +288,24 @@ public final ListSessionEntityTypesPagedResponse listSessionEntityTypes( * Returns the list of all session entity types in the specified session. * *

Sample code: + * + *

{@code
+   * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
+   *   while (true) {
+   *     ListSessionEntityTypesResponse response =
+   *         sessionEntityTypesClient.listSessionEntityTypesCallable().call(request);
+   *     for (SessionEntityType element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listSessionEntityTypesCallable() { @@ -220,6 +316,17 @@ public final ListSessionEntityTypesPagedResponse listSessionEntityTypes( /** * Retrieves the specified session entity type. * + *

Sample code: + * + *

{@code
+   * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
+   *   SessionEntityTypeName name =
+   *       SessionEntityTypeName.ofProjectLocationAgentSessionEntityTypeName(
+   *           "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]", "[ENTITY_TYPE]");
+   *   SessionEntityType response = sessionEntityTypesClient.getSessionEntityType(name);
+   * }
+   * }
+ * * @param name Required. The name of the session entity type. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/sessions/<Session * ID>/entityTypes/<Entity Type ID>` or `projects/<Project @@ -240,6 +347,18 @@ public final SessionEntityType getSessionEntityType(SessionEntityTypeName name) /** * Retrieves the specified session entity type. * + *

Sample code: + * + *

{@code
+   * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
+   *   String name =
+   *       SessionEntityTypeName.ofProjectLocationAgentSessionEntityTypeName(
+   *               "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]", "[ENTITY_TYPE]")
+   *           .toString();
+   *   SessionEntityType response = sessionEntityTypesClient.getSessionEntityType(name);
+   * }
+   * }
+ * * @param name Required. The name of the session entity type. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/sessions/<Session * ID>/entityTypes/<Entity Type ID>` or `projects/<Project @@ -258,6 +377,21 @@ public final SessionEntityType getSessionEntityType(String name) { /** * Retrieves the specified session entity type. * + *

Sample code: + * + *

{@code
+   * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
+   *   GetSessionEntityTypeRequest request =
+   *       GetSessionEntityTypeRequest.newBuilder()
+   *           .setName(
+   *               SessionEntityTypeName.ofProjectLocationAgentSessionEntityTypeName(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]", "[ENTITY_TYPE]")
+   *                   .toString())
+   *           .build();
+   *   SessionEntityType response = sessionEntityTypesClient.getSessionEntityType(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -270,6 +404,22 @@ public final SessionEntityType getSessionEntityType(GetSessionEntityTypeRequest * Retrieves the specified session entity type. * *

Sample code: + * + *

{@code
+   * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
+   *   GetSessionEntityTypeRequest request =
+   *       GetSessionEntityTypeRequest.newBuilder()
+   *           .setName(
+   *               SessionEntityTypeName.ofProjectLocationAgentSessionEntityTypeName(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]", "[ENTITY_TYPE]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       sessionEntityTypesClient.getSessionEntityTypeCallable().futureCall(request);
+   *   // Do something.
+   *   SessionEntityType response = future.get();
+   * }
+   * }
*/ public final UnaryCallable getSessionEntityTypeCallable() { @@ -282,6 +432,19 @@ public final SessionEntityType getSessionEntityType(GetSessionEntityTypeRequest * *

If the specified session entity type already exists, overrides the session entity type. * + *

Sample code: + * + *

{@code
+   * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
+   *   SessionName parent =
+   *       SessionName.ofProjectLocationAgentSessionName(
+   *           "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]");
+   *   SessionEntityType sessionEntityType = SessionEntityType.newBuilder().build();
+   *   SessionEntityType response =
+   *       sessionEntityTypesClient.createSessionEntityType(parent, sessionEntityType);
+   * }
+   * }
+ * * @param parent Required. The session to create a session entity type for. Format: * `projects/<Project ID>/locations/<Location ID>/agents/<Agent * ID>/sessions/<Session ID>` or `projects/<Project ID>/locations/<Location @@ -306,6 +469,20 @@ public final SessionEntityType createSessionEntityType( * *

If the specified session entity type already exists, overrides the session entity type. * + *

Sample code: + * + *

{@code
+   * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
+   *   String parent =
+   *       SessionEntityTypeName.ofProjectLocationAgentSessionEntityTypeName(
+   *               "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]", "[ENTITY_TYPE]")
+   *           .toString();
+   *   SessionEntityType sessionEntityType = SessionEntityType.newBuilder().build();
+   *   SessionEntityType response =
+   *       sessionEntityTypesClient.createSessionEntityType(parent, sessionEntityType);
+   * }
+   * }
+ * * @param parent Required. The session to create a session entity type for. Format: * `projects/<Project ID>/locations/<Location ID>/agents/<Agent * ID>/sessions/<Session ID>` or `projects/<Project ID>/locations/<Location @@ -330,6 +507,22 @@ public final SessionEntityType createSessionEntityType( * *

If the specified session entity type already exists, overrides the session entity type. * + *

Sample code: + * + *

{@code
+   * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
+   *   CreateSessionEntityTypeRequest request =
+   *       CreateSessionEntityTypeRequest.newBuilder()
+   *           .setParent(
+   *               SessionEntityTypeName.ofProjectLocationAgentSessionEntityTypeName(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]", "[ENTITY_TYPE]")
+   *                   .toString())
+   *           .setSessionEntityType(SessionEntityType.newBuilder().build())
+   *           .build();
+   *   SessionEntityType response = sessionEntityTypesClient.createSessionEntityType(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -344,6 +537,23 @@ public final SessionEntityType createSessionEntityType(CreateSessionEntityTypeRe *

If the specified session entity type already exists, overrides the session entity type. * *

Sample code: + * + *

{@code
+   * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
+   *   CreateSessionEntityTypeRequest request =
+   *       CreateSessionEntityTypeRequest.newBuilder()
+   *           .setParent(
+   *               SessionEntityTypeName.ofProjectLocationAgentSessionEntityTypeName(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]", "[ENTITY_TYPE]")
+   *                   .toString())
+   *           .setSessionEntityType(SessionEntityType.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       sessionEntityTypesClient.createSessionEntityTypeCallable().futureCall(request);
+   *   // Do something.
+   *   SessionEntityType response = future.get();
+   * }
+   * }
*/ public final UnaryCallable createSessionEntityTypeCallable() { @@ -354,6 +564,17 @@ public final SessionEntityType createSessionEntityType(CreateSessionEntityTypeRe /** * Updates the specified session entity type. * + *

Sample code: + * + *

{@code
+   * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
+   *   SessionEntityType sessionEntityType = SessionEntityType.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   SessionEntityType response =
+   *       sessionEntityTypesClient.updateSessionEntityType(sessionEntityType, updateMask);
+   * }
+   * }
+ * * @param sessionEntityType Required. The session entity type to update. Format: * `projects/<Project ID>/locations/<Location ID>/agents/<Agent * ID>/sessions/<Session ID>/entityTypes/<Entity Type ID>` or @@ -378,6 +599,19 @@ public final SessionEntityType updateSessionEntityType( /** * Updates the specified session entity type. * + *

Sample code: + * + *

{@code
+   * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
+   *   UpdateSessionEntityTypeRequest request =
+   *       UpdateSessionEntityTypeRequest.newBuilder()
+   *           .setSessionEntityType(SessionEntityType.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   SessionEntityType response = sessionEntityTypesClient.updateSessionEntityType(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -390,6 +624,20 @@ public final SessionEntityType updateSessionEntityType(UpdateSessionEntityTypeRe * Updates the specified session entity type. * *

Sample code: + * + *

{@code
+   * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
+   *   UpdateSessionEntityTypeRequest request =
+   *       UpdateSessionEntityTypeRequest.newBuilder()
+   *           .setSessionEntityType(SessionEntityType.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       sessionEntityTypesClient.updateSessionEntityTypeCallable().futureCall(request);
+   *   // Do something.
+   *   SessionEntityType response = future.get();
+   * }
+   * }
*/ public final UnaryCallable updateSessionEntityTypeCallable() { @@ -400,6 +648,17 @@ public final SessionEntityType updateSessionEntityType(UpdateSessionEntityTypeRe /** * Deletes the specified session entity type. * + *

Sample code: + * + *

{@code
+   * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
+   *   SessionEntityTypeName name =
+   *       SessionEntityTypeName.ofProjectLocationAgentSessionEntityTypeName(
+   *           "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]", "[ENTITY_TYPE]");
+   *   sessionEntityTypesClient.deleteSessionEntityType(name);
+   * }
+   * }
+ * * @param name Required. The name of the session entity type to delete. Format: * `projects/<Project ID>/locations/<Location ID>/agents/<Agent * ID>/sessions/<Session ID>/entityTypes/<Entity Type ID>` or @@ -421,6 +680,18 @@ public final void deleteSessionEntityType(SessionEntityTypeName name) { /** * Deletes the specified session entity type. * + *

Sample code: + * + *

{@code
+   * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
+   *   String name =
+   *       SessionEntityTypeName.ofProjectLocationAgentSessionEntityTypeName(
+   *               "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]", "[ENTITY_TYPE]")
+   *           .toString();
+   *   sessionEntityTypesClient.deleteSessionEntityType(name);
+   * }
+   * }
+ * * @param name Required. The name of the session entity type to delete. Format: * `projects/<Project ID>/locations/<Location ID>/agents/<Agent * ID>/sessions/<Session ID>/entityTypes/<Entity Type ID>` or @@ -440,6 +711,21 @@ public final void deleteSessionEntityType(String name) { /** * Deletes the specified session entity type. * + *

Sample code: + * + *

{@code
+   * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
+   *   DeleteSessionEntityTypeRequest request =
+   *       DeleteSessionEntityTypeRequest.newBuilder()
+   *           .setName(
+   *               SessionEntityTypeName.ofProjectLocationAgentSessionEntityTypeName(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]", "[ENTITY_TYPE]")
+   *                   .toString())
+   *           .build();
+   *   sessionEntityTypesClient.deleteSessionEntityType(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -452,6 +738,22 @@ public final void deleteSessionEntityType(DeleteSessionEntityTypeRequest request * Deletes the specified session entity type. * *

Sample code: + * + *

{@code
+   * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
+   *   DeleteSessionEntityTypeRequest request =
+   *       DeleteSessionEntityTypeRequest.newBuilder()
+   *           .setName(
+   *               SessionEntityTypeName.ofProjectLocationAgentSessionEntityTypeName(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]", "[ENTITY_TYPE]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       sessionEntityTypesClient.deleteSessionEntityTypeCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final UnaryCallable deleteSessionEntityTypeCallable() { diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionsClient.java index 6a3eb6c7e..d1cb50ec1 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionsClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionsClient.java @@ -35,6 +35,22 @@ *

This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: * + *

{@code
+ * try (SessionsClient sessionsClient = SessionsClient.create()) {
+ *   DetectIntentRequest request =
+ *       DetectIntentRequest.newBuilder()
+ *           .setSession(
+ *               SessionName.ofProjectLocationAgentSessionName(
+ *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]")
+ *                   .toString())
+ *           .setQueryParams(QueryParameters.newBuilder().build())
+ *           .setQueryInput(QueryInput.newBuilder().build())
+ *           .setOutputAudioConfig(OutputAudioConfig.newBuilder().build())
+ *           .build();
+ *   DetectIntentResponse response = sessionsClient.detectIntent(request);
+ * }
+ * }
+ * *

Note: close() needs to be called on the SessionsClient object to clean up resources such as * threads. In the example above, try-with-resources is used, which automatically calls close(). * @@ -141,6 +157,24 @@ public SessionsStub getStub() { *

Note: Always use agent versions for production traffic. See [Versions and * environments](https://cloud.google.com/dialogflow/cx/docs/concept/version). * + *

Sample code: + * + *

{@code
+   * try (SessionsClient sessionsClient = SessionsClient.create()) {
+   *   DetectIntentRequest request =
+   *       DetectIntentRequest.newBuilder()
+   *           .setSession(
+   *               SessionName.ofProjectLocationAgentSessionName(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]")
+   *                   .toString())
+   *           .setQueryParams(QueryParameters.newBuilder().build())
+   *           .setQueryInput(QueryInput.newBuilder().build())
+   *           .setOutputAudioConfig(OutputAudioConfig.newBuilder().build())
+   *           .build();
+   *   DetectIntentResponse response = sessionsClient.detectIntent(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -158,6 +192,25 @@ public final DetectIntentResponse detectIntent(DetectIntentRequest request) { * environments](https://cloud.google.com/dialogflow/cx/docs/concept/version). * *

Sample code: + * + *

{@code
+   * try (SessionsClient sessionsClient = SessionsClient.create()) {
+   *   DetectIntentRequest request =
+   *       DetectIntentRequest.newBuilder()
+   *           .setSession(
+   *               SessionName.ofProjectLocationAgentSessionName(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]")
+   *                   .toString())
+   *           .setQueryParams(QueryParameters.newBuilder().build())
+   *           .setQueryInput(QueryInput.newBuilder().build())
+   *           .setOutputAudioConfig(OutputAudioConfig.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       sessionsClient.detectIntentCallable().futureCall(request);
+   *   // Do something.
+   *   DetectIntentResponse response = future.get();
+   * }
+   * }
*/ public final UnaryCallable detectIntentCallable() { return stub.detectIntentCallable(); @@ -173,6 +226,27 @@ public final UnaryCallable detectInte * environments](https://cloud.google.com/dialogflow/cx/docs/concept/version). * *

Sample code: + * + *

{@code
+   * try (SessionsClient sessionsClient = SessionsClient.create()) {
+   *   BidiStream bidiStream =
+   *       sessionsClient.streamingDetectIntentCallable().call();
+   *   StreamingDetectIntentRequest request =
+   *       StreamingDetectIntentRequest.newBuilder()
+   *           .setSession(
+   *               SessionName.ofProjectLocationAgentSessionName(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]")
+   *                   .toString())
+   *           .setQueryParams(QueryParameters.newBuilder().build())
+   *           .setQueryInput(QueryInput.newBuilder().build())
+   *           .setOutputAudioConfig(OutputAudioConfig.newBuilder().build())
+   *           .build();
+   *   bidiStream.send(request);
+   *   for (StreamingDetectIntentResponse response : bidiStream) {
+   *     // Do something when a response is received.
+   *   }
+   * }
+   * }
*/ public final BidiStreamingCallable streamingDetectIntentCallable() { @@ -183,6 +257,23 @@ public final UnaryCallable detectInte /** * Returns preliminary intent match results, doesn't change the session status. * + *

Sample code: + * + *

{@code
+   * try (SessionsClient sessionsClient = SessionsClient.create()) {
+   *   MatchIntentRequest request =
+   *       MatchIntentRequest.newBuilder()
+   *           .setSession(
+   *               SessionName.ofProjectLocationAgentSessionName(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]")
+   *                   .toString())
+   *           .setQueryParams(QueryParameters.newBuilder().build())
+   *           .setQueryInput(QueryInput.newBuilder().build())
+   *           .build();
+   *   MatchIntentResponse response = sessionsClient.matchIntent(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -195,6 +286,24 @@ public final MatchIntentResponse matchIntent(MatchIntentRequest request) { * Returns preliminary intent match results, doesn't change the session status. * *

Sample code: + * + *

{@code
+   * try (SessionsClient sessionsClient = SessionsClient.create()) {
+   *   MatchIntentRequest request =
+   *       MatchIntentRequest.newBuilder()
+   *           .setSession(
+   *               SessionName.ofProjectLocationAgentSessionName(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]")
+   *                   .toString())
+   *           .setQueryParams(QueryParameters.newBuilder().build())
+   *           .setQueryInput(QueryInput.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       sessionsClient.matchIntentCallable().futureCall(request);
+   *   // Do something.
+   *   MatchIntentResponse response = future.get();
+   * }
+   * }
*/ public final UnaryCallable matchIntentCallable() { return stub.matchIntentCallable(); @@ -208,6 +317,20 @@ public final UnaryCallable matchIntentC * [MatchIntentResponse][google.cloud.dialogflow.cx.v3.MatchIntentResponse]. Otherwise, the * behavior is undefined. * + *

Sample code: + * + *

{@code
+   * try (SessionsClient sessionsClient = SessionsClient.create()) {
+   *   FulfillIntentRequest request =
+   *       FulfillIntentRequest.newBuilder()
+   *           .setMatchIntentRequest(MatchIntentRequest.newBuilder().build())
+   *           .setMatch(Match.newBuilder().build())
+   *           .setOutputAudioConfig(OutputAudioConfig.newBuilder().build())
+   *           .build();
+   *   FulfillIntentResponse response = sessionsClient.fulfillIntent(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -224,6 +347,21 @@ public final FulfillIntentResponse fulfillIntent(FulfillIntentRequest request) { * behavior is undefined. * *

Sample code: + * + *

{@code
+   * try (SessionsClient sessionsClient = SessionsClient.create()) {
+   *   FulfillIntentRequest request =
+   *       FulfillIntentRequest.newBuilder()
+   *           .setMatchIntentRequest(MatchIntentRequest.newBuilder().build())
+   *           .setMatch(Match.newBuilder().build())
+   *           .setOutputAudioConfig(OutputAudioConfig.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       sessionsClient.fulfillIntentCallable().futureCall(request);
+   *   // Do something.
+   *   FulfillIntentResponse response = future.get();
+   * }
+   * }
*/ public final UnaryCallable fulfillIntentCallable() { return stub.fulfillIntentCallable(); diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCasesClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCasesClient.java index 5ecd29656..87529c157 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCasesClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCasesClient.java @@ -48,6 +48,13 @@ *

This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: * + *

{@code
+ * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+ *   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+ *   testCasesClient.batchDeleteTestCases(parent);
+ * }
+ * }
+ * *

Note: close() needs to be called on the TestCasesClient object to clean up resources such as * threads. In the example above, try-with-resources is used, which automatically calls close(). * @@ -160,6 +167,17 @@ public final OperationsClient getOperationsClient() { /** * Fetches a list of test cases for a given agent. * + *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+   *   for (TestCase element : testCasesClient.listTestCases(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The agent to list all pages for. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -176,6 +194,18 @@ public final ListTestCasesPagedResponse listTestCases(AgentName parent) { /** * Fetches a list of test cases for a given agent. * + *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   String parent =
+   *       TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString();
+   *   for (TestCase element : testCasesClient.listTestCases(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The agent to list all pages for. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -189,6 +219,23 @@ public final ListTestCasesPagedResponse listTestCases(String parent) { /** * Fetches a list of test cases for a given agent. * + *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   ListTestCasesRequest request =
+   *       ListTestCasesRequest.newBuilder()
+   *           .setParent(
+   *               TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (TestCase element : testCasesClient.listTestCases(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -201,6 +248,23 @@ public final ListTestCasesPagedResponse listTestCases(ListTestCasesRequest reque * Fetches a list of test cases for a given agent. * *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   ListTestCasesRequest request =
+   *       ListTestCasesRequest.newBuilder()
+   *           .setParent(
+   *               TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future = testCasesClient.listTestCasesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (TestCase element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listTestCasesPagedCallable() { @@ -212,6 +276,23 @@ public final ListTestCasesPagedResponse listTestCases(ListTestCasesRequest reque * Fetches a list of test cases for a given agent. * *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   while (true) {
+   *     ListTestCasesResponse response = testCasesClient.listTestCasesCallable().call(request);
+   *     for (TestCase element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listTestCasesCallable() { return stub.listTestCasesCallable(); @@ -221,6 +302,15 @@ public final UnaryCallable listTest /** * Batch deletes test cases. * + *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+   *   testCasesClient.batchDeleteTestCases(parent);
+   * }
+   * }
+ * * @param parent Required. The agent to delete test cases from. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -237,6 +327,16 @@ public final void batchDeleteTestCases(AgentName parent) { /** * Batch deletes test cases. * + *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   String parent =
+   *       TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString();
+   *   testCasesClient.batchDeleteTestCases(parent);
+   * }
+   * }
+ * * @param parent Required. The agent to delete test cases from. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -251,6 +351,20 @@ public final void batchDeleteTestCases(String parent) { /** * Batch deletes test cases. * + *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   BatchDeleteTestCasesRequest request =
+   *       BatchDeleteTestCasesRequest.newBuilder()
+   *           .setParent(
+   *               TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString())
+   *           .addAllNames(new ArrayList())
+   *           .build();
+   *   testCasesClient.batchDeleteTestCases(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -263,6 +377,20 @@ public final void batchDeleteTestCases(BatchDeleteTestCasesRequest request) { * Batch deletes test cases. * *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   BatchDeleteTestCasesRequest request =
+   *       BatchDeleteTestCasesRequest.newBuilder()
+   *           .setParent(
+   *               TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString())
+   *           .addAllNames(new ArrayList())
+   *           .build();
+   *   ApiFuture future = testCasesClient.batchDeleteTestCasesCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final UnaryCallable batchDeleteTestCasesCallable() { return stub.batchDeleteTestCasesCallable(); @@ -272,6 +400,15 @@ public final UnaryCallable batchDeleteTestCa /** * Gets a test case. * + *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   TestCaseName name = TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]");
+   *   TestCase response = testCasesClient.getTestCase(name);
+   * }
+   * }
+ * * @param name Required. The name of the testcase. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/testCases/<TestCase * ID>`. @@ -287,6 +424,15 @@ public final TestCase getTestCase(TestCaseName name) { /** * Gets a test case. * + *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   String name = TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString();
+   *   TestCase response = testCasesClient.getTestCase(name);
+   * }
+   * }
+ * * @param name Required. The name of the testcase. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/testCases/<TestCase * ID>`. @@ -301,6 +447,19 @@ public final TestCase getTestCase(String name) { /** * Gets a test case. * + *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   GetTestCaseRequest request =
+   *       GetTestCaseRequest.newBuilder()
+   *           .setName(
+   *               TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString())
+   *           .build();
+   *   TestCase response = testCasesClient.getTestCase(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -313,6 +472,19 @@ public final TestCase getTestCase(GetTestCaseRequest request) { * Gets a test case. * *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   GetTestCaseRequest request =
+   *       GetTestCaseRequest.newBuilder()
+   *           .setName(
+   *               TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString())
+   *           .build();
+   *   ApiFuture future = testCasesClient.getTestCaseCallable().futureCall(request);
+   *   // Do something.
+   *   TestCase response = future.get();
+   * }
+   * }
*/ public final UnaryCallable getTestCaseCallable() { return stub.getTestCaseCallable(); @@ -322,6 +494,16 @@ public final UnaryCallable getTestCaseCallable() { /** * Creates a test case for the given agent. * + *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+   *   TestCase testCase = TestCase.newBuilder().build();
+   *   TestCase response = testCasesClient.createTestCase(parent, testCase);
+   * }
+   * }
+ * * @param parent Required. The agent to create the test case for. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>`. * @param testCase Required. The test case to create. @@ -340,6 +522,17 @@ public final TestCase createTestCase(AgentName parent, TestCase testCase) { /** * Creates a test case for the given agent. * + *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   String parent =
+   *       TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString();
+   *   TestCase testCase = TestCase.newBuilder().build();
+   *   TestCase response = testCasesClient.createTestCase(parent, testCase);
+   * }
+   * }
+ * * @param parent Required. The agent to create the test case for. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>`. * @param testCase Required. The test case to create. @@ -355,6 +548,20 @@ public final TestCase createTestCase(String parent, TestCase testCase) { /** * Creates a test case for the given agent. * + *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   CreateTestCaseRequest request =
+   *       CreateTestCaseRequest.newBuilder()
+   *           .setParent(
+   *               TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString())
+   *           .setTestCase(TestCase.newBuilder().build())
+   *           .build();
+   *   TestCase response = testCasesClient.createTestCase(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -367,6 +574,20 @@ public final TestCase createTestCase(CreateTestCaseRequest request) { * Creates a test case for the given agent. * *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   CreateTestCaseRequest request =
+   *       CreateTestCaseRequest.newBuilder()
+   *           .setParent(
+   *               TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString())
+   *           .setTestCase(TestCase.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = testCasesClient.createTestCaseCallable().futureCall(request);
+   *   // Do something.
+   *   TestCase response = future.get();
+   * }
+   * }
*/ public final UnaryCallable createTestCaseCallable() { return stub.createTestCaseCallable(); @@ -376,6 +597,16 @@ public final UnaryCallable createTestCaseCallab /** * Updates the specified test case. * + *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   TestCase testCase = TestCase.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   TestCase response = testCasesClient.updateTestCase(testCase, updateMask);
+   * }
+   * }
+ * * @param testCase Required. The test case to update. * @param updateMask Required. The mask to specify which fields should be updated. The * [`creationTime`][google.cloud.dialogflow.cx.v3.TestCase.creation_time] and @@ -393,6 +624,19 @@ public final TestCase updateTestCase(TestCase testCase, FieldMask updateMask) { /** * Updates the specified test case. * + *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   UpdateTestCaseRequest request =
+   *       UpdateTestCaseRequest.newBuilder()
+   *           .setTestCase(TestCase.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   TestCase response = testCasesClient.updateTestCase(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -405,6 +649,19 @@ public final TestCase updateTestCase(UpdateTestCaseRequest request) { * Updates the specified test case. * *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   UpdateTestCaseRequest request =
+   *       UpdateTestCaseRequest.newBuilder()
+   *           .setTestCase(TestCase.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = testCasesClient.updateTestCaseCallable().futureCall(request);
+   *   // Do something.
+   *   TestCase response = future.get();
+   * }
+   * }
*/ public final UnaryCallable updateTestCaseCallable() { return stub.updateTestCaseCallable(); @@ -414,6 +671,22 @@ public final UnaryCallable updateTestCaseCallab /** * Kicks off a test case run. * + *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   RunTestCaseRequest request =
+   *       RunTestCaseRequest.newBuilder()
+   *           .setName(
+   *               TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString())
+   *           .setEnvironment(
+   *               EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]")
+   *                   .toString())
+   *           .build();
+   *   RunTestCaseResponse response = testCasesClient.runTestCaseAsync(request).get();
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -427,6 +700,23 @@ public final OperationFuture runTestCa * Kicks off a test case run. * *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   RunTestCaseRequest request =
+   *       RunTestCaseRequest.newBuilder()
+   *           .setName(
+   *               TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString())
+   *           .setEnvironment(
+   *               EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]")
+   *                   .toString())
+   *           .build();
+   *   OperationFuture future =
+   *       testCasesClient.runTestCaseOperationCallable().futureCall(request);
+   *   // Do something.
+   *   RunTestCaseResponse response = future.get();
+   * }
+   * }
*/ public final OperationCallable runTestCaseOperationCallable() { @@ -438,6 +728,22 @@ public final OperationFuture runTestCa * Kicks off a test case run. * *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   RunTestCaseRequest request =
+   *       RunTestCaseRequest.newBuilder()
+   *           .setName(
+   *               TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString())
+   *           .setEnvironment(
+   *               EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future = testCasesClient.runTestCaseCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
*/ public final UnaryCallable runTestCaseCallable() { return stub.runTestCaseCallable(); @@ -447,6 +753,23 @@ public final UnaryCallable runTestCaseCallable() /** * Kicks off a batch run of test cases. * + *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   BatchRunTestCasesRequest request =
+   *       BatchRunTestCasesRequest.newBuilder()
+   *           .setParent(
+   *               TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString())
+   *           .setEnvironment(
+   *               EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]")
+   *                   .toString())
+   *           .addAllTestCases(new ArrayList())
+   *           .build();
+   *   BatchRunTestCasesResponse response = testCasesClient.batchRunTestCasesAsync(request).get();
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -460,6 +783,24 @@ public final UnaryCallable runTestCaseCallable() * Kicks off a batch run of test cases. * *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   BatchRunTestCasesRequest request =
+   *       BatchRunTestCasesRequest.newBuilder()
+   *           .setParent(
+   *               TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString())
+   *           .setEnvironment(
+   *               EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]")
+   *                   .toString())
+   *           .addAllTestCases(new ArrayList())
+   *           .build();
+   *   OperationFuture future =
+   *       testCasesClient.batchRunTestCasesOperationCallable().futureCall(request);
+   *   // Do something.
+   *   BatchRunTestCasesResponse response = future.get();
+   * }
+   * }
*/ public final OperationCallable< BatchRunTestCasesRequest, BatchRunTestCasesResponse, BatchRunTestCasesMetadata> @@ -472,6 +813,23 @@ public final UnaryCallable runTestCaseCallable() * Kicks off a batch run of test cases. * *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   BatchRunTestCasesRequest request =
+   *       BatchRunTestCasesRequest.newBuilder()
+   *           .setParent(
+   *               TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString())
+   *           .setEnvironment(
+   *               EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]")
+   *                   .toString())
+   *           .addAllTestCases(new ArrayList())
+   *           .build();
+   *   ApiFuture future = testCasesClient.batchRunTestCasesCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
*/ public final UnaryCallable batchRunTestCasesCallable() { return stub.batchRunTestCasesCallable(); @@ -481,6 +839,18 @@ public final UnaryCallable batchRunTestCase /** * Calculates the test coverage for an agent. * + *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   CalculateCoverageRequest request =
+   *       CalculateCoverageRequest.newBuilder()
+   *           .setAgent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .build();
+   *   CalculateCoverageResponse response = testCasesClient.calculateCoverage(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -493,6 +863,19 @@ public final CalculateCoverageResponse calculateCoverage(CalculateCoverageReques * Calculates the test coverage for an agent. * *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   CalculateCoverageRequest request =
+   *       CalculateCoverageRequest.newBuilder()
+   *           .setAgent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       testCasesClient.calculateCoverageCallable().futureCall(request);
+   *   // Do something.
+   *   CalculateCoverageResponse response = future.get();
+   * }
+   * }
*/ public final UnaryCallable calculateCoverageCallable() { @@ -505,6 +888,19 @@ public final CalculateCoverageResponse calculateCoverage(CalculateCoverageReques * cases and won't overwite any existing ones. The provided ID in the imported test case is * neglected. * + *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   ImportTestCasesRequest request =
+   *       ImportTestCasesRequest.newBuilder()
+   *           .setParent(
+   *               TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString())
+   *           .build();
+   *   ImportTestCasesResponse response = testCasesClient.importTestCasesAsync(request).get();
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -520,6 +916,20 @@ public final CalculateCoverageResponse calculateCoverage(CalculateCoverageReques * neglected. * *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   ImportTestCasesRequest request =
+   *       ImportTestCasesRequest.newBuilder()
+   *           .setParent(
+   *               TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString())
+   *           .build();
+   *   OperationFuture future =
+   *       testCasesClient.importTestCasesOperationCallable().futureCall(request);
+   *   // Do something.
+   *   ImportTestCasesResponse response = future.get();
+   * }
+   * }
*/ public final OperationCallable< ImportTestCasesRequest, ImportTestCasesResponse, ImportTestCasesMetadata> @@ -534,6 +944,19 @@ public final CalculateCoverageResponse calculateCoverage(CalculateCoverageReques * neglected. * *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   ImportTestCasesRequest request =
+   *       ImportTestCasesRequest.newBuilder()
+   *           .setParent(
+   *               TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString())
+   *           .build();
+   *   ApiFuture future = testCasesClient.importTestCasesCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
*/ public final UnaryCallable importTestCasesCallable() { return stub.importTestCasesCallable(); @@ -544,6 +967,20 @@ public final UnaryCallable importTestCasesCal * 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. * + *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   ExportTestCasesRequest request =
+   *       ExportTestCasesRequest.newBuilder()
+   *           .setParent(
+   *               TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   ExportTestCasesResponse response = testCasesClient.exportTestCasesAsync(request).get();
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -558,6 +995,21 @@ public final UnaryCallable importTestCasesCal * applied to export a subset of test cases. * *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   ExportTestCasesRequest request =
+   *       ExportTestCasesRequest.newBuilder()
+   *           .setParent(
+   *               TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   OperationFuture future =
+   *       testCasesClient.exportTestCasesOperationCallable().futureCall(request);
+   *   // Do something.
+   *   ExportTestCasesResponse response = future.get();
+   * }
+   * }
*/ public final OperationCallable< ExportTestCasesRequest, ExportTestCasesResponse, ExportTestCasesMetadata> @@ -571,6 +1023,20 @@ public final UnaryCallable importTestCasesCal * applied to export a subset of test cases. * *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   ExportTestCasesRequest request =
+   *       ExportTestCasesRequest.newBuilder()
+   *           .setParent(
+   *               TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   ApiFuture future = testCasesClient.exportTestCasesCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
*/ public final UnaryCallable exportTestCasesCallable() { return stub.exportTestCasesCallable(); @@ -580,6 +1046,17 @@ public final UnaryCallable exportTestCasesCal /** * Fetches a list of results for a given test case. * + *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   TestCaseName parent = TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]");
+   *   for (TestCaseResult element : testCasesClient.listTestCaseResults(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The test case to list results for. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/ testCases/<TestCase * ID>`. Specify a `-` as a wildcard for TestCase ID to list results across multiple test @@ -598,6 +1075,19 @@ public final ListTestCaseResultsPagedResponse listTestCaseResults(TestCaseName p /** * Fetches a list of results for a given test case. * + *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   String parent =
+   *       TestCaseResultName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]", "[RESULT]")
+   *           .toString();
+   *   for (TestCaseResult element : testCasesClient.listTestCaseResults(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The test case to list results for. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/ testCases/<TestCase * ID>`. Specify a `-` as a wildcard for TestCase ID to list results across multiple test @@ -614,6 +1104,26 @@ public final ListTestCaseResultsPagedResponse listTestCaseResults(String parent) /** * Fetches a list of results for a given test case. * + *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   ListTestCaseResultsRequest request =
+   *       ListTestCaseResultsRequest.newBuilder()
+   *           .setParent(
+   *               TestCaseResultName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]", "[RESULT]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   for (TestCaseResult element : testCasesClient.listTestCaseResults(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -627,6 +1137,27 @@ public final ListTestCaseResultsPagedResponse listTestCaseResults( * Fetches a list of results for a given test case. * *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   ListTestCaseResultsRequest request =
+   *       ListTestCaseResultsRequest.newBuilder()
+   *           .setParent(
+   *               TestCaseResultName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]", "[RESULT]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   ApiFuture future =
+   *       testCasesClient.listTestCaseResultsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (TestCaseResult element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listTestCaseResultsPagedCallable() { @@ -638,6 +1169,24 @@ public final ListTestCaseResultsPagedResponse listTestCaseResults( * Fetches a list of results for a given test case. * *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   while (true) {
+   *     ListTestCaseResultsResponse response =
+   *         testCasesClient.listTestCaseResultsCallable().call(request);
+   *     for (TestCaseResult element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listTestCaseResultsCallable() { diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupsClient.java index b188c7ada..c48c2a466 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupsClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupsClient.java @@ -44,6 +44,16 @@ *

This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: * + *

{@code
+ * try (TransitionRouteGroupsClient transitionRouteGroupsClient =
+ *     TransitionRouteGroupsClient.create()) {
+ *   TransitionRouteGroupName name =
+ *       TransitionRouteGroupName.of(
+ *           "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]");
+ *   TransitionRouteGroup response = transitionRouteGroupsClient.getTransitionRouteGroup(name);
+ * }
+ * }
+ * *

Note: close() needs to be called on the TransitionRouteGroupsClient object to clean up * resources such as threads. In the example above, try-with-resources is used, which automatically * calls close(). @@ -150,6 +160,19 @@ public TransitionRouteGroupsStub getStub() { /** * Returns the list of all transition route groups in the specified flow. * + *

Sample code: + * + *

{@code
+   * try (TransitionRouteGroupsClient transitionRouteGroupsClient =
+   *     TransitionRouteGroupsClient.create()) {
+   *   FlowName parent = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]");
+   *   for (TransitionRouteGroup element :
+   *       transitionRouteGroupsClient.listTransitionRouteGroups(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The flow to list all transition route groups for. Format: * `projects/<Project ID>/locations/<Location ID>/agents/<Agent * ID>/flows/<Flow ID>`. @@ -167,6 +190,22 @@ public final ListTransitionRouteGroupsPagedResponse listTransitionRouteGroups(Fl /** * Returns the list of all transition route groups in the specified flow. * + *

Sample code: + * + *

{@code
+   * try (TransitionRouteGroupsClient transitionRouteGroupsClient =
+   *     TransitionRouteGroupsClient.create()) {
+   *   String parent =
+   *       TransitionRouteGroupName.of(
+   *               "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]")
+   *           .toString();
+   *   for (TransitionRouteGroup element :
+   *       transitionRouteGroupsClient.listTransitionRouteGroups(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The flow to list all transition route groups for. Format: * `projects/<Project ID>/locations/<Location ID>/agents/<Agent * ID>/flows/<Flow ID>`. @@ -182,6 +221,32 @@ public final ListTransitionRouteGroupsPagedResponse listTransitionRouteGroups(St /** * Returns the list of all transition route groups in the specified flow. * + *

Sample code: + * + *

{@code
+   * try (TransitionRouteGroupsClient transitionRouteGroupsClient =
+   *     TransitionRouteGroupsClient.create()) {
+   *   ListTransitionRouteGroupsRequest request =
+   *       ListTransitionRouteGroupsRequest.newBuilder()
+   *           .setParent(
+   *               TransitionRouteGroupName.of(
+   *                       "[PROJECT]",
+   *                       "[LOCATION]",
+   *                       "[AGENT]",
+   *                       "[FLOW]",
+   *                       "[TRANSITION_ROUTE_GROUP]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   for (TransitionRouteGroup element :
+   *       transitionRouteGroupsClient.listTransitionRouteGroups(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -195,6 +260,32 @@ public final ListTransitionRouteGroupsPagedResponse listTransitionRouteGroups( * Returns the list of all transition route groups in the specified flow. * *

Sample code: + * + *

{@code
+   * try (TransitionRouteGroupsClient transitionRouteGroupsClient =
+   *     TransitionRouteGroupsClient.create()) {
+   *   ListTransitionRouteGroupsRequest request =
+   *       ListTransitionRouteGroupsRequest.newBuilder()
+   *           .setParent(
+   *               TransitionRouteGroupName.of(
+   *                       "[PROJECT]",
+   *                       "[LOCATION]",
+   *                       "[AGENT]",
+   *                       "[FLOW]",
+   *                       "[TRANSITION_ROUTE_GROUP]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   ApiFuture future =
+   *       transitionRouteGroupsClient.listTransitionRouteGroupsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (TransitionRouteGroup element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable< ListTransitionRouteGroupsRequest, ListTransitionRouteGroupsPagedResponse> @@ -207,6 +298,25 @@ public final ListTransitionRouteGroupsPagedResponse listTransitionRouteGroups( * Returns the list of all transition route groups in the specified flow. * *

Sample code: + * + *

{@code
+   * try (TransitionRouteGroupsClient transitionRouteGroupsClient =
+   *     TransitionRouteGroupsClient.create()) {
+   *   while (true) {
+   *     ListTransitionRouteGroupsResponse response =
+   *         transitionRouteGroupsClient.listTransitionRouteGroupsCallable().call(request);
+   *     for (TransitionRouteGroup element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listTransitionRouteGroupsCallable() { @@ -218,6 +328,18 @@ public final ListTransitionRouteGroupsPagedResponse listTransitionRouteGroups( * Retrieves the specified * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]. * + *

Sample code: + * + *

{@code
+   * try (TransitionRouteGroupsClient transitionRouteGroupsClient =
+   *     TransitionRouteGroupsClient.create()) {
+   *   TransitionRouteGroupName name =
+   *       TransitionRouteGroupName.of(
+   *           "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]");
+   *   TransitionRouteGroup response = transitionRouteGroupsClient.getTransitionRouteGroup(name);
+   * }
+   * }
+ * * @param name Required. The name of the * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]. Format: * `projects/<Project ID>/locations/<Location ID>/agents/<Agent @@ -237,6 +359,19 @@ public final TransitionRouteGroup getTransitionRouteGroup(TransitionRouteGroupNa * Retrieves the specified * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]. * + *

Sample code: + * + *

{@code
+   * try (TransitionRouteGroupsClient transitionRouteGroupsClient =
+   *     TransitionRouteGroupsClient.create()) {
+   *   String name =
+   *       TransitionRouteGroupName.of(
+   *               "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]")
+   *           .toString();
+   *   TransitionRouteGroup response = transitionRouteGroupsClient.getTransitionRouteGroup(name);
+   * }
+   * }
+ * * @param name Required. The name of the * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]. Format: * `projects/<Project ID>/locations/<Location ID>/agents/<Agent @@ -254,6 +389,27 @@ public final TransitionRouteGroup getTransitionRouteGroup(String name) { * Retrieves the specified * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]. * + *

Sample code: + * + *

{@code
+   * try (TransitionRouteGroupsClient transitionRouteGroupsClient =
+   *     TransitionRouteGroupsClient.create()) {
+   *   GetTransitionRouteGroupRequest request =
+   *       GetTransitionRouteGroupRequest.newBuilder()
+   *           .setName(
+   *               TransitionRouteGroupName.of(
+   *                       "[PROJECT]",
+   *                       "[LOCATION]",
+   *                       "[AGENT]",
+   *                       "[FLOW]",
+   *                       "[TRANSITION_ROUTE_GROUP]")
+   *                   .toString())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   TransitionRouteGroup response = transitionRouteGroupsClient.getTransitionRouteGroup(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -268,6 +424,28 @@ public final TransitionRouteGroup getTransitionRouteGroup( * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]. * *

Sample code: + * + *

{@code
+   * try (TransitionRouteGroupsClient transitionRouteGroupsClient =
+   *     TransitionRouteGroupsClient.create()) {
+   *   GetTransitionRouteGroupRequest request =
+   *       GetTransitionRouteGroupRequest.newBuilder()
+   *           .setName(
+   *               TransitionRouteGroupName.of(
+   *                       "[PROJECT]",
+   *                       "[LOCATION]",
+   *                       "[AGENT]",
+   *                       "[FLOW]",
+   *                       "[TRANSITION_ROUTE_GROUP]")
+   *                   .toString())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   ApiFuture future =
+   *       transitionRouteGroupsClient.getTransitionRouteGroupCallable().futureCall(request);
+   *   // Do something.
+   *   TransitionRouteGroup response = future.get();
+   * }
+   * }
*/ public final UnaryCallable getTransitionRouteGroupCallable() { @@ -279,6 +457,18 @@ public final TransitionRouteGroup getTransitionRouteGroup( * Creates an [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] in the * specified flow. * + *

Sample code: + * + *

{@code
+   * try (TransitionRouteGroupsClient transitionRouteGroupsClient =
+   *     TransitionRouteGroupsClient.create()) {
+   *   FlowName parent = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]");
+   *   TransitionRouteGroup transitionRouteGroup = TransitionRouteGroup.newBuilder().build();
+   *   TransitionRouteGroup response =
+   *       transitionRouteGroupsClient.createTransitionRouteGroup(parent, transitionRouteGroup);
+   * }
+   * }
+ * * @param parent Required. The flow to create an * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] for. Format: * `projects/<Project ID>/locations/<Location ID>/agents/<Agent @@ -301,6 +491,21 @@ public final TransitionRouteGroup createTransitionRouteGroup( * Creates an [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] in the * specified flow. * + *

Sample code: + * + *

{@code
+   * try (TransitionRouteGroupsClient transitionRouteGroupsClient =
+   *     TransitionRouteGroupsClient.create()) {
+   *   String parent =
+   *       TransitionRouteGroupName.of(
+   *               "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]")
+   *           .toString();
+   *   TransitionRouteGroup transitionRouteGroup = TransitionRouteGroup.newBuilder().build();
+   *   TransitionRouteGroup response =
+   *       transitionRouteGroupsClient.createTransitionRouteGroup(parent, transitionRouteGroup);
+   * }
+   * }
+ * * @param parent Required. The flow to create an * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] for. Format: * `projects/<Project ID>/locations/<Location ID>/agents/<Agent @@ -323,6 +528,29 @@ public final TransitionRouteGroup createTransitionRouteGroup( * Creates an [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] in the * specified flow. * + *

Sample code: + * + *

{@code
+   * try (TransitionRouteGroupsClient transitionRouteGroupsClient =
+   *     TransitionRouteGroupsClient.create()) {
+   *   CreateTransitionRouteGroupRequest request =
+   *       CreateTransitionRouteGroupRequest.newBuilder()
+   *           .setParent(
+   *               TransitionRouteGroupName.of(
+   *                       "[PROJECT]",
+   *                       "[LOCATION]",
+   *                       "[AGENT]",
+   *                       "[FLOW]",
+   *                       "[TRANSITION_ROUTE_GROUP]")
+   *                   .toString())
+   *           .setTransitionRouteGroup(TransitionRouteGroup.newBuilder().build())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   TransitionRouteGroup response =
+   *       transitionRouteGroupsClient.createTransitionRouteGroup(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -337,6 +565,29 @@ public final TransitionRouteGroup createTransitionRouteGroup( * specified flow. * *

Sample code: + * + *

{@code
+   * try (TransitionRouteGroupsClient transitionRouteGroupsClient =
+   *     TransitionRouteGroupsClient.create()) {
+   *   CreateTransitionRouteGroupRequest request =
+   *       CreateTransitionRouteGroupRequest.newBuilder()
+   *           .setParent(
+   *               TransitionRouteGroupName.of(
+   *                       "[PROJECT]",
+   *                       "[LOCATION]",
+   *                       "[AGENT]",
+   *                       "[FLOW]",
+   *                       "[TRANSITION_ROUTE_GROUP]")
+   *                   .toString())
+   *           .setTransitionRouteGroup(TransitionRouteGroup.newBuilder().build())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   ApiFuture future =
+   *       transitionRouteGroupsClient.createTransitionRouteGroupCallable().futureCall(request);
+   *   // Do something.
+   *   TransitionRouteGroup response = future.get();
+   * }
+   * }
*/ public final UnaryCallable createTransitionRouteGroupCallable() { @@ -348,6 +599,18 @@ public final TransitionRouteGroup createTransitionRouteGroup( * Updates the specified * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]. * + *

Sample code: + * + *

{@code
+   * try (TransitionRouteGroupsClient transitionRouteGroupsClient =
+   *     TransitionRouteGroupsClient.create()) {
+   *   TransitionRouteGroup transitionRouteGroup = TransitionRouteGroup.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   TransitionRouteGroup response =
+   *       transitionRouteGroupsClient.updateTransitionRouteGroup(transitionRouteGroup, updateMask);
+   * }
+   * }
+ * * @param transitionRouteGroup Required. The transition route group to update. * @param updateMask The mask to control which fields get updated. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -367,6 +630,22 @@ public final TransitionRouteGroup updateTransitionRouteGroup( * Updates the specified * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]. * + *

Sample code: + * + *

{@code
+   * try (TransitionRouteGroupsClient transitionRouteGroupsClient =
+   *     TransitionRouteGroupsClient.create()) {
+   *   UpdateTransitionRouteGroupRequest request =
+   *       UpdateTransitionRouteGroupRequest.newBuilder()
+   *           .setTransitionRouteGroup(TransitionRouteGroup.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   TransitionRouteGroup response =
+   *       transitionRouteGroupsClient.updateTransitionRouteGroup(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -381,6 +660,22 @@ public final TransitionRouteGroup updateTransitionRouteGroup( * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]. * *

Sample code: + * + *

{@code
+   * try (TransitionRouteGroupsClient transitionRouteGroupsClient =
+   *     TransitionRouteGroupsClient.create()) {
+   *   UpdateTransitionRouteGroupRequest request =
+   *       UpdateTransitionRouteGroupRequest.newBuilder()
+   *           .setTransitionRouteGroup(TransitionRouteGroup.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   ApiFuture future =
+   *       transitionRouteGroupsClient.updateTransitionRouteGroupCallable().futureCall(request);
+   *   // Do something.
+   *   TransitionRouteGroup response = future.get();
+   * }
+   * }
*/ public final UnaryCallable updateTransitionRouteGroupCallable() { @@ -392,6 +687,18 @@ public final TransitionRouteGroup updateTransitionRouteGroup( * Deletes the specified * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]. * + *

Sample code: + * + *

{@code
+   * try (TransitionRouteGroupsClient transitionRouteGroupsClient =
+   *     TransitionRouteGroupsClient.create()) {
+   *   TransitionRouteGroupName name =
+   *       TransitionRouteGroupName.of(
+   *           "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]");
+   *   transitionRouteGroupsClient.deleteTransitionRouteGroup(name);
+   * }
+   * }
+ * * @param name Required. The name of the * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] to delete. * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent @@ -411,6 +718,19 @@ public final void deleteTransitionRouteGroup(TransitionRouteGroupName name) { * Deletes the specified * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]. * + *

Sample code: + * + *

{@code
+   * try (TransitionRouteGroupsClient transitionRouteGroupsClient =
+   *     TransitionRouteGroupsClient.create()) {
+   *   String name =
+   *       TransitionRouteGroupName.of(
+   *               "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]")
+   *           .toString();
+   *   transitionRouteGroupsClient.deleteTransitionRouteGroup(name);
+   * }
+   * }
+ * * @param name Required. The name of the * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] to delete. * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent @@ -428,6 +748,27 @@ public final void deleteTransitionRouteGroup(String name) { * Deletes the specified * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]. * + *

Sample code: + * + *

{@code
+   * try (TransitionRouteGroupsClient transitionRouteGroupsClient =
+   *     TransitionRouteGroupsClient.create()) {
+   *   DeleteTransitionRouteGroupRequest request =
+   *       DeleteTransitionRouteGroupRequest.newBuilder()
+   *           .setName(
+   *               TransitionRouteGroupName.of(
+   *                       "[PROJECT]",
+   *                       "[LOCATION]",
+   *                       "[AGENT]",
+   *                       "[FLOW]",
+   *                       "[TRANSITION_ROUTE_GROUP]")
+   *                   .toString())
+   *           .setForce(true)
+   *           .build();
+   *   transitionRouteGroupsClient.deleteTransitionRouteGroup(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -441,6 +782,28 @@ public final void deleteTransitionRouteGroup(DeleteTransitionRouteGroupRequest r * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]. * *

Sample code: + * + *

{@code
+   * try (TransitionRouteGroupsClient transitionRouteGroupsClient =
+   *     TransitionRouteGroupsClient.create()) {
+   *   DeleteTransitionRouteGroupRequest request =
+   *       DeleteTransitionRouteGroupRequest.newBuilder()
+   *           .setName(
+   *               TransitionRouteGroupName.of(
+   *                       "[PROJECT]",
+   *                       "[LOCATION]",
+   *                       "[AGENT]",
+   *                       "[FLOW]",
+   *                       "[TRANSITION_ROUTE_GROUP]")
+   *                   .toString())
+   *           .setForce(true)
+   *           .build();
+   *   ApiFuture future =
+   *       transitionRouteGroupsClient.deleteTransitionRouteGroupCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final UnaryCallable deleteTransitionRouteGroupCallable() { diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/VersionsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/VersionsClient.java index 3bba62b28..97bc0e3b7 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/VersionsClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/VersionsClient.java @@ -48,6 +48,14 @@ *

This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: * + *

{@code
+ * try (VersionsClient versionsClient = VersionsClient.create()) {
+ *   VersionName name =
+ *       VersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]");
+ *   Version response = versionsClient.getVersion(name);
+ * }
+ * }
+ * *

Note: close() needs to be called on the VersionsClient object to clean up resources such as * threads. In the example above, try-with-resources is used, which automatically calls close(). * @@ -160,6 +168,17 @@ public final OperationsClient getOperationsClient() { /** * Returns the list of all versions in the specified [Flow][google.cloud.dialogflow.cx.v3.Flow]. * + *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   FlowName parent = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]");
+   *   for (Version element : versionsClient.listVersions(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The [Flow][google.cloud.dialogflow.cx.v3.Flow] to list all versions * for. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent * ID>/flows/<Flow ID>`. @@ -177,6 +196,18 @@ public final ListVersionsPagedResponse listVersions(FlowName parent) { /** * Returns the list of all versions in the specified [Flow][google.cloud.dialogflow.cx.v3.Flow]. * + *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   String parent =
+   *       VersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]").toString();
+   *   for (Version element : versionsClient.listVersions(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The [Flow][google.cloud.dialogflow.cx.v3.Flow] to list all versions * for. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent * ID>/flows/<Flow ID>`. @@ -191,6 +222,24 @@ public final ListVersionsPagedResponse listVersions(String parent) { /** * Returns the list of all versions in the specified [Flow][google.cloud.dialogflow.cx.v3.Flow]. * + *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   ListVersionsRequest request =
+   *       ListVersionsRequest.newBuilder()
+   *           .setParent(
+   *               VersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Version element : versionsClient.listVersions(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -203,6 +252,24 @@ public final ListVersionsPagedResponse listVersions(ListVersionsRequest request) * Returns the list of all versions in the specified [Flow][google.cloud.dialogflow.cx.v3.Flow]. * *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   ListVersionsRequest request =
+   *       ListVersionsRequest.newBuilder()
+   *           .setParent(
+   *               VersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future = versionsClient.listVersionsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Version element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listVersionsPagedCallable() { @@ -214,6 +281,23 @@ public final ListVersionsPagedResponse listVersions(ListVersionsRequest request) * Returns the list of all versions in the specified [Flow][google.cloud.dialogflow.cx.v3.Flow]. * *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   while (true) {
+   *     ListVersionsResponse response = versionsClient.listVersionsCallable().call(request);
+   *     for (Version element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listVersionsCallable() { return stub.listVersionsCallable(); @@ -223,6 +307,16 @@ public final UnaryCallable listVersio /** * Retrieves the specified [Version][google.cloud.dialogflow.cx.v3.Version]. * + *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   VersionName name =
+   *       VersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]");
+   *   Version response = versionsClient.getVersion(name);
+   * }
+   * }
+ * * @param name Required. The name of the [Version][google.cloud.dialogflow.cx.v3.Version]. Format: * `projects/<Project ID>/locations/<Location ID>/agents/<Agent * ID>/flows/<Flow ID>/versions/<Version ID>`. @@ -238,6 +332,16 @@ public final Version getVersion(VersionName name) { /** * Retrieves the specified [Version][google.cloud.dialogflow.cx.v3.Version]. * + *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   String name =
+   *       VersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]").toString();
+   *   Version response = versionsClient.getVersion(name);
+   * }
+   * }
+ * * @param name Required. The name of the [Version][google.cloud.dialogflow.cx.v3.Version]. Format: * `projects/<Project ID>/locations/<Location ID>/agents/<Agent * ID>/flows/<Flow ID>/versions/<Version ID>`. @@ -252,6 +356,20 @@ public final Version getVersion(String name) { /** * Retrieves the specified [Version][google.cloud.dialogflow.cx.v3.Version]. * + *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   GetVersionRequest request =
+   *       GetVersionRequest.newBuilder()
+   *           .setName(
+   *               VersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]")
+   *                   .toString())
+   *           .build();
+   *   Version response = versionsClient.getVersion(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -264,6 +382,20 @@ public final Version getVersion(GetVersionRequest request) { * Retrieves the specified [Version][google.cloud.dialogflow.cx.v3.Version]. * *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   GetVersionRequest request =
+   *       GetVersionRequest.newBuilder()
+   *           .setName(
+   *               VersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future = versionsClient.getVersionCallable().futureCall(request);
+   *   // Do something.
+   *   Version response = future.get();
+   * }
+   * }
*/ public final UnaryCallable getVersionCallable() { return stub.getVersionCallable(); @@ -274,6 +406,16 @@ public final UnaryCallable getVersionCallable() { * Creates a [Version][google.cloud.dialogflow.cx.v3.Version] in the specified * [Flow][google.cloud.dialogflow.cx.v3.Flow]. * + *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   FlowName parent = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]");
+   *   Version version = Version.newBuilder().build();
+   *   Version response = versionsClient.createVersionAsync(parent, version).get();
+   * }
+   * }
+ * * @param parent Required. The [Flow][google.cloud.dialogflow.cx.v3.Flow] to create an * [Version][google.cloud.dialogflow.cx.v3.Version] for. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>`. @@ -295,6 +437,17 @@ public final OperationFuture createVers * Creates a [Version][google.cloud.dialogflow.cx.v3.Version] in the specified * [Flow][google.cloud.dialogflow.cx.v3.Flow]. * + *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   String parent =
+   *       VersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]").toString();
+   *   Version version = Version.newBuilder().build();
+   *   Version response = versionsClient.createVersionAsync(parent, version).get();
+   * }
+   * }
+ * * @param parent Required. The [Flow][google.cloud.dialogflow.cx.v3.Flow] to create an * [Version][google.cloud.dialogflow.cx.v3.Version] for. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>`. @@ -313,6 +466,21 @@ public final OperationFuture createVers * Creates a [Version][google.cloud.dialogflow.cx.v3.Version] in the specified * [Flow][google.cloud.dialogflow.cx.v3.Flow]. * + *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   CreateVersionRequest request =
+   *       CreateVersionRequest.newBuilder()
+   *           .setParent(
+   *               VersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]")
+   *                   .toString())
+   *           .setVersion(Version.newBuilder().build())
+   *           .build();
+   *   Version response = versionsClient.createVersionAsync(request).get();
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -327,6 +495,22 @@ public final OperationFuture createVers * [Flow][google.cloud.dialogflow.cx.v3.Flow]. * *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   CreateVersionRequest request =
+   *       CreateVersionRequest.newBuilder()
+   *           .setParent(
+   *               VersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]")
+   *                   .toString())
+   *           .setVersion(Version.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       versionsClient.createVersionOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Version response = future.get();
+   * }
+   * }
*/ public final OperationCallable createVersionOperationCallable() { @@ -339,6 +523,21 @@ public final OperationFuture createVers * [Flow][google.cloud.dialogflow.cx.v3.Flow]. * *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   CreateVersionRequest request =
+   *       CreateVersionRequest.newBuilder()
+   *           .setParent(
+   *               VersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]")
+   *                   .toString())
+   *           .setVersion(Version.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = versionsClient.createVersionCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
*/ public final UnaryCallable createVersionCallable() { return stub.createVersionCallable(); @@ -348,6 +547,16 @@ public final UnaryCallable createVersionCallabl /** * Updates the specified [Version][google.cloud.dialogflow.cx.v3.Version]. * + *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   Version version = Version.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Version response = versionsClient.updateVersion(version, updateMask);
+   * }
+   * }
+ * * @param version Required. The version to update. * @param updateMask Required. The mask to control which fields get updated. Currently only * `description` and `display_name` can be updated. @@ -363,6 +572,19 @@ public final Version updateVersion(Version version, FieldMask updateMask) { /** * Updates the specified [Version][google.cloud.dialogflow.cx.v3.Version]. * + *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   UpdateVersionRequest request =
+   *       UpdateVersionRequest.newBuilder()
+   *           .setVersion(Version.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Version response = versionsClient.updateVersion(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -375,6 +597,19 @@ public final Version updateVersion(UpdateVersionRequest request) { * Updates the specified [Version][google.cloud.dialogflow.cx.v3.Version]. * *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   UpdateVersionRequest request =
+   *       UpdateVersionRequest.newBuilder()
+   *           .setVersion(Version.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = versionsClient.updateVersionCallable().futureCall(request);
+   *   // Do something.
+   *   Version response = future.get();
+   * }
+   * }
*/ public final UnaryCallable updateVersionCallable() { return stub.updateVersionCallable(); @@ -384,6 +619,16 @@ public final UnaryCallable updateVersionCallable( /** * Deletes the specified [Version][google.cloud.dialogflow.cx.v3.Version]. * + *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   VersionName name =
+   *       VersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]");
+   *   versionsClient.deleteVersion(name);
+   * }
+   * }
+ * * @param name Required. The name of the [Version][google.cloud.dialogflow.cx.v3.Version] to * delete. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent * ID>/flows/<Flow ID>/versions/<Version ID>`. @@ -399,6 +644,16 @@ public final void deleteVersion(VersionName name) { /** * Deletes the specified [Version][google.cloud.dialogflow.cx.v3.Version]. * + *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   String name =
+   *       VersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]").toString();
+   *   versionsClient.deleteVersion(name);
+   * }
+   * }
+ * * @param name Required. The name of the [Version][google.cloud.dialogflow.cx.v3.Version] to * delete. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent * ID>/flows/<Flow ID>/versions/<Version ID>`. @@ -413,6 +668,20 @@ public final void deleteVersion(String name) { /** * Deletes the specified [Version][google.cloud.dialogflow.cx.v3.Version]. * + *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   DeleteVersionRequest request =
+   *       DeleteVersionRequest.newBuilder()
+   *           .setName(
+   *               VersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]")
+   *                   .toString())
+   *           .build();
+   *   versionsClient.deleteVersion(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -425,6 +694,20 @@ public final void deleteVersion(DeleteVersionRequest request) { * Deletes the specified [Version][google.cloud.dialogflow.cx.v3.Version]. * *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   DeleteVersionRequest request =
+   *       DeleteVersionRequest.newBuilder()
+   *           .setName(
+   *               VersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future = versionsClient.deleteVersionCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final UnaryCallable deleteVersionCallable() { return stub.deleteVersionCallable(); @@ -434,6 +717,16 @@ public final UnaryCallable deleteVersionCallable() /** * Loads a specified version to draft version. * + *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   VersionName name =
+   *       VersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]");
+   *   versionsClient.loadVersionAsync(name).get();
+   * }
+   * }
+ * * @param name Required. The [Version][google.cloud.dialogflow.cx.v3.Version] to be loaded to * draft version. Format: `projects/<Project ID>/locations/<Location * ID>/agents/<Agent ID>/flows/<Flow ID>/versions/<Version ID>`. @@ -449,6 +742,16 @@ public final OperationFuture loadVersionAsync(VersionName name) { /** * Loads a specified version to draft version. * + *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   String name =
+   *       VersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]").toString();
+   *   versionsClient.loadVersionAsync(name).get();
+   * }
+   * }
+ * * @param name Required. The [Version][google.cloud.dialogflow.cx.v3.Version] to be loaded to * draft version. Format: `projects/<Project ID>/locations/<Location * ID>/agents/<Agent ID>/flows/<Flow ID>/versions/<Version ID>`. @@ -463,6 +766,21 @@ public final OperationFuture loadVersionAsync(String name) { /** * Loads a specified version to draft version. * + *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   LoadVersionRequest request =
+   *       LoadVersionRequest.newBuilder()
+   *           .setName(
+   *               VersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]")
+   *                   .toString())
+   *           .setAllowOverrideAgentResources(true)
+   *           .build();
+   *   versionsClient.loadVersionAsync(request).get();
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -475,6 +793,22 @@ public final OperationFuture loadVersionAsync(LoadVersionRequest * Loads a specified version to draft version. * *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   LoadVersionRequest request =
+   *       LoadVersionRequest.newBuilder()
+   *           .setName(
+   *               VersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]")
+   *                   .toString())
+   *           .setAllowOverrideAgentResources(true)
+   *           .build();
+   *   OperationFuture future =
+   *       versionsClient.loadVersionOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final OperationCallable loadVersionOperationCallable() { return stub.loadVersionOperationCallable(); @@ -485,6 +819,21 @@ public final OperationCallable loadVersionOpe * Loads a specified version to draft version. * *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   LoadVersionRequest request =
+   *       LoadVersionRequest.newBuilder()
+   *           .setName(
+   *               VersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]")
+   *                   .toString())
+   *           .setAllowOverrideAgentResources(true)
+   *           .build();
+   *   ApiFuture future = versionsClient.loadVersionCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final UnaryCallable loadVersionCallable() { return stub.loadVersionCallable(); diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/WebhooksClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/WebhooksClient.java index 87255df7c..703232c0c 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/WebhooksClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/WebhooksClient.java @@ -43,6 +43,13 @@ *

This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: * + *

{@code
+ * try (WebhooksClient webhooksClient = WebhooksClient.create()) {
+ *   WebhookName name = WebhookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[WEBHOOK]");
+ *   Webhook response = webhooksClient.getWebhook(name);
+ * }
+ * }
+ * *

Note: close() needs to be called on the WebhooksClient object to clean up resources such as * threads. In the example above, try-with-resources is used, which automatically calls close(). * @@ -144,6 +151,17 @@ public WebhooksStub getStub() { /** * Returns the list of all webhooks in the specified agent. * + *

Sample code: + * + *

{@code
+   * try (WebhooksClient webhooksClient = WebhooksClient.create()) {
+   *   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+   *   for (Webhook element : webhooksClient.listWebhooks(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The agent to list all webhooks for. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -160,6 +178,17 @@ public final ListWebhooksPagedResponse listWebhooks(AgentName parent) { /** * Returns the list of all webhooks in the specified agent. * + *

Sample code: + * + *

{@code
+   * try (WebhooksClient webhooksClient = WebhooksClient.create()) {
+   *   String parent = WebhookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[WEBHOOK]").toString();
+   *   for (Webhook element : webhooksClient.listWebhooks(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The agent to list all webhooks for. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -173,6 +202,23 @@ public final ListWebhooksPagedResponse listWebhooks(String parent) { /** * Returns the list of all webhooks in the specified agent. * + *

Sample code: + * + *

{@code
+   * try (WebhooksClient webhooksClient = WebhooksClient.create()) {
+   *   ListWebhooksRequest request =
+   *       ListWebhooksRequest.newBuilder()
+   *           .setParent(
+   *               WebhookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[WEBHOOK]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Webhook element : webhooksClient.listWebhooks(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -185,6 +231,23 @@ public final ListWebhooksPagedResponse listWebhooks(ListWebhooksRequest request) * Returns the list of all webhooks in the specified agent. * *

Sample code: + * + *

{@code
+   * try (WebhooksClient webhooksClient = WebhooksClient.create()) {
+   *   ListWebhooksRequest request =
+   *       ListWebhooksRequest.newBuilder()
+   *           .setParent(
+   *               WebhookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[WEBHOOK]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future = webhooksClient.listWebhooksPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Webhook element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listWebhooksPagedCallable() { @@ -196,6 +259,23 @@ public final ListWebhooksPagedResponse listWebhooks(ListWebhooksRequest request) * Returns the list of all webhooks in the specified agent. * *

Sample code: + * + *

{@code
+   * try (WebhooksClient webhooksClient = WebhooksClient.create()) {
+   *   while (true) {
+   *     ListWebhooksResponse response = webhooksClient.listWebhooksCallable().call(request);
+   *     for (Webhook element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listWebhooksCallable() { return stub.listWebhooksCallable(); @@ -205,6 +285,15 @@ public final UnaryCallable listWebhoo /** * Retrieves the specified webhook. * + *

Sample code: + * + *

{@code
+   * try (WebhooksClient webhooksClient = WebhooksClient.create()) {
+   *   WebhookName name = WebhookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[WEBHOOK]");
+   *   Webhook response = webhooksClient.getWebhook(name);
+   * }
+   * }
+ * * @param name Required. The name of the webhook. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/webhooks/<Webhook ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -219,6 +308,15 @@ public final Webhook getWebhook(WebhookName name) { /** * Retrieves the specified webhook. * + *

Sample code: + * + *

{@code
+   * try (WebhooksClient webhooksClient = WebhooksClient.create()) {
+   *   String name = WebhookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[WEBHOOK]").toString();
+   *   Webhook response = webhooksClient.getWebhook(name);
+   * }
+   * }
+ * * @param name Required. The name of the webhook. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/webhooks/<Webhook ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -232,6 +330,18 @@ public final Webhook getWebhook(String name) { /** * Retrieves the specified webhook. * + *

Sample code: + * + *

{@code
+   * try (WebhooksClient webhooksClient = WebhooksClient.create()) {
+   *   GetWebhookRequest request =
+   *       GetWebhookRequest.newBuilder()
+   *           .setName(WebhookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[WEBHOOK]").toString())
+   *           .build();
+   *   Webhook response = webhooksClient.getWebhook(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -244,6 +354,18 @@ public final Webhook getWebhook(GetWebhookRequest request) { * Retrieves the specified webhook. * *

Sample code: + * + *

{@code
+   * try (WebhooksClient webhooksClient = WebhooksClient.create()) {
+   *   GetWebhookRequest request =
+   *       GetWebhookRequest.newBuilder()
+   *           .setName(WebhookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[WEBHOOK]").toString())
+   *           .build();
+   *   ApiFuture future = webhooksClient.getWebhookCallable().futureCall(request);
+   *   // Do something.
+   *   Webhook response = future.get();
+   * }
+   * }
*/ public final UnaryCallable getWebhookCallable() { return stub.getWebhookCallable(); @@ -253,6 +375,16 @@ public final UnaryCallable getWebhookCallable() { /** * Creates a webhook in the specified agent. * + *

Sample code: + * + *

{@code
+   * try (WebhooksClient webhooksClient = WebhooksClient.create()) {
+   *   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+   *   Webhook webhook = Webhook.newBuilder().build();
+   *   Webhook response = webhooksClient.createWebhook(parent, webhook);
+   * }
+   * }
+ * * @param parent Required. The agent to create a webhook for. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>`. * @param webhook Required. The webhook to create. @@ -271,6 +403,16 @@ public final Webhook createWebhook(AgentName parent, Webhook webhook) { /** * Creates a webhook in the specified agent. * + *

Sample code: + * + *

{@code
+   * try (WebhooksClient webhooksClient = WebhooksClient.create()) {
+   *   String parent = WebhookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[WEBHOOK]").toString();
+   *   Webhook webhook = Webhook.newBuilder().build();
+   *   Webhook response = webhooksClient.createWebhook(parent, webhook);
+   * }
+   * }
+ * * @param parent Required. The agent to create a webhook for. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>`. * @param webhook Required. The webhook to create. @@ -286,6 +428,20 @@ public final Webhook createWebhook(String parent, Webhook webhook) { /** * Creates a webhook in the specified agent. * + *

Sample code: + * + *

{@code
+   * try (WebhooksClient webhooksClient = WebhooksClient.create()) {
+   *   CreateWebhookRequest request =
+   *       CreateWebhookRequest.newBuilder()
+   *           .setParent(
+   *               WebhookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[WEBHOOK]").toString())
+   *           .setWebhook(Webhook.newBuilder().build())
+   *           .build();
+   *   Webhook response = webhooksClient.createWebhook(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -298,6 +454,20 @@ public final Webhook createWebhook(CreateWebhookRequest request) { * Creates a webhook in the specified agent. * *

Sample code: + * + *

{@code
+   * try (WebhooksClient webhooksClient = WebhooksClient.create()) {
+   *   CreateWebhookRequest request =
+   *       CreateWebhookRequest.newBuilder()
+   *           .setParent(
+   *               WebhookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[WEBHOOK]").toString())
+   *           .setWebhook(Webhook.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = webhooksClient.createWebhookCallable().futureCall(request);
+   *   // Do something.
+   *   Webhook response = future.get();
+   * }
+   * }
*/ public final UnaryCallable createWebhookCallable() { return stub.createWebhookCallable(); @@ -307,6 +477,16 @@ public final UnaryCallable createWebhookCallable( /** * Updates the specified webhook. * + *

Sample code: + * + *

{@code
+   * try (WebhooksClient webhooksClient = WebhooksClient.create()) {
+   *   Webhook webhook = Webhook.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Webhook response = webhooksClient.updateWebhook(webhook, updateMask);
+   * }
+   * }
+ * * @param webhook Required. The webhook to update. * @param updateMask The mask to control which fields get updated. If the mask is not present, all * fields will be updated. @@ -322,6 +502,19 @@ public final Webhook updateWebhook(Webhook webhook, FieldMask updateMask) { /** * Updates the specified webhook. * + *

Sample code: + * + *

{@code
+   * try (WebhooksClient webhooksClient = WebhooksClient.create()) {
+   *   UpdateWebhookRequest request =
+   *       UpdateWebhookRequest.newBuilder()
+   *           .setWebhook(Webhook.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Webhook response = webhooksClient.updateWebhook(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -334,6 +527,19 @@ public final Webhook updateWebhook(UpdateWebhookRequest request) { * Updates the specified webhook. * *

Sample code: + * + *

{@code
+   * try (WebhooksClient webhooksClient = WebhooksClient.create()) {
+   *   UpdateWebhookRequest request =
+   *       UpdateWebhookRequest.newBuilder()
+   *           .setWebhook(Webhook.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = webhooksClient.updateWebhookCallable().futureCall(request);
+   *   // Do something.
+   *   Webhook response = future.get();
+   * }
+   * }
*/ public final UnaryCallable updateWebhookCallable() { return stub.updateWebhookCallable(); @@ -343,6 +549,15 @@ public final UnaryCallable updateWebhookCallable( /** * Deletes the specified webhook. * + *

Sample code: + * + *

{@code
+   * try (WebhooksClient webhooksClient = WebhooksClient.create()) {
+   *   WebhookName name = WebhookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[WEBHOOK]");
+   *   webhooksClient.deleteWebhook(name);
+   * }
+   * }
+ * * @param name Required. The name of the webhook to delete. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/webhooks/<Webhook ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -357,6 +572,15 @@ public final void deleteWebhook(WebhookName name) { /** * Deletes the specified webhook. * + *

Sample code: + * + *

{@code
+   * try (WebhooksClient webhooksClient = WebhooksClient.create()) {
+   *   String name = WebhookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[WEBHOOK]").toString();
+   *   webhooksClient.deleteWebhook(name);
+   * }
+   * }
+ * * @param name Required. The name of the webhook to delete. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/webhooks/<Webhook ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -370,6 +594,19 @@ public final void deleteWebhook(String name) { /** * Deletes the specified webhook. * + *

Sample code: + * + *

{@code
+   * try (WebhooksClient webhooksClient = WebhooksClient.create()) {
+   *   DeleteWebhookRequest request =
+   *       DeleteWebhookRequest.newBuilder()
+   *           .setName(WebhookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[WEBHOOK]").toString())
+   *           .setForce(true)
+   *           .build();
+   *   webhooksClient.deleteWebhook(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -382,6 +619,19 @@ public final void deleteWebhook(DeleteWebhookRequest request) { * Deletes the specified webhook. * *

Sample code: + * + *

{@code
+   * try (WebhooksClient webhooksClient = WebhooksClient.create()) {
+   *   DeleteWebhookRequest request =
+   *       DeleteWebhookRequest.newBuilder()
+   *           .setName(WebhookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[WEBHOOK]").toString())
+   *           .setForce(true)
+   *           .build();
+   *   ApiFuture future = webhooksClient.deleteWebhookCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final UnaryCallable deleteWebhookCallable() { return stub.deleteWebhookCallable(); diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/package-info.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/package-info.java index e6f5e51b3..2b531442c 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/package-info.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/package-info.java @@ -23,6 +23,13 @@ * *

Sample for AgentsClient: * + *

{@code
+ * try (AgentsClient agentsClient = AgentsClient.create()) {
+ *   AgentName name = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+ *   Agent response = agentsClient.getAgent(name);
+ * }
+ * }
+ * *

======================= EntityTypesClient ======================= * *

Service Description: Service for managing @@ -30,6 +37,14 @@ * *

Sample for EntityTypesClient: * + *

{@code
+ * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+ *   EntityTypeName name =
+ *       EntityTypeName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENTITY_TYPE]");
+ *   EntityType response = entityTypesClient.getEntityType(name);
+ * }
+ * }
+ * *

======================= EnvironmentsClient ======================= * *

Service Description: Service for managing @@ -37,6 +52,14 @@ * *

Sample for EnvironmentsClient: * + *

{@code
+ * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+ *   EnvironmentName name =
+ *       EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]");
+ *   Environment response = environmentsClient.getEnvironment(name);
+ * }
+ * }
+ * *

======================= ExperimentsClient ======================= * *

Service Description: Service for managing @@ -44,30 +67,70 @@ * *

Sample for ExperimentsClient: * + *

{@code
+ * try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
+ *   ExperimentName name =
+ *       ExperimentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]");
+ *   Experiment response = experimentsClient.getExperiment(name);
+ * }
+ * }
+ * *

======================= FlowsClient ======================= * *

Service Description: Service for managing [Flows][google.cloud.dialogflow.cx.v3.Flow]. * *

Sample for FlowsClient: * + *

{@code
+ * try (FlowsClient flowsClient = FlowsClient.create()) {
+ *   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+ *   Flow flow = Flow.newBuilder().build();
+ *   Flow response = flowsClient.createFlow(parent, flow);
+ * }
+ * }
+ * *

======================= IntentsClient ======================= * *

Service Description: Service for managing [Intents][google.cloud.dialogflow.cx.v3.Intent]. * *

Sample for IntentsClient: * + *

{@code
+ * try (IntentsClient intentsClient = IntentsClient.create()) {
+ *   IntentName name = IntentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[INTENT]");
+ *   Intent response = intentsClient.getIntent(name);
+ * }
+ * }
+ * *

======================= PagesClient ======================= * *

Service Description: Service for managing [Pages][google.cloud.dialogflow.cx.v3.Page]. * *

Sample for PagesClient: * + *

{@code
+ * try (PagesClient pagesClient = PagesClient.create()) {
+ *   PageName name = PageName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]");
+ *   Page response = pagesClient.getPage(name);
+ * }
+ * }
+ * *

======================= SecuritySettingsServiceClient ======================= * *

Service Description: Service for managing security settings for Dialogflow. * *

Sample for SecuritySettingsServiceClient: * + *

{@code
+ * try (SecuritySettingsServiceClient securitySettingsServiceClient =
+ *     SecuritySettingsServiceClient.create()) {
+ *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ *   SecuritySettings securitySettings = SecuritySettings.newBuilder().build();
+ *   SecuritySettings response =
+ *       securitySettingsServiceClient.createSecuritySettings(parent, securitySettings);
+ * }
+ * }
+ * *

======================= SessionsClient ======================= * *

Service Description: A session represents an interaction with a user. You retrieve user input @@ -76,6 +139,22 @@ * *

Sample for SessionsClient: * + *

{@code
+ * try (SessionsClient sessionsClient = SessionsClient.create()) {
+ *   DetectIntentRequest request =
+ *       DetectIntentRequest.newBuilder()
+ *           .setSession(
+ *               SessionName.ofProjectLocationAgentSessionName(
+ *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]")
+ *                   .toString())
+ *           .setQueryParams(QueryParameters.newBuilder().build())
+ *           .setQueryInput(QueryInput.newBuilder().build())
+ *           .setOutputAudioConfig(OutputAudioConfig.newBuilder().build())
+ *           .build();
+ *   DetectIntentResponse response = sessionsClient.detectIntent(request);
+ * }
+ * }
+ * *

======================= SessionEntityTypesClient ======================= * *

Service Description: Service for managing @@ -83,6 +162,15 @@ * *

Sample for SessionEntityTypesClient: * + *

{@code
+ * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
+ *   SessionEntityTypeName name =
+ *       SessionEntityTypeName.ofProjectLocationAgentSessionEntityTypeName(
+ *           "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]", "[ENTITY_TYPE]");
+ *   SessionEntityType response = sessionEntityTypesClient.getSessionEntityType(name);
+ * }
+ * }
+ * *

======================= TestCasesClient ======================= * *

Service Description: Service for managing [Test Cases][google.cloud.dialogflow.cx.v3.TestCase] @@ -90,6 +178,13 @@ * *

Sample for TestCasesClient: * + *

{@code
+ * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+ *   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+ *   testCasesClient.batchDeleteTestCases(parent);
+ * }
+ * }
+ * *

======================= TransitionRouteGroupsClient ======================= * *

Service Description: Service for managing @@ -97,17 +192,42 @@ * *

Sample for TransitionRouteGroupsClient: * + *

{@code
+ * try (TransitionRouteGroupsClient transitionRouteGroupsClient =
+ *     TransitionRouteGroupsClient.create()) {
+ *   TransitionRouteGroupName name =
+ *       TransitionRouteGroupName.of(
+ *           "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]");
+ *   TransitionRouteGroup response = transitionRouteGroupsClient.getTransitionRouteGroup(name);
+ * }
+ * }
+ * *

======================= VersionsClient ======================= * *

Service Description: Service for managing [Versions][google.cloud.dialogflow.cx.v3.Version]. * *

Sample for VersionsClient: * + *

{@code
+ * try (VersionsClient versionsClient = VersionsClient.create()) {
+ *   VersionName name =
+ *       VersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]");
+ *   Version response = versionsClient.getVersion(name);
+ * }
+ * }
+ * *

======================= WebhooksClient ======================= * *

Service Description: Service for managing [Webhooks][google.cloud.dialogflow.cx.v3.Webhook]. * *

Sample for WebhooksClient: + * + *

{@code
+ * try (WebhooksClient webhooksClient = WebhooksClient.create()) {
+ *   WebhookName name = WebhookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[WEBHOOK]");
+ *   Webhook response = webhooksClient.getWebhook(name);
+ * }
+ * }
*/ @Generated("by gapic-generator-java") package com.google.cloud.dialogflow.cx.v3; diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClient.java index 163f99588..4df009a79 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClient.java @@ -48,6 +48,13 @@ *

This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: * + *

{@code
+ * try (AgentsClient agentsClient = AgentsClient.create()) {
+ *   AgentName name = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+ *   Agent response = agentsClient.getAgent(name);
+ * }
+ * }
+ * *

Note: close() needs to be called on the AgentsClient object to clean up resources such as * threads. In the example above, try-with-resources is used, which automatically calls close(). * @@ -160,6 +167,17 @@ public final OperationsClient getOperationsClient() { /** * Returns the list of all agents in the specified location. * + *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (Agent element : agentsClient.listAgents(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The location to list all agents for. Format: `projects/<Project * ID>/locations/<Location ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -174,6 +192,17 @@ public final ListAgentsPagedResponse listAgents(LocationName parent) { /** * Returns the list of all agents in the specified location. * + *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   String parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString();
+   *   for (Agent element : agentsClient.listAgents(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The location to list all agents for. Format: `projects/<Project * ID>/locations/<Location ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -187,6 +216,22 @@ public final ListAgentsPagedResponse listAgents(String parent) { /** * Returns the list of all agents in the specified location. * + *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   ListAgentsRequest request =
+   *       ListAgentsRequest.newBuilder()
+   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Agent element : agentsClient.listAgents(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -199,6 +244,22 @@ public final ListAgentsPagedResponse listAgents(ListAgentsRequest request) { * Returns the list of all agents in the specified location. * *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   ListAgentsRequest request =
+   *       ListAgentsRequest.newBuilder()
+   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future = agentsClient.listAgentsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Agent element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listAgentsPagedCallable() { return stub.listAgentsPagedCallable(); @@ -209,6 +270,23 @@ public final UnaryCallable listAgent * Returns the list of all agents in the specified location. * *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   while (true) {
+   *     ListAgentsResponse response = agentsClient.listAgentsCallable().call(request);
+   *     for (Agent element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listAgentsCallable() { return stub.listAgentsCallable(); @@ -218,6 +296,15 @@ public final UnaryCallable listAgentsCall /** * Retrieves the specified agent. * + *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   AgentName name = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+   *   Agent response = agentsClient.getAgent(name);
+   * }
+   * }
+ * * @param name Required. The name of the agent. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -232,6 +319,15 @@ public final Agent getAgent(AgentName name) { /** * Retrieves the specified agent. * + *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   String name = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString();
+   *   Agent response = agentsClient.getAgent(name);
+   * }
+   * }
+ * * @param name Required. The name of the agent. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -245,6 +341,18 @@ public final Agent getAgent(String name) { /** * Retrieves the specified agent. * + *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   GetAgentRequest request =
+   *       GetAgentRequest.newBuilder()
+   *           .setName(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .build();
+   *   Agent response = agentsClient.getAgent(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -257,6 +365,18 @@ public final Agent getAgent(GetAgentRequest request) { * Retrieves the specified agent. * *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   GetAgentRequest request =
+   *       GetAgentRequest.newBuilder()
+   *           .setName(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .build();
+   *   ApiFuture future = agentsClient.getAgentCallable().futureCall(request);
+   *   // Do something.
+   *   Agent response = future.get();
+   * }
+   * }
*/ public final UnaryCallable getAgentCallable() { return stub.getAgentCallable(); @@ -266,6 +386,16 @@ public final UnaryCallable getAgentCallable() { /** * Creates an agent in the specified location. * + *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   Agent agent = Agent.newBuilder().build();
+   *   Agent response = agentsClient.createAgent(parent, agent);
+   * }
+   * }
+ * * @param parent Required. The location to create a agent for. Format: `projects/<Project * ID>/locations/<Location ID>`. * @param agent Required. The agent to create. @@ -284,6 +414,16 @@ public final Agent createAgent(LocationName parent, Agent agent) { /** * Creates an agent in the specified location. * + *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   String parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString();
+   *   Agent agent = Agent.newBuilder().build();
+   *   Agent response = agentsClient.createAgent(parent, agent);
+   * }
+   * }
+ * * @param parent Required. The location to create a agent for. Format: `projects/<Project * ID>/locations/<Location ID>`. * @param agent Required. The agent to create. @@ -299,6 +439,19 @@ public final Agent createAgent(String parent, Agent agent) { /** * Creates an agent in the specified location. * + *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   CreateAgentRequest request =
+   *       CreateAgentRequest.newBuilder()
+   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setAgent(Agent.newBuilder().build())
+   *           .build();
+   *   Agent response = agentsClient.createAgent(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -311,6 +464,19 @@ public final Agent createAgent(CreateAgentRequest request) { * Creates an agent in the specified location. * *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   CreateAgentRequest request =
+   *       CreateAgentRequest.newBuilder()
+   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setAgent(Agent.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = agentsClient.createAgentCallable().futureCall(request);
+   *   // Do something.
+   *   Agent response = future.get();
+   * }
+   * }
*/ public final UnaryCallable createAgentCallable() { return stub.createAgentCallable(); @@ -320,6 +486,16 @@ public final UnaryCallable createAgentCallable() { /** * Updates the specified agent. * + *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   Agent agent = Agent.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Agent response = agentsClient.updateAgent(agent, updateMask);
+   * }
+   * }
+ * * @param agent Required. The agent to update. * @param updateMask The mask to control which fields get updated. If the mask is not present, all * fields will be updated. @@ -335,6 +511,19 @@ public final Agent updateAgent(Agent agent, FieldMask updateMask) { /** * Updates the specified agent. * + *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   UpdateAgentRequest request =
+   *       UpdateAgentRequest.newBuilder()
+   *           .setAgent(Agent.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Agent response = agentsClient.updateAgent(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -347,6 +536,19 @@ public final Agent updateAgent(UpdateAgentRequest request) { * Updates the specified agent. * *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   UpdateAgentRequest request =
+   *       UpdateAgentRequest.newBuilder()
+   *           .setAgent(Agent.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = agentsClient.updateAgentCallable().futureCall(request);
+   *   // Do something.
+   *   Agent response = future.get();
+   * }
+   * }
*/ public final UnaryCallable updateAgentCallable() { return stub.updateAgentCallable(); @@ -356,6 +558,15 @@ public final UnaryCallable updateAgentCallable() { /** * Deletes the specified agent. * + *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   AgentName name = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+   *   agentsClient.deleteAgent(name);
+   * }
+   * }
+ * * @param name Required. The name of the agent to delete. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -370,6 +581,15 @@ public final void deleteAgent(AgentName name) { /** * Deletes the specified agent. * + *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   String name = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString();
+   *   agentsClient.deleteAgent(name);
+   * }
+   * }
+ * * @param name Required. The name of the agent to delete. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -383,6 +603,18 @@ public final void deleteAgent(String name) { /** * Deletes the specified agent. * + *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   DeleteAgentRequest request =
+   *       DeleteAgentRequest.newBuilder()
+   *           .setName(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .build();
+   *   agentsClient.deleteAgent(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -395,6 +627,18 @@ public final void deleteAgent(DeleteAgentRequest request) { * Deletes the specified agent. * *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   DeleteAgentRequest request =
+   *       DeleteAgentRequest.newBuilder()
+   *           .setName(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .build();
+   *   ApiFuture future = agentsClient.deleteAgentCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final UnaryCallable deleteAgentCallable() { return stub.deleteAgentCallable(); @@ -404,6 +648,19 @@ public final UnaryCallable deleteAgentCallable() { /** * Exports the specified agent to a binary file. * + *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   ExportAgentRequest request =
+   *       ExportAgentRequest.newBuilder()
+   *           .setName(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setAgentUri("agentUri1469149223")
+   *           .build();
+   *   ExportAgentResponse response = agentsClient.exportAgentAsync(request).get();
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -417,6 +674,20 @@ public final OperationFuture exportAgentAsync( * Exports the specified agent to a binary file. * *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   ExportAgentRequest request =
+   *       ExportAgentRequest.newBuilder()
+   *           .setName(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setAgentUri("agentUri1469149223")
+   *           .build();
+   *   OperationFuture future =
+   *       agentsClient.exportAgentOperationCallable().futureCall(request);
+   *   // Do something.
+   *   ExportAgentResponse response = future.get();
+   * }
+   * }
*/ public final OperationCallable exportAgentOperationCallable() { @@ -428,6 +699,19 @@ public final OperationFuture exportAgentAsync( * Exports the specified agent to a binary file. * *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   ExportAgentRequest request =
+   *       ExportAgentRequest.newBuilder()
+   *           .setName(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setAgentUri("agentUri1469149223")
+   *           .build();
+   *   ApiFuture future = agentsClient.exportAgentCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
*/ public final UnaryCallable exportAgentCallable() { return stub.exportAgentCallable(); @@ -440,6 +724,18 @@ public final UnaryCallable exportAgentCallable() *

Replaces the current agent with a new one. Note that all existing resources in agent (e.g. * intents, entity types, flows) will be removed. * + *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   RestoreAgentRequest request =
+   *       RestoreAgentRequest.newBuilder()
+   *           .setName(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .build();
+   *   agentsClient.restoreAgentAsync(request).get();
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -455,6 +751,19 @@ public final OperationFuture restoreAgentAsync(RestoreAgentReques * intents, entity types, flows) will be removed. * *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   RestoreAgentRequest request =
+   *       RestoreAgentRequest.newBuilder()
+   *           .setName(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .build();
+   *   OperationFuture future =
+   *       agentsClient.restoreAgentOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final OperationCallable restoreAgentOperationCallable() { @@ -469,6 +778,18 @@ public final OperationFuture restoreAgentAsync(RestoreAgentReques * intents, entity types, flows) will be removed. * *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   RestoreAgentRequest request =
+   *       RestoreAgentRequest.newBuilder()
+   *           .setName(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .build();
+   *   ApiFuture future = agentsClient.restoreAgentCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final UnaryCallable restoreAgentCallable() { return stub.restoreAgentCallable(); @@ -480,6 +801,19 @@ public final UnaryCallable restoreAgentCallable( * version is validated. Please call this API after the training is completed to get the complete * validation results. * + *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   ValidateAgentRequest request =
+   *       ValidateAgentRequest.newBuilder()
+   *           .setName(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   AgentValidationResult response = agentsClient.validateAgent(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -494,6 +828,20 @@ public final AgentValidationResult validateAgent(ValidateAgentRequest request) { * validation results. * *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   ValidateAgentRequest request =
+   *       ValidateAgentRequest.newBuilder()
+   *           .setName(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   ApiFuture future =
+   *       agentsClient.validateAgentCallable().futureCall(request);
+   *   // Do something.
+   *   AgentValidationResult response = future.get();
+   * }
+   * }
*/ public final UnaryCallable validateAgentCallable() { return stub.validateAgentCallable(); @@ -504,6 +852,16 @@ public final UnaryCallable validate * Gets the latest agent validation result. Agent validation is performed when ValidateAgent is * called. * + *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   AgentValidationResultName name =
+   *       AgentValidationResultName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+   *   AgentValidationResult response = agentsClient.getAgentValidationResult(name);
+   * }
+   * }
+ * * @param name Required. The agent name. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/validationResult`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -521,6 +879,15 @@ public final AgentValidationResult getAgentValidationResult(AgentValidationResul * Gets the latest agent validation result. Agent validation is performed when ValidateAgent is * called. * + *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   String name = AgentValidationResultName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString();
+   *   AgentValidationResult response = agentsClient.getAgentValidationResult(name);
+   * }
+   * }
+ * * @param name Required. The agent name. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/validationResult`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -536,6 +903,20 @@ public final AgentValidationResult getAgentValidationResult(String name) { * Gets the latest agent validation result. Agent validation is performed when ValidateAgent is * called. * + *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   GetAgentValidationResultRequest request =
+   *       GetAgentValidationResultRequest.newBuilder()
+   *           .setName(
+   *               AgentValidationResultName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   AgentValidationResult response = agentsClient.getAgentValidationResult(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -550,6 +931,21 @@ public final AgentValidationResult getAgentValidationResult( * called. * *

Sample code: + * + *

{@code
+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   GetAgentValidationResultRequest request =
+   *       GetAgentValidationResultRequest.newBuilder()
+   *           .setName(
+   *               AgentValidationResultName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   ApiFuture future =
+   *       agentsClient.getAgentValidationResultCallable().futureCall(request);
+   *   // Do something.
+   *   AgentValidationResult response = future.get();
+   * }
+   * }
*/ public final UnaryCallable getAgentValidationResultCallable() { diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesClient.java index 2610067e6..d10442daf 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesClient.java @@ -44,6 +44,14 @@ *

This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: * + *

{@code
+ * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+ *   EntityTypeName name =
+ *       EntityTypeName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENTITY_TYPE]");
+ *   EntityType response = entityTypesClient.getEntityType(name);
+ * }
+ * }
+ * *

Note: close() needs to be called on the EntityTypesClient object to clean up resources such as * threads. In the example above, try-with-resources is used, which automatically calls close(). * @@ -147,6 +155,17 @@ public EntityTypesStub getStub() { /** * Returns the list of all entity types in the specified agent. * + *

Sample code: + * + *

{@code
+   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+   *   for (EntityType element : entityTypesClient.listEntityTypes(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The agent to list all entity types for. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -163,6 +182,18 @@ public final ListEntityTypesPagedResponse listEntityTypes(AgentName parent) { /** * Returns the list of all entity types in the specified agent. * + *

Sample code: + * + *

{@code
+   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   String parent =
+   *       EntityTypeName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENTITY_TYPE]").toString();
+   *   for (EntityType element : entityTypesClient.listEntityTypes(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The agent to list all entity types for. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -176,6 +207,25 @@ public final ListEntityTypesPagedResponse listEntityTypes(String parent) { /** * Returns the list of all entity types in the specified agent. * + *

Sample code: + * + *

{@code
+   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   ListEntityTypesRequest request =
+   *       ListEntityTypesRequest.newBuilder()
+   *           .setParent(
+   *               EntityTypeName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENTITY_TYPE]")
+   *                   .toString())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (EntityType element : entityTypesClient.listEntityTypes(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -188,6 +238,26 @@ public final ListEntityTypesPagedResponse listEntityTypes(ListEntityTypesRequest * Returns the list of all entity types in the specified agent. * *

Sample code: + * + *

{@code
+   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   ListEntityTypesRequest request =
+   *       ListEntityTypesRequest.newBuilder()
+   *           .setParent(
+   *               EntityTypeName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENTITY_TYPE]")
+   *                   .toString())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       entityTypesClient.listEntityTypesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (EntityType element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listEntityTypesPagedCallable() { @@ -199,6 +269,24 @@ public final ListEntityTypesPagedResponse listEntityTypes(ListEntityTypesRequest * Returns the list of all entity types in the specified agent. * *

Sample code: + * + *

{@code
+   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   while (true) {
+   *     ListEntityTypesResponse response =
+   *         entityTypesClient.listEntityTypesCallable().call(request);
+   *     for (EntityType element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listEntityTypesCallable() { @@ -209,6 +297,16 @@ public final ListEntityTypesPagedResponse listEntityTypes(ListEntityTypesRequest /** * Retrieves the specified entity type. * + *

Sample code: + * + *

{@code
+   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   EntityTypeName name =
+   *       EntityTypeName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENTITY_TYPE]");
+   *   EntityType response = entityTypesClient.getEntityType(name);
+   * }
+   * }
+ * * @param name Required. The name of the entity type. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/entityTypes/<Entity Type * ID>`. @@ -224,6 +322,16 @@ public final EntityType getEntityType(EntityTypeName name) { /** * Retrieves the specified entity type. * + *

Sample code: + * + *

{@code
+   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   String name =
+   *       EntityTypeName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENTITY_TYPE]").toString();
+   *   EntityType response = entityTypesClient.getEntityType(name);
+   * }
+   * }
+ * * @param name Required. The name of the entity type. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/entityTypes/<Entity Type * ID>`. @@ -238,6 +346,21 @@ public final EntityType getEntityType(String name) { /** * Retrieves the specified entity type. * + *

Sample code: + * + *

{@code
+   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   GetEntityTypeRequest request =
+   *       GetEntityTypeRequest.newBuilder()
+   *           .setName(
+   *               EntityTypeName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENTITY_TYPE]")
+   *                   .toString())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   EntityType response = entityTypesClient.getEntityType(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -250,6 +373,21 @@ public final EntityType getEntityType(GetEntityTypeRequest request) { * Retrieves the specified entity type. * *

Sample code: + * + *

{@code
+   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   GetEntityTypeRequest request =
+   *       GetEntityTypeRequest.newBuilder()
+   *           .setName(
+   *               EntityTypeName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENTITY_TYPE]")
+   *                   .toString())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   ApiFuture future = entityTypesClient.getEntityTypeCallable().futureCall(request);
+   *   // Do something.
+   *   EntityType response = future.get();
+   * }
+   * }
*/ public final UnaryCallable getEntityTypeCallable() { return stub.getEntityTypeCallable(); @@ -259,6 +397,16 @@ public final UnaryCallable getEntityTypeCallab /** * Creates an entity type in the specified agent. * + *

Sample code: + * + *

{@code
+   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+   *   EntityType entityType = EntityType.newBuilder().build();
+   *   EntityType response = entityTypesClient.createEntityType(parent, entityType);
+   * }
+   * }
+ * * @param parent Required. The agent to create a entity type for. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>`. * @param entityType Required. The entity type to create. @@ -277,6 +425,17 @@ public final EntityType createEntityType(AgentName parent, EntityType entityType /** * Creates an entity type in the specified agent. * + *

Sample code: + * + *

{@code
+   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   String parent =
+   *       EntityTypeName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENTITY_TYPE]").toString();
+   *   EntityType entityType = EntityType.newBuilder().build();
+   *   EntityType response = entityTypesClient.createEntityType(parent, entityType);
+   * }
+   * }
+ * * @param parent Required. The agent to create a entity type for. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>`. * @param entityType Required. The entity type to create. @@ -292,6 +451,22 @@ public final EntityType createEntityType(String parent, EntityType entityType) { /** * Creates an entity type in the specified agent. * + *

Sample code: + * + *

{@code
+   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   CreateEntityTypeRequest request =
+   *       CreateEntityTypeRequest.newBuilder()
+   *           .setParent(
+   *               EntityTypeName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENTITY_TYPE]")
+   *                   .toString())
+   *           .setEntityType(EntityType.newBuilder().build())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   EntityType response = entityTypesClient.createEntityType(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -304,6 +479,23 @@ public final EntityType createEntityType(CreateEntityTypeRequest request) { * Creates an entity type in the specified agent. * *

Sample code: + * + *

{@code
+   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   CreateEntityTypeRequest request =
+   *       CreateEntityTypeRequest.newBuilder()
+   *           .setParent(
+   *               EntityTypeName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENTITY_TYPE]")
+   *                   .toString())
+   *           .setEntityType(EntityType.newBuilder().build())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   ApiFuture future =
+   *       entityTypesClient.createEntityTypeCallable().futureCall(request);
+   *   // Do something.
+   *   EntityType response = future.get();
+   * }
+   * }
*/ public final UnaryCallable createEntityTypeCallable() { return stub.createEntityTypeCallable(); @@ -313,6 +505,16 @@ public final UnaryCallable createEntityType /** * Updates the specified entity type. * + *

Sample code: + * + *

{@code
+   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   EntityType entityType = EntityType.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   EntityType response = entityTypesClient.updateEntityType(entityType, updateMask);
+   * }
+   * }
+ * * @param entityType Required. The entity type to update. * @param updateMask The mask to control which fields get updated. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -330,6 +532,20 @@ public final EntityType updateEntityType(EntityType entityType, FieldMask update /** * Updates the specified entity type. * + *

Sample code: + * + *

{@code
+   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   UpdateEntityTypeRequest request =
+   *       UpdateEntityTypeRequest.newBuilder()
+   *           .setEntityType(EntityType.newBuilder().build())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   EntityType response = entityTypesClient.updateEntityType(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -342,6 +558,21 @@ public final EntityType updateEntityType(UpdateEntityTypeRequest request) { * Updates the specified entity type. * *

Sample code: + * + *

{@code
+   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   UpdateEntityTypeRequest request =
+   *       UpdateEntityTypeRequest.newBuilder()
+   *           .setEntityType(EntityType.newBuilder().build())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       entityTypesClient.updateEntityTypeCallable().futureCall(request);
+   *   // Do something.
+   *   EntityType response = future.get();
+   * }
+   * }
*/ public final UnaryCallable updateEntityTypeCallable() { return stub.updateEntityTypeCallable(); @@ -351,6 +582,16 @@ public final UnaryCallable updateEntityType /** * Deletes the specified entity type. * + *

Sample code: + * + *

{@code
+   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   EntityTypeName name =
+   *       EntityTypeName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENTITY_TYPE]");
+   *   entityTypesClient.deleteEntityType(name);
+   * }
+   * }
+ * * @param name Required. The name of the entity type to delete. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/entityTypes/<Entity Type * ID>`. @@ -366,6 +607,16 @@ public final void deleteEntityType(EntityTypeName name) { /** * Deletes the specified entity type. * + *

Sample code: + * + *

{@code
+   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   String name =
+   *       EntityTypeName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENTITY_TYPE]").toString();
+   *   entityTypesClient.deleteEntityType(name);
+   * }
+   * }
+ * * @param name Required. The name of the entity type to delete. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/entityTypes/<Entity Type * ID>`. @@ -380,6 +631,21 @@ public final void deleteEntityType(String name) { /** * Deletes the specified entity type. * + *

Sample code: + * + *

{@code
+   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   DeleteEntityTypeRequest request =
+   *       DeleteEntityTypeRequest.newBuilder()
+   *           .setName(
+   *               EntityTypeName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENTITY_TYPE]")
+   *                   .toString())
+   *           .setForce(true)
+   *           .build();
+   *   entityTypesClient.deleteEntityType(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -392,6 +658,21 @@ public final void deleteEntityType(DeleteEntityTypeRequest request) { * Deletes the specified entity type. * *

Sample code: + * + *

{@code
+   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   DeleteEntityTypeRequest request =
+   *       DeleteEntityTypeRequest.newBuilder()
+   *           .setName(
+   *               EntityTypeName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENTITY_TYPE]")
+   *                   .toString())
+   *           .setForce(true)
+   *           .build();
+   *   ApiFuture future = entityTypesClient.deleteEntityTypeCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final UnaryCallable deleteEntityTypeCallable() { return stub.deleteEntityTypeCallable(); diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentsClient.java index 28c5f789b..882701ced 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentsClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentsClient.java @@ -49,6 +49,14 @@ *

This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: * + *

{@code
+ * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+ *   EnvironmentName name =
+ *       EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]");
+ *   Environment response = environmentsClient.getEnvironment(name);
+ * }
+ * }
+ * *

Note: close() needs to be called on the EnvironmentsClient object to clean up resources such * as threads. In the example above, try-with-resources is used, which automatically calls close(). * @@ -164,6 +172,17 @@ public final OperationsClient getOperationsClient() { * Returns the list of all environments in the specified * [Agent][google.cloud.dialogflow.cx.v3beta1.Agent]. * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+   *   for (Environment element : environmentsClient.listEnvironments(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The [Agent][google.cloud.dialogflow.cx.v3beta1.Agent] to list all * environments for. Format: `projects/<Project ID>/locations/<Location * ID>/agents/<Agent ID>`. @@ -182,6 +201,18 @@ public final ListEnvironmentsPagedResponse listEnvironments(AgentName parent) { * Returns the list of all environments in the specified * [Agent][google.cloud.dialogflow.cx.v3beta1.Agent]. * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   String parent =
+   *       EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]").toString();
+   *   for (Environment element : environmentsClient.listEnvironments(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The [Agent][google.cloud.dialogflow.cx.v3beta1.Agent] to list all * environments for. Format: `projects/<Project ID>/locations/<Location * ID>/agents/<Agent ID>`. @@ -198,6 +229,24 @@ public final ListEnvironmentsPagedResponse listEnvironments(String parent) { * Returns the list of all environments in the specified * [Agent][google.cloud.dialogflow.cx.v3beta1.Agent]. * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   ListEnvironmentsRequest request =
+   *       ListEnvironmentsRequest.newBuilder()
+   *           .setParent(
+   *               EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Environment element : environmentsClient.listEnvironments(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -211,6 +260,25 @@ public final ListEnvironmentsPagedResponse listEnvironments(ListEnvironmentsRequ * [Agent][google.cloud.dialogflow.cx.v3beta1.Agent]. * *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   ListEnvironmentsRequest request =
+   *       ListEnvironmentsRequest.newBuilder()
+   *           .setParent(
+   *               EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       environmentsClient.listEnvironmentsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Environment element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listEnvironmentsPagedCallable() { @@ -223,6 +291,24 @@ public final ListEnvironmentsPagedResponse listEnvironments(ListEnvironmentsRequ * [Agent][google.cloud.dialogflow.cx.v3beta1.Agent]. * *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   while (true) {
+   *     ListEnvironmentsResponse response =
+   *         environmentsClient.listEnvironmentsCallable().call(request);
+   *     for (Environment element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listEnvironmentsCallable() { @@ -233,6 +319,16 @@ public final ListEnvironmentsPagedResponse listEnvironments(ListEnvironmentsRequ /** * Retrieves the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   EnvironmentName name =
+   *       EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]");
+   *   Environment response = environmentsClient.getEnvironment(name);
+   * }
+   * }
+ * * @param name Required. The name of the * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. Format: * `projects/<Project ID>/locations/<Location ID>/agents/<Agent @@ -249,6 +345,16 @@ public final Environment getEnvironment(EnvironmentName name) { /** * Retrieves the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   String name =
+   *       EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]").toString();
+   *   Environment response = environmentsClient.getEnvironment(name);
+   * }
+   * }
+ * * @param name Required. The name of the * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. Format: * `projects/<Project ID>/locations/<Location ID>/agents/<Agent @@ -264,6 +370,20 @@ public final Environment getEnvironment(String name) { /** * Retrieves the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   GetEnvironmentRequest request =
+   *       GetEnvironmentRequest.newBuilder()
+   *           .setName(
+   *               EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]")
+   *                   .toString())
+   *           .build();
+   *   Environment response = environmentsClient.getEnvironment(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -276,6 +396,21 @@ public final Environment getEnvironment(GetEnvironmentRequest request) { * Retrieves the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. * *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   GetEnvironmentRequest request =
+   *       GetEnvironmentRequest.newBuilder()
+   *           .setName(
+   *               EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       environmentsClient.getEnvironmentCallable().futureCall(request);
+   *   // Do something.
+   *   Environment response = future.get();
+   * }
+   * }
*/ public final UnaryCallable getEnvironmentCallable() { return stub.getEnvironmentCallable(); @@ -286,6 +421,16 @@ public final UnaryCallable getEnvironmentCal * Creates an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] in the specified * [Agent][google.cloud.dialogflow.cx.v3beta1.Agent]. * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+   *   Environment environment = Environment.newBuilder().build();
+   *   Environment response = environmentsClient.createEnvironmentAsync(parent, environment).get();
+   * }
+   * }
+ * * @param parent Required. The [Agent][google.cloud.dialogflow.cx.v3beta1.Agent] to create an * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] for. Format: * `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`. @@ -307,6 +452,17 @@ public final OperationFuture createEnvironmentAsync( * Creates an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] in the specified * [Agent][google.cloud.dialogflow.cx.v3beta1.Agent]. * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   String parent =
+   *       EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]").toString();
+   *   Environment environment = Environment.newBuilder().build();
+   *   Environment response = environmentsClient.createEnvironmentAsync(parent, environment).get();
+   * }
+   * }
+ * * @param parent Required. The [Agent][google.cloud.dialogflow.cx.v3beta1.Agent] to create an * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] for. Format: * `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`. @@ -325,6 +481,21 @@ public final OperationFuture createEnvironmentAsync( * Creates an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] in the specified * [Agent][google.cloud.dialogflow.cx.v3beta1.Agent]. * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   CreateEnvironmentRequest request =
+   *       CreateEnvironmentRequest.newBuilder()
+   *           .setParent(
+   *               EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]")
+   *                   .toString())
+   *           .setEnvironment(Environment.newBuilder().build())
+   *           .build();
+   *   Environment response = environmentsClient.createEnvironmentAsync(request).get();
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -339,6 +510,22 @@ public final OperationFuture createEnvironmentAsync( * [Agent][google.cloud.dialogflow.cx.v3beta1.Agent]. * *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   CreateEnvironmentRequest request =
+   *       CreateEnvironmentRequest.newBuilder()
+   *           .setParent(
+   *               EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]")
+   *                   .toString())
+   *           .setEnvironment(Environment.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       environmentsClient.createEnvironmentOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Environment response = future.get();
+   * }
+   * }
*/ public final OperationCallable createEnvironmentOperationCallable() { @@ -351,6 +538,22 @@ public final OperationFuture createEnvironmentAsync( * [Agent][google.cloud.dialogflow.cx.v3beta1.Agent]. * *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   CreateEnvironmentRequest request =
+   *       CreateEnvironmentRequest.newBuilder()
+   *           .setParent(
+   *               EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]")
+   *                   .toString())
+   *           .setEnvironment(Environment.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       environmentsClient.createEnvironmentCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
*/ public final UnaryCallable createEnvironmentCallable() { return stub.createEnvironmentCallable(); @@ -360,6 +563,17 @@ public final UnaryCallable createEnvironmen /** * Updates the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   Environment environment = Environment.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Environment response =
+   *       environmentsClient.updateEnvironmentAsync(environment, updateMask).get();
+   * }
+   * }
+ * * @param environment Required. The environment to update. * @param updateMask Required. The mask to control which fields get updated. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -378,6 +592,19 @@ public final OperationFuture updateEnvironmentAsync( /** * Updates the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   UpdateEnvironmentRequest request =
+   *       UpdateEnvironmentRequest.newBuilder()
+   *           .setEnvironment(Environment.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Environment response = environmentsClient.updateEnvironmentAsync(request).get();
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -391,6 +618,20 @@ public final OperationFuture updateEnvironmentAsync( * Updates the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. * *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   UpdateEnvironmentRequest request =
+   *       UpdateEnvironmentRequest.newBuilder()
+   *           .setEnvironment(Environment.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       environmentsClient.updateEnvironmentOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Environment response = future.get();
+   * }
+   * }
*/ public final OperationCallable updateEnvironmentOperationCallable() { @@ -402,6 +643,20 @@ public final OperationFuture updateEnvironmentAsync( * Updates the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. * *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   UpdateEnvironmentRequest request =
+   *       UpdateEnvironmentRequest.newBuilder()
+   *           .setEnvironment(Environment.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       environmentsClient.updateEnvironmentCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
*/ public final UnaryCallable updateEnvironmentCallable() { return stub.updateEnvironmentCallable(); @@ -411,6 +666,16 @@ public final UnaryCallable updateEnvironmen /** * Deletes the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   EnvironmentName name =
+   *       EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]");
+   *   environmentsClient.deleteEnvironment(name);
+   * }
+   * }
+ * * @param name Required. The name of the * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to delete. Format: * `projects/<Project ID>/locations/<Location ID>/agents/<Agent @@ -429,6 +694,16 @@ public final void deleteEnvironment(EnvironmentName name) { /** * Deletes the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   String name =
+   *       EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]").toString();
+   *   environmentsClient.deleteEnvironment(name);
+   * }
+   * }
+ * * @param name Required. The name of the * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to delete. Format: * `projects/<Project ID>/locations/<Location ID>/agents/<Agent @@ -444,6 +719,20 @@ public final void deleteEnvironment(String name) { /** * Deletes the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   DeleteEnvironmentRequest request =
+   *       DeleteEnvironmentRequest.newBuilder()
+   *           .setName(
+   *               EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]")
+   *                   .toString())
+   *           .build();
+   *   environmentsClient.deleteEnvironment(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -456,6 +745,20 @@ public final void deleteEnvironment(DeleteEnvironmentRequest request) { * Deletes the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. * *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   DeleteEnvironmentRequest request =
+   *       DeleteEnvironmentRequest.newBuilder()
+   *           .setName(
+   *               EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future = environmentsClient.deleteEnvironmentCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final UnaryCallable deleteEnvironmentCallable() { return stub.deleteEnvironmentCallable(); @@ -466,6 +769,18 @@ public final UnaryCallable deleteEnvironmentCal * Looks up the history of the specified * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   EnvironmentName name =
+   *       EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]");
+   *   for (Environment element : environmentsClient.lookupEnvironmentHistory(name).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param name Required. Resource name of the environment to look up the history for. Format: * `projects/<Project ID>/locations/<Location ID>/agents/<Agent * ID>/environments/<Environment ID>`. @@ -485,6 +800,18 @@ public final LookupEnvironmentHistoryPagedResponse lookupEnvironmentHistory( * Looks up the history of the specified * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   String name =
+   *       EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]").toString();
+   *   for (Environment element : environmentsClient.lookupEnvironmentHistory(name).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param name Required. Resource name of the environment to look up the history for. Format: * `projects/<Project ID>/locations/<Location ID>/agents/<Agent * ID>/environments/<Environment ID>`. @@ -501,6 +828,25 @@ public final LookupEnvironmentHistoryPagedResponse lookupEnvironmentHistory(Stri * Looks up the history of the specified * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   LookupEnvironmentHistoryRequest request =
+   *       LookupEnvironmentHistoryRequest.newBuilder()
+   *           .setName(
+   *               EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Environment element :
+   *       environmentsClient.lookupEnvironmentHistory(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -515,6 +861,25 @@ public final LookupEnvironmentHistoryPagedResponse lookupEnvironmentHistory( * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. * *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   LookupEnvironmentHistoryRequest request =
+   *       LookupEnvironmentHistoryRequest.newBuilder()
+   *           .setName(
+   *               EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       environmentsClient.lookupEnvironmentHistoryPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Environment element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable lookupEnvironmentHistoryPagedCallable() { @@ -527,6 +892,24 @@ public final LookupEnvironmentHistoryPagedResponse lookupEnvironmentHistory( * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. * *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   while (true) {
+   *     LookupEnvironmentHistoryResponse response =
+   *         environmentsClient.lookupEnvironmentHistoryCallable().call(request);
+   *     for (Environment element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
*/ public final UnaryCallable lookupEnvironmentHistoryCallable() { diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsClient.java index d958df2f7..189610d14 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsClient.java @@ -44,6 +44,14 @@ *

This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: * + *

{@code
+ * try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
+ *   ExperimentName name =
+ *       ExperimentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]");
+ *   Experiment response = experimentsClient.getExperiment(name);
+ * }
+ * }
+ * *

Note: close() needs to be called on the ExperimentsClient object to clean up resources such as * threads. In the example above, try-with-resources is used, which automatically calls close(). * @@ -148,6 +156,18 @@ public ExperimentsStub getStub() { * Returns the list of all experiments in the specified * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. * + *

Sample code: + * + *

{@code
+   * try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
+   *   EnvironmentName parent =
+   *       EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]");
+   *   for (Experiment element : experimentsClient.listExperiments(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to * list all environments for. Format: `projects/<Project ID>/locations/<Location * ID>/agents/<Agent ID>/environments/<Environment ID>`. @@ -166,6 +186,19 @@ public final ListExperimentsPagedResponse listExperiments(EnvironmentName parent * Returns the list of all experiments in the specified * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. * + *

Sample code: + * + *

{@code
+   * try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
+   *   String parent =
+   *       ExperimentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]")
+   *           .toString();
+   *   for (Experiment element : experimentsClient.listExperiments(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to * list all environments for. Format: `projects/<Project ID>/locations/<Location * ID>/agents/<Agent ID>/environments/<Environment ID>`. @@ -181,6 +214,25 @@ public final ListExperimentsPagedResponse listExperiments(String parent) { * Returns the list of all experiments in the specified * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. * + *

Sample code: + * + *

{@code
+   * try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
+   *   ListExperimentsRequest request =
+   *       ListExperimentsRequest.newBuilder()
+   *           .setParent(
+   *               ExperimentName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Experiment element : experimentsClient.listExperiments(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -194,6 +246,26 @@ public final ListExperimentsPagedResponse listExperiments(ListExperimentsRequest * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. * *

Sample code: + * + *

{@code
+   * try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
+   *   ListExperimentsRequest request =
+   *       ListExperimentsRequest.newBuilder()
+   *           .setParent(
+   *               ExperimentName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       experimentsClient.listExperimentsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Experiment element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listExperimentsPagedCallable() { @@ -206,6 +278,24 @@ public final ListExperimentsPagedResponse listExperiments(ListExperimentsRequest * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. * *

Sample code: + * + *

{@code
+   * try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
+   *   while (true) {
+   *     ListExperimentsResponse response =
+   *         experimentsClient.listExperimentsCallable().call(request);
+   *     for (Experiment element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listExperimentsCallable() { @@ -216,6 +306,16 @@ public final ListExperimentsPagedResponse listExperiments(ListExperimentsRequest /** * Retrieves the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. * + *

Sample code: + * + *

{@code
+   * try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
+   *   ExperimentName name =
+   *       ExperimentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]");
+   *   Experiment response = experimentsClient.getExperiment(name);
+   * }
+   * }
+ * * @param name Required. The name of the * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. Format: * `projects/<Project ID>/locations/<Location ID>/agents/<Agent @@ -232,6 +332,17 @@ public final Experiment getExperiment(ExperimentName name) { /** * Retrieves the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. * + *

Sample code: + * + *

{@code
+   * try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
+   *   String name =
+   *       ExperimentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]")
+   *           .toString();
+   *   Experiment response = experimentsClient.getExperiment(name);
+   * }
+   * }
+ * * @param name Required. The name of the * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. Format: * `projects/<Project ID>/locations/<Location ID>/agents/<Agent @@ -247,6 +358,21 @@ public final Experiment getExperiment(String name) { /** * Retrieves the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. * + *

Sample code: + * + *

{@code
+   * try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
+   *   GetExperimentRequest request =
+   *       GetExperimentRequest.newBuilder()
+   *           .setName(
+   *               ExperimentName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]")
+   *                   .toString())
+   *           .build();
+   *   Experiment response = experimentsClient.getExperiment(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -259,6 +385,21 @@ public final Experiment getExperiment(GetExperimentRequest request) { * Retrieves the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. * *

Sample code: + * + *

{@code
+   * try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
+   *   GetExperimentRequest request =
+   *       GetExperimentRequest.newBuilder()
+   *           .setName(
+   *               ExperimentName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future = experimentsClient.getExperimentCallable().futureCall(request);
+   *   // Do something.
+   *   Experiment response = future.get();
+   * }
+   * }
*/ public final UnaryCallable getExperimentCallable() { return stub.getExperimentCallable(); @@ -269,6 +410,17 @@ public final UnaryCallable getExperimentCallab * Creates an [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment] in the specified * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. * + *

Sample code: + * + *

{@code
+   * try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
+   *   EnvironmentName parent =
+   *       EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]");
+   *   Experiment experiment = Experiment.newBuilder().build();
+   *   Experiment response = experimentsClient.createExperiment(parent, experiment);
+   * }
+   * }
+ * * @param parent Required. The [Agent][google.cloud.dialogflow.cx.v3beta1.Agent] to create an * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] for. Format: * `projects/<Project ID>/locations/<Location ID>/agents/<Agent @@ -290,6 +442,18 @@ public final Experiment createExperiment(EnvironmentName parent, Experiment expe * Creates an [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment] in the specified * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. * + *

Sample code: + * + *

{@code
+   * try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
+   *   String parent =
+   *       ExperimentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]")
+   *           .toString();
+   *   Experiment experiment = Experiment.newBuilder().build();
+   *   Experiment response = experimentsClient.createExperiment(parent, experiment);
+   * }
+   * }
+ * * @param parent Required. The [Agent][google.cloud.dialogflow.cx.v3beta1.Agent] to create an * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] for. Format: * `projects/<Project ID>/locations/<Location ID>/agents/<Agent @@ -308,6 +472,22 @@ public final Experiment createExperiment(String parent, Experiment experiment) { * Creates an [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment] in the specified * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. * + *

Sample code: + * + *

{@code
+   * try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
+   *   CreateExperimentRequest request =
+   *       CreateExperimentRequest.newBuilder()
+   *           .setParent(
+   *               ExperimentName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]")
+   *                   .toString())
+   *           .setExperiment(Experiment.newBuilder().build())
+   *           .build();
+   *   Experiment response = experimentsClient.createExperiment(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -321,6 +501,23 @@ public final Experiment createExperiment(CreateExperimentRequest request) { * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. * *

Sample code: + * + *

{@code
+   * try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
+   *   CreateExperimentRequest request =
+   *       CreateExperimentRequest.newBuilder()
+   *           .setParent(
+   *               ExperimentName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]")
+   *                   .toString())
+   *           .setExperiment(Experiment.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       experimentsClient.createExperimentCallable().futureCall(request);
+   *   // Do something.
+   *   Experiment response = future.get();
+   * }
+   * }
*/ public final UnaryCallable createExperimentCallable() { return stub.createExperimentCallable(); @@ -330,6 +527,16 @@ public final UnaryCallable createExperiment /** * Updates the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. * + *

Sample code: + * + *

{@code
+   * try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
+   *   Experiment experiment = Experiment.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Experiment response = experimentsClient.updateExperiment(experiment, updateMask);
+   * }
+   * }
+ * * @param experiment Required. The experiment to update. * @param updateMask Required. The mask to control which fields get updated. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -347,6 +554,19 @@ public final Experiment updateExperiment(Experiment experiment, FieldMask update /** * Updates the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. * + *

Sample code: + * + *

{@code
+   * try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
+   *   UpdateExperimentRequest request =
+   *       UpdateExperimentRequest.newBuilder()
+   *           .setExperiment(Experiment.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Experiment response = experimentsClient.updateExperiment(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -359,6 +579,20 @@ public final Experiment updateExperiment(UpdateExperimentRequest request) { * Updates the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. * *

Sample code: + * + *

{@code
+   * try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
+   *   UpdateExperimentRequest request =
+   *       UpdateExperimentRequest.newBuilder()
+   *           .setExperiment(Experiment.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       experimentsClient.updateExperimentCallable().futureCall(request);
+   *   // Do something.
+   *   Experiment response = future.get();
+   * }
+   * }
*/ public final UnaryCallable updateExperimentCallable() { return stub.updateExperimentCallable(); @@ -368,6 +602,16 @@ public final UnaryCallable updateExperiment /** * Deletes the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. * + *

Sample code: + * + *

{@code
+   * try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
+   *   ExperimentName name =
+   *       ExperimentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]");
+   *   experimentsClient.deleteExperiment(name);
+   * }
+   * }
+ * * @param name Required. The name of the * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to delete. Format: * `projects/<Project ID>/locations/<Location ID>/agents/<Agent @@ -384,6 +628,17 @@ public final void deleteExperiment(ExperimentName name) { /** * Deletes the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. * + *

Sample code: + * + *

{@code
+   * try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
+   *   String name =
+   *       ExperimentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]")
+   *           .toString();
+   *   experimentsClient.deleteExperiment(name);
+   * }
+   * }
+ * * @param name Required. The name of the * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to delete. Format: * `projects/<Project ID>/locations/<Location ID>/agents/<Agent @@ -399,6 +654,21 @@ public final void deleteExperiment(String name) { /** * Deletes the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. * + *

Sample code: + * + *

{@code
+   * try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
+   *   DeleteExperimentRequest request =
+   *       DeleteExperimentRequest.newBuilder()
+   *           .setName(
+   *               ExperimentName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]")
+   *                   .toString())
+   *           .build();
+   *   experimentsClient.deleteExperiment(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -411,6 +681,21 @@ public final void deleteExperiment(DeleteExperimentRequest request) { * Deletes the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. * *

Sample code: + * + *

{@code
+   * try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
+   *   DeleteExperimentRequest request =
+   *       DeleteExperimentRequest.newBuilder()
+   *           .setName(
+   *               ExperimentName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future = experimentsClient.deleteExperimentCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final UnaryCallable deleteExperimentCallable() { return stub.deleteExperimentCallable(); @@ -421,6 +706,16 @@ public final UnaryCallable deleteExperimentCalla * Starts the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only * changes the state of experiment from PENDING to RUNNING. * + *

Sample code: + * + *

{@code
+   * try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
+   *   ExperimentName name =
+   *       ExperimentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]");
+   *   Experiment response = experimentsClient.startExperiment(name);
+   * }
+   * }
+ * * @param name Required. Resource name of the experiment to start. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment * ID>/experiments/<Experiment ID>`. @@ -437,6 +732,17 @@ public final Experiment startExperiment(ExperimentName name) { * Starts the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only * changes the state of experiment from PENDING to RUNNING. * + *

Sample code: + * + *

{@code
+   * try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
+   *   String name =
+   *       ExperimentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]")
+   *           .toString();
+   *   Experiment response = experimentsClient.startExperiment(name);
+   * }
+   * }
+ * * @param name Required. Resource name of the experiment to start. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment * ID>/experiments/<Experiment ID>`. @@ -452,6 +758,21 @@ public final Experiment startExperiment(String name) { * Starts the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only * changes the state of experiment from PENDING to RUNNING. * + *

Sample code: + * + *

{@code
+   * try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
+   *   StartExperimentRequest request =
+   *       StartExperimentRequest.newBuilder()
+   *           .setName(
+   *               ExperimentName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]")
+   *                   .toString())
+   *           .build();
+   *   Experiment response = experimentsClient.startExperiment(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -465,6 +786,22 @@ public final Experiment startExperiment(StartExperimentRequest request) { * changes the state of experiment from PENDING to RUNNING. * *

Sample code: + * + *

{@code
+   * try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
+   *   StartExperimentRequest request =
+   *       StartExperimentRequest.newBuilder()
+   *           .setName(
+   *               ExperimentName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       experimentsClient.startExperimentCallable().futureCall(request);
+   *   // Do something.
+   *   Experiment response = future.get();
+   * }
+   * }
*/ public final UnaryCallable startExperimentCallable() { return stub.startExperimentCallable(); @@ -475,6 +812,16 @@ public final UnaryCallable startExperimentCa * Stops the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only * changes the state of experiment from RUNNING to DONE. * + *

Sample code: + * + *

{@code
+   * try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
+   *   ExperimentName name =
+   *       ExperimentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]");
+   *   Experiment response = experimentsClient.stopExperiment(name);
+   * }
+   * }
+ * * @param name Required. Resource name of the experiment to stop. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment * ID>/experiments/<Experiment ID>`. @@ -491,6 +838,17 @@ public final Experiment stopExperiment(ExperimentName name) { * Stops the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only * changes the state of experiment from RUNNING to DONE. * + *

Sample code: + * + *

{@code
+   * try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
+   *   String name =
+   *       ExperimentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]")
+   *           .toString();
+   *   Experiment response = experimentsClient.stopExperiment(name);
+   * }
+   * }
+ * * @param name Required. Resource name of the experiment to stop. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment * ID>/experiments/<Experiment ID>`. @@ -506,6 +864,21 @@ public final Experiment stopExperiment(String name) { * Stops the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only * changes the state of experiment from RUNNING to DONE. * + *

Sample code: + * + *

{@code
+   * try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
+   *   StopExperimentRequest request =
+   *       StopExperimentRequest.newBuilder()
+   *           .setName(
+   *               ExperimentName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]")
+   *                   .toString())
+   *           .build();
+   *   Experiment response = experimentsClient.stopExperiment(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -519,6 +892,21 @@ public final Experiment stopExperiment(StopExperimentRequest request) { * changes the state of experiment from RUNNING to DONE. * *

Sample code: + * + *

{@code
+   * try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
+   *   StopExperimentRequest request =
+   *       StopExperimentRequest.newBuilder()
+   *           .setName(
+   *               ExperimentName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future = experimentsClient.stopExperimentCallable().futureCall(request);
+   *   // Do something.
+   *   Experiment response = future.get();
+   * }
+   * }
*/ public final UnaryCallable stopExperimentCallable() { return stub.stopExperimentCallable(); diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsClient.java index 3890b9bca..b38599bd1 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsClient.java @@ -48,6 +48,14 @@ *

This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: * + *

{@code
+ * try (FlowsClient flowsClient = FlowsClient.create()) {
+ *   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+ *   Flow flow = Flow.newBuilder().build();
+ *   Flow response = flowsClient.createFlow(parent, flow);
+ * }
+ * }
+ * *

Note: close() needs to be called on the FlowsClient object to clean up resources such as * threads. In the example above, try-with-resources is used, which automatically calls close(). * @@ -160,6 +168,16 @@ public final OperationsClient getOperationsClient() { /** * Creates a flow in the specified agent. * + *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+   *   Flow flow = Flow.newBuilder().build();
+   *   Flow response = flowsClient.createFlow(parent, flow);
+   * }
+   * }
+ * * @param parent Required. The agent to create a flow for. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>`. * @param flow Required. The flow to create. @@ -178,6 +196,16 @@ public final Flow createFlow(AgentName parent, Flow flow) { /** * Creates a flow in the specified agent. * + *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   String parent = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString();
+   *   Flow flow = Flow.newBuilder().build();
+   *   Flow response = flowsClient.createFlow(parent, flow);
+   * }
+   * }
+ * * @param parent Required. The agent to create a flow for. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>`. * @param flow Required. The flow to create. @@ -193,6 +221,20 @@ public final Flow createFlow(String parent, Flow flow) { /** * Creates a flow in the specified agent. * + *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   CreateFlowRequest request =
+   *       CreateFlowRequest.newBuilder()
+   *           .setParent(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString())
+   *           .setFlow(Flow.newBuilder().build())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   Flow response = flowsClient.createFlow(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -205,6 +247,20 @@ public final Flow createFlow(CreateFlowRequest request) { * Creates a flow in the specified agent. * *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   CreateFlowRequest request =
+   *       CreateFlowRequest.newBuilder()
+   *           .setParent(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString())
+   *           .setFlow(Flow.newBuilder().build())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   ApiFuture future = flowsClient.createFlowCallable().futureCall(request);
+   *   // Do something.
+   *   Flow response = future.get();
+   * }
+   * }
*/ public final UnaryCallable createFlowCallable() { return stub.createFlowCallable(); @@ -214,6 +270,15 @@ public final UnaryCallable createFlowCallable() { /** * Deletes a specified flow. * + *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   FlowName name = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]");
+   *   flowsClient.deleteFlow(name);
+   * }
+   * }
+ * * @param name Required. The name of the flow to delete. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -228,6 +293,15 @@ public final void deleteFlow(FlowName name) { /** * Deletes a specified flow. * + *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   String name = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString();
+   *   flowsClient.deleteFlow(name);
+   * }
+   * }
+ * * @param name Required. The name of the flow to delete. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -241,6 +315,19 @@ public final void deleteFlow(String name) { /** * Deletes a specified flow. * + *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   DeleteFlowRequest request =
+   *       DeleteFlowRequest.newBuilder()
+   *           .setName(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString())
+   *           .setForce(true)
+   *           .build();
+   *   flowsClient.deleteFlow(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -253,6 +340,19 @@ public final void deleteFlow(DeleteFlowRequest request) { * Deletes a specified flow. * *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   DeleteFlowRequest request =
+   *       DeleteFlowRequest.newBuilder()
+   *           .setName(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString())
+   *           .setForce(true)
+   *           .build();
+   *   ApiFuture future = flowsClient.deleteFlowCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final UnaryCallable deleteFlowCallable() { return stub.deleteFlowCallable(); @@ -262,6 +362,17 @@ public final UnaryCallable deleteFlowCallable() { /** * Returns the list of all flows in the specified agent. * + *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+   *   for (Flow element : flowsClient.listFlows(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The agent containing the flows. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -276,6 +387,17 @@ public final ListFlowsPagedResponse listFlows(AgentName parent) { /** * Returns the list of all flows in the specified agent. * + *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   String parent = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString();
+   *   for (Flow element : flowsClient.listFlows(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The agent containing the flows. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -289,6 +411,23 @@ public final ListFlowsPagedResponse listFlows(String parent) { /** * Returns the list of all flows in the specified agent. * + *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   ListFlowsRequest request =
+   *       ListFlowsRequest.newBuilder()
+   *           .setParent(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   for (Flow element : flowsClient.listFlows(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -301,6 +440,23 @@ public final ListFlowsPagedResponse listFlows(ListFlowsRequest request) { * Returns the list of all flows in the specified agent. * *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   ListFlowsRequest request =
+   *       ListFlowsRequest.newBuilder()
+   *           .setParent(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   ApiFuture future = flowsClient.listFlowsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Flow element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listFlowsPagedCallable() { return stub.listFlowsPagedCallable(); @@ -311,6 +467,23 @@ public final UnaryCallable listFlowsPa * Returns the list of all flows in the specified agent. * *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   while (true) {
+   *     ListFlowsResponse response = flowsClient.listFlowsCallable().call(request);
+   *     for (Flow element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listFlowsCallable() { return stub.listFlowsCallable(); @@ -320,6 +493,15 @@ public final UnaryCallable listFlowsCallabl /** * Retrieves the specified flow. * + *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   FlowName name = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]");
+   *   Flow response = flowsClient.getFlow(name);
+   * }
+   * }
+ * * @param name Required. The name of the flow to get. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -334,6 +516,15 @@ public final Flow getFlow(FlowName name) { /** * Retrieves the specified flow. * + *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   String name = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString();
+   *   Flow response = flowsClient.getFlow(name);
+   * }
+   * }
+ * * @param name Required. The name of the flow to get. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -347,6 +538,19 @@ public final Flow getFlow(String name) { /** * Retrieves the specified flow. * + *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   GetFlowRequest request =
+   *       GetFlowRequest.newBuilder()
+   *           .setName(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   Flow response = flowsClient.getFlow(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -359,6 +563,19 @@ public final Flow getFlow(GetFlowRequest request) { * Retrieves the specified flow. * *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   GetFlowRequest request =
+   *       GetFlowRequest.newBuilder()
+   *           .setName(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   ApiFuture future = flowsClient.getFlowCallable().futureCall(request);
+   *   // Do something.
+   *   Flow response = future.get();
+   * }
+   * }
*/ public final UnaryCallable getFlowCallable() { return stub.getFlowCallable(); @@ -368,6 +585,16 @@ public final UnaryCallable getFlowCallable() { /** * Updates the specified flow. * + *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   Flow flow = Flow.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Flow response = flowsClient.updateFlow(flow, updateMask);
+   * }
+   * }
+ * * @param flow Required. The flow to update. * @param updateMask Required. The mask to control which fields get updated. If `update_mask` is * not specified, an error will be returned. @@ -383,6 +610,20 @@ public final Flow updateFlow(Flow flow, FieldMask updateMask) { /** * Updates the specified flow. * + *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   UpdateFlowRequest request =
+   *       UpdateFlowRequest.newBuilder()
+   *           .setFlow(Flow.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   Flow response = flowsClient.updateFlow(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -395,6 +636,20 @@ public final Flow updateFlow(UpdateFlowRequest request) { * Updates the specified flow. * *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   UpdateFlowRequest request =
+   *       UpdateFlowRequest.newBuilder()
+   *           .setFlow(Flow.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   ApiFuture future = flowsClient.updateFlowCallable().futureCall(request);
+   *   // Do something.
+   *   Flow response = future.get();
+   * }
+   * }
*/ public final UnaryCallable updateFlowCallable() { return stub.updateFlowCallable(); @@ -404,6 +659,15 @@ public final UnaryCallable updateFlowCallable() { /** * Trains the specified flow. Note that only the flow in 'draft' environment is trained. * + *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   FlowName name = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]");
+   *   flowsClient.trainFlowAsync(name).get();
+   * }
+   * }
+ * * @param name Required. The flow to train. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -418,6 +682,15 @@ public final OperationFuture trainFlowAsync(FlowName name) { /** * Trains the specified flow. Note that only the flow in 'draft' environment is trained. * + *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   String name = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString();
+   *   flowsClient.trainFlowAsync(name).get();
+   * }
+   * }
+ * * @param name Required. The flow to train. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -431,6 +704,18 @@ public final OperationFuture trainFlowAsync(String name) { /** * Trains the specified flow. Note that only the flow in 'draft' environment is trained. * + *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   TrainFlowRequest request =
+   *       TrainFlowRequest.newBuilder()
+   *           .setName(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString())
+   *           .build();
+   *   flowsClient.trainFlowAsync(request).get();
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -443,6 +728,19 @@ public final OperationFuture trainFlowAsync(TrainFlowRequest requ * Trains the specified flow. Note that only the flow in 'draft' environment is trained. * *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   TrainFlowRequest request =
+   *       TrainFlowRequest.newBuilder()
+   *           .setName(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString())
+   *           .build();
+   *   OperationFuture future =
+   *       flowsClient.trainFlowOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final OperationCallable trainFlowOperationCallable() { return stub.trainFlowOperationCallable(); @@ -453,6 +751,18 @@ public final OperationCallable trainFlowOperati * Trains the specified flow. Note that only the flow in 'draft' environment is trained. * *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   TrainFlowRequest request =
+   *       TrainFlowRequest.newBuilder()
+   *           .setName(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString())
+   *           .build();
+   *   ApiFuture future = flowsClient.trainFlowCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final UnaryCallable trainFlowCallable() { return stub.trainFlowCallable(); @@ -463,6 +773,19 @@ public final UnaryCallable trainFlowCallable() { * 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. * + *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   ValidateFlowRequest request =
+   *       ValidateFlowRequest.newBuilder()
+   *           .setName(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   FlowValidationResult response = flowsClient.validateFlow(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -476,6 +799,20 @@ public final FlowValidationResult validateFlow(ValidateFlowRequest request) { * after the training is completed to get the complete validation results. * *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   ValidateFlowRequest request =
+   *       ValidateFlowRequest.newBuilder()
+   *           .setName(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   ApiFuture future =
+   *       flowsClient.validateFlowCallable().futureCall(request);
+   *   // Do something.
+   *   FlowValidationResult response = future.get();
+   * }
+   * }
*/ public final UnaryCallable validateFlowCallable() { return stub.validateFlowCallable(); @@ -486,6 +823,16 @@ public final UnaryCallable validateFl * Gets the latest flow validation result. Flow validation is performed when ValidateFlow is * called. * + *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   FlowValidationResultName name =
+   *       FlowValidationResultName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]");
+   *   FlowValidationResult response = flowsClient.getFlowValidationResult(name);
+   * }
+   * }
+ * * @param name Required. The flow name. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow * ID>/validationResult`. @@ -504,6 +851,16 @@ public final FlowValidationResult getFlowValidationResult(FlowValidationResultNa * Gets the latest flow validation result. Flow validation is performed when ValidateFlow is * called. * + *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   String name =
+   *       FlowValidationResultName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString();
+   *   FlowValidationResult response = flowsClient.getFlowValidationResult(name);
+   * }
+   * }
+ * * @param name Required. The flow name. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow * ID>/validationResult`. @@ -520,6 +877,21 @@ public final FlowValidationResult getFlowValidationResult(String name) { * Gets the latest flow validation result. Flow validation is performed when ValidateFlow is * called. * + *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   GetFlowValidationResultRequest request =
+   *       GetFlowValidationResultRequest.newBuilder()
+   *           .setName(
+   *               FlowValidationResultName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]")
+   *                   .toString())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   FlowValidationResult response = flowsClient.getFlowValidationResult(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -534,6 +906,22 @@ public final FlowValidationResult getFlowValidationResult( * called. * *

Sample code: + * + *

{@code
+   * try (FlowsClient flowsClient = FlowsClient.create()) {
+   *   GetFlowValidationResultRequest request =
+   *       GetFlowValidationResultRequest.newBuilder()
+   *           .setName(
+   *               FlowValidationResultName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]")
+   *                   .toString())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   ApiFuture future =
+   *       flowsClient.getFlowValidationResultCallable().futureCall(request);
+   *   // Do something.
+   *   FlowValidationResult response = future.get();
+   * }
+   * }
*/ public final UnaryCallable getFlowValidationResultCallable() { diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/IntentsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/IntentsClient.java index 970168839..f5d0c1000 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/IntentsClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/IntentsClient.java @@ -43,6 +43,13 @@ *

This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: * + *

{@code
+ * try (IntentsClient intentsClient = IntentsClient.create()) {
+ *   IntentName name = IntentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[INTENT]");
+ *   Intent response = intentsClient.getIntent(name);
+ * }
+ * }
+ * *

Note: close() needs to be called on the IntentsClient object to clean up resources such as * threads. In the example above, try-with-resources is used, which automatically calls close(). * @@ -144,6 +151,17 @@ public IntentsStub getStub() { /** * Returns the list of all intents in the specified agent. * + *

Sample code: + * + *

{@code
+   * try (IntentsClient intentsClient = IntentsClient.create()) {
+   *   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+   *   for (Intent element : intentsClient.listIntents(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The agent to list all intents for. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -160,6 +178,17 @@ public final ListIntentsPagedResponse listIntents(AgentName parent) { /** * Returns the list of all intents in the specified agent. * + *

Sample code: + * + *

{@code
+   * try (IntentsClient intentsClient = IntentsClient.create()) {
+   *   String parent = IntentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[INTENT]").toString();
+   *   for (Intent element : intentsClient.listIntents(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The agent to list all intents for. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -173,6 +202,23 @@ public final ListIntentsPagedResponse listIntents(String parent) { /** * Returns the list of all intents in the specified agent. * + *

Sample code: + * + *

{@code
+   * try (IntentsClient intentsClient = IntentsClient.create()) {
+   *   ListIntentsRequest request =
+   *       ListIntentsRequest.newBuilder()
+   *           .setParent(IntentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[INTENT]").toString())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Intent element : intentsClient.listIntents(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -185,6 +231,23 @@ public final ListIntentsPagedResponse listIntents(ListIntentsRequest request) { * Returns the list of all intents in the specified agent. * *

Sample code: + * + *

{@code
+   * try (IntentsClient intentsClient = IntentsClient.create()) {
+   *   ListIntentsRequest request =
+   *       ListIntentsRequest.newBuilder()
+   *           .setParent(IntentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[INTENT]").toString())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future = intentsClient.listIntentsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Intent element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listIntentsPagedCallable() { @@ -196,6 +259,23 @@ public final ListIntentsPagedResponse listIntents(ListIntentsRequest request) { * Returns the list of all intents in the specified agent. * *

Sample code: + * + *

{@code
+   * try (IntentsClient intentsClient = IntentsClient.create()) {
+   *   while (true) {
+   *     ListIntentsResponse response = intentsClient.listIntentsCallable().call(request);
+   *     for (Intent element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listIntentsCallable() { return stub.listIntentsCallable(); @@ -205,6 +285,15 @@ public final UnaryCallable listIntentsC /** * Retrieves the specified intent. * + *

Sample code: + * + *

{@code
+   * try (IntentsClient intentsClient = IntentsClient.create()) {
+   *   IntentName name = IntentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[INTENT]");
+   *   Intent response = intentsClient.getIntent(name);
+   * }
+   * }
+ * * @param name Required. The name of the intent. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/intents/<Intent ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -219,6 +308,15 @@ public final Intent getIntent(IntentName name) { /** * Retrieves the specified intent. * + *

Sample code: + * + *

{@code
+   * try (IntentsClient intentsClient = IntentsClient.create()) {
+   *   String name = IntentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[INTENT]").toString();
+   *   Intent response = intentsClient.getIntent(name);
+   * }
+   * }
+ * * @param name Required. The name of the intent. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/intents/<Intent ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -232,6 +330,19 @@ public final Intent getIntent(String name) { /** * Retrieves the specified intent. * + *

Sample code: + * + *

{@code
+   * try (IntentsClient intentsClient = IntentsClient.create()) {
+   *   GetIntentRequest request =
+   *       GetIntentRequest.newBuilder()
+   *           .setName(IntentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[INTENT]").toString())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   Intent response = intentsClient.getIntent(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -244,6 +355,19 @@ public final Intent getIntent(GetIntentRequest request) { * Retrieves the specified intent. * *

Sample code: + * + *

{@code
+   * try (IntentsClient intentsClient = IntentsClient.create()) {
+   *   GetIntentRequest request =
+   *       GetIntentRequest.newBuilder()
+   *           .setName(IntentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[INTENT]").toString())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   ApiFuture future = intentsClient.getIntentCallable().futureCall(request);
+   *   // Do something.
+   *   Intent response = future.get();
+   * }
+   * }
*/ public final UnaryCallable getIntentCallable() { return stub.getIntentCallable(); @@ -253,6 +377,16 @@ public final UnaryCallable getIntentCallable() { /** * Creates an intent in the specified agent. * + *

Sample code: + * + *

{@code
+   * try (IntentsClient intentsClient = IntentsClient.create()) {
+   *   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+   *   Intent intent = Intent.newBuilder().build();
+   *   Intent response = intentsClient.createIntent(parent, intent);
+   * }
+   * }
+ * * @param parent Required. The agent to create an intent for. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>`. * @param intent Required. The intent to create. @@ -271,6 +405,16 @@ public final Intent createIntent(AgentName parent, Intent intent) { /** * Creates an intent in the specified agent. * + *

Sample code: + * + *

{@code
+   * try (IntentsClient intentsClient = IntentsClient.create()) {
+   *   String parent = IntentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[INTENT]").toString();
+   *   Intent intent = Intent.newBuilder().build();
+   *   Intent response = intentsClient.createIntent(parent, intent);
+   * }
+   * }
+ * * @param parent Required. The agent to create an intent for. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>`. * @param intent Required. The intent to create. @@ -286,6 +430,20 @@ public final Intent createIntent(String parent, Intent intent) { /** * Creates an intent in the specified agent. * + *

Sample code: + * + *

{@code
+   * try (IntentsClient intentsClient = IntentsClient.create()) {
+   *   CreateIntentRequest request =
+   *       CreateIntentRequest.newBuilder()
+   *           .setParent(IntentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[INTENT]").toString())
+   *           .setIntent(Intent.newBuilder().build())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   Intent response = intentsClient.createIntent(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -298,6 +456,20 @@ public final Intent createIntent(CreateIntentRequest request) { * Creates an intent in the specified agent. * *

Sample code: + * + *

{@code
+   * try (IntentsClient intentsClient = IntentsClient.create()) {
+   *   CreateIntentRequest request =
+   *       CreateIntentRequest.newBuilder()
+   *           .setParent(IntentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[INTENT]").toString())
+   *           .setIntent(Intent.newBuilder().build())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   ApiFuture future = intentsClient.createIntentCallable().futureCall(request);
+   *   // Do something.
+   *   Intent response = future.get();
+   * }
+   * }
*/ public final UnaryCallable createIntentCallable() { return stub.createIntentCallable(); @@ -307,6 +479,16 @@ public final UnaryCallable createIntentCallable() { /** * Updates the specified intent. * + *

Sample code: + * + *

{@code
+   * try (IntentsClient intentsClient = IntentsClient.create()) {
+   *   Intent intent = Intent.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Intent response = intentsClient.updateIntent(intent, updateMask);
+   * }
+   * }
+ * * @param intent Required. The intent to update. * @param updateMask The mask to control which fields get updated. If the mask is not present, all * fields will be updated. @@ -322,6 +504,20 @@ public final Intent updateIntent(Intent intent, FieldMask updateMask) { /** * Updates the specified intent. * + *

Sample code: + * + *

{@code
+   * try (IntentsClient intentsClient = IntentsClient.create()) {
+   *   UpdateIntentRequest request =
+   *       UpdateIntentRequest.newBuilder()
+   *           .setIntent(Intent.newBuilder().build())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Intent response = intentsClient.updateIntent(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -334,6 +530,20 @@ public final Intent updateIntent(UpdateIntentRequest request) { * Updates the specified intent. * *

Sample code: + * + *

{@code
+   * try (IntentsClient intentsClient = IntentsClient.create()) {
+   *   UpdateIntentRequest request =
+   *       UpdateIntentRequest.newBuilder()
+   *           .setIntent(Intent.newBuilder().build())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = intentsClient.updateIntentCallable().futureCall(request);
+   *   // Do something.
+   *   Intent response = future.get();
+   * }
+   * }
*/ public final UnaryCallable updateIntentCallable() { return stub.updateIntentCallable(); @@ -343,6 +553,15 @@ public final UnaryCallable updateIntentCallable() { /** * Deletes the specified intent. * + *

Sample code: + * + *

{@code
+   * try (IntentsClient intentsClient = IntentsClient.create()) {
+   *   IntentName name = IntentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[INTENT]");
+   *   intentsClient.deleteIntent(name);
+   * }
+   * }
+ * * @param name Required. The name of the intent to delete. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/intents/<Intent ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -357,6 +576,15 @@ public final void deleteIntent(IntentName name) { /** * Deletes the specified intent. * + *

Sample code: + * + *

{@code
+   * try (IntentsClient intentsClient = IntentsClient.create()) {
+   *   String name = IntentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[INTENT]").toString();
+   *   intentsClient.deleteIntent(name);
+   * }
+   * }
+ * * @param name Required. The name of the intent to delete. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/intents/<Intent ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -370,6 +598,18 @@ public final void deleteIntent(String name) { /** * Deletes the specified intent. * + *

Sample code: + * + *

{@code
+   * try (IntentsClient intentsClient = IntentsClient.create()) {
+   *   DeleteIntentRequest request =
+   *       DeleteIntentRequest.newBuilder()
+   *           .setName(IntentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[INTENT]").toString())
+   *           .build();
+   *   intentsClient.deleteIntent(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -382,6 +622,18 @@ public final void deleteIntent(DeleteIntentRequest request) { * Deletes the specified intent. * *

Sample code: + * + *

{@code
+   * try (IntentsClient intentsClient = IntentsClient.create()) {
+   *   DeleteIntentRequest request =
+   *       DeleteIntentRequest.newBuilder()
+   *           .setName(IntentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[INTENT]").toString())
+   *           .build();
+   *   ApiFuture future = intentsClient.deleteIntentCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final UnaryCallable deleteIntentCallable() { return stub.deleteIntentCallable(); diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PagesClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PagesClient.java index 1df4b8cff..b14019ccc 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PagesClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PagesClient.java @@ -43,6 +43,13 @@ *

This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: * + *

{@code
+ * try (PagesClient pagesClient = PagesClient.create()) {
+ *   PageName name = PageName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]");
+ *   Page response = pagesClient.getPage(name);
+ * }
+ * }
+ * *

Note: close() needs to be called on the PagesClient object to clean up resources such as * threads. In the example above, try-with-resources is used, which automatically calls close(). * @@ -144,6 +151,17 @@ public PagesStub getStub() { /** * Returns the list of all pages in the specified flow. * + *

Sample code: + * + *

{@code
+   * try (PagesClient pagesClient = PagesClient.create()) {
+   *   FlowName parent = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]");
+   *   for (Page element : pagesClient.listPages(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The flow to list all pages for. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -158,6 +176,18 @@ public final ListPagesPagedResponse listPages(FlowName parent) { /** * Returns the list of all pages in the specified flow. * + *

Sample code: + * + *

{@code
+   * try (PagesClient pagesClient = PagesClient.create()) {
+   *   String parent =
+   *       PageName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]").toString();
+   *   for (Page element : pagesClient.listPages(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The flow to list all pages for. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -171,6 +201,24 @@ public final ListPagesPagedResponse listPages(String parent) { /** * Returns the list of all pages in the specified flow. * + *

Sample code: + * + *

{@code
+   * try (PagesClient pagesClient = PagesClient.create()) {
+   *   ListPagesRequest request =
+   *       ListPagesRequest.newBuilder()
+   *           .setParent(
+   *               PageName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]").toString())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Page element : pagesClient.listPages(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -183,6 +231,24 @@ public final ListPagesPagedResponse listPages(ListPagesRequest request) { * Returns the list of all pages in the specified flow. * *

Sample code: + * + *

{@code
+   * try (PagesClient pagesClient = PagesClient.create()) {
+   *   ListPagesRequest request =
+   *       ListPagesRequest.newBuilder()
+   *           .setParent(
+   *               PageName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]").toString())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future = pagesClient.listPagesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Page element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listPagesPagedCallable() { return stub.listPagesPagedCallable(); @@ -193,6 +259,23 @@ public final UnaryCallable listPagesPa * Returns the list of all pages in the specified flow. * *

Sample code: + * + *

{@code
+   * try (PagesClient pagesClient = PagesClient.create()) {
+   *   while (true) {
+   *     ListPagesResponse response = pagesClient.listPagesCallable().call(request);
+   *     for (Page element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listPagesCallable() { return stub.listPagesCallable(); @@ -202,6 +285,15 @@ public final UnaryCallable listPagesCallabl /** * Retrieves the specified page. * + *

Sample code: + * + *

{@code
+   * try (PagesClient pagesClient = PagesClient.create()) {
+   *   PageName name = PageName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]");
+   *   Page response = pagesClient.getPage(name);
+   * }
+   * }
+ * * @param name Required. The name of the page. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow * ID>/pages/<Page ID>`. @@ -217,6 +309,16 @@ public final Page getPage(PageName name) { /** * Retrieves the specified page. * + *

Sample code: + * + *

{@code
+   * try (PagesClient pagesClient = PagesClient.create()) {
+   *   String name =
+   *       PageName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]").toString();
+   *   Page response = pagesClient.getPage(name);
+   * }
+   * }
+ * * @param name Required. The name of the page. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow * ID>/pages/<Page ID>`. @@ -231,6 +333,20 @@ public final Page getPage(String name) { /** * Retrieves the specified page. * + *

Sample code: + * + *

{@code
+   * try (PagesClient pagesClient = PagesClient.create()) {
+   *   GetPageRequest request =
+   *       GetPageRequest.newBuilder()
+   *           .setName(
+   *               PageName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]").toString())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   Page response = pagesClient.getPage(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -243,6 +359,20 @@ public final Page getPage(GetPageRequest request) { * Retrieves the specified page. * *

Sample code: + * + *

{@code
+   * try (PagesClient pagesClient = PagesClient.create()) {
+   *   GetPageRequest request =
+   *       GetPageRequest.newBuilder()
+   *           .setName(
+   *               PageName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]").toString())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   ApiFuture future = pagesClient.getPageCallable().futureCall(request);
+   *   // Do something.
+   *   Page response = future.get();
+   * }
+   * }
*/ public final UnaryCallable getPageCallable() { return stub.getPageCallable(); @@ -252,6 +382,16 @@ public final UnaryCallable getPageCallable() { /** * Creates a page in the specified flow. * + *

Sample code: + * + *

{@code
+   * try (PagesClient pagesClient = PagesClient.create()) {
+   *   FlowName parent = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]");
+   *   Page page = Page.newBuilder().build();
+   *   Page response = pagesClient.createPage(parent, page);
+   * }
+   * }
+ * * @param parent Required. The flow to create a page for. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>`. * @param page Required. The page to create. @@ -270,6 +410,17 @@ public final Page createPage(FlowName parent, Page page) { /** * Creates a page in the specified flow. * + *

Sample code: + * + *

{@code
+   * try (PagesClient pagesClient = PagesClient.create()) {
+   *   String parent =
+   *       PageName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]").toString();
+   *   Page page = Page.newBuilder().build();
+   *   Page response = pagesClient.createPage(parent, page);
+   * }
+   * }
+ * * @param parent Required. The flow to create a page for. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>`. * @param page Required. The page to create. @@ -285,6 +436,21 @@ public final Page createPage(String parent, Page page) { /** * Creates a page in the specified flow. * + *

Sample code: + * + *

{@code
+   * try (PagesClient pagesClient = PagesClient.create()) {
+   *   CreatePageRequest request =
+   *       CreatePageRequest.newBuilder()
+   *           .setParent(
+   *               PageName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]").toString())
+   *           .setPage(Page.newBuilder().build())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   Page response = pagesClient.createPage(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -297,6 +463,21 @@ public final Page createPage(CreatePageRequest request) { * Creates a page in the specified flow. * *

Sample code: + * + *

{@code
+   * try (PagesClient pagesClient = PagesClient.create()) {
+   *   CreatePageRequest request =
+   *       CreatePageRequest.newBuilder()
+   *           .setParent(
+   *               PageName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]").toString())
+   *           .setPage(Page.newBuilder().build())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   ApiFuture future = pagesClient.createPageCallable().futureCall(request);
+   *   // Do something.
+   *   Page response = future.get();
+   * }
+   * }
*/ public final UnaryCallable createPageCallable() { return stub.createPageCallable(); @@ -306,6 +487,16 @@ public final UnaryCallable createPageCallable() { /** * Updates the specified page. * + *

Sample code: + * + *

{@code
+   * try (PagesClient pagesClient = PagesClient.create()) {
+   *   Page page = Page.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Page response = pagesClient.updatePage(page, updateMask);
+   * }
+   * }
+ * * @param page Required. The page to update. * @param updateMask The mask to control which fields get updated. If the mask is not present, all * fields will be updated. @@ -321,6 +512,20 @@ public final Page updatePage(Page page, FieldMask updateMask) { /** * Updates the specified page. * + *

Sample code: + * + *

{@code
+   * try (PagesClient pagesClient = PagesClient.create()) {
+   *   UpdatePageRequest request =
+   *       UpdatePageRequest.newBuilder()
+   *           .setPage(Page.newBuilder().build())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Page response = pagesClient.updatePage(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -333,6 +538,20 @@ public final Page updatePage(UpdatePageRequest request) { * Updates the specified page. * *

Sample code: + * + *

{@code
+   * try (PagesClient pagesClient = PagesClient.create()) {
+   *   UpdatePageRequest request =
+   *       UpdatePageRequest.newBuilder()
+   *           .setPage(Page.newBuilder().build())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = pagesClient.updatePageCallable().futureCall(request);
+   *   // Do something.
+   *   Page response = future.get();
+   * }
+   * }
*/ public final UnaryCallable updatePageCallable() { return stub.updatePageCallable(); @@ -342,6 +561,15 @@ public final UnaryCallable updatePageCallable() { /** * Deletes the specified page. * + *

Sample code: + * + *

{@code
+   * try (PagesClient pagesClient = PagesClient.create()) {
+   *   PageName name = PageName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]");
+   *   pagesClient.deletePage(name);
+   * }
+   * }
+ * * @param name Required. The name of the page to delete. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/Flows/<flow * ID>/pages/<Page ID>`. @@ -357,6 +585,16 @@ public final void deletePage(PageName name) { /** * Deletes the specified page. * + *

Sample code: + * + *

{@code
+   * try (PagesClient pagesClient = PagesClient.create()) {
+   *   String name =
+   *       PageName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]").toString();
+   *   pagesClient.deletePage(name);
+   * }
+   * }
+ * * @param name Required. The name of the page to delete. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/Flows/<flow * ID>/pages/<Page ID>`. @@ -371,6 +609,20 @@ public final void deletePage(String name) { /** * Deletes the specified page. * + *

Sample code: + * + *

{@code
+   * try (PagesClient pagesClient = PagesClient.create()) {
+   *   DeletePageRequest request =
+   *       DeletePageRequest.newBuilder()
+   *           .setName(
+   *               PageName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]").toString())
+   *           .setForce(true)
+   *           .build();
+   *   pagesClient.deletePage(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -383,6 +635,20 @@ public final void deletePage(DeletePageRequest request) { * Deletes the specified page. * *

Sample code: + * + *

{@code
+   * try (PagesClient pagesClient = PagesClient.create()) {
+   *   DeletePageRequest request =
+   *       DeletePageRequest.newBuilder()
+   *           .setName(
+   *               PageName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]").toString())
+   *           .setForce(true)
+   *           .build();
+   *   ApiFuture future = pagesClient.deletePageCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final UnaryCallable deletePageCallable() { return stub.deletePageCallable(); diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SecuritySettingsServiceClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SecuritySettingsServiceClient.java index 191194e1e..093db50ff 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SecuritySettingsServiceClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SecuritySettingsServiceClient.java @@ -43,6 +43,16 @@ *

This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: * + *

{@code
+ * try (SecuritySettingsServiceClient securitySettingsServiceClient =
+ *     SecuritySettingsServiceClient.create()) {
+ *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ *   SecuritySettings securitySettings = SecuritySettings.newBuilder().build();
+ *   SecuritySettings response =
+ *       securitySettingsServiceClient.createSecuritySettings(parent, securitySettings);
+ * }
+ * }
+ * *

Note: close() needs to be called on the SecuritySettingsServiceClient object to clean up * resources such as threads. In the example above, try-with-resources is used, which automatically * calls close(). @@ -151,6 +161,18 @@ public SecuritySettingsServiceStub getStub() { /** * Create security settings in the specified location. * + *

Sample code: + * + *

{@code
+   * try (SecuritySettingsServiceClient securitySettingsServiceClient =
+   *     SecuritySettingsServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   SecuritySettings securitySettings = SecuritySettings.newBuilder().build();
+   *   SecuritySettings response =
+   *       securitySettingsServiceClient.createSecuritySettings(parent, securitySettings);
+   * }
+   * }
+ * * @param parent Required. The location to create an * [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettings] for. Format: * `projects/<Project ID>/locations/<Location ID>`. @@ -171,6 +193,19 @@ public final SecuritySettings createSecuritySettings( /** * Create security settings in the specified location. * + *

Sample code: + * + *

{@code
+   * try (SecuritySettingsServiceClient securitySettingsServiceClient =
+   *     SecuritySettingsServiceClient.create()) {
+   *   String parent =
+   *       SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]").toString();
+   *   SecuritySettings securitySettings = SecuritySettings.newBuilder().build();
+   *   SecuritySettings response =
+   *       securitySettingsServiceClient.createSecuritySettings(parent, securitySettings);
+   * }
+   * }
+ * * @param parent Required. The location to create an * [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettings] for. Format: * `projects/<Project ID>/locations/<Location ID>`. @@ -191,6 +226,22 @@ public final SecuritySettings createSecuritySettings( /** * Create security settings in the specified location. * + *

Sample code: + * + *

{@code
+   * try (SecuritySettingsServiceClient securitySettingsServiceClient =
+   *     SecuritySettingsServiceClient.create()) {
+   *   CreateSecuritySettingsRequest request =
+   *       CreateSecuritySettingsRequest.newBuilder()
+   *           .setParent(
+   *               SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]")
+   *                   .toString())
+   *           .setSecuritySettings(SecuritySettings.newBuilder().build())
+   *           .build();
+   *   SecuritySettings response = securitySettingsServiceClient.createSecuritySettings(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -203,6 +254,23 @@ public final SecuritySettings createSecuritySettings(CreateSecuritySettingsReque * Create security settings in the specified location. * *

Sample code: + * + *

{@code
+   * try (SecuritySettingsServiceClient securitySettingsServiceClient =
+   *     SecuritySettingsServiceClient.create()) {
+   *   CreateSecuritySettingsRequest request =
+   *       CreateSecuritySettingsRequest.newBuilder()
+   *           .setParent(
+   *               SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]")
+   *                   .toString())
+   *           .setSecuritySettings(SecuritySettings.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       securitySettingsServiceClient.createSecuritySettingsCallable().futureCall(request);
+   *   // Do something.
+   *   SecuritySettings response = future.get();
+   * }
+   * }
*/ public final UnaryCallable createSecuritySettingsCallable() { @@ -215,6 +283,17 @@ public final SecuritySettings createSecuritySettings(CreateSecuritySettingsReque * [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettings]. The returned settings * may be stale by up to 1 minute. * + *

Sample code: + * + *

{@code
+   * try (SecuritySettingsServiceClient securitySettingsServiceClient =
+   *     SecuritySettingsServiceClient.create()) {
+   *   SecuritySettingsName name =
+   *       SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]");
+   *   SecuritySettings response = securitySettingsServiceClient.getSecuritySettings(name);
+   * }
+   * }
+ * * @param name Required. Resource name of the settings. Format: `projects/<Project * ID>/locations/<Location ID>/securitySettings/<security settings ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -233,6 +312,17 @@ public final SecuritySettings getSecuritySettings(SecuritySettingsName name) { * [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettings]. The returned settings * may be stale by up to 1 minute. * + *

Sample code: + * + *

{@code
+   * try (SecuritySettingsServiceClient securitySettingsServiceClient =
+   *     SecuritySettingsServiceClient.create()) {
+   *   String name =
+   *       SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]").toString();
+   *   SecuritySettings response = securitySettingsServiceClient.getSecuritySettings(name);
+   * }
+   * }
+ * * @param name Required. Resource name of the settings. Format: `projects/<Project * ID>/locations/<Location ID>/securitySettings/<security settings ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -249,6 +339,21 @@ public final SecuritySettings getSecuritySettings(String name) { * [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettings]. The returned settings * may be stale by up to 1 minute. * + *

Sample code: + * + *

{@code
+   * try (SecuritySettingsServiceClient securitySettingsServiceClient =
+   *     SecuritySettingsServiceClient.create()) {
+   *   GetSecuritySettingsRequest request =
+   *       GetSecuritySettingsRequest.newBuilder()
+   *           .setName(
+   *               SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]")
+   *                   .toString())
+   *           .build();
+   *   SecuritySettings response = securitySettingsServiceClient.getSecuritySettings(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -263,6 +368,22 @@ public final SecuritySettings getSecuritySettings(GetSecuritySettingsRequest req * may be stale by up to 1 minute. * *

Sample code: + * + *

{@code
+   * try (SecuritySettingsServiceClient securitySettingsServiceClient =
+   *     SecuritySettingsServiceClient.create()) {
+   *   GetSecuritySettingsRequest request =
+   *       GetSecuritySettingsRequest.newBuilder()
+   *           .setName(
+   *               SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       securitySettingsServiceClient.getSecuritySettingsCallable().futureCall(request);
+   *   // Do something.
+   *   SecuritySettings response = future.get();
+   * }
+   * }
*/ public final UnaryCallable getSecuritySettingsCallable() { @@ -273,6 +394,18 @@ public final SecuritySettings getSecuritySettings(GetSecuritySettingsRequest req /** * Updates the specified [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettings]. * + *

Sample code: + * + *

{@code
+   * try (SecuritySettingsServiceClient securitySettingsServiceClient =
+   *     SecuritySettingsServiceClient.create()) {
+   *   SecuritySettings securitySettings = SecuritySettings.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   SecuritySettings response =
+   *       securitySettingsServiceClient.updateSecuritySettings(securitySettings, updateMask);
+   * }
+   * }
+ * * @param securitySettings Required. [SecuritySettings] object that contains values for each of * the fields to update. * @param updateMask Required. The mask to control which fields get updated. If the mask is not @@ -293,6 +426,20 @@ public final SecuritySettings updateSecuritySettings( /** * Updates the specified [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettings]. * + *

Sample code: + * + *

{@code
+   * try (SecuritySettingsServiceClient securitySettingsServiceClient =
+   *     SecuritySettingsServiceClient.create()) {
+   *   UpdateSecuritySettingsRequest request =
+   *       UpdateSecuritySettingsRequest.newBuilder()
+   *           .setSecuritySettings(SecuritySettings.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   SecuritySettings response = securitySettingsServiceClient.updateSecuritySettings(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -305,6 +452,21 @@ public final SecuritySettings updateSecuritySettings(UpdateSecuritySettingsReque * Updates the specified [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettings]. * *

Sample code: + * + *

{@code
+   * try (SecuritySettingsServiceClient securitySettingsServiceClient =
+   *     SecuritySettingsServiceClient.create()) {
+   *   UpdateSecuritySettingsRequest request =
+   *       UpdateSecuritySettingsRequest.newBuilder()
+   *           .setSecuritySettings(SecuritySettings.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       securitySettingsServiceClient.updateSecuritySettingsCallable().futureCall(request);
+   *   // Do something.
+   *   SecuritySettings response = future.get();
+   * }
+   * }
*/ public final UnaryCallable updateSecuritySettingsCallable() { @@ -315,6 +477,19 @@ public final SecuritySettings updateSecuritySettings(UpdateSecuritySettingsReque /** * Returns the list of all security settings in the specified location. * + *

Sample code: + * + *

{@code
+   * try (SecuritySettingsServiceClient securitySettingsServiceClient =
+   *     SecuritySettingsServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (SecuritySettings element :
+   *       securitySettingsServiceClient.listSecuritySettings(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The location to list all security settings for. Format: * `projects/<Project ID>/locations/<Location ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -331,6 +506,20 @@ public final ListSecuritySettingsPagedResponse listSecuritySettings(LocationName /** * Returns the list of all security settings in the specified location. * + *

Sample code: + * + *

{@code
+   * try (SecuritySettingsServiceClient securitySettingsServiceClient =
+   *     SecuritySettingsServiceClient.create()) {
+   *   String parent =
+   *       SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]").toString();
+   *   for (SecuritySettings element :
+   *       securitySettingsServiceClient.listSecuritySettings(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The location to list all security settings for. Format: * `projects/<Project ID>/locations/<Location ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -345,6 +534,26 @@ public final ListSecuritySettingsPagedResponse listSecuritySettings(String paren /** * Returns the list of all security settings in the specified location. * + *

Sample code: + * + *

{@code
+   * try (SecuritySettingsServiceClient securitySettingsServiceClient =
+   *     SecuritySettingsServiceClient.create()) {
+   *   ListSecuritySettingsRequest request =
+   *       ListSecuritySettingsRequest.newBuilder()
+   *           .setParent(
+   *               SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (SecuritySettings element :
+   *       securitySettingsServiceClient.listSecuritySettings(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -358,6 +567,26 @@ public final ListSecuritySettingsPagedResponse listSecuritySettings( * Returns the list of all security settings in the specified location. * *

Sample code: + * + *

{@code
+   * try (SecuritySettingsServiceClient securitySettingsServiceClient =
+   *     SecuritySettingsServiceClient.create()) {
+   *   ListSecuritySettingsRequest request =
+   *       ListSecuritySettingsRequest.newBuilder()
+   *           .setParent(
+   *               SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       securitySettingsServiceClient.listSecuritySettingsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (SecuritySettings element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listSecuritySettingsPagedCallable() { @@ -369,6 +598,25 @@ public final ListSecuritySettingsPagedResponse listSecuritySettings( * Returns the list of all security settings in the specified location. * *

Sample code: + * + *

{@code
+   * try (SecuritySettingsServiceClient securitySettingsServiceClient =
+   *     SecuritySettingsServiceClient.create()) {
+   *   while (true) {
+   *     ListSecuritySettingsResponse response =
+   *         securitySettingsServiceClient.listSecuritySettingsCallable().call(request);
+   *     for (SecuritySettings element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listSecuritySettingsCallable() { @@ -379,6 +627,17 @@ public final ListSecuritySettingsPagedResponse listSecuritySettings( /** * Deletes the specified [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettings]. * + *

Sample code: + * + *

{@code
+   * try (SecuritySettingsServiceClient securitySettingsServiceClient =
+   *     SecuritySettingsServiceClient.create()) {
+   *   SecuritySettingsName name =
+   *       SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]");
+   *   securitySettingsServiceClient.deleteSecuritySettings(name);
+   * }
+   * }
+ * * @param name Required. The name of the * [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettings] to delete. Format: * `projects/<Project ID>/locations/<Location ID>/securitySettings/<Security @@ -397,6 +656,17 @@ public final void deleteSecuritySettings(SecuritySettingsName name) { /** * Deletes the specified [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettings]. * + *

Sample code: + * + *

{@code
+   * try (SecuritySettingsServiceClient securitySettingsServiceClient =
+   *     SecuritySettingsServiceClient.create()) {
+   *   String name =
+   *       SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]").toString();
+   *   securitySettingsServiceClient.deleteSecuritySettings(name);
+   * }
+   * }
+ * * @param name Required. The name of the * [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettings] to delete. Format: * `projects/<Project ID>/locations/<Location ID>/securitySettings/<Security @@ -413,6 +683,21 @@ public final void deleteSecuritySettings(String name) { /** * Deletes the specified [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettings]. * + *

Sample code: + * + *

{@code
+   * try (SecuritySettingsServiceClient securitySettingsServiceClient =
+   *     SecuritySettingsServiceClient.create()) {
+   *   DeleteSecuritySettingsRequest request =
+   *       DeleteSecuritySettingsRequest.newBuilder()
+   *           .setName(
+   *               SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]")
+   *                   .toString())
+   *           .build();
+   *   securitySettingsServiceClient.deleteSecuritySettings(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -425,6 +710,22 @@ public final void deleteSecuritySettings(DeleteSecuritySettingsRequest request) * Deletes the specified [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettings]. * *

Sample code: + * + *

{@code
+   * try (SecuritySettingsServiceClient securitySettingsServiceClient =
+   *     SecuritySettingsServiceClient.create()) {
+   *   DeleteSecuritySettingsRequest request =
+   *       DeleteSecuritySettingsRequest.newBuilder()
+   *           .setName(
+   *               SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       securitySettingsServiceClient.deleteSecuritySettingsCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final UnaryCallable deleteSecuritySettingsCallable() { diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionEntityTypesClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionEntityTypesClient.java index 333a0f081..547041183 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionEntityTypesClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionEntityTypesClient.java @@ -44,6 +44,15 @@ *

This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: * + *

{@code
+ * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
+ *   SessionEntityTypeName name =
+ *       SessionEntityTypeName.ofProjectLocationAgentSessionEntityTypeName(
+ *           "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]", "[ENTITY_TYPE]");
+ *   SessionEntityType response = sessionEntityTypesClient.getSessionEntityType(name);
+ * }
+ * }
+ * *

Note: close() needs to be called on the SessionEntityTypesClient object to clean up resources * such as threads. In the example above, try-with-resources is used, which automatically calls * close(). @@ -151,6 +160,20 @@ public SessionEntityTypesStub getStub() { /** * Returns the list of all session entity types in the specified session. * + *

Sample code: + * + *

{@code
+   * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
+   *   SessionName parent =
+   *       SessionName.ofProjectLocationAgentSessionName(
+   *           "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]");
+   *   for (SessionEntityType element :
+   *       sessionEntityTypesClient.listSessionEntityTypes(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The session to list all session entity types from. Format: * `projects/<Project ID>/locations/<Location ID>/agents/<Agent * ID>/sessions/<Session ID>` or `projects/<Project ID>/locations/<Location @@ -170,6 +193,21 @@ public final ListSessionEntityTypesPagedResponse listSessionEntityTypes(SessionN /** * Returns the list of all session entity types in the specified session. * + *

Sample code: + * + *

{@code
+   * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
+   *   String parent =
+   *       SessionEntityTypeName.ofProjectLocationAgentSessionEntityTypeName(
+   *               "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]", "[ENTITY_TYPE]")
+   *           .toString();
+   *   for (SessionEntityType element :
+   *       sessionEntityTypesClient.listSessionEntityTypes(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The session to list all session entity types from. Format: * `projects/<Project ID>/locations/<Location ID>/agents/<Agent * ID>/sessions/<Session ID>` or `projects/<Project ID>/locations/<Location @@ -187,6 +225,26 @@ public final ListSessionEntityTypesPagedResponse listSessionEntityTypes(String p /** * Returns the list of all session entity types in the specified session. * + *

Sample code: + * + *

{@code
+   * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
+   *   ListSessionEntityTypesRequest request =
+   *       ListSessionEntityTypesRequest.newBuilder()
+   *           .setParent(
+   *               SessionEntityTypeName.ofProjectLocationAgentSessionEntityTypeName(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]", "[ENTITY_TYPE]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (SessionEntityType element :
+   *       sessionEntityTypesClient.listSessionEntityTypes(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -200,6 +258,26 @@ public final ListSessionEntityTypesPagedResponse listSessionEntityTypes( * Returns the list of all session entity types in the specified session. * *

Sample code: + * + *

{@code
+   * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
+   *   ListSessionEntityTypesRequest request =
+   *       ListSessionEntityTypesRequest.newBuilder()
+   *           .setParent(
+   *               SessionEntityTypeName.ofProjectLocationAgentSessionEntityTypeName(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]", "[ENTITY_TYPE]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       sessionEntityTypesClient.listSessionEntityTypesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (SessionEntityType element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listSessionEntityTypesPagedCallable() { @@ -211,6 +289,24 @@ public final ListSessionEntityTypesPagedResponse listSessionEntityTypes( * Returns the list of all session entity types in the specified session. * *

Sample code: + * + *

{@code
+   * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
+   *   while (true) {
+   *     ListSessionEntityTypesResponse response =
+   *         sessionEntityTypesClient.listSessionEntityTypesCallable().call(request);
+   *     for (SessionEntityType element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listSessionEntityTypesCallable() { @@ -221,6 +317,17 @@ public final ListSessionEntityTypesPagedResponse listSessionEntityTypes( /** * Retrieves the specified session entity type. * + *

Sample code: + * + *

{@code
+   * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
+   *   SessionEntityTypeName name =
+   *       SessionEntityTypeName.ofProjectLocationAgentSessionEntityTypeName(
+   *           "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]", "[ENTITY_TYPE]");
+   *   SessionEntityType response = sessionEntityTypesClient.getSessionEntityType(name);
+   * }
+   * }
+ * * @param name Required. The name of the session entity type. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/sessions/<Session * ID>/entityTypes/<Entity Type ID>` or `projects/<Project @@ -241,6 +348,18 @@ public final SessionEntityType getSessionEntityType(SessionEntityTypeName name) /** * Retrieves the specified session entity type. * + *

Sample code: + * + *

{@code
+   * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
+   *   String name =
+   *       SessionEntityTypeName.ofProjectLocationAgentSessionEntityTypeName(
+   *               "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]", "[ENTITY_TYPE]")
+   *           .toString();
+   *   SessionEntityType response = sessionEntityTypesClient.getSessionEntityType(name);
+   * }
+   * }
+ * * @param name Required. The name of the session entity type. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/sessions/<Session * ID>/entityTypes/<Entity Type ID>` or `projects/<Project @@ -259,6 +378,21 @@ public final SessionEntityType getSessionEntityType(String name) { /** * Retrieves the specified session entity type. * + *

Sample code: + * + *

{@code
+   * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
+   *   GetSessionEntityTypeRequest request =
+   *       GetSessionEntityTypeRequest.newBuilder()
+   *           .setName(
+   *               SessionEntityTypeName.ofProjectLocationAgentSessionEntityTypeName(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]", "[ENTITY_TYPE]")
+   *                   .toString())
+   *           .build();
+   *   SessionEntityType response = sessionEntityTypesClient.getSessionEntityType(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -271,6 +405,22 @@ public final SessionEntityType getSessionEntityType(GetSessionEntityTypeRequest * Retrieves the specified session entity type. * *

Sample code: + * + *

{@code
+   * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
+   *   GetSessionEntityTypeRequest request =
+   *       GetSessionEntityTypeRequest.newBuilder()
+   *           .setName(
+   *               SessionEntityTypeName.ofProjectLocationAgentSessionEntityTypeName(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]", "[ENTITY_TYPE]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       sessionEntityTypesClient.getSessionEntityTypeCallable().futureCall(request);
+   *   // Do something.
+   *   SessionEntityType response = future.get();
+   * }
+   * }
*/ public final UnaryCallable getSessionEntityTypeCallable() { @@ -283,6 +433,19 @@ public final SessionEntityType getSessionEntityType(GetSessionEntityTypeRequest * *

If the specified session entity type already exists, overrides the session entity type. * + *

Sample code: + * + *

{@code
+   * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
+   *   SessionName parent =
+   *       SessionName.ofProjectLocationAgentSessionName(
+   *           "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]");
+   *   SessionEntityType sessionEntityType = SessionEntityType.newBuilder().build();
+   *   SessionEntityType response =
+   *       sessionEntityTypesClient.createSessionEntityType(parent, sessionEntityType);
+   * }
+   * }
+ * * @param parent Required. The session to create a session entity type for. Format: * `projects/<Project ID>/locations/<Location ID>/agents/<Agent * ID>/sessions/<Session ID>` or `projects/<Project ID>/locations/<Location @@ -307,6 +470,20 @@ public final SessionEntityType createSessionEntityType( * *

If the specified session entity type already exists, overrides the session entity type. * + *

Sample code: + * + *

{@code
+   * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
+   *   String parent =
+   *       SessionEntityTypeName.ofProjectLocationAgentSessionEntityTypeName(
+   *               "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]", "[ENTITY_TYPE]")
+   *           .toString();
+   *   SessionEntityType sessionEntityType = SessionEntityType.newBuilder().build();
+   *   SessionEntityType response =
+   *       sessionEntityTypesClient.createSessionEntityType(parent, sessionEntityType);
+   * }
+   * }
+ * * @param parent Required. The session to create a session entity type for. Format: * `projects/<Project ID>/locations/<Location ID>/agents/<Agent * ID>/sessions/<Session ID>` or `projects/<Project ID>/locations/<Location @@ -331,6 +508,22 @@ public final SessionEntityType createSessionEntityType( * *

If the specified session entity type already exists, overrides the session entity type. * + *

Sample code: + * + *

{@code
+   * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
+   *   CreateSessionEntityTypeRequest request =
+   *       CreateSessionEntityTypeRequest.newBuilder()
+   *           .setParent(
+   *               SessionEntityTypeName.ofProjectLocationAgentSessionEntityTypeName(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]", "[ENTITY_TYPE]")
+   *                   .toString())
+   *           .setSessionEntityType(SessionEntityType.newBuilder().build())
+   *           .build();
+   *   SessionEntityType response = sessionEntityTypesClient.createSessionEntityType(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -345,6 +538,23 @@ public final SessionEntityType createSessionEntityType(CreateSessionEntityTypeRe *

If the specified session entity type already exists, overrides the session entity type. * *

Sample code: + * + *

{@code
+   * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
+   *   CreateSessionEntityTypeRequest request =
+   *       CreateSessionEntityTypeRequest.newBuilder()
+   *           .setParent(
+   *               SessionEntityTypeName.ofProjectLocationAgentSessionEntityTypeName(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]", "[ENTITY_TYPE]")
+   *                   .toString())
+   *           .setSessionEntityType(SessionEntityType.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       sessionEntityTypesClient.createSessionEntityTypeCallable().futureCall(request);
+   *   // Do something.
+   *   SessionEntityType response = future.get();
+   * }
+   * }
*/ public final UnaryCallable createSessionEntityTypeCallable() { @@ -355,6 +565,17 @@ public final SessionEntityType createSessionEntityType(CreateSessionEntityTypeRe /** * Updates the specified session entity type. * + *

Sample code: + * + *

{@code
+   * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
+   *   SessionEntityType sessionEntityType = SessionEntityType.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   SessionEntityType response =
+   *       sessionEntityTypesClient.updateSessionEntityType(sessionEntityType, updateMask);
+   * }
+   * }
+ * * @param sessionEntityType Required. The session entity type to update. Format: * `projects/<Project ID>/locations/<Location ID>/agents/<Agent * ID>/sessions/<Session ID>/entityTypes/<Entity Type ID>` or @@ -379,6 +600,19 @@ public final SessionEntityType updateSessionEntityType( /** * Updates the specified session entity type. * + *

Sample code: + * + *

{@code
+   * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
+   *   UpdateSessionEntityTypeRequest request =
+   *       UpdateSessionEntityTypeRequest.newBuilder()
+   *           .setSessionEntityType(SessionEntityType.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   SessionEntityType response = sessionEntityTypesClient.updateSessionEntityType(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -391,6 +625,20 @@ public final SessionEntityType updateSessionEntityType(UpdateSessionEntityTypeRe * Updates the specified session entity type. * *

Sample code: + * + *

{@code
+   * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
+   *   UpdateSessionEntityTypeRequest request =
+   *       UpdateSessionEntityTypeRequest.newBuilder()
+   *           .setSessionEntityType(SessionEntityType.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       sessionEntityTypesClient.updateSessionEntityTypeCallable().futureCall(request);
+   *   // Do something.
+   *   SessionEntityType response = future.get();
+   * }
+   * }
*/ public final UnaryCallable updateSessionEntityTypeCallable() { @@ -401,6 +649,17 @@ public final SessionEntityType updateSessionEntityType(UpdateSessionEntityTypeRe /** * Deletes the specified session entity type. * + *

Sample code: + * + *

{@code
+   * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
+   *   SessionEntityTypeName name =
+   *       SessionEntityTypeName.ofProjectLocationAgentSessionEntityTypeName(
+   *           "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]", "[ENTITY_TYPE]");
+   *   sessionEntityTypesClient.deleteSessionEntityType(name);
+   * }
+   * }
+ * * @param name Required. The name of the session entity type to delete. Format: * `projects/<Project ID>/locations/<Location ID>/agents/<Agent * ID>/sessions/<Session ID>/entityTypes/<Entity Type ID>` or @@ -422,6 +681,18 @@ public final void deleteSessionEntityType(SessionEntityTypeName name) { /** * Deletes the specified session entity type. * + *

Sample code: + * + *

{@code
+   * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
+   *   String name =
+   *       SessionEntityTypeName.ofProjectLocationAgentSessionEntityTypeName(
+   *               "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]", "[ENTITY_TYPE]")
+   *           .toString();
+   *   sessionEntityTypesClient.deleteSessionEntityType(name);
+   * }
+   * }
+ * * @param name Required. The name of the session entity type to delete. Format: * `projects/<Project ID>/locations/<Location ID>/agents/<Agent * ID>/sessions/<Session ID>/entityTypes/<Entity Type ID>` or @@ -441,6 +712,21 @@ public final void deleteSessionEntityType(String name) { /** * Deletes the specified session entity type. * + *

Sample code: + * + *

{@code
+   * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
+   *   DeleteSessionEntityTypeRequest request =
+   *       DeleteSessionEntityTypeRequest.newBuilder()
+   *           .setName(
+   *               SessionEntityTypeName.ofProjectLocationAgentSessionEntityTypeName(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]", "[ENTITY_TYPE]")
+   *                   .toString())
+   *           .build();
+   *   sessionEntityTypesClient.deleteSessionEntityType(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -453,6 +739,22 @@ public final void deleteSessionEntityType(DeleteSessionEntityTypeRequest request * Deletes the specified session entity type. * *

Sample code: + * + *

{@code
+   * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
+   *   DeleteSessionEntityTypeRequest request =
+   *       DeleteSessionEntityTypeRequest.newBuilder()
+   *           .setName(
+   *               SessionEntityTypeName.ofProjectLocationAgentSessionEntityTypeName(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]", "[ENTITY_TYPE]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       sessionEntityTypesClient.deleteSessionEntityTypeCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final UnaryCallable deleteSessionEntityTypeCallable() { diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionsClient.java index d718c19bd..8b0937492 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionsClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionsClient.java @@ -35,6 +35,22 @@ *

This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: * + *

{@code
+ * try (SessionsClient sessionsClient = SessionsClient.create()) {
+ *   DetectIntentRequest request =
+ *       DetectIntentRequest.newBuilder()
+ *           .setSession(
+ *               SessionName.ofProjectLocationAgentSessionName(
+ *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]")
+ *                   .toString())
+ *           .setQueryParams(QueryParameters.newBuilder().build())
+ *           .setQueryInput(QueryInput.newBuilder().build())
+ *           .setOutputAudioConfig(OutputAudioConfig.newBuilder().build())
+ *           .build();
+ *   DetectIntentResponse response = sessionsClient.detectIntent(request);
+ * }
+ * }
+ * *

Note: close() needs to be called on the SessionsClient object to clean up resources such as * threads. In the example above, try-with-resources is used, which automatically calls close(). * @@ -142,6 +158,24 @@ public SessionsStub getStub() { *

Note: Always use agent versions for production traffic. See [Versions and * environments](https://cloud.google.com/dialogflow/cx/docs/concept/version). * + *

Sample code: + * + *

{@code
+   * try (SessionsClient sessionsClient = SessionsClient.create()) {
+   *   DetectIntentRequest request =
+   *       DetectIntentRequest.newBuilder()
+   *           .setSession(
+   *               SessionName.ofProjectLocationAgentSessionName(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]")
+   *                   .toString())
+   *           .setQueryParams(QueryParameters.newBuilder().build())
+   *           .setQueryInput(QueryInput.newBuilder().build())
+   *           .setOutputAudioConfig(OutputAudioConfig.newBuilder().build())
+   *           .build();
+   *   DetectIntentResponse response = sessionsClient.detectIntent(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -159,6 +193,25 @@ public final DetectIntentResponse detectIntent(DetectIntentRequest request) { * environments](https://cloud.google.com/dialogflow/cx/docs/concept/version). * *

Sample code: + * + *

{@code
+   * try (SessionsClient sessionsClient = SessionsClient.create()) {
+   *   DetectIntentRequest request =
+   *       DetectIntentRequest.newBuilder()
+   *           .setSession(
+   *               SessionName.ofProjectLocationAgentSessionName(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]")
+   *                   .toString())
+   *           .setQueryParams(QueryParameters.newBuilder().build())
+   *           .setQueryInput(QueryInput.newBuilder().build())
+   *           .setOutputAudioConfig(OutputAudioConfig.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       sessionsClient.detectIntentCallable().futureCall(request);
+   *   // Do something.
+   *   DetectIntentResponse response = future.get();
+   * }
+   * }
*/ public final UnaryCallable detectIntentCallable() { return stub.detectIntentCallable(); @@ -174,6 +227,27 @@ public final UnaryCallable detectInte * environments](https://cloud.google.com/dialogflow/cx/docs/concept/version). * *

Sample code: + * + *

{@code
+   * try (SessionsClient sessionsClient = SessionsClient.create()) {
+   *   BidiStream bidiStream =
+   *       sessionsClient.streamingDetectIntentCallable().call();
+   *   StreamingDetectIntentRequest request =
+   *       StreamingDetectIntentRequest.newBuilder()
+   *           .setSession(
+   *               SessionName.ofProjectLocationAgentSessionName(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]")
+   *                   .toString())
+   *           .setQueryParams(QueryParameters.newBuilder().build())
+   *           .setQueryInput(QueryInput.newBuilder().build())
+   *           .setOutputAudioConfig(OutputAudioConfig.newBuilder().build())
+   *           .build();
+   *   bidiStream.send(request);
+   *   for (StreamingDetectIntentResponse response : bidiStream) {
+   *     // Do something when a response is received.
+   *   }
+   * }
+   * }
*/ public final BidiStreamingCallable streamingDetectIntentCallable() { @@ -184,6 +258,23 @@ public final UnaryCallable detectInte /** * Returns preliminary intent match results, doesn't change the session status. * + *

Sample code: + * + *

{@code
+   * try (SessionsClient sessionsClient = SessionsClient.create()) {
+   *   MatchIntentRequest request =
+   *       MatchIntentRequest.newBuilder()
+   *           .setSession(
+   *               SessionName.ofProjectLocationAgentSessionName(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]")
+   *                   .toString())
+   *           .setQueryParams(QueryParameters.newBuilder().build())
+   *           .setQueryInput(QueryInput.newBuilder().build())
+   *           .build();
+   *   MatchIntentResponse response = sessionsClient.matchIntent(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -196,6 +287,24 @@ public final MatchIntentResponse matchIntent(MatchIntentRequest request) { * Returns preliminary intent match results, doesn't change the session status. * *

Sample code: + * + *

{@code
+   * try (SessionsClient sessionsClient = SessionsClient.create()) {
+   *   MatchIntentRequest request =
+   *       MatchIntentRequest.newBuilder()
+   *           .setSession(
+   *               SessionName.ofProjectLocationAgentSessionName(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]")
+   *                   .toString())
+   *           .setQueryParams(QueryParameters.newBuilder().build())
+   *           .setQueryInput(QueryInput.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       sessionsClient.matchIntentCallable().futureCall(request);
+   *   // Do something.
+   *   MatchIntentResponse response = future.get();
+   * }
+   * }
*/ public final UnaryCallable matchIntentCallable() { return stub.matchIntentCallable(); @@ -209,6 +318,20 @@ public final UnaryCallable matchIntentC * [MatchIntentResponse][google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse]. Otherwise, the * behavior is undefined. * + *

Sample code: + * + *

{@code
+   * try (SessionsClient sessionsClient = SessionsClient.create()) {
+   *   FulfillIntentRequest request =
+   *       FulfillIntentRequest.newBuilder()
+   *           .setMatchIntentRequest(MatchIntentRequest.newBuilder().build())
+   *           .setMatch(Match.newBuilder().build())
+   *           .setOutputAudioConfig(OutputAudioConfig.newBuilder().build())
+   *           .build();
+   *   FulfillIntentResponse response = sessionsClient.fulfillIntent(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -225,6 +348,21 @@ public final FulfillIntentResponse fulfillIntent(FulfillIntentRequest request) { * behavior is undefined. * *

Sample code: + * + *

{@code
+   * try (SessionsClient sessionsClient = SessionsClient.create()) {
+   *   FulfillIntentRequest request =
+   *       FulfillIntentRequest.newBuilder()
+   *           .setMatchIntentRequest(MatchIntentRequest.newBuilder().build())
+   *           .setMatch(Match.newBuilder().build())
+   *           .setOutputAudioConfig(OutputAudioConfig.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       sessionsClient.fulfillIntentCallable().futureCall(request);
+   *   // Do something.
+   *   FulfillIntentResponse response = future.get();
+   * }
+   * }
*/ public final UnaryCallable fulfillIntentCallable() { return stub.fulfillIntentCallable(); diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCasesClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCasesClient.java index 8c9ffc38e..7f15e1efe 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCasesClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCasesClient.java @@ -49,6 +49,13 @@ *

This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: * + *

{@code
+ * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+ *   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+ *   testCasesClient.batchDeleteTestCases(parent);
+ * }
+ * }
+ * *

Note: close() needs to be called on the TestCasesClient object to clean up resources such as * threads. In the example above, try-with-resources is used, which automatically calls close(). * @@ -162,6 +169,17 @@ public final OperationsClient getOperationsClient() { /** * Fetches a list of test cases for a given agent. * + *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+   *   for (TestCase element : testCasesClient.listTestCases(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The agent to list all pages for. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -178,6 +196,18 @@ public final ListTestCasesPagedResponse listTestCases(AgentName parent) { /** * Fetches a list of test cases for a given agent. * + *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   String parent =
+   *       TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString();
+   *   for (TestCase element : testCasesClient.listTestCases(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The agent to list all pages for. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -191,6 +221,23 @@ public final ListTestCasesPagedResponse listTestCases(String parent) { /** * Fetches a list of test cases for a given agent. * + *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   ListTestCasesRequest request =
+   *       ListTestCasesRequest.newBuilder()
+   *           .setParent(
+   *               TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (TestCase element : testCasesClient.listTestCases(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -203,6 +250,23 @@ public final ListTestCasesPagedResponse listTestCases(ListTestCasesRequest reque * Fetches a list of test cases for a given agent. * *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   ListTestCasesRequest request =
+   *       ListTestCasesRequest.newBuilder()
+   *           .setParent(
+   *               TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future = testCasesClient.listTestCasesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (TestCase element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listTestCasesPagedCallable() { @@ -214,6 +278,23 @@ public final ListTestCasesPagedResponse listTestCases(ListTestCasesRequest reque * Fetches a list of test cases for a given agent. * *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   while (true) {
+   *     ListTestCasesResponse response = testCasesClient.listTestCasesCallable().call(request);
+   *     for (TestCase element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listTestCasesCallable() { return stub.listTestCasesCallable(); @@ -223,6 +304,15 @@ public final UnaryCallable listTest /** * Batch deletes test cases. * + *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+   *   testCasesClient.batchDeleteTestCases(parent);
+   * }
+   * }
+ * * @param parent Required. The agent to delete test cases from. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -239,6 +329,16 @@ public final void batchDeleteTestCases(AgentName parent) { /** * Batch deletes test cases. * + *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   String parent =
+   *       TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString();
+   *   testCasesClient.batchDeleteTestCases(parent);
+   * }
+   * }
+ * * @param parent Required. The agent to delete test cases from. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -253,6 +353,20 @@ public final void batchDeleteTestCases(String parent) { /** * Batch deletes test cases. * + *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   BatchDeleteTestCasesRequest request =
+   *       BatchDeleteTestCasesRequest.newBuilder()
+   *           .setParent(
+   *               TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString())
+   *           .addAllNames(new ArrayList())
+   *           .build();
+   *   testCasesClient.batchDeleteTestCases(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -265,6 +379,20 @@ public final void batchDeleteTestCases(BatchDeleteTestCasesRequest request) { * Batch deletes test cases. * *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   BatchDeleteTestCasesRequest request =
+   *       BatchDeleteTestCasesRequest.newBuilder()
+   *           .setParent(
+   *               TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString())
+   *           .addAllNames(new ArrayList())
+   *           .build();
+   *   ApiFuture future = testCasesClient.batchDeleteTestCasesCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final UnaryCallable batchDeleteTestCasesCallable() { return stub.batchDeleteTestCasesCallable(); @@ -274,6 +402,15 @@ public final UnaryCallable batchDeleteTestCa /** * Gets a test case. * + *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   TestCaseName name = TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]");
+   *   TestCase response = testCasesClient.getTestCase(name);
+   * }
+   * }
+ * * @param name Required. The name of the testcase. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/testCases/<TestCase * ID>`. @@ -289,6 +426,15 @@ public final TestCase getTestCase(TestCaseName name) { /** * Gets a test case. * + *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   String name = TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString();
+   *   TestCase response = testCasesClient.getTestCase(name);
+   * }
+   * }
+ * * @param name Required. The name of the testcase. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/testCases/<TestCase * ID>`. @@ -303,6 +449,19 @@ public final TestCase getTestCase(String name) { /** * Gets a test case. * + *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   GetTestCaseRequest request =
+   *       GetTestCaseRequest.newBuilder()
+   *           .setName(
+   *               TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString())
+   *           .build();
+   *   TestCase response = testCasesClient.getTestCase(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -315,6 +474,19 @@ public final TestCase getTestCase(GetTestCaseRequest request) { * Gets a test case. * *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   GetTestCaseRequest request =
+   *       GetTestCaseRequest.newBuilder()
+   *           .setName(
+   *               TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString())
+   *           .build();
+   *   ApiFuture future = testCasesClient.getTestCaseCallable().futureCall(request);
+   *   // Do something.
+   *   TestCase response = future.get();
+   * }
+   * }
*/ public final UnaryCallable getTestCaseCallable() { return stub.getTestCaseCallable(); @@ -324,6 +496,16 @@ public final UnaryCallable getTestCaseCallable() { /** * Creates a test case for the given agent. * + *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+   *   TestCase testCase = TestCase.newBuilder().build();
+   *   TestCase response = testCasesClient.createTestCase(parent, testCase);
+   * }
+   * }
+ * * @param parent Required. The agent to create the test case for. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>`. * @param testCase Required. The test case to create. @@ -342,6 +524,17 @@ public final TestCase createTestCase(AgentName parent, TestCase testCase) { /** * Creates a test case for the given agent. * + *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   String parent =
+   *       TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString();
+   *   TestCase testCase = TestCase.newBuilder().build();
+   *   TestCase response = testCasesClient.createTestCase(parent, testCase);
+   * }
+   * }
+ * * @param parent Required. The agent to create the test case for. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>`. * @param testCase Required. The test case to create. @@ -357,6 +550,20 @@ public final TestCase createTestCase(String parent, TestCase testCase) { /** * Creates a test case for the given agent. * + *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   CreateTestCaseRequest request =
+   *       CreateTestCaseRequest.newBuilder()
+   *           .setParent(
+   *               TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString())
+   *           .setTestCase(TestCase.newBuilder().build())
+   *           .build();
+   *   TestCase response = testCasesClient.createTestCase(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -369,6 +576,20 @@ public final TestCase createTestCase(CreateTestCaseRequest request) { * Creates a test case for the given agent. * *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   CreateTestCaseRequest request =
+   *       CreateTestCaseRequest.newBuilder()
+   *           .setParent(
+   *               TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString())
+   *           .setTestCase(TestCase.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = testCasesClient.createTestCaseCallable().futureCall(request);
+   *   // Do something.
+   *   TestCase response = future.get();
+   * }
+   * }
*/ public final UnaryCallable createTestCaseCallable() { return stub.createTestCaseCallable(); @@ -378,6 +599,16 @@ public final UnaryCallable createTestCaseCallab /** * Updates the specified test case. * + *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   TestCase testCase = TestCase.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   TestCase response = testCasesClient.updateTestCase(testCase, updateMask);
+   * }
+   * }
+ * * @param testCase Required. The test case to update. * @param updateMask Required. The mask to specify which fields should be updated. The * [`creationTime`][google.cloud.dialogflow.cx.v3beta1.TestCase.creation_time] and @@ -395,6 +626,19 @@ public final TestCase updateTestCase(TestCase testCase, FieldMask updateMask) { /** * Updates the specified test case. * + *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   UpdateTestCaseRequest request =
+   *       UpdateTestCaseRequest.newBuilder()
+   *           .setTestCase(TestCase.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   TestCase response = testCasesClient.updateTestCase(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -407,6 +651,19 @@ public final TestCase updateTestCase(UpdateTestCaseRequest request) { * Updates the specified test case. * *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   UpdateTestCaseRequest request =
+   *       UpdateTestCaseRequest.newBuilder()
+   *           .setTestCase(TestCase.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = testCasesClient.updateTestCaseCallable().futureCall(request);
+   *   // Do something.
+   *   TestCase response = future.get();
+   * }
+   * }
*/ public final UnaryCallable updateTestCaseCallable() { return stub.updateTestCaseCallable(); @@ -416,6 +673,22 @@ public final UnaryCallable updateTestCaseCallab /** * Kicks off a test case run. * + *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   RunTestCaseRequest request =
+   *       RunTestCaseRequest.newBuilder()
+   *           .setName(
+   *               TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString())
+   *           .setEnvironment(
+   *               EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]")
+   *                   .toString())
+   *           .build();
+   *   RunTestCaseResponse response = testCasesClient.runTestCaseAsync(request).get();
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -429,6 +702,23 @@ public final OperationFuture runTestCa * Kicks off a test case run. * *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   RunTestCaseRequest request =
+   *       RunTestCaseRequest.newBuilder()
+   *           .setName(
+   *               TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString())
+   *           .setEnvironment(
+   *               EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]")
+   *                   .toString())
+   *           .build();
+   *   OperationFuture future =
+   *       testCasesClient.runTestCaseOperationCallable().futureCall(request);
+   *   // Do something.
+   *   RunTestCaseResponse response = future.get();
+   * }
+   * }
*/ public final OperationCallable runTestCaseOperationCallable() { @@ -440,6 +730,22 @@ public final OperationFuture runTestCa * Kicks off a test case run. * *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   RunTestCaseRequest request =
+   *       RunTestCaseRequest.newBuilder()
+   *           .setName(
+   *               TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString())
+   *           .setEnvironment(
+   *               EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future = testCasesClient.runTestCaseCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
*/ public final UnaryCallable runTestCaseCallable() { return stub.runTestCaseCallable(); @@ -449,6 +755,23 @@ public final UnaryCallable runTestCaseCallable() /** * Kicks off a batch run of test cases. * + *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   BatchRunTestCasesRequest request =
+   *       BatchRunTestCasesRequest.newBuilder()
+   *           .setParent(
+   *               TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString())
+   *           .setEnvironment(
+   *               EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]")
+   *                   .toString())
+   *           .addAllTestCases(new ArrayList())
+   *           .build();
+   *   BatchRunTestCasesResponse response = testCasesClient.batchRunTestCasesAsync(request).get();
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -462,6 +785,24 @@ public final UnaryCallable runTestCaseCallable() * Kicks off a batch run of test cases. * *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   BatchRunTestCasesRequest request =
+   *       BatchRunTestCasesRequest.newBuilder()
+   *           .setParent(
+   *               TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString())
+   *           .setEnvironment(
+   *               EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]")
+   *                   .toString())
+   *           .addAllTestCases(new ArrayList())
+   *           .build();
+   *   OperationFuture future =
+   *       testCasesClient.batchRunTestCasesOperationCallable().futureCall(request);
+   *   // Do something.
+   *   BatchRunTestCasesResponse response = future.get();
+   * }
+   * }
*/ public final OperationCallable< BatchRunTestCasesRequest, BatchRunTestCasesResponse, BatchRunTestCasesMetadata> @@ -474,6 +815,23 @@ public final UnaryCallable runTestCaseCallable() * Kicks off a batch run of test cases. * *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   BatchRunTestCasesRequest request =
+   *       BatchRunTestCasesRequest.newBuilder()
+   *           .setParent(
+   *               TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString())
+   *           .setEnvironment(
+   *               EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]")
+   *                   .toString())
+   *           .addAllTestCases(new ArrayList())
+   *           .build();
+   *   ApiFuture future = testCasesClient.batchRunTestCasesCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
*/ public final UnaryCallable batchRunTestCasesCallable() { return stub.batchRunTestCasesCallable(); @@ -483,6 +841,18 @@ public final UnaryCallable batchRunTestCase /** * Calculates the test coverage for an agent. * + *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   CalculateCoverageRequest request =
+   *       CalculateCoverageRequest.newBuilder()
+   *           .setAgent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .build();
+   *   CalculateCoverageResponse response = testCasesClient.calculateCoverage(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -495,6 +865,19 @@ public final CalculateCoverageResponse calculateCoverage(CalculateCoverageReques * Calculates the test coverage for an agent. * *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   CalculateCoverageRequest request =
+   *       CalculateCoverageRequest.newBuilder()
+   *           .setAgent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       testCasesClient.calculateCoverageCallable().futureCall(request);
+   *   // Do something.
+   *   CalculateCoverageResponse response = future.get();
+   * }
+   * }
*/ public final UnaryCallable calculateCoverageCallable() { @@ -507,6 +890,19 @@ public final CalculateCoverageResponse calculateCoverage(CalculateCoverageReques * cases and won't overwite any existing ones. The provided ID in the imported test case is * neglected. * + *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   ImportTestCasesRequest request =
+   *       ImportTestCasesRequest.newBuilder()
+   *           .setParent(
+   *               TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString())
+   *           .build();
+   *   ImportTestCasesResponse response = testCasesClient.importTestCasesAsync(request).get();
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -522,6 +918,20 @@ public final CalculateCoverageResponse calculateCoverage(CalculateCoverageReques * neglected. * *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   ImportTestCasesRequest request =
+   *       ImportTestCasesRequest.newBuilder()
+   *           .setParent(
+   *               TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString())
+   *           .build();
+   *   OperationFuture future =
+   *       testCasesClient.importTestCasesOperationCallable().futureCall(request);
+   *   // Do something.
+   *   ImportTestCasesResponse response = future.get();
+   * }
+   * }
*/ public final OperationCallable< ImportTestCasesRequest, ImportTestCasesResponse, ImportTestCasesMetadata> @@ -536,6 +946,19 @@ public final CalculateCoverageResponse calculateCoverage(CalculateCoverageReques * neglected. * *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   ImportTestCasesRequest request =
+   *       ImportTestCasesRequest.newBuilder()
+   *           .setParent(
+   *               TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString())
+   *           .build();
+   *   ApiFuture future = testCasesClient.importTestCasesCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
*/ public final UnaryCallable importTestCasesCallable() { return stub.importTestCasesCallable(); @@ -546,6 +969,20 @@ public final UnaryCallable importTestCasesCal * 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. * + *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   ExportTestCasesRequest request =
+   *       ExportTestCasesRequest.newBuilder()
+   *           .setParent(
+   *               TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   ExportTestCasesResponse response = testCasesClient.exportTestCasesAsync(request).get();
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -560,6 +997,21 @@ public final UnaryCallable importTestCasesCal * applied to export a subset of test cases. * *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   ExportTestCasesRequest request =
+   *       ExportTestCasesRequest.newBuilder()
+   *           .setParent(
+   *               TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   OperationFuture future =
+   *       testCasesClient.exportTestCasesOperationCallable().futureCall(request);
+   *   // Do something.
+   *   ExportTestCasesResponse response = future.get();
+   * }
+   * }
*/ public final OperationCallable< ExportTestCasesRequest, ExportTestCasesResponse, ExportTestCasesMetadata> @@ -573,6 +1025,20 @@ public final UnaryCallable importTestCasesCal * applied to export a subset of test cases. * *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   ExportTestCasesRequest request =
+   *       ExportTestCasesRequest.newBuilder()
+   *           .setParent(
+   *               TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   ApiFuture future = testCasesClient.exportTestCasesCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
*/ public final UnaryCallable exportTestCasesCallable() { return stub.exportTestCasesCallable(); @@ -582,6 +1048,17 @@ public final UnaryCallable exportTestCasesCal /** * Fetches a list of results for a given test case. * + *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   TestCaseName parent = TestCaseName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]");
+   *   for (TestCaseResult element : testCasesClient.listTestCaseResults(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The test case to list results for. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/ testCases/<TestCase * ID>`. Specify a `-` as a wildcard for TestCase ID to list results across multiple test @@ -600,6 +1077,19 @@ public final ListTestCaseResultsPagedResponse listTestCaseResults(TestCaseName p /** * Fetches a list of results for a given test case. * + *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   String parent =
+   *       TestCaseResultName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]", "[RESULT]")
+   *           .toString();
+   *   for (TestCaseResult element : testCasesClient.listTestCaseResults(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The test case to list results for. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/ testCases/<TestCase * ID>`. Specify a `-` as a wildcard for TestCase ID to list results across multiple test @@ -616,6 +1106,26 @@ public final ListTestCaseResultsPagedResponse listTestCaseResults(String parent) /** * Fetches a list of results for a given test case. * + *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   ListTestCaseResultsRequest request =
+   *       ListTestCaseResultsRequest.newBuilder()
+   *           .setParent(
+   *               TestCaseResultName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]", "[RESULT]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   for (TestCaseResult element : testCasesClient.listTestCaseResults(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -629,6 +1139,27 @@ public final ListTestCaseResultsPagedResponse listTestCaseResults( * Fetches a list of results for a given test case. * *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   ListTestCaseResultsRequest request =
+   *       ListTestCaseResultsRequest.newBuilder()
+   *           .setParent(
+   *               TestCaseResultName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]", "[RESULT]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   ApiFuture future =
+   *       testCasesClient.listTestCaseResultsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (TestCaseResult element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listTestCaseResultsPagedCallable() { @@ -640,6 +1171,24 @@ public final ListTestCaseResultsPagedResponse listTestCaseResults( * Fetches a list of results for a given test case. * *

Sample code: + * + *

{@code
+   * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+   *   while (true) {
+   *     ListTestCaseResultsResponse response =
+   *         testCasesClient.listTestCaseResultsCallable().call(request);
+   *     for (TestCaseResult element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listTestCaseResultsCallable() { diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupsClient.java index 42655795f..2bf3e427c 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupsClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupsClient.java @@ -44,6 +44,16 @@ *

This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: * + *

{@code
+ * try (TransitionRouteGroupsClient transitionRouteGroupsClient =
+ *     TransitionRouteGroupsClient.create()) {
+ *   TransitionRouteGroupName name =
+ *       TransitionRouteGroupName.of(
+ *           "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]");
+ *   TransitionRouteGroup response = transitionRouteGroupsClient.getTransitionRouteGroup(name);
+ * }
+ * }
+ * *

Note: close() needs to be called on the TransitionRouteGroupsClient object to clean up * resources such as threads. In the example above, try-with-resources is used, which automatically * calls close(). @@ -151,6 +161,19 @@ public TransitionRouteGroupsStub getStub() { /** * Returns the list of all transition route groups in the specified flow. * + *

Sample code: + * + *

{@code
+   * try (TransitionRouteGroupsClient transitionRouteGroupsClient =
+   *     TransitionRouteGroupsClient.create()) {
+   *   FlowName parent = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]");
+   *   for (TransitionRouteGroup element :
+   *       transitionRouteGroupsClient.listTransitionRouteGroups(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The flow to list all transition route groups for. Format: * `projects/<Project ID>/locations/<Location ID>/agents/<Agent * ID>/flows/<Flow ID>`. @@ -168,6 +191,22 @@ public final ListTransitionRouteGroupsPagedResponse listTransitionRouteGroups(Fl /** * Returns the list of all transition route groups in the specified flow. * + *

Sample code: + * + *

{@code
+   * try (TransitionRouteGroupsClient transitionRouteGroupsClient =
+   *     TransitionRouteGroupsClient.create()) {
+   *   String parent =
+   *       TransitionRouteGroupName.of(
+   *               "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]")
+   *           .toString();
+   *   for (TransitionRouteGroup element :
+   *       transitionRouteGroupsClient.listTransitionRouteGroups(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The flow to list all transition route groups for. Format: * `projects/<Project ID>/locations/<Location ID>/agents/<Agent * ID>/flows/<Flow ID>`. @@ -183,6 +222,32 @@ public final ListTransitionRouteGroupsPagedResponse listTransitionRouteGroups(St /** * Returns the list of all transition route groups in the specified flow. * + *

Sample code: + * + *

{@code
+   * try (TransitionRouteGroupsClient transitionRouteGroupsClient =
+   *     TransitionRouteGroupsClient.create()) {
+   *   ListTransitionRouteGroupsRequest request =
+   *       ListTransitionRouteGroupsRequest.newBuilder()
+   *           .setParent(
+   *               TransitionRouteGroupName.of(
+   *                       "[PROJECT]",
+   *                       "[LOCATION]",
+   *                       "[AGENT]",
+   *                       "[FLOW]",
+   *                       "[TRANSITION_ROUTE_GROUP]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   for (TransitionRouteGroup element :
+   *       transitionRouteGroupsClient.listTransitionRouteGroups(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -196,6 +261,32 @@ public final ListTransitionRouteGroupsPagedResponse listTransitionRouteGroups( * Returns the list of all transition route groups in the specified flow. * *

Sample code: + * + *

{@code
+   * try (TransitionRouteGroupsClient transitionRouteGroupsClient =
+   *     TransitionRouteGroupsClient.create()) {
+   *   ListTransitionRouteGroupsRequest request =
+   *       ListTransitionRouteGroupsRequest.newBuilder()
+   *           .setParent(
+   *               TransitionRouteGroupName.of(
+   *                       "[PROJECT]",
+   *                       "[LOCATION]",
+   *                       "[AGENT]",
+   *                       "[FLOW]",
+   *                       "[TRANSITION_ROUTE_GROUP]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   ApiFuture future =
+   *       transitionRouteGroupsClient.listTransitionRouteGroupsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (TransitionRouteGroup element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable< ListTransitionRouteGroupsRequest, ListTransitionRouteGroupsPagedResponse> @@ -208,6 +299,25 @@ public final ListTransitionRouteGroupsPagedResponse listTransitionRouteGroups( * Returns the list of all transition route groups in the specified flow. * *

Sample code: + * + *

{@code
+   * try (TransitionRouteGroupsClient transitionRouteGroupsClient =
+   *     TransitionRouteGroupsClient.create()) {
+   *   while (true) {
+   *     ListTransitionRouteGroupsResponse response =
+   *         transitionRouteGroupsClient.listTransitionRouteGroupsCallable().call(request);
+   *     for (TransitionRouteGroup element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listTransitionRouteGroupsCallable() { @@ -219,6 +329,18 @@ public final ListTransitionRouteGroupsPagedResponse listTransitionRouteGroups( * Retrieves the specified * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup]. * + *

Sample code: + * + *

{@code
+   * try (TransitionRouteGroupsClient transitionRouteGroupsClient =
+   *     TransitionRouteGroupsClient.create()) {
+   *   TransitionRouteGroupName name =
+   *       TransitionRouteGroupName.of(
+   *           "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]");
+   *   TransitionRouteGroup response = transitionRouteGroupsClient.getTransitionRouteGroup(name);
+   * }
+   * }
+ * * @param name Required. The name of the * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup]. Format: * `projects/<Project ID>/locations/<Location ID>/agents/<Agent @@ -238,6 +360,19 @@ public final TransitionRouteGroup getTransitionRouteGroup(TransitionRouteGroupNa * Retrieves the specified * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup]. * + *

Sample code: + * + *

{@code
+   * try (TransitionRouteGroupsClient transitionRouteGroupsClient =
+   *     TransitionRouteGroupsClient.create()) {
+   *   String name =
+   *       TransitionRouteGroupName.of(
+   *               "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]")
+   *           .toString();
+   *   TransitionRouteGroup response = transitionRouteGroupsClient.getTransitionRouteGroup(name);
+   * }
+   * }
+ * * @param name Required. The name of the * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup]. Format: * `projects/<Project ID>/locations/<Location ID>/agents/<Agent @@ -255,6 +390,27 @@ public final TransitionRouteGroup getTransitionRouteGroup(String name) { * Retrieves the specified * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup]. * + *

Sample code: + * + *

{@code
+   * try (TransitionRouteGroupsClient transitionRouteGroupsClient =
+   *     TransitionRouteGroupsClient.create()) {
+   *   GetTransitionRouteGroupRequest request =
+   *       GetTransitionRouteGroupRequest.newBuilder()
+   *           .setName(
+   *               TransitionRouteGroupName.of(
+   *                       "[PROJECT]",
+   *                       "[LOCATION]",
+   *                       "[AGENT]",
+   *                       "[FLOW]",
+   *                       "[TRANSITION_ROUTE_GROUP]")
+   *                   .toString())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   TransitionRouteGroup response = transitionRouteGroupsClient.getTransitionRouteGroup(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -269,6 +425,28 @@ public final TransitionRouteGroup getTransitionRouteGroup( * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup]. * *

Sample code: + * + *

{@code
+   * try (TransitionRouteGroupsClient transitionRouteGroupsClient =
+   *     TransitionRouteGroupsClient.create()) {
+   *   GetTransitionRouteGroupRequest request =
+   *       GetTransitionRouteGroupRequest.newBuilder()
+   *           .setName(
+   *               TransitionRouteGroupName.of(
+   *                       "[PROJECT]",
+   *                       "[LOCATION]",
+   *                       "[AGENT]",
+   *                       "[FLOW]",
+   *                       "[TRANSITION_ROUTE_GROUP]")
+   *                   .toString())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   ApiFuture future =
+   *       transitionRouteGroupsClient.getTransitionRouteGroupCallable().futureCall(request);
+   *   // Do something.
+   *   TransitionRouteGroup response = future.get();
+   * }
+   * }
*/ public final UnaryCallable getTransitionRouteGroupCallable() { @@ -280,6 +458,18 @@ public final TransitionRouteGroup getTransitionRouteGroup( * Creates an [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup] in * the specified flow. * + *

Sample code: + * + *

{@code
+   * try (TransitionRouteGroupsClient transitionRouteGroupsClient =
+   *     TransitionRouteGroupsClient.create()) {
+   *   FlowName parent = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]");
+   *   TransitionRouteGroup transitionRouteGroup = TransitionRouteGroup.newBuilder().build();
+   *   TransitionRouteGroup response =
+   *       transitionRouteGroupsClient.createTransitionRouteGroup(parent, transitionRouteGroup);
+   * }
+   * }
+ * * @param parent Required. The flow to create an * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup] for. * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent @@ -302,6 +492,21 @@ public final TransitionRouteGroup createTransitionRouteGroup( * Creates an [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup] in * the specified flow. * + *

Sample code: + * + *

{@code
+   * try (TransitionRouteGroupsClient transitionRouteGroupsClient =
+   *     TransitionRouteGroupsClient.create()) {
+   *   String parent =
+   *       TransitionRouteGroupName.of(
+   *               "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]")
+   *           .toString();
+   *   TransitionRouteGroup transitionRouteGroup = TransitionRouteGroup.newBuilder().build();
+   *   TransitionRouteGroup response =
+   *       transitionRouteGroupsClient.createTransitionRouteGroup(parent, transitionRouteGroup);
+   * }
+   * }
+ * * @param parent Required. The flow to create an * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup] for. * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent @@ -324,6 +529,29 @@ public final TransitionRouteGroup createTransitionRouteGroup( * Creates an [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup] in * the specified flow. * + *

Sample code: + * + *

{@code
+   * try (TransitionRouteGroupsClient transitionRouteGroupsClient =
+   *     TransitionRouteGroupsClient.create()) {
+   *   CreateTransitionRouteGroupRequest request =
+   *       CreateTransitionRouteGroupRequest.newBuilder()
+   *           .setParent(
+   *               TransitionRouteGroupName.of(
+   *                       "[PROJECT]",
+   *                       "[LOCATION]",
+   *                       "[AGENT]",
+   *                       "[FLOW]",
+   *                       "[TRANSITION_ROUTE_GROUP]")
+   *                   .toString())
+   *           .setTransitionRouteGroup(TransitionRouteGroup.newBuilder().build())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   TransitionRouteGroup response =
+   *       transitionRouteGroupsClient.createTransitionRouteGroup(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -338,6 +566,29 @@ public final TransitionRouteGroup createTransitionRouteGroup( * the specified flow. * *

Sample code: + * + *

{@code
+   * try (TransitionRouteGroupsClient transitionRouteGroupsClient =
+   *     TransitionRouteGroupsClient.create()) {
+   *   CreateTransitionRouteGroupRequest request =
+   *       CreateTransitionRouteGroupRequest.newBuilder()
+   *           .setParent(
+   *               TransitionRouteGroupName.of(
+   *                       "[PROJECT]",
+   *                       "[LOCATION]",
+   *                       "[AGENT]",
+   *                       "[FLOW]",
+   *                       "[TRANSITION_ROUTE_GROUP]")
+   *                   .toString())
+   *           .setTransitionRouteGroup(TransitionRouteGroup.newBuilder().build())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   ApiFuture future =
+   *       transitionRouteGroupsClient.createTransitionRouteGroupCallable().futureCall(request);
+   *   // Do something.
+   *   TransitionRouteGroup response = future.get();
+   * }
+   * }
*/ public final UnaryCallable createTransitionRouteGroupCallable() { @@ -349,6 +600,18 @@ public final TransitionRouteGroup createTransitionRouteGroup( * Updates the specified * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup]. * + *

Sample code: + * + *

{@code
+   * try (TransitionRouteGroupsClient transitionRouteGroupsClient =
+   *     TransitionRouteGroupsClient.create()) {
+   *   TransitionRouteGroup transitionRouteGroup = TransitionRouteGroup.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   TransitionRouteGroup response =
+   *       transitionRouteGroupsClient.updateTransitionRouteGroup(transitionRouteGroup, updateMask);
+   * }
+   * }
+ * * @param transitionRouteGroup Required. The transition route group to update. * @param updateMask The mask to control which fields get updated. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -368,6 +631,22 @@ public final TransitionRouteGroup updateTransitionRouteGroup( * Updates the specified * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup]. * + *

Sample code: + * + *

{@code
+   * try (TransitionRouteGroupsClient transitionRouteGroupsClient =
+   *     TransitionRouteGroupsClient.create()) {
+   *   UpdateTransitionRouteGroupRequest request =
+   *       UpdateTransitionRouteGroupRequest.newBuilder()
+   *           .setTransitionRouteGroup(TransitionRouteGroup.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   TransitionRouteGroup response =
+   *       transitionRouteGroupsClient.updateTransitionRouteGroup(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -382,6 +661,22 @@ public final TransitionRouteGroup updateTransitionRouteGroup( * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup]. * *

Sample code: + * + *

{@code
+   * try (TransitionRouteGroupsClient transitionRouteGroupsClient =
+   *     TransitionRouteGroupsClient.create()) {
+   *   UpdateTransitionRouteGroupRequest request =
+   *       UpdateTransitionRouteGroupRequest.newBuilder()
+   *           .setTransitionRouteGroup(TransitionRouteGroup.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   ApiFuture future =
+   *       transitionRouteGroupsClient.updateTransitionRouteGroupCallable().futureCall(request);
+   *   // Do something.
+   *   TransitionRouteGroup response = future.get();
+   * }
+   * }
*/ public final UnaryCallable updateTransitionRouteGroupCallable() { @@ -393,6 +688,18 @@ public final TransitionRouteGroup updateTransitionRouteGroup( * Deletes the specified * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup]. * + *

Sample code: + * + *

{@code
+   * try (TransitionRouteGroupsClient transitionRouteGroupsClient =
+   *     TransitionRouteGroupsClient.create()) {
+   *   TransitionRouteGroupName name =
+   *       TransitionRouteGroupName.of(
+   *           "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]");
+   *   transitionRouteGroupsClient.deleteTransitionRouteGroup(name);
+   * }
+   * }
+ * * @param name Required. The name of the * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup] to delete. * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent @@ -412,6 +719,19 @@ public final void deleteTransitionRouteGroup(TransitionRouteGroupName name) { * Deletes the specified * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup]. * + *

Sample code: + * + *

{@code
+   * try (TransitionRouteGroupsClient transitionRouteGroupsClient =
+   *     TransitionRouteGroupsClient.create()) {
+   *   String name =
+   *       TransitionRouteGroupName.of(
+   *               "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]")
+   *           .toString();
+   *   transitionRouteGroupsClient.deleteTransitionRouteGroup(name);
+   * }
+   * }
+ * * @param name Required. The name of the * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup] to delete. * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent @@ -429,6 +749,27 @@ public final void deleteTransitionRouteGroup(String name) { * Deletes the specified * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup]. * + *

Sample code: + * + *

{@code
+   * try (TransitionRouteGroupsClient transitionRouteGroupsClient =
+   *     TransitionRouteGroupsClient.create()) {
+   *   DeleteTransitionRouteGroupRequest request =
+   *       DeleteTransitionRouteGroupRequest.newBuilder()
+   *           .setName(
+   *               TransitionRouteGroupName.of(
+   *                       "[PROJECT]",
+   *                       "[LOCATION]",
+   *                       "[AGENT]",
+   *                       "[FLOW]",
+   *                       "[TRANSITION_ROUTE_GROUP]")
+   *                   .toString())
+   *           .setForce(true)
+   *           .build();
+   *   transitionRouteGroupsClient.deleteTransitionRouteGroup(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -442,6 +783,28 @@ public final void deleteTransitionRouteGroup(DeleteTransitionRouteGroupRequest r * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup]. * *

Sample code: + * + *

{@code
+   * try (TransitionRouteGroupsClient transitionRouteGroupsClient =
+   *     TransitionRouteGroupsClient.create()) {
+   *   DeleteTransitionRouteGroupRequest request =
+   *       DeleteTransitionRouteGroupRequest.newBuilder()
+   *           .setName(
+   *               TransitionRouteGroupName.of(
+   *                       "[PROJECT]",
+   *                       "[LOCATION]",
+   *                       "[AGENT]",
+   *                       "[FLOW]",
+   *                       "[TRANSITION_ROUTE_GROUP]")
+   *                   .toString())
+   *           .setForce(true)
+   *           .build();
+   *   ApiFuture future =
+   *       transitionRouteGroupsClient.deleteTransitionRouteGroupCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final UnaryCallable deleteTransitionRouteGroupCallable() { diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VersionsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VersionsClient.java index 6c67a3d86..3e506f656 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VersionsClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VersionsClient.java @@ -48,6 +48,14 @@ *

This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: * + *

{@code
+ * try (VersionsClient versionsClient = VersionsClient.create()) {
+ *   VersionName name =
+ *       VersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]");
+ *   Version response = versionsClient.getVersion(name);
+ * }
+ * }
+ * *

Note: close() needs to be called on the VersionsClient object to clean up resources such as * threads. In the example above, try-with-resources is used, which automatically calls close(). * @@ -162,6 +170,17 @@ public final OperationsClient getOperationsClient() { * Returns the list of all versions in the specified * [Flow][google.cloud.dialogflow.cx.v3beta1.Flow]. * + *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   FlowName parent = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]");
+   *   for (Version element : versionsClient.listVersions(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The [Flow][google.cloud.dialogflow.cx.v3beta1.Flow] to list all * versions for. Format: `projects/<Project ID>/locations/<Location * ID>/agents/<Agent ID>/flows/<Flow ID>`. @@ -180,6 +199,18 @@ public final ListVersionsPagedResponse listVersions(FlowName parent) { * Returns the list of all versions in the specified * [Flow][google.cloud.dialogflow.cx.v3beta1.Flow]. * + *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   String parent =
+   *       VersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]").toString();
+   *   for (Version element : versionsClient.listVersions(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The [Flow][google.cloud.dialogflow.cx.v3beta1.Flow] to list all * versions for. Format: `projects/<Project ID>/locations/<Location * ID>/agents/<Agent ID>/flows/<Flow ID>`. @@ -195,6 +226,24 @@ public final ListVersionsPagedResponse listVersions(String parent) { * Returns the list of all versions in the specified * [Flow][google.cloud.dialogflow.cx.v3beta1.Flow]. * + *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   ListVersionsRequest request =
+   *       ListVersionsRequest.newBuilder()
+   *           .setParent(
+   *               VersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Version element : versionsClient.listVersions(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -208,6 +257,24 @@ public final ListVersionsPagedResponse listVersions(ListVersionsRequest request) * [Flow][google.cloud.dialogflow.cx.v3beta1.Flow]. * *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   ListVersionsRequest request =
+   *       ListVersionsRequest.newBuilder()
+   *           .setParent(
+   *               VersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future = versionsClient.listVersionsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Version element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listVersionsPagedCallable() { @@ -220,6 +287,23 @@ public final ListVersionsPagedResponse listVersions(ListVersionsRequest request) * [Flow][google.cloud.dialogflow.cx.v3beta1.Flow]. * *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   while (true) {
+   *     ListVersionsResponse response = versionsClient.listVersionsCallable().call(request);
+   *     for (Version element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listVersionsCallable() { return stub.listVersionsCallable(); @@ -229,6 +313,16 @@ public final UnaryCallable listVersio /** * Retrieves the specified [Version][google.cloud.dialogflow.cx.v3beta1.Version]. * + *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   VersionName name =
+   *       VersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]");
+   *   Version response = versionsClient.getVersion(name);
+   * }
+   * }
+ * * @param name Required. The name of the [Version][google.cloud.dialogflow.cx.v3beta1.Version]. * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent * ID>/flows/<Flow ID>/versions/<Version ID>`. @@ -244,6 +338,16 @@ public final Version getVersion(VersionName name) { /** * Retrieves the specified [Version][google.cloud.dialogflow.cx.v3beta1.Version]. * + *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   String name =
+   *       VersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]").toString();
+   *   Version response = versionsClient.getVersion(name);
+   * }
+   * }
+ * * @param name Required. The name of the [Version][google.cloud.dialogflow.cx.v3beta1.Version]. * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent * ID>/flows/<Flow ID>/versions/<Version ID>`. @@ -258,6 +362,20 @@ public final Version getVersion(String name) { /** * Retrieves the specified [Version][google.cloud.dialogflow.cx.v3beta1.Version]. * + *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   GetVersionRequest request =
+   *       GetVersionRequest.newBuilder()
+   *           .setName(
+   *               VersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]")
+   *                   .toString())
+   *           .build();
+   *   Version response = versionsClient.getVersion(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -270,6 +388,20 @@ public final Version getVersion(GetVersionRequest request) { * Retrieves the specified [Version][google.cloud.dialogflow.cx.v3beta1.Version]. * *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   GetVersionRequest request =
+   *       GetVersionRequest.newBuilder()
+   *           .setName(
+   *               VersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future = versionsClient.getVersionCallable().futureCall(request);
+   *   // Do something.
+   *   Version response = future.get();
+   * }
+   * }
*/ public final UnaryCallable getVersionCallable() { return stub.getVersionCallable(); @@ -280,6 +412,16 @@ public final UnaryCallable getVersionCallable() { * Creates a [Version][google.cloud.dialogflow.cx.v3beta1.Version] in the specified * [Flow][google.cloud.dialogflow.cx.v3beta1.Flow]. * + *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   FlowName parent = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]");
+   *   Version version = Version.newBuilder().build();
+   *   Version response = versionsClient.createVersionAsync(parent, version).get();
+   * }
+   * }
+ * * @param parent Required. The [Flow][google.cloud.dialogflow.cx.v3beta1.Flow] to create an * [Version][google.cloud.dialogflow.cx.v3beta1.Version] for. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>`. @@ -301,6 +443,17 @@ public final OperationFuture createVers * Creates a [Version][google.cloud.dialogflow.cx.v3beta1.Version] in the specified * [Flow][google.cloud.dialogflow.cx.v3beta1.Flow]. * + *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   String parent =
+   *       VersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]").toString();
+   *   Version version = Version.newBuilder().build();
+   *   Version response = versionsClient.createVersionAsync(parent, version).get();
+   * }
+   * }
+ * * @param parent Required. The [Flow][google.cloud.dialogflow.cx.v3beta1.Flow] to create an * [Version][google.cloud.dialogflow.cx.v3beta1.Version] for. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>`. @@ -319,6 +472,21 @@ public final OperationFuture createVers * Creates a [Version][google.cloud.dialogflow.cx.v3beta1.Version] in the specified * [Flow][google.cloud.dialogflow.cx.v3beta1.Flow]. * + *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   CreateVersionRequest request =
+   *       CreateVersionRequest.newBuilder()
+   *           .setParent(
+   *               VersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]")
+   *                   .toString())
+   *           .setVersion(Version.newBuilder().build())
+   *           .build();
+   *   Version response = versionsClient.createVersionAsync(request).get();
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -333,6 +501,22 @@ public final OperationFuture createVers * [Flow][google.cloud.dialogflow.cx.v3beta1.Flow]. * *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   CreateVersionRequest request =
+   *       CreateVersionRequest.newBuilder()
+   *           .setParent(
+   *               VersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]")
+   *                   .toString())
+   *           .setVersion(Version.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       versionsClient.createVersionOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Version response = future.get();
+   * }
+   * }
*/ public final OperationCallable createVersionOperationCallable() { @@ -345,6 +529,21 @@ public final OperationFuture createVers * [Flow][google.cloud.dialogflow.cx.v3beta1.Flow]. * *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   CreateVersionRequest request =
+   *       CreateVersionRequest.newBuilder()
+   *           .setParent(
+   *               VersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]")
+   *                   .toString())
+   *           .setVersion(Version.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = versionsClient.createVersionCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
*/ public final UnaryCallable createVersionCallable() { return stub.createVersionCallable(); @@ -354,6 +553,16 @@ public final UnaryCallable createVersionCallabl /** * Updates the specified [Version][google.cloud.dialogflow.cx.v3beta1.Version]. * + *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   Version version = Version.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Version response = versionsClient.updateVersion(version, updateMask);
+   * }
+   * }
+ * * @param version Required. The version to update. * @param updateMask Required. The mask to control which fields get updated. Currently only * `description` and `display_name` can be updated. @@ -369,6 +578,19 @@ public final Version updateVersion(Version version, FieldMask updateMask) { /** * Updates the specified [Version][google.cloud.dialogflow.cx.v3beta1.Version]. * + *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   UpdateVersionRequest request =
+   *       UpdateVersionRequest.newBuilder()
+   *           .setVersion(Version.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Version response = versionsClient.updateVersion(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -381,6 +603,19 @@ public final Version updateVersion(UpdateVersionRequest request) { * Updates the specified [Version][google.cloud.dialogflow.cx.v3beta1.Version]. * *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   UpdateVersionRequest request =
+   *       UpdateVersionRequest.newBuilder()
+   *           .setVersion(Version.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = versionsClient.updateVersionCallable().futureCall(request);
+   *   // Do something.
+   *   Version response = future.get();
+   * }
+   * }
*/ public final UnaryCallable updateVersionCallable() { return stub.updateVersionCallable(); @@ -390,6 +625,16 @@ public final UnaryCallable updateVersionCallable( /** * Deletes the specified [Version][google.cloud.dialogflow.cx.v3beta1.Version]. * + *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   VersionName name =
+   *       VersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]");
+   *   versionsClient.deleteVersion(name);
+   * }
+   * }
+ * * @param name Required. The name of the [Version][google.cloud.dialogflow.cx.v3beta1.Version] to * delete. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent * ID>/flows/<Flow ID>/versions/<Version ID>`. @@ -405,6 +650,16 @@ public final void deleteVersion(VersionName name) { /** * Deletes the specified [Version][google.cloud.dialogflow.cx.v3beta1.Version]. * + *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   String name =
+   *       VersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]").toString();
+   *   versionsClient.deleteVersion(name);
+   * }
+   * }
+ * * @param name Required. The name of the [Version][google.cloud.dialogflow.cx.v3beta1.Version] to * delete. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent * ID>/flows/<Flow ID>/versions/<Version ID>`. @@ -419,6 +674,20 @@ public final void deleteVersion(String name) { /** * Deletes the specified [Version][google.cloud.dialogflow.cx.v3beta1.Version]. * + *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   DeleteVersionRequest request =
+   *       DeleteVersionRequest.newBuilder()
+   *           .setName(
+   *               VersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]")
+   *                   .toString())
+   *           .build();
+   *   versionsClient.deleteVersion(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -431,6 +700,20 @@ public final void deleteVersion(DeleteVersionRequest request) { * Deletes the specified [Version][google.cloud.dialogflow.cx.v3beta1.Version]. * *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   DeleteVersionRequest request =
+   *       DeleteVersionRequest.newBuilder()
+   *           .setName(
+   *               VersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future = versionsClient.deleteVersionCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final UnaryCallable deleteVersionCallable() { return stub.deleteVersionCallable(); @@ -440,6 +723,16 @@ public final UnaryCallable deleteVersionCallable() /** * Loads a specified version to draft version. * + *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   VersionName name =
+   *       VersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]");
+   *   versionsClient.loadVersionAsync(name).get();
+   * }
+   * }
+ * * @param name Required. The [Version][google.cloud.dialogflow.cx.v3beta1.Version] to be loaded to * draft version. Format: `projects/<Project ID>/locations/<Location * ID>/agents/<Agent ID>/flows/<Flow ID>/versions/<Version ID>`. @@ -455,6 +748,16 @@ public final OperationFuture loadVersionAsync(VersionName name) { /** * Loads a specified version to draft version. * + *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   String name =
+   *       VersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]").toString();
+   *   versionsClient.loadVersionAsync(name).get();
+   * }
+   * }
+ * * @param name Required. The [Version][google.cloud.dialogflow.cx.v3beta1.Version] to be loaded to * draft version. Format: `projects/<Project ID>/locations/<Location * ID>/agents/<Agent ID>/flows/<Flow ID>/versions/<Version ID>`. @@ -469,6 +772,21 @@ public final OperationFuture loadVersionAsync(String name) { /** * Loads a specified version to draft version. * + *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   LoadVersionRequest request =
+   *       LoadVersionRequest.newBuilder()
+   *           .setName(
+   *               VersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]")
+   *                   .toString())
+   *           .setAllowOverrideAgentResources(true)
+   *           .build();
+   *   versionsClient.loadVersionAsync(request).get();
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -481,6 +799,22 @@ public final OperationFuture loadVersionAsync(LoadVersionRequest * Loads a specified version to draft version. * *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   LoadVersionRequest request =
+   *       LoadVersionRequest.newBuilder()
+   *           .setName(
+   *               VersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]")
+   *                   .toString())
+   *           .setAllowOverrideAgentResources(true)
+   *           .build();
+   *   OperationFuture future =
+   *       versionsClient.loadVersionOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final OperationCallable loadVersionOperationCallable() { return stub.loadVersionOperationCallable(); @@ -491,6 +825,21 @@ public final OperationCallable loadVersionOpe * Loads a specified version to draft version. * *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   LoadVersionRequest request =
+   *       LoadVersionRequest.newBuilder()
+   *           .setName(
+   *               VersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]")
+   *                   .toString())
+   *           .setAllowOverrideAgentResources(true)
+   *           .build();
+   *   ApiFuture future = versionsClient.loadVersionCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final UnaryCallable loadVersionCallable() { return stub.loadVersionCallable(); diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/WebhooksClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/WebhooksClient.java index 226be5b0a..0ba420242 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/WebhooksClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/WebhooksClient.java @@ -43,6 +43,13 @@ *

This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: * + *

{@code
+ * try (WebhooksClient webhooksClient = WebhooksClient.create()) {
+ *   WebhookName name = WebhookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[WEBHOOK]");
+ *   Webhook response = webhooksClient.getWebhook(name);
+ * }
+ * }
+ * *

Note: close() needs to be called on the WebhooksClient object to clean up resources such as * threads. In the example above, try-with-resources is used, which automatically calls close(). * @@ -145,6 +152,17 @@ public WebhooksStub getStub() { /** * Returns the list of all webhooks in the specified agent. * + *

Sample code: + * + *

{@code
+   * try (WebhooksClient webhooksClient = WebhooksClient.create()) {
+   *   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+   *   for (Webhook element : webhooksClient.listWebhooks(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The agent to list all webhooks for. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -161,6 +179,17 @@ public final ListWebhooksPagedResponse listWebhooks(AgentName parent) { /** * Returns the list of all webhooks in the specified agent. * + *

Sample code: + * + *

{@code
+   * try (WebhooksClient webhooksClient = WebhooksClient.create()) {
+   *   String parent = WebhookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[WEBHOOK]").toString();
+   *   for (Webhook element : webhooksClient.listWebhooks(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The agent to list all webhooks for. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -174,6 +203,23 @@ public final ListWebhooksPagedResponse listWebhooks(String parent) { /** * Returns the list of all webhooks in the specified agent. * + *

Sample code: + * + *

{@code
+   * try (WebhooksClient webhooksClient = WebhooksClient.create()) {
+   *   ListWebhooksRequest request =
+   *       ListWebhooksRequest.newBuilder()
+   *           .setParent(
+   *               WebhookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[WEBHOOK]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Webhook element : webhooksClient.listWebhooks(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -186,6 +232,23 @@ public final ListWebhooksPagedResponse listWebhooks(ListWebhooksRequest request) * Returns the list of all webhooks in the specified agent. * *

Sample code: + * + *

{@code
+   * try (WebhooksClient webhooksClient = WebhooksClient.create()) {
+   *   ListWebhooksRequest request =
+   *       ListWebhooksRequest.newBuilder()
+   *           .setParent(
+   *               WebhookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[WEBHOOK]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future = webhooksClient.listWebhooksPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Webhook element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listWebhooksPagedCallable() { @@ -197,6 +260,23 @@ public final ListWebhooksPagedResponse listWebhooks(ListWebhooksRequest request) * Returns the list of all webhooks in the specified agent. * *

Sample code: + * + *

{@code
+   * try (WebhooksClient webhooksClient = WebhooksClient.create()) {
+   *   while (true) {
+   *     ListWebhooksResponse response = webhooksClient.listWebhooksCallable().call(request);
+   *     for (Webhook element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listWebhooksCallable() { return stub.listWebhooksCallable(); @@ -206,6 +286,15 @@ public final UnaryCallable listWebhoo /** * Retrieves the specified webhook. * + *

Sample code: + * + *

{@code
+   * try (WebhooksClient webhooksClient = WebhooksClient.create()) {
+   *   WebhookName name = WebhookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[WEBHOOK]");
+   *   Webhook response = webhooksClient.getWebhook(name);
+   * }
+   * }
+ * * @param name Required. The name of the webhook. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/webhooks/<Webhook ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -220,6 +309,15 @@ public final Webhook getWebhook(WebhookName name) { /** * Retrieves the specified webhook. * + *

Sample code: + * + *

{@code
+   * try (WebhooksClient webhooksClient = WebhooksClient.create()) {
+   *   String name = WebhookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[WEBHOOK]").toString();
+   *   Webhook response = webhooksClient.getWebhook(name);
+   * }
+   * }
+ * * @param name Required. The name of the webhook. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/webhooks/<Webhook ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -233,6 +331,18 @@ public final Webhook getWebhook(String name) { /** * Retrieves the specified webhook. * + *

Sample code: + * + *

{@code
+   * try (WebhooksClient webhooksClient = WebhooksClient.create()) {
+   *   GetWebhookRequest request =
+   *       GetWebhookRequest.newBuilder()
+   *           .setName(WebhookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[WEBHOOK]").toString())
+   *           .build();
+   *   Webhook response = webhooksClient.getWebhook(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -245,6 +355,18 @@ public final Webhook getWebhook(GetWebhookRequest request) { * Retrieves the specified webhook. * *

Sample code: + * + *

{@code
+   * try (WebhooksClient webhooksClient = WebhooksClient.create()) {
+   *   GetWebhookRequest request =
+   *       GetWebhookRequest.newBuilder()
+   *           .setName(WebhookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[WEBHOOK]").toString())
+   *           .build();
+   *   ApiFuture future = webhooksClient.getWebhookCallable().futureCall(request);
+   *   // Do something.
+   *   Webhook response = future.get();
+   * }
+   * }
*/ public final UnaryCallable getWebhookCallable() { return stub.getWebhookCallable(); @@ -254,6 +376,16 @@ public final UnaryCallable getWebhookCallable() { /** * Creates a webhook in the specified agent. * + *

Sample code: + * + *

{@code
+   * try (WebhooksClient webhooksClient = WebhooksClient.create()) {
+   *   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+   *   Webhook webhook = Webhook.newBuilder().build();
+   *   Webhook response = webhooksClient.createWebhook(parent, webhook);
+   * }
+   * }
+ * * @param parent Required. The agent to create a webhook for. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>`. * @param webhook Required. The webhook to create. @@ -272,6 +404,16 @@ public final Webhook createWebhook(AgentName parent, Webhook webhook) { /** * Creates a webhook in the specified agent. * + *

Sample code: + * + *

{@code
+   * try (WebhooksClient webhooksClient = WebhooksClient.create()) {
+   *   String parent = WebhookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[WEBHOOK]").toString();
+   *   Webhook webhook = Webhook.newBuilder().build();
+   *   Webhook response = webhooksClient.createWebhook(parent, webhook);
+   * }
+   * }
+ * * @param parent Required. The agent to create a webhook for. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>`. * @param webhook Required. The webhook to create. @@ -287,6 +429,20 @@ public final Webhook createWebhook(String parent, Webhook webhook) { /** * Creates a webhook in the specified agent. * + *

Sample code: + * + *

{@code
+   * try (WebhooksClient webhooksClient = WebhooksClient.create()) {
+   *   CreateWebhookRequest request =
+   *       CreateWebhookRequest.newBuilder()
+   *           .setParent(
+   *               WebhookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[WEBHOOK]").toString())
+   *           .setWebhook(Webhook.newBuilder().build())
+   *           .build();
+   *   Webhook response = webhooksClient.createWebhook(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -299,6 +455,20 @@ public final Webhook createWebhook(CreateWebhookRequest request) { * Creates a webhook in the specified agent. * *

Sample code: + * + *

{@code
+   * try (WebhooksClient webhooksClient = WebhooksClient.create()) {
+   *   CreateWebhookRequest request =
+   *       CreateWebhookRequest.newBuilder()
+   *           .setParent(
+   *               WebhookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[WEBHOOK]").toString())
+   *           .setWebhook(Webhook.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = webhooksClient.createWebhookCallable().futureCall(request);
+   *   // Do something.
+   *   Webhook response = future.get();
+   * }
+   * }
*/ public final UnaryCallable createWebhookCallable() { return stub.createWebhookCallable(); @@ -308,6 +478,16 @@ public final UnaryCallable createWebhookCallable( /** * Updates the specified webhook. * + *

Sample code: + * + *

{@code
+   * try (WebhooksClient webhooksClient = WebhooksClient.create()) {
+   *   Webhook webhook = Webhook.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Webhook response = webhooksClient.updateWebhook(webhook, updateMask);
+   * }
+   * }
+ * * @param webhook Required. The webhook to update. * @param updateMask The mask to control which fields get updated. If the mask is not present, all * fields will be updated. @@ -323,6 +503,19 @@ public final Webhook updateWebhook(Webhook webhook, FieldMask updateMask) { /** * Updates the specified webhook. * + *

Sample code: + * + *

{@code
+   * try (WebhooksClient webhooksClient = WebhooksClient.create()) {
+   *   UpdateWebhookRequest request =
+   *       UpdateWebhookRequest.newBuilder()
+   *           .setWebhook(Webhook.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Webhook response = webhooksClient.updateWebhook(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -335,6 +528,19 @@ public final Webhook updateWebhook(UpdateWebhookRequest request) { * Updates the specified webhook. * *

Sample code: + * + *

{@code
+   * try (WebhooksClient webhooksClient = WebhooksClient.create()) {
+   *   UpdateWebhookRequest request =
+   *       UpdateWebhookRequest.newBuilder()
+   *           .setWebhook(Webhook.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = webhooksClient.updateWebhookCallable().futureCall(request);
+   *   // Do something.
+   *   Webhook response = future.get();
+   * }
+   * }
*/ public final UnaryCallable updateWebhookCallable() { return stub.updateWebhookCallable(); @@ -344,6 +550,15 @@ public final UnaryCallable updateWebhookCallable( /** * Deletes the specified webhook. * + *

Sample code: + * + *

{@code
+   * try (WebhooksClient webhooksClient = WebhooksClient.create()) {
+   *   WebhookName name = WebhookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[WEBHOOK]");
+   *   webhooksClient.deleteWebhook(name);
+   * }
+   * }
+ * * @param name Required. The name of the webhook to delete. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/webhooks/<Webhook ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -358,6 +573,15 @@ public final void deleteWebhook(WebhookName name) { /** * Deletes the specified webhook. * + *

Sample code: + * + *

{@code
+   * try (WebhooksClient webhooksClient = WebhooksClient.create()) {
+   *   String name = WebhookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[WEBHOOK]").toString();
+   *   webhooksClient.deleteWebhook(name);
+   * }
+   * }
+ * * @param name Required. The name of the webhook to delete. Format: `projects/<Project * ID>/locations/<Location ID>/agents/<Agent ID>/webhooks/<Webhook ID>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -371,6 +595,19 @@ public final void deleteWebhook(String name) { /** * Deletes the specified webhook. * + *

Sample code: + * + *

{@code
+   * try (WebhooksClient webhooksClient = WebhooksClient.create()) {
+   *   DeleteWebhookRequest request =
+   *       DeleteWebhookRequest.newBuilder()
+   *           .setName(WebhookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[WEBHOOK]").toString())
+   *           .setForce(true)
+   *           .build();
+   *   webhooksClient.deleteWebhook(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -383,6 +620,19 @@ public final void deleteWebhook(DeleteWebhookRequest request) { * Deletes the specified webhook. * *

Sample code: + * + *

{@code
+   * try (WebhooksClient webhooksClient = WebhooksClient.create()) {
+   *   DeleteWebhookRequest request =
+   *       DeleteWebhookRequest.newBuilder()
+   *           .setName(WebhookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[WEBHOOK]").toString())
+   *           .setForce(true)
+   *           .build();
+   *   ApiFuture future = webhooksClient.deleteWebhookCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final UnaryCallable deleteWebhookCallable() { return stub.deleteWebhookCallable(); diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/package-info.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/package-info.java index 9a266d4b9..313e7daae 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/package-info.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/package-info.java @@ -23,6 +23,13 @@ * *

Sample for AgentsClient: * + *

{@code
+ * try (AgentsClient agentsClient = AgentsClient.create()) {
+ *   AgentName name = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+ *   Agent response = agentsClient.getAgent(name);
+ * }
+ * }
+ * *

======================= EntityTypesClient ======================= * *

Service Description: Service for managing @@ -30,6 +37,14 @@ * *

Sample for EntityTypesClient: * + *

{@code
+ * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+ *   EntityTypeName name =
+ *       EntityTypeName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENTITY_TYPE]");
+ *   EntityType response = entityTypesClient.getEntityType(name);
+ * }
+ * }
+ * *

======================= EnvironmentsClient ======================= * *

Service Description: Service for managing @@ -37,6 +52,14 @@ * *

Sample for EnvironmentsClient: * + *

{@code
+ * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+ *   EnvironmentName name =
+ *       EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]");
+ *   Environment response = environmentsClient.getEnvironment(name);
+ * }
+ * }
+ * *

======================= ExperimentsClient ======================= * *

Service Description: Service for managing @@ -44,12 +67,28 @@ * *

Sample for ExperimentsClient: * + *

{@code
+ * try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
+ *   ExperimentName name =
+ *       ExperimentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]");
+ *   Experiment response = experimentsClient.getExperiment(name);
+ * }
+ * }
+ * *

======================= FlowsClient ======================= * *

Service Description: Service for managing [Flows][google.cloud.dialogflow.cx.v3beta1.Flow]. * *

Sample for FlowsClient: * + *

{@code
+ * try (FlowsClient flowsClient = FlowsClient.create()) {
+ *   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+ *   Flow flow = Flow.newBuilder().build();
+ *   Flow response = flowsClient.createFlow(parent, flow);
+ * }
+ * }
+ * *

======================= IntentsClient ======================= * *

Service Description: Service for managing @@ -57,18 +96,42 @@ * *

Sample for IntentsClient: * + *

{@code
+ * try (IntentsClient intentsClient = IntentsClient.create()) {
+ *   IntentName name = IntentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[INTENT]");
+ *   Intent response = intentsClient.getIntent(name);
+ * }
+ * }
+ * *

======================= PagesClient ======================= * *

Service Description: Service for managing [Pages][google.cloud.dialogflow.cx.v3beta1.Page]. * *

Sample for PagesClient: * + *

{@code
+ * try (PagesClient pagesClient = PagesClient.create()) {
+ *   PageName name = PageName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]");
+ *   Page response = pagesClient.getPage(name);
+ * }
+ * }
+ * *

======================= SecuritySettingsServiceClient ======================= * *

Service Description: Service for managing security settings for Dialogflow. * *

Sample for SecuritySettingsServiceClient: * + *

{@code
+ * try (SecuritySettingsServiceClient securitySettingsServiceClient =
+ *     SecuritySettingsServiceClient.create()) {
+ *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ *   SecuritySettings securitySettings = SecuritySettings.newBuilder().build();
+ *   SecuritySettings response =
+ *       securitySettingsServiceClient.createSecuritySettings(parent, securitySettings);
+ * }
+ * }
+ * *

======================= SessionsClient ======================= * *

Service Description: A session represents an interaction with a user. You retrieve user input @@ -77,6 +140,22 @@ * *

Sample for SessionsClient: * + *

{@code
+ * try (SessionsClient sessionsClient = SessionsClient.create()) {
+ *   DetectIntentRequest request =
+ *       DetectIntentRequest.newBuilder()
+ *           .setSession(
+ *               SessionName.ofProjectLocationAgentSessionName(
+ *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]")
+ *                   .toString())
+ *           .setQueryParams(QueryParameters.newBuilder().build())
+ *           .setQueryInput(QueryInput.newBuilder().build())
+ *           .setOutputAudioConfig(OutputAudioConfig.newBuilder().build())
+ *           .build();
+ *   DetectIntentResponse response = sessionsClient.detectIntent(request);
+ * }
+ * }
+ * *

======================= SessionEntityTypesClient ======================= * *

Service Description: Service for managing @@ -84,6 +163,15 @@ * *

Sample for SessionEntityTypesClient: * + *

{@code
+ * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
+ *   SessionEntityTypeName name =
+ *       SessionEntityTypeName.ofProjectLocationAgentSessionEntityTypeName(
+ *           "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]", "[ENTITY_TYPE]");
+ *   SessionEntityType response = sessionEntityTypesClient.getSessionEntityType(name);
+ * }
+ * }
+ * *

======================= TestCasesClient ======================= * *

Service Description: Service for managing [Test @@ -92,6 +180,13 @@ * *

Sample for TestCasesClient: * + *

{@code
+ * try (TestCasesClient testCasesClient = TestCasesClient.create()) {
+ *   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+ *   testCasesClient.batchDeleteTestCases(parent);
+ * }
+ * }
+ * *

======================= TransitionRouteGroupsClient ======================= * *

Service Description: Service for managing @@ -99,6 +194,16 @@ * *

Sample for TransitionRouteGroupsClient: * + *

{@code
+ * try (TransitionRouteGroupsClient transitionRouteGroupsClient =
+ *     TransitionRouteGroupsClient.create()) {
+ *   TransitionRouteGroupName name =
+ *       TransitionRouteGroupName.of(
+ *           "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]");
+ *   TransitionRouteGroup response = transitionRouteGroupsClient.getTransitionRouteGroup(name);
+ * }
+ * }
+ * *

======================= VersionsClient ======================= * *

Service Description: Service for managing @@ -106,12 +211,27 @@ * *

Sample for VersionsClient: * + *

{@code
+ * try (VersionsClient versionsClient = VersionsClient.create()) {
+ *   VersionName name =
+ *       VersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]");
+ *   Version response = versionsClient.getVersion(name);
+ * }
+ * }
+ * *

======================= WebhooksClient ======================= * *

Service Description: Service for managing * [Webhooks][google.cloud.dialogflow.cx.v3beta1.Webhook]. * *

Sample for WebhooksClient: + * + *

{@code
+ * try (WebhooksClient webhooksClient = WebhooksClient.create()) {
+ *   WebhookName name = WebhookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[WEBHOOK]");
+ *   Webhook response = webhooksClient.getWebhook(name);
+ * }
+ * }
*/ @Generated("by gapic-generator-java") package com.google.cloud.dialogflow.cx.v3beta1; diff --git a/synth.metadata b/synth.metadata index 5e03d2ec2..bdd557c3a 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,16 +11,16 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "c71a9c4ff7bc5179f2e94af31bc95ce4922575ff", - "internalRef": "354553780" + "sha": "8d8c008e56f1af31d57f75561e0f1848ffb29eeb", + "internalRef": "356341083" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "c71a9c4ff7bc5179f2e94af31bc95ce4922575ff", - "internalRef": "354553780" + "sha": "8d8c008e56f1af31d57f75561e0f1848ffb29eeb", + "internalRef": "356341083" } }, { From 037e262ea2f77957b94484db048ffd0b38b8d3cd Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Tue, 16 Feb 2021 19:20:00 -0800 Subject: [PATCH 08/12] feat: supports SentimentAnalysisResult in webhook request docs: minor updates in wording PiperOrigin-RevId: 356624136 Source-Author: Google APIs Source-Date: Tue Feb 9 16:52:56 2021 -0800 Source-Repo: googleapis/googleapis Source-Sha: e28aa8570dc86136fe677202c976f4ee00d77f61 Source-Link: https://github.com/googleapis/googleapis/commit/e28aa8570dc86136fe677202c976f4ee00d77f61 --- .../cx/v3beta1/ExperimentsGrpc.java | 119 +- .../cx/v3beta1/CreateExperimentRequest.java | 27 +- .../CreateExperimentRequestOrBuilder.java | 6 +- .../cx/v3beta1/DeleteExperimentRequest.java | 27 +- .../DeleteExperimentRequestOrBuilder.java | 6 +- .../dialogflow/cx/v3beta1/Experiment.java | 91 +- .../cx/v3beta1/ExperimentOrBuilder.java | 8 +- .../cx/v3beta1/GetExperimentRequest.java | 41 +- .../GetExperimentRequestOrBuilder.java | 10 +- .../cx/v3beta1/ListExperimentsRequest.java | 55 +- .../ListExperimentsRequestOrBuilder.java | 14 +- .../cx/v3beta1/ListExperimentsResponse.java | 6 +- .../cloud/dialogflow/cx/v3beta1/Page.java | 69 + .../dialogflow/cx/v3beta1/PageOrBuilder.java | 15 + .../cx/v3beta1/StartExperimentRequest.java | 6 +- .../cx/v3beta1/StopExperimentRequest.java | 6 +- .../cx/v3beta1/UpdateExperimentRequest.java | 6 +- .../dialogflow/cx/v3beta1/WebhookProto.java | 197 ++- .../dialogflow/cx/v3beta1/WebhookRequest.java | 1462 ++++++++++++++--- .../cx/v3beta1/WebhookRequestOrBuilder.java | 46 + .../dialogflow/cx/v3beta1/audio_config.proto | 50 +- .../dialogflow/cx/v3beta1/experiment.proto | 97 +- .../cloud/dialogflow/cx/v3beta1/page.proto | 3 + .../cloud/dialogflow/cx/v3beta1/webhook.proto | 16 + synth.metadata | 8 +- 25 files changed, 1735 insertions(+), 656 deletions(-) diff --git a/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsGrpc.java b/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsGrpc.java index 2bda56110..3a8aed25d 100644 --- a/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsGrpc.java +++ b/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsGrpc.java @@ -26,8 +26,7 @@ * * *
- * Service for managing
- * [Experiments][google.cloud.dialogflow.cx.v3beta1.Experiment].
+ * Service for managing [Experiments][google.cloud.dialogflow.cx.v3beta1.Experiment].
  * 
*/ @javax.annotation.Generated( @@ -409,8 +408,7 @@ public ExperimentsFutureStub newStub( * * *
-   * Service for managing
-   * [Experiments][google.cloud.dialogflow.cx.v3beta1.Experiment].
+   * Service for managing [Experiments][google.cloud.dialogflow.cx.v3beta1.Experiment].
    * 
*/ public abstract static class ExperimentsImplBase implements io.grpc.BindableService { @@ -419,8 +417,7 @@ public abstract static class ExperimentsImplBase implements io.grpc.BindableServ * * *
-     * Returns the list of all experiments in the specified
-     * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
+     * Returns the list of all experiments in the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
      * 
*/ public void listExperiments( @@ -434,8 +431,7 @@ public void listExperiments( * * *
-     * Retrieves the specified
-     * [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment].
+     * Retrieves the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment].
      * 
*/ public void getExperiment( @@ -449,9 +445,7 @@ public void getExperiment( * * *
-     * Creates an [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment] in
-     * the specified
-     * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
+     * Creates an [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment] in the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
      * 
*/ public void createExperiment( @@ -465,8 +459,7 @@ public void createExperiment( * * *
-     * Updates the specified
-     * [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment].
+     * Updates the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment].
      * 
*/ public void updateExperiment( @@ -480,8 +473,7 @@ public void updateExperiment( * * *
-     * Deletes the specified
-     * [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment].
+     * Deletes the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment].
      * 
*/ public void deleteExperiment( @@ -494,9 +486,8 @@ public void deleteExperiment( * * *
-     * Starts the specified
-     * [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only
-     * changes the state of experiment from PENDING to RUNNING.
+     * Starts the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only changes the state of
+     * experiment from PENDING to RUNNING.
      * 
*/ public void startExperiment( @@ -510,9 +501,8 @@ public void startExperiment( * * *
-     * Stops the specified
-     * [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only
-     * changes the state of experiment from RUNNING to DONE.
+     * Stops the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only changes the state of
+     * experiment from RUNNING to DONE.
      * 
*/ public void stopExperiment( @@ -581,8 +571,7 @@ public final io.grpc.ServerServiceDefinition bindService() { * * *
-   * Service for managing
-   * [Experiments][google.cloud.dialogflow.cx.v3beta1.Experiment].
+   * Service for managing [Experiments][google.cloud.dialogflow.cx.v3beta1.Experiment].
    * 
*/ public static final class ExperimentsStub @@ -600,8 +589,7 @@ protected ExperimentsStub build(io.grpc.Channel channel, io.grpc.CallOptions cal * * *
-     * Returns the list of all experiments in the specified
-     * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
+     * Returns the list of all experiments in the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
      * 
*/ public void listExperiments( @@ -618,8 +606,7 @@ public void listExperiments( * * *
-     * Retrieves the specified
-     * [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment].
+     * Retrieves the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment].
      * 
*/ public void getExperiment( @@ -636,9 +623,7 @@ public void getExperiment( * * *
-     * Creates an [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment] in
-     * the specified
-     * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
+     * Creates an [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment] in the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
      * 
*/ public void createExperiment( @@ -655,8 +640,7 @@ public void createExperiment( * * *
-     * Updates the specified
-     * [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment].
+     * Updates the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment].
      * 
*/ public void updateExperiment( @@ -673,8 +657,7 @@ public void updateExperiment( * * *
-     * Deletes the specified
-     * [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment].
+     * Deletes the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment].
      * 
*/ public void deleteExperiment( @@ -690,9 +673,8 @@ public void deleteExperiment( * * *
-     * Starts the specified
-     * [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only
-     * changes the state of experiment from PENDING to RUNNING.
+     * Starts the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only changes the state of
+     * experiment from PENDING to RUNNING.
      * 
*/ public void startExperiment( @@ -709,9 +691,8 @@ public void startExperiment( * * *
-     * Stops the specified
-     * [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only
-     * changes the state of experiment from RUNNING to DONE.
+     * Stops the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only changes the state of
+     * experiment from RUNNING to DONE.
      * 
*/ public void stopExperiment( @@ -729,8 +710,7 @@ public void stopExperiment( * * *
-   * Service for managing
-   * [Experiments][google.cloud.dialogflow.cx.v3beta1.Experiment].
+   * Service for managing [Experiments][google.cloud.dialogflow.cx.v3beta1.Experiment].
    * 
*/ public static final class ExperimentsBlockingStub @@ -749,8 +729,7 @@ protected ExperimentsBlockingStub build( * * *
-     * Returns the list of all experiments in the specified
-     * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
+     * Returns the list of all experiments in the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
      * 
*/ public com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse listExperiments( @@ -762,8 +741,7 @@ public com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse listExperi * * *
-     * Retrieves the specified
-     * [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment].
+     * Retrieves the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment].
      * 
*/ public com.google.cloud.dialogflow.cx.v3beta1.Experiment getExperiment( @@ -775,9 +753,7 @@ public com.google.cloud.dialogflow.cx.v3beta1.Experiment getExperiment( * * *
-     * Creates an [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment] in
-     * the specified
-     * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
+     * Creates an [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment] in the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
      * 
*/ public com.google.cloud.dialogflow.cx.v3beta1.Experiment createExperiment( @@ -790,8 +766,7 @@ public com.google.cloud.dialogflow.cx.v3beta1.Experiment createExperiment( * * *
-     * Updates the specified
-     * [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment].
+     * Updates the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment].
      * 
*/ public com.google.cloud.dialogflow.cx.v3beta1.Experiment updateExperiment( @@ -804,8 +779,7 @@ public com.google.cloud.dialogflow.cx.v3beta1.Experiment updateExperiment( * * *
-     * Deletes the specified
-     * [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment].
+     * Deletes the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment].
      * 
*/ public com.google.protobuf.Empty deleteExperiment( @@ -818,9 +792,8 @@ public com.google.protobuf.Empty deleteExperiment( * * *
-     * Starts the specified
-     * [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only
-     * changes the state of experiment from PENDING to RUNNING.
+     * Starts the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only changes the state of
+     * experiment from PENDING to RUNNING.
      * 
*/ public com.google.cloud.dialogflow.cx.v3beta1.Experiment startExperiment( @@ -832,9 +805,8 @@ public com.google.cloud.dialogflow.cx.v3beta1.Experiment startExperiment( * * *
-     * Stops the specified
-     * [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only
-     * changes the state of experiment from RUNNING to DONE.
+     * Stops the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only changes the state of
+     * experiment from RUNNING to DONE.
      * 
*/ public com.google.cloud.dialogflow.cx.v3beta1.Experiment stopExperiment( @@ -847,8 +819,7 @@ public com.google.cloud.dialogflow.cx.v3beta1.Experiment stopExperiment( * * *
-   * Service for managing
-   * [Experiments][google.cloud.dialogflow.cx.v3beta1.Experiment].
+   * Service for managing [Experiments][google.cloud.dialogflow.cx.v3beta1.Experiment].
    * 
*/ public static final class ExperimentsFutureStub @@ -867,8 +838,7 @@ protected ExperimentsFutureStub build( * * *
-     * Returns the list of all experiments in the specified
-     * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
+     * Returns the list of all experiments in the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
      * 
*/ public com.google.common.util.concurrent.ListenableFuture< @@ -882,8 +852,7 @@ protected ExperimentsFutureStub build( * * *
-     * Retrieves the specified
-     * [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment].
+     * Retrieves the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment].
      * 
*/ public com.google.common.util.concurrent.ListenableFuture< @@ -897,9 +866,7 @@ protected ExperimentsFutureStub build( * * *
-     * Creates an [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment] in
-     * the specified
-     * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
+     * Creates an [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment] in the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
      * 
*/ public com.google.common.util.concurrent.ListenableFuture< @@ -913,8 +880,7 @@ protected ExperimentsFutureStub build( * * *
-     * Updates the specified
-     * [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment].
+     * Updates the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment].
      * 
*/ public com.google.common.util.concurrent.ListenableFuture< @@ -928,8 +894,7 @@ protected ExperimentsFutureStub build( * * *
-     * Deletes the specified
-     * [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment].
+     * Deletes the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment].
      * 
*/ public com.google.common.util.concurrent.ListenableFuture @@ -942,9 +907,8 @@ protected ExperimentsFutureStub build( * * *
-     * Starts the specified
-     * [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only
-     * changes the state of experiment from PENDING to RUNNING.
+     * Starts the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only changes the state of
+     * experiment from PENDING to RUNNING.
      * 
*/ public com.google.common.util.concurrent.ListenableFuture< @@ -958,9 +922,8 @@ protected ExperimentsFutureStub build( * * *
-     * Stops the specified
-     * [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only
-     * changes the state of experiment from RUNNING to DONE.
+     * Stops the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only changes the state of
+     * experiment from RUNNING to DONE.
      * 
*/ public com.google.common.util.concurrent.ListenableFuture< diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateExperimentRequest.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateExperimentRequest.java index d71b06641..9cb624c62 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateExperimentRequest.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateExperimentRequest.java @@ -22,8 +22,7 @@ * * *
- * The request message for
- * [Experiments.CreateExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.CreateExperiment].
+ * The request message for [Experiments.CreateExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.CreateExperiment].
  * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest} @@ -135,8 +134,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. The [Agent][google.cloud.dialogflow.cx.v3beta1.Agent] to create
-   * an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] for.
+   * Required. The [Agent][google.cloud.dialogflow.cx.v3beta1.Agent] to create an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] for.
    * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
    * ID>/environments/<Environment ID>`.
    * 
@@ -163,8 +161,7 @@ public java.lang.String getParent() { * * *
-   * Required. The [Agent][google.cloud.dialogflow.cx.v3beta1.Agent] to create
-   * an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] for.
+   * Required. The [Agent][google.cloud.dialogflow.cx.v3beta1.Agent] to create an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] for.
    * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
    * ID>/environments/<Environment ID>`.
    * 
@@ -420,8 +417,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The request message for
-   * [Experiments.CreateExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.CreateExperiment].
+   * The request message for [Experiments.CreateExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.CreateExperiment].
    * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest} @@ -598,8 +594,7 @@ public Builder mergeFrom( * * *
-     * Required. The [Agent][google.cloud.dialogflow.cx.v3beta1.Agent] to create
-     * an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] for.
+     * Required. The [Agent][google.cloud.dialogflow.cx.v3beta1.Agent] to create an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] for.
      * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
      * ID>/environments/<Environment ID>`.
      * 
@@ -625,8 +620,7 @@ public java.lang.String getParent() { * * *
-     * Required. The [Agent][google.cloud.dialogflow.cx.v3beta1.Agent] to create
-     * an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] for.
+     * Required. The [Agent][google.cloud.dialogflow.cx.v3beta1.Agent] to create an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] for.
      * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
      * ID>/environments/<Environment ID>`.
      * 
@@ -652,8 +646,7 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
-     * Required. The [Agent][google.cloud.dialogflow.cx.v3beta1.Agent] to create
-     * an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] for.
+     * Required. The [Agent][google.cloud.dialogflow.cx.v3beta1.Agent] to create an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] for.
      * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
      * ID>/environments/<Environment ID>`.
      * 
@@ -678,8 +671,7 @@ public Builder setParent(java.lang.String value) { * * *
-     * Required. The [Agent][google.cloud.dialogflow.cx.v3beta1.Agent] to create
-     * an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] for.
+     * Required. The [Agent][google.cloud.dialogflow.cx.v3beta1.Agent] to create an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] for.
      * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
      * ID>/environments/<Environment ID>`.
      * 
@@ -700,8 +692,7 @@ public Builder clearParent() { * * *
-     * Required. The [Agent][google.cloud.dialogflow.cx.v3beta1.Agent] to create
-     * an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] for.
+     * Required. The [Agent][google.cloud.dialogflow.cx.v3beta1.Agent] to create an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] for.
      * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
      * ID>/environments/<Environment ID>`.
      * 
diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateExperimentRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateExperimentRequestOrBuilder.java index f2da2e270..64f53e840 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateExperimentRequestOrBuilder.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateExperimentRequestOrBuilder.java @@ -27,8 +27,7 @@ public interface CreateExperimentRequestOrBuilder * * *
-   * Required. The [Agent][google.cloud.dialogflow.cx.v3beta1.Agent] to create
-   * an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] for.
+   * Required. The [Agent][google.cloud.dialogflow.cx.v3beta1.Agent] to create an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] for.
    * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
    * ID>/environments/<Environment ID>`.
    * 
@@ -44,8 +43,7 @@ public interface CreateExperimentRequestOrBuilder * * *
-   * Required. The [Agent][google.cloud.dialogflow.cx.v3beta1.Agent] to create
-   * an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] for.
+   * Required. The [Agent][google.cloud.dialogflow.cx.v3beta1.Agent] to create an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] for.
    * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
    * ID>/environments/<Environment ID>`.
    * 
diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteExperimentRequest.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteExperimentRequest.java index e75fcbc30..281aebe81 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteExperimentRequest.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteExperimentRequest.java @@ -22,8 +22,7 @@ * * *
- * The request message for
- * [Experiments.DeleteExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.DeleteExperiment].
+ * The request message for [Experiments.DeleteExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.DeleteExperiment].
  * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest} @@ -118,8 +117,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. The name of the
-   * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to delete.
+   * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to delete.
    * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
    * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
    * 
@@ -146,8 +144,7 @@ public java.lang.String getName() { * * *
-   * Required. The name of the
-   * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to delete.
+   * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to delete.
    * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
    * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
    * 
@@ -335,8 +332,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The request message for
-   * [Experiments.DeleteExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.DeleteExperiment].
+   * The request message for [Experiments.DeleteExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.DeleteExperiment].
    * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest} @@ -499,8 +495,7 @@ public Builder mergeFrom( * * *
-     * Required. The name of the
-     * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to delete.
+     * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to delete.
      * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
      * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
      * 
@@ -526,8 +521,7 @@ public java.lang.String getName() { * * *
-     * Required. The name of the
-     * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to delete.
+     * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to delete.
      * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
      * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
      * 
@@ -553,8 +547,7 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-     * Required. The name of the
-     * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to delete.
+     * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to delete.
      * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
      * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
      * 
@@ -579,8 +572,7 @@ public Builder setName(java.lang.String value) { * * *
-     * Required. The name of the
-     * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to delete.
+     * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to delete.
      * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
      * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
      * 
@@ -601,8 +593,7 @@ public Builder clearName() { * * *
-     * Required. The name of the
-     * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to delete.
+     * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to delete.
      * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
      * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
      * 
diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteExperimentRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteExperimentRequestOrBuilder.java index ee0fe93c0..a9b954549 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteExperimentRequestOrBuilder.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteExperimentRequestOrBuilder.java @@ -27,8 +27,7 @@ public interface DeleteExperimentRequestOrBuilder * * *
-   * Required. The name of the
-   * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to delete.
+   * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to delete.
    * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
    * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
    * 
@@ -44,8 +43,7 @@ public interface DeleteExperimentRequestOrBuilder * * *
-   * Required. The name of the
-   * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to delete.
+   * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to delete.
    * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
    * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
    * 
diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Experiment.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Experiment.java index 90d68a371..b73938daf 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Experiment.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Experiment.java @@ -4696,10 +4696,9 @@ public interface VersionMetricsOrBuilder * * *
-       * The name of the flow
-       * [Version][google.cloud.dialogflow.cx.v3beta1.Version]. Format:
-       * `projects/<Project Number>/locations/<Location ID>/agents/<Agent
-       * ID>/flows/<Flow ID>/versions/<Version ID>`.
+       * The name of the flow [Version][google.cloud.dialogflow.cx.v3beta1.Version].
+       * Format: `projects/<Project Number>/locations/<Location
+       * ID>/agents/<Agent ID>/flows/<Flow ID>/versions/<Version ID>`.
        * 
* * string version = 1 [(.google.api.resource_reference) = { ... } @@ -4711,10 +4710,9 @@ public interface VersionMetricsOrBuilder * * *
-       * The name of the flow
-       * [Version][google.cloud.dialogflow.cx.v3beta1.Version]. Format:
-       * `projects/<Project Number>/locations/<Location ID>/agents/<Agent
-       * ID>/flows/<Flow ID>/versions/<Version ID>`.
+       * The name of the flow [Version][google.cloud.dialogflow.cx.v3beta1.Version].
+       * Format: `projects/<Project Number>/locations/<Location
+       * ID>/agents/<Agent ID>/flows/<Flow ID>/versions/<Version ID>`.
        * 
* * string version = 1 [(.google.api.resource_reference) = { ... } @@ -4926,10 +4924,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-       * The name of the flow
-       * [Version][google.cloud.dialogflow.cx.v3beta1.Version]. Format:
-       * `projects/<Project Number>/locations/<Location ID>/agents/<Agent
-       * ID>/flows/<Flow ID>/versions/<Version ID>`.
+       * The name of the flow [Version][google.cloud.dialogflow.cx.v3beta1.Version].
+       * Format: `projects/<Project Number>/locations/<Location
+       * ID>/agents/<Agent ID>/flows/<Flow ID>/versions/<Version ID>`.
        * 
* * string version = 1 [(.google.api.resource_reference) = { ... } @@ -4952,10 +4949,9 @@ public java.lang.String getVersion() { * * *
-       * The name of the flow
-       * [Version][google.cloud.dialogflow.cx.v3beta1.Version]. Format:
-       * `projects/<Project Number>/locations/<Location ID>/agents/<Agent
-       * ID>/flows/<Flow ID>/versions/<Version ID>`.
+       * The name of the flow [Version][google.cloud.dialogflow.cx.v3beta1.Version].
+       * Format: `projects/<Project Number>/locations/<Location
+       * ID>/agents/<Agent ID>/flows/<Flow ID>/versions/<Version ID>`.
        * 
* * string version = 1 [(.google.api.resource_reference) = { ... } @@ -5498,10 +5494,9 @@ public Builder mergeFrom( * * *
-         * The name of the flow
-         * [Version][google.cloud.dialogflow.cx.v3beta1.Version]. Format:
-         * `projects/<Project Number>/locations/<Location ID>/agents/<Agent
-         * ID>/flows/<Flow ID>/versions/<Version ID>`.
+         * The name of the flow [Version][google.cloud.dialogflow.cx.v3beta1.Version].
+         * Format: `projects/<Project Number>/locations/<Location
+         * ID>/agents/<Agent ID>/flows/<Flow ID>/versions/<Version ID>`.
          * 
* * string version = 1 [(.google.api.resource_reference) = { ... } @@ -5523,10 +5518,9 @@ public java.lang.String getVersion() { * * *
-         * The name of the flow
-         * [Version][google.cloud.dialogflow.cx.v3beta1.Version]. Format:
-         * `projects/<Project Number>/locations/<Location ID>/agents/<Agent
-         * ID>/flows/<Flow ID>/versions/<Version ID>`.
+         * The name of the flow [Version][google.cloud.dialogflow.cx.v3beta1.Version].
+         * Format: `projects/<Project Number>/locations/<Location
+         * ID>/agents/<Agent ID>/flows/<Flow ID>/versions/<Version ID>`.
          * 
* * string version = 1 [(.google.api.resource_reference) = { ... } @@ -5548,10 +5542,9 @@ public com.google.protobuf.ByteString getVersionBytes() { * * *
-         * The name of the flow
-         * [Version][google.cloud.dialogflow.cx.v3beta1.Version]. Format:
-         * `projects/<Project Number>/locations/<Location ID>/agents/<Agent
-         * ID>/flows/<Flow ID>/versions/<Version ID>`.
+         * The name of the flow [Version][google.cloud.dialogflow.cx.v3beta1.Version].
+         * Format: `projects/<Project Number>/locations/<Location
+         * ID>/agents/<Agent ID>/flows/<Flow ID>/versions/<Version ID>`.
          * 
* * string version = 1 [(.google.api.resource_reference) = { ... } @@ -5572,10 +5565,9 @@ public Builder setVersion(java.lang.String value) { * * *
-         * The name of the flow
-         * [Version][google.cloud.dialogflow.cx.v3beta1.Version]. Format:
-         * `projects/<Project Number>/locations/<Location ID>/agents/<Agent
-         * ID>/flows/<Flow ID>/versions/<Version ID>`.
+         * The name of the flow [Version][google.cloud.dialogflow.cx.v3beta1.Version].
+         * Format: `projects/<Project Number>/locations/<Location
+         * ID>/agents/<Agent ID>/flows/<Flow ID>/versions/<Version ID>`.
          * 
* * string version = 1 [(.google.api.resource_reference) = { ... } @@ -5592,10 +5584,9 @@ public Builder clearVersion() { * * *
-         * The name of the flow
-         * [Version][google.cloud.dialogflow.cx.v3beta1.Version]. Format:
-         * `projects/<Project Number>/locations/<Location ID>/agents/<Agent
-         * ID>/flows/<Flow ID>/versions/<Version ID>`.
+         * The name of the flow [Version][google.cloud.dialogflow.cx.v3beta1.Version].
+         * Format: `projects/<Project Number>/locations/<Location
+         * ID>/agents/<Agent ID>/flows/<Flow ID>/versions/<Version ID>`.
          * 
* * string version = 1 [(.google.api.resource_reference) = { ... } @@ -7387,8 +7378,8 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-   * Required. The human-readable name of the experiment (unique in an
-   * environment). Limit of 64 characters.
+   * Required. The human-readable name of the experiment (unique in an environment). Limit
+   * of 64 characters.
    * 
* * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -7411,8 +7402,8 @@ public java.lang.String getDisplayName() { * * *
-   * Required. The human-readable name of the experiment (unique in an
-   * environment). Limit of 64 characters.
+   * Required. The human-readable name of the experiment (unique in an environment). Limit
+   * of 64 characters.
    * 
* * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -8674,8 +8665,8 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * * *
-     * Required. The human-readable name of the experiment (unique in an
-     * environment). Limit of 64 characters.
+     * Required. The human-readable name of the experiment (unique in an environment). Limit
+     * of 64 characters.
      * 
* * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -8697,8 +8688,8 @@ public java.lang.String getDisplayName() { * * *
-     * Required. The human-readable name of the experiment (unique in an
-     * environment). Limit of 64 characters.
+     * Required. The human-readable name of the experiment (unique in an environment). Limit
+     * of 64 characters.
      * 
* * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -8720,8 +8711,8 @@ public com.google.protobuf.ByteString getDisplayNameBytes() { * * *
-     * Required. The human-readable name of the experiment (unique in an
-     * environment). Limit of 64 characters.
+     * Required. The human-readable name of the experiment (unique in an environment). Limit
+     * of 64 characters.
      * 
* * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -8742,8 +8733,8 @@ public Builder setDisplayName(java.lang.String value) { * * *
-     * Required. The human-readable name of the experiment (unique in an
-     * environment). Limit of 64 characters.
+     * Required. The human-readable name of the experiment (unique in an environment). Limit
+     * of 64 characters.
      * 
* * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -8760,8 +8751,8 @@ public Builder clearDisplayName() { * * *
-     * Required. The human-readable name of the experiment (unique in an
-     * environment). Limit of 64 characters.
+     * Required. The human-readable name of the experiment (unique in an environment). Limit
+     * of 64 characters.
      * 
* * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentOrBuilder.java index 6c652bd94..16ff2aa8c 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentOrBuilder.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentOrBuilder.java @@ -56,8 +56,8 @@ public interface ExperimentOrBuilder * * *
-   * Required. The human-readable name of the experiment (unique in an
-   * environment). Limit of 64 characters.
+   * Required. The human-readable name of the experiment (unique in an environment). Limit
+   * of 64 characters.
    * 
* * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -69,8 +69,8 @@ public interface ExperimentOrBuilder * * *
-   * Required. The human-readable name of the experiment (unique in an
-   * environment). Limit of 64 characters.
+   * Required. The human-readable name of the experiment (unique in an environment). Limit
+   * of 64 characters.
    * 
* * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetExperimentRequest.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetExperimentRequest.java index b877a26ab..4f8e2a29e 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetExperimentRequest.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetExperimentRequest.java @@ -22,8 +22,7 @@ * * *
- * The request message for
- * [Experiments.GetExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.GetExperiment].
+ * The request message for [Experiments.GetExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.GetExperiment].
  * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest} @@ -118,9 +117,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. The name of the
-   * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. Format:
-   * `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
    * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
    * 
* @@ -146,9 +144,8 @@ public java.lang.String getName() { * * *
-   * Required. The name of the
-   * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. Format:
-   * `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
    * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
    * 
* @@ -335,8 +332,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The request message for
-   * [Experiments.GetExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.GetExperiment].
+   * The request message for [Experiments.GetExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.GetExperiment].
    * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest} @@ -496,9 +492,8 @@ public Builder mergeFrom( * * *
-     * Required. The name of the
-     * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. Format:
-     * `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
      * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
      * 
* @@ -523,9 +518,8 @@ public java.lang.String getName() { * * *
-     * Required. The name of the
-     * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. Format:
-     * `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
      * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
      * 
* @@ -550,9 +544,8 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-     * Required. The name of the
-     * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. Format:
-     * `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
      * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
      * 
* @@ -576,9 +569,8 @@ public Builder setName(java.lang.String value) { * * *
-     * Required. The name of the
-     * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. Format:
-     * `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
      * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
      * 
* @@ -598,9 +590,8 @@ public Builder clearName() { * * *
-     * Required. The name of the
-     * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. Format:
-     * `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
      * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
      * 
* diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetExperimentRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetExperimentRequestOrBuilder.java index 541546b27..cd551a79b 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetExperimentRequestOrBuilder.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetExperimentRequestOrBuilder.java @@ -27,9 +27,8 @@ public interface GetExperimentRequestOrBuilder * * *
-   * Required. The name of the
-   * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. Format:
-   * `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
    * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
    * 
* @@ -44,9 +43,8 @@ public interface GetExperimentRequestOrBuilder * * *
-   * Required. The name of the
-   * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. Format:
-   * `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * Required. The name of the [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
    * ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
    * 
* diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExperimentsRequest.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExperimentsRequest.java index 9798908bc..6f9ccd7dd 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExperimentsRequest.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExperimentsRequest.java @@ -22,8 +22,7 @@ * * *
- * The request message for
- * [Experiments.ListExperiments][google.cloud.dialogflow.cx.v3beta1.Experiments.ListExperiments].
+ * The request message for [Experiments.ListExperiments][google.cloud.dialogflow.cx.v3beta1.Experiments.ListExperiments].
  * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest} @@ -131,10 +130,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]
-   * to list all environments for. Format: `projects/<Project
-   * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment
-   * ID>`.
+   * Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to list all environments for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>`.
    * 
* * @@ -159,10 +157,9 @@ public java.lang.String getParent() { * * *
-   * Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]
-   * to list all environments for. Format: `projects/<Project
-   * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment
-   * ID>`.
+   * Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to list all environments for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>`.
    * 
* * @@ -434,8 +431,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The request message for
-   * [Experiments.ListExperiments][google.cloud.dialogflow.cx.v3beta1.Experiments.ListExperiments].
+   * The request message for [Experiments.ListExperiments][google.cloud.dialogflow.cx.v3beta1.Experiments.ListExperiments].
    * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest} @@ -611,10 +607,9 @@ public Builder mergeFrom( * * *
-     * Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]
-     * to list all environments for. Format: `projects/<Project
-     * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment
-     * ID>`.
+     * Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to list all environments for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>`.
      * 
* * @@ -638,10 +633,9 @@ public java.lang.String getParent() { * * *
-     * Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]
-     * to list all environments for. Format: `projects/<Project
-     * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment
-     * ID>`.
+     * Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to list all environments for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>`.
      * 
* * @@ -665,10 +659,9 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
-     * Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]
-     * to list all environments for. Format: `projects/<Project
-     * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment
-     * ID>`.
+     * Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to list all environments for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>`.
      * 
* * @@ -691,10 +684,9 @@ public Builder setParent(java.lang.String value) { * * *
-     * Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]
-     * to list all environments for. Format: `projects/<Project
-     * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment
-     * ID>`.
+     * Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to list all environments for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>`.
      * 
* * @@ -713,10 +705,9 @@ public Builder clearParent() { * * *
-     * Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]
-     * to list all environments for. Format: `projects/<Project
-     * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment
-     * ID>`.
+     * Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to list all environments for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>`.
      * 
* * diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExperimentsRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExperimentsRequestOrBuilder.java index 915d81e02..d898d28f1 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExperimentsRequestOrBuilder.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExperimentsRequestOrBuilder.java @@ -27,10 +27,9 @@ public interface ListExperimentsRequestOrBuilder * * *
-   * Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]
-   * to list all environments for. Format: `projects/<Project
-   * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment
-   * ID>`.
+   * Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to list all environments for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>`.
    * 
* * @@ -44,10 +43,9 @@ public interface ListExperimentsRequestOrBuilder * * *
-   * Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]
-   * to list all environments for. Format: `projects/<Project
-   * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment
-   * ID>`.
+   * Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to list all environments for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>`.
    * 
* * diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExperimentsResponse.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExperimentsResponse.java index ec88fdbd8..7b8008b6e 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExperimentsResponse.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExperimentsResponse.java @@ -22,8 +22,7 @@ * * *
- * The response message for
- * [Experiments.ListExperiments][google.cloud.dialogflow.cx.v3beta1.Experiments.ListExperiments].
+ * The response message for [Experiments.ListExperiments][google.cloud.dialogflow.cx.v3beta1.Experiments.ListExperiments].
  * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse} @@ -441,8 +440,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The response message for
-   * [Experiments.ListExperiments][google.cloud.dialogflow.cx.v3beta1.Experiments.ListExperiments].
+   * The response message for [Experiments.ListExperiments][google.cloud.dialogflow.cx.v3beta1.Experiments.ListExperiments].
    * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Page.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Page.java index 899513cae..79669e8a6 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Page.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Page.java @@ -531,6 +531,9 @@ public com.google.protobuf.ByteString getTransitionRouteGroupsBytes(int index) { * [transition route groups][google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.Page.transition_route_groups] with only @@ -559,6 +562,9 @@ public com.google.protobuf.ByteString getTransitionRouteGroupsBytes(int index) { * [transition route groups][google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.Page.transition_route_groups] with only @@ -587,6 +593,9 @@ public com.google.protobuf.ByteString getTransitionRouteGroupsBytes(int index) { * [transition route groups][google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.Page.transition_route_groups] with only @@ -614,6 +623,9 @@ public int getTransitionRoutesCount() { * [transition route groups][google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.Page.transition_route_groups] with only @@ -641,6 +653,9 @@ public com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute getTransitionRoute * [transition route groups][google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.Page.transition_route_groups] with only @@ -2182,6 +2197,9 @@ private void ensureTransitionRoutesIsMutable() { * [transition route groups][google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.Page.transition_route_groups] with only @@ -2213,6 +2231,9 @@ private void ensureTransitionRoutesIsMutable() { * [transition route groups][google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.Page.transition_route_groups] with only @@ -2243,6 +2264,9 @@ public int getTransitionRoutesCount() { * [transition route groups][google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.Page.transition_route_groups] with only @@ -2273,6 +2297,9 @@ public com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute getTransitionRoute * [transition route groups][google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.Page.transition_route_groups] with only @@ -2310,6 +2337,9 @@ public Builder setTransitionRoutes( * [transition route groups][google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.Page.transition_route_groups] with only @@ -2344,6 +2374,9 @@ public Builder setTransitionRoutes( * [transition route groups][google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.Page.transition_route_groups] with only @@ -2381,6 +2414,9 @@ public Builder addTransitionRoutes( * [transition route groups][google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.Page.transition_route_groups] with only @@ -2418,6 +2454,9 @@ public Builder addTransitionRoutes( * [transition route groups][google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.Page.transition_route_groups] with only @@ -2452,6 +2491,9 @@ public Builder addTransitionRoutes( * [transition route groups][google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.Page.transition_route_groups] with only @@ -2486,6 +2528,9 @@ public Builder addTransitionRoutes( * [transition route groups][google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.Page.transition_route_groups] with only @@ -2521,6 +2566,9 @@ public Builder addAllTransitionRoutes( * [transition route groups][google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.Page.transition_route_groups] with only @@ -2554,6 +2602,9 @@ public Builder clearTransitionRoutes() { * [transition route groups][google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.Page.transition_route_groups] with only @@ -2587,6 +2638,9 @@ public Builder removeTransitionRoutes(int index) { * [transition route groups][google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.Page.transition_route_groups] with only @@ -2614,6 +2668,9 @@ public Builder removeTransitionRoutes(int index) { * [transition route groups][google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.Page.transition_route_groups] with only @@ -2645,6 +2702,9 @@ public Builder removeTransitionRoutes(int index) { * [transition route groups][google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.Page.transition_route_groups] with only @@ -2676,6 +2736,9 @@ public Builder removeTransitionRoutes(int index) { * [transition route groups][google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.Page.transition_route_groups] with only @@ -2704,6 +2767,9 @@ public Builder removeTransitionRoutes(int index) { * [transition route groups][google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.Page.transition_route_groups] with only @@ -2733,6 +2799,9 @@ public Builder removeTransitionRoutes(int index) { * [transition route groups][google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.Page.transition_route_groups] with only diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PageOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PageOrBuilder.java index ea2f8b587..55b12f9c0 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PageOrBuilder.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PageOrBuilder.java @@ -255,6 +255,9 @@ public interface PageOrBuilder * [transition route groups][google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.Page.transition_route_groups] with only @@ -279,6 +282,9 @@ public interface PageOrBuilder * [transition route groups][google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.Page.transition_route_groups] with only @@ -303,6 +309,9 @@ public interface PageOrBuilder * [transition route groups][google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.Page.transition_route_groups] with only @@ -327,6 +336,9 @@ public interface PageOrBuilder * [transition route groups][google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.Page.transition_route_groups] with only @@ -352,6 +364,9 @@ public interface PageOrBuilder * [transition route groups][google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.Page.transition_route_groups] with only diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/StartExperimentRequest.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/StartExperimentRequest.java index 225233618..0f926fe27 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/StartExperimentRequest.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/StartExperimentRequest.java @@ -22,8 +22,7 @@ * * *
- * The request message for
- * [Experiments.StartExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.StartExperiment].
+ * The request message for [Experiments.StartExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.StartExperiment].
  * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest} @@ -333,8 +332,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The request message for
-   * [Experiments.StartExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.StartExperiment].
+   * The request message for [Experiments.StartExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.StartExperiment].
    * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/StopExperimentRequest.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/StopExperimentRequest.java index c6c46db81..8036a1c27 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/StopExperimentRequest.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/StopExperimentRequest.java @@ -22,8 +22,7 @@ * * *
- * The request message for
- * [Experiments.StopExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.StopExperiment].
+ * The request message for [Experiments.StopExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.StopExperiment].
  * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest} @@ -333,8 +332,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The request message for
-   * [Experiments.StopExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.StopExperiment].
+   * The request message for [Experiments.StopExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.StopExperiment].
    * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateExperimentRequest.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateExperimentRequest.java index 1af4d4e3d..e056312ae 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateExperimentRequest.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateExperimentRequest.java @@ -22,8 +22,7 @@ * * *
- * The request message for
- * [Experiments.UpdateExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.UpdateExperiment].
+ * The request message for [Experiments.UpdateExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.UpdateExperiment].
  * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest} @@ -421,8 +420,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The request message for
-   * [Experiments.UpdateExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.UpdateExperiment].
+   * The request message for [Experiments.UpdateExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.UpdateExperiment].
    * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/WebhookProto.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/WebhookProto.java index 55c1ae584..bb9ac232b 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/WebhookProto.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/WebhookProto.java @@ -83,6 +83,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dialogflow_cx_v3beta1_WebhookRequest_IntentInfo_ParametersEntry_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_cx_v3beta1_WebhookRequest_IntentInfo_ParametersEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_WebhookRequest_SentimentAnalysisResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_WebhookRequest_SentimentAnalysisResult_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_dialogflow_cx_v3beta1_WebhookResponse_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -161,7 +165,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\002\022/\n\013update_mask\030\002 \001(\0132\032.google.protobuf" + ".FieldMask\"^\n\024DeleteWebhookRequest\0227\n\004na" + "me\030\001 \001(\tB)\340A\002\372A#\n!dialogflow.googleapis." - + "com/Webhook\022\r\n\005force\030\002 \001(\010\"\306\007\n\016WebhookRe" + + "com/Webhook\022\r\n\005force\030\002 \001(\010\"\362\010\n\016WebhookRe" + "quest\022!\n\031detect_intent_response_id\030\001 \001(\t" + "\022\\\n\020fulfillment_info\030\006 \001(\0132B.google.clou" + "d.dialogflow.cx.v3beta1.WebhookRequest.F" @@ -173,94 +177,98 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + ".dialogflow.cx.v3beta1.SessionInfo\022E\n\010me" + "ssages\030\007 \003(\01323.google.cloud.dialogflow.c" + "x.v3beta1.ResponseMessage\022(\n\007payload\030\010 \001" - + "(\0132\027.google.protobuf.Struct\032\036\n\017Fulfillme" - + "ntInfo\022\013\n\003tag\030\001 \001(\t\032\305\003\n\nIntentInfo\022B\n\023la" - + "st_matched_intent\030\001 \001(\tB%\372A\"\n dialogflow" - + ".googleapis.com/Intent\022\024\n\014display_name\030\003" - + " \001(\t\022a\n\nparameters\030\002 \003(\0132M.google.cloud." - + "dialogflow.cx.v3beta1.WebhookRequest.Int" - + "entInfo.ParametersEntry\022\022\n\nconfidence\030\004 " - + "\001(\002\032^\n\024IntentParameterValue\022\026\n\016original_" - + "value\030\001 \001(\t\022.\n\016resolved_value\030\002 \001(\0132\026.go" - + "ogle.protobuf.Value\032\205\001\n\017ParametersEntry\022" - + "\013\n\003key\030\001 \001(\t\022a\n\005value\030\002 \001(\0132R.google.clo" - + "ud.dialogflow.cx.v3beta1.WebhookRequest." - + "IntentInfo.IntentParameterValue:\0028\001\"\310\005\n\017" - + "WebhookResponse\022e\n\024fulfillment_response\030" - + "\001 \001(\0132G.google.cloud.dialogflow.cx.v3bet" - + "a1.WebhookResponse.FulfillmentResponse\022?" - + "\n\tpage_info\030\002 \001(\0132,.google.cloud.dialogf" - + "low.cx.v3beta1.PageInfo\022E\n\014session_info\030" - + "\003 \001(\0132/.google.cloud.dialogflow.cx.v3bet" - + "a1.SessionInfo\022(\n\007payload\030\004 \001(\0132\027.google" - + ".protobuf.Struct\022:\n\013target_page\030\005 \001(\tB#\372" - + "A \n\036dialogflow.googleapis.com/PageH\000\022:\n\013" - + "target_flow\030\006 \001(\tB#\372A \n\036dialogflow.googl" - + "eapis.com/FlowH\000\032\225\002\n\023FulfillmentResponse" - + "\022E\n\010messages\030\001 \003(\01323.google.cloud.dialog" - + "flow.cx.v3beta1.ResponseMessage\022m\n\016merge" - + "_behavior\030\002 \001(\0162U.google.cloud.dialogflo" - + "w.cx.v3beta1.WebhookResponse.Fulfillment" - + "Response.MergeBehavior\"H\n\rMergeBehavior\022" - + "\036\n\032MERGE_BEHAVIOR_UNSPECIFIED\020\000\022\n\n\006APPEN" - + "D\020\001\022\013\n\007REPLACE\020\002B\014\n\ntransition\"\254\004\n\010PageI" - + "nfo\0229\n\014current_page\030\001 \001(\tB#\372A \n\036dialogfl" - + "ow.googleapis.com/Page\022H\n\tform_info\030\003 \001(" - + "\01325.google.cloud.dialogflow.cx.v3beta1.P" - + "ageInfo.FormInfo\032\232\003\n\010FormInfo\022[\n\016paramet" - + "er_info\030\002 \003(\0132C.google.cloud.dialogflow." - + "cx.v3beta1.PageInfo.FormInfo.ParameterIn" - + "fo\032\260\002\n\rParameterInfo\022\024\n\014display_name\030\001 \001" - + "(\t\022\020\n\010required\030\002 \001(\010\022a\n\005state\030\003 \001(\0162R.go" - + "ogle.cloud.dialogflow.cx.v3beta1.PageInf" - + "o.FormInfo.ParameterInfo.ParameterState\022" - + "%\n\005value\030\004 \001(\0132\026.google.protobuf.Value\022\026" - + "\n\016just_collected\030\005 \001(\010\"U\n\016ParameterState" - + "\022\037\n\033PARAMETER_STATE_UNSPECIFIED\020\000\022\t\n\005EMP" - + "TY\020\001\022\013\n\007INVALID\020\002\022\n\n\006FILLED\020\003\"\346\001\n\013Sessio" - + "nInfo\0227\n\007session\030\001 \001(\tB&\372A#\n!dialogflow." - + "googleapis.com/Session\022S\n\nparameters\030\002 \003" - + "(\0132?.google.cloud.dialogflow.cx.v3beta1." - + "SessionInfo.ParametersEntry\032I\n\017Parameter" - + "sEntry\022\013\n\003key\030\001 \001(\t\022%\n\005value\030\002 \001(\0132\026.goo" - + "gle.protobuf.Value:\0028\0012\375\010\n\010Webhooks\022\316\001\n\014" - + "ListWebhooks\0227.google.cloud.dialogflow.c" - + "x.v3beta1.ListWebhooksRequest\0328.google.c" - + "loud.dialogflow.cx.v3beta1.ListWebhooksR" - + "esponse\"K\202\323\344\223\002<\022:/v3beta1/{parent=projec" - + "ts/*/locations/*/agents/*}/webhooks\332A\006pa" - + "rent\022\273\001\n\nGetWebhook\0225.google.cloud.dialo" - + "gflow.cx.v3beta1.GetWebhookRequest\032+.goo" - + "gle.cloud.dialogflow.cx.v3beta1.Webhook\"" - + "I\202\323\344\223\002<\022:/v3beta1/{name=projects/*/locat" - + "ions/*/agents/*/webhooks/*}\332A\004name\022\324\001\n\rC" - + "reateWebhook\0228.google.cloud.dialogflow.c" - + "x.v3beta1.CreateWebhookRequest\032+.google." - + "cloud.dialogflow.cx.v3beta1.Webhook\"\\\202\323\344" - + "\223\002E\":/v3beta1/{parent=projects/*/locatio" - + "ns/*/agents/*}/webhooks:\007webhook\332A\016paren" - + "t,webhook\022\341\001\n\rUpdateWebhook\0228.google.clo" - + "ud.dialogflow.cx.v3beta1.UpdateWebhookRe" - + "quest\032+.google.cloud.dialogflow.cx.v3bet" - + "a1.Webhook\"i\202\323\344\223\002M2B/v3beta1/{webhook.na" - + "me=projects/*/locations/*/agents/*/webho" - + "oks/*}:\007webhook\332A\023webhook,update_mask\022\254\001" - + "\n\rDeleteWebhook\0228.google.cloud.dialogflo" - + "w.cx.v3beta1.DeleteWebhookRequest\032\026.goog" - + "le.protobuf.Empty\"I\202\323\344\223\002<*:/v3beta1/{nam" - + "e=projects/*/locations/*/agents/*/webhoo" - + "ks/*}\332A\004name\032x\312A\031dialogflow.googleapis.c" - + "om\322AYhttps://www.googleapis.com/auth/clo" - + "ud-platform,https://www.googleapis.com/a" - + "uth/dialogflowB\252\002\n&com.google.cloud.dial" - + "ogflow.cx.v3beta1B\014WebhookProtoP\001ZDgoogl" - + "e.golang.org/genproto/googleapis/cloud/d" - + "ialogflow/cx/v3beta1;cx\370\001\001\242\002\002DF\252\002\"Google" - + ".Cloud.Dialogflow.Cx.V3Beta1\352A|\n\'service" - + "directory.googleapis.com/Service\022Qprojec" - + "ts/{project}/locations/{location}/namesp" - + "aces/{namespace}/services/{service}b\006pro" - + "to3" + + "(\0132\027.google.protobuf.Struct\022m\n\031sentiment" + + "_analysis_result\030\t \001(\0132J.google.cloud.di" + + "alogflow.cx.v3beta1.WebhookRequest.Senti" + + "mentAnalysisResult\032\036\n\017FulfillmentInfo\022\013\n" + + "\003tag\030\001 \001(\t\032\305\003\n\nIntentInfo\022B\n\023last_matche" + + "d_intent\030\001 \001(\tB%\372A\"\n dialogflow.googleap" + + "is.com/Intent\022\024\n\014display_name\030\003 \001(\t\022a\n\np" + + "arameters\030\002 \003(\0132M.google.cloud.dialogflo" + + "w.cx.v3beta1.WebhookRequest.IntentInfo.P" + + "arametersEntry\022\022\n\nconfidence\030\004 \001(\002\032^\n\024In" + + "tentParameterValue\022\026\n\016original_value\030\001 \001" + + "(\t\022.\n\016resolved_value\030\002 \001(\0132\026.google.prot" + + "obuf.Value\032\205\001\n\017ParametersEntry\022\013\n\003key\030\001 " + + "\001(\t\022a\n\005value\030\002 \001(\0132R.google.cloud.dialog" + + "flow.cx.v3beta1.WebhookRequest.IntentInf" + + "o.IntentParameterValue:\0028\001\032;\n\027SentimentA" + + "nalysisResult\022\r\n\005score\030\001 \001(\002\022\021\n\tmagnitud" + + "e\030\002 \001(\002\"\310\005\n\017WebhookResponse\022e\n\024fulfillme" + + "nt_response\030\001 \001(\0132G.google.cloud.dialogf" + + "low.cx.v3beta1.WebhookResponse.Fulfillme" + + "ntResponse\022?\n\tpage_info\030\002 \001(\0132,.google.c" + + "loud.dialogflow.cx.v3beta1.PageInfo\022E\n\014s" + + "ession_info\030\003 \001(\0132/.google.cloud.dialogf" + + "low.cx.v3beta1.SessionInfo\022(\n\007payload\030\004 " + + "\001(\0132\027.google.protobuf.Struct\022:\n\013target_p" + + "age\030\005 \001(\tB#\372A \n\036dialogflow.googleapis.co" + + "m/PageH\000\022:\n\013target_flow\030\006 \001(\tB#\372A \n\036dial" + + "ogflow.googleapis.com/FlowH\000\032\225\002\n\023Fulfill" + + "mentResponse\022E\n\010messages\030\001 \003(\01323.google." + + "cloud.dialogflow.cx.v3beta1.ResponseMess" + + "age\022m\n\016merge_behavior\030\002 \001(\0162U.google.clo" + + "ud.dialogflow.cx.v3beta1.WebhookResponse" + + ".FulfillmentResponse.MergeBehavior\"H\n\rMe" + + "rgeBehavior\022\036\n\032MERGE_BEHAVIOR_UNSPECIFIE" + + "D\020\000\022\n\n\006APPEND\020\001\022\013\n\007REPLACE\020\002B\014\n\ntransiti" + + "on\"\254\004\n\010PageInfo\0229\n\014current_page\030\001 \001(\tB#\372" + + "A \n\036dialogflow.googleapis.com/Page\022H\n\tfo" + + "rm_info\030\003 \001(\01325.google.cloud.dialogflow." + + "cx.v3beta1.PageInfo.FormInfo\032\232\003\n\010FormInf" + + "o\022[\n\016parameter_info\030\002 \003(\0132C.google.cloud" + + ".dialogflow.cx.v3beta1.PageInfo.FormInfo" + + ".ParameterInfo\032\260\002\n\rParameterInfo\022\024\n\014disp" + + "lay_name\030\001 \001(\t\022\020\n\010required\030\002 \001(\010\022a\n\005stat" + + "e\030\003 \001(\0162R.google.cloud.dialogflow.cx.v3b" + + "eta1.PageInfo.FormInfo.ParameterInfo.Par" + + "ameterState\022%\n\005value\030\004 \001(\0132\026.google.prot" + + "obuf.Value\022\026\n\016just_collected\030\005 \001(\010\"U\n\016Pa" + + "rameterState\022\037\n\033PARAMETER_STATE_UNSPECIF" + + "IED\020\000\022\t\n\005EMPTY\020\001\022\013\n\007INVALID\020\002\022\n\n\006FILLED\020" + + "\003\"\346\001\n\013SessionInfo\0227\n\007session\030\001 \001(\tB&\372A#\n" + + "!dialogflow.googleapis.com/Session\022S\n\npa" + + "rameters\030\002 \003(\0132?.google.cloud.dialogflow" + + ".cx.v3beta1.SessionInfo.ParametersEntry\032" + + "I\n\017ParametersEntry\022\013\n\003key\030\001 \001(\t\022%\n\005value" + + "\030\002 \001(\0132\026.google.protobuf.Value:\0028\0012\375\010\n\010W" + + "ebhooks\022\316\001\n\014ListWebhooks\0227.google.cloud." + + "dialogflow.cx.v3beta1.ListWebhooksReques" + + "t\0328.google.cloud.dialogflow.cx.v3beta1.L" + + "istWebhooksResponse\"K\202\323\344\223\002<\022:/v3beta1/{p" + + "arent=projects/*/locations/*/agents/*}/w" + + "ebhooks\332A\006parent\022\273\001\n\nGetWebhook\0225.google" + + ".cloud.dialogflow.cx.v3beta1.GetWebhookR" + + "equest\032+.google.cloud.dialogflow.cx.v3be" + + "ta1.Webhook\"I\202\323\344\223\002<\022:/v3beta1/{name=proj" + + "ects/*/locations/*/agents/*/webhooks/*}\332" + + "A\004name\022\324\001\n\rCreateWebhook\0228.google.cloud." + + "dialogflow.cx.v3beta1.CreateWebhookReque" + + "st\032+.google.cloud.dialogflow.cx.v3beta1." + + "Webhook\"\\\202\323\344\223\002E\":/v3beta1/{parent=projec" + + "ts/*/locations/*/agents/*}/webhooks:\007web" + + "hook\332A\016parent,webhook\022\341\001\n\rUpdateWebhook\022" + + "8.google.cloud.dialogflow.cx.v3beta1.Upd" + + "ateWebhookRequest\032+.google.cloud.dialogf" + + "low.cx.v3beta1.Webhook\"i\202\323\344\223\002M2B/v3beta1" + + "/{webhook.name=projects/*/locations/*/ag" + + "ents/*/webhooks/*}:\007webhook\332A\023webhook,up" + + "date_mask\022\254\001\n\rDeleteWebhook\0228.google.clo" + + "ud.dialogflow.cx.v3beta1.DeleteWebhookRe" + + "quest\032\026.google.protobuf.Empty\"I\202\323\344\223\002<*:/" + + "v3beta1/{name=projects/*/locations/*/age" + + "nts/*/webhooks/*}\332A\004name\032x\312A\031dialogflow." + + "googleapis.com\322AYhttps://www.googleapis." + + "com/auth/cloud-platform,https://www.goog" + + "leapis.com/auth/dialogflowB\252\002\n&com.googl" + + "e.cloud.dialogflow.cx.v3beta1B\014WebhookPr" + + "otoP\001ZDgoogle.golang.org/genproto/google" + + "apis/cloud/dialogflow/cx/v3beta1;cx\370\001\001\242\002" + + "\002DF\252\002\"Google.Cloud.Dialogflow.Cx.V3Beta1" + + "\352A|\n\'servicedirectory.googleapis.com/Ser" + + "vice\022Qprojects/{project}/locations/{loca" + + "tion}/namespaces/{namespace}/services/{s" + + "ervice}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -365,6 +373,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "SessionInfo", "Messages", "Payload", + "SentimentAnalysisResult", }); internal_static_google_cloud_dialogflow_cx_v3beta1_WebhookRequest_FulfillmentInfo_descriptor = internal_static_google_cloud_dialogflow_cx_v3beta1_WebhookRequest_descriptor @@ -406,6 +415,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Key", "Value", }); + internal_static_google_cloud_dialogflow_cx_v3beta1_WebhookRequest_SentimentAnalysisResult_descriptor = + internal_static_google_cloud_dialogflow_cx_v3beta1_WebhookRequest_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_dialogflow_cx_v3beta1_WebhookRequest_SentimentAnalysisResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_WebhookRequest_SentimentAnalysisResult_descriptor, + new java.lang.String[] { + "Score", "Magnitude", + }); internal_static_google_cloud_dialogflow_cx_v3beta1_WebhookResponse_descriptor = getDescriptor().getMessageTypes().get(8); internal_static_google_cloud_dialogflow_cx_v3beta1_WebhookResponse_fieldAccessorTable = diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/WebhookRequest.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/WebhookRequest.java index 2f7ce7dc7..068edf088 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/WebhookRequest.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/WebhookRequest.java @@ -175,6 +175,25 @@ private WebhookRequest( payload_ = subBuilder.buildPartial(); } + break; + } + case 74: + { + com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult.Builder + subBuilder = null; + if (sentimentAnalysisResult_ != null) { + subBuilder = sentimentAnalysisResult_.toBuilder(); + } + sentimentAnalysisResult_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(sentimentAnalysisResult_); + sentimentAnalysisResult_ = subBuilder.buildPartial(); + } + break; } default: @@ -3479,233 +3498,933 @@ public com.google.protobuf.Parser getParserForType() { } } - public static final int DETECT_INTENT_RESPONSE_ID_FIELD_NUMBER = 1; - private volatile java.lang.Object detectIntentResponseId_; - /** - * - * - *
-   * Always present. The unique identifier of the [DetectIntentResponse][google.cloud.dialogflow.cx.v3beta1.DetectIntentResponse] that
-   * will be returned to the API caller.
-   * 
- * - * string detect_intent_response_id = 1; - * - * @return The detectIntentResponseId. - */ - @java.lang.Override - public java.lang.String getDetectIntentResponseId() { - java.lang.Object ref = detectIntentResponseId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - detectIntentResponseId_ = s; - return s; - } + public interface SentimentAnalysisResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Sentiment score between -1.0 (negative sentiment) and 1.0 (positive
+     * sentiment).
+     * 
+ * + * float score = 1; + * + * @return The score. + */ + float getScore(); + + /** + * + * + *
+     * A non-negative number in the [0, +inf) range, which represents the
+     * absolute magnitude of sentiment, regardless of score (positive or
+     * negative).
+     * 
+ * + * float magnitude = 2; + * + * @return The magnitude. + */ + float getMagnitude(); } /** * * *
-   * Always present. The unique identifier of the [DetectIntentResponse][google.cloud.dialogflow.cx.v3beta1.DetectIntentResponse] that
-   * will be returned to the API caller.
+   * Represents the result of sentiment analysis.
    * 
* - * string detect_intent_response_id = 1; - * - * @return The bytes for detectIntentResponseId. + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult} */ - @java.lang.Override - public com.google.protobuf.ByteString getDetectIntentResponseIdBytes() { - java.lang.Object ref = detectIntentResponseId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - detectIntentResponseId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + public static final class SentimentAnalysisResult extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult) + SentimentAnalysisResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use SentimentAnalysisResult.newBuilder() to construct. + private SentimentAnalysisResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); } - } - public static final int FULFILLMENT_INFO_FIELD_NUMBER = 6; - private com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.FulfillmentInfo fulfillmentInfo_; - /** - * - * - *
-   * Always present. Information about the fulfillment that triggered this
-   * webhook call.
-   * 
- * - * .google.cloud.dialogflow.cx.v3beta1.WebhookRequest.FulfillmentInfo fulfillment_info = 6; - * - * - * @return Whether the fulfillmentInfo field is set. - */ - @java.lang.Override - public boolean hasFulfillmentInfo() { - return fulfillmentInfo_ != null; - } - /** - * - * - *
-   * Always present. Information about the fulfillment that triggered this
-   * webhook call.
-   * 
- * - * .google.cloud.dialogflow.cx.v3beta1.WebhookRequest.FulfillmentInfo fulfillment_info = 6; - * - * - * @return The fulfillmentInfo. - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.FulfillmentInfo - getFulfillmentInfo() { - return fulfillmentInfo_ == null - ? com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.FulfillmentInfo.getDefaultInstance() - : fulfillmentInfo_; - } - /** - * - * - *
-   * Always present. Information about the fulfillment that triggered this
-   * webhook call.
-   * 
- * - * .google.cloud.dialogflow.cx.v3beta1.WebhookRequest.FulfillmentInfo fulfillment_info = 6; - * - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.FulfillmentInfoOrBuilder - getFulfillmentInfoOrBuilder() { - return getFulfillmentInfo(); - } + private SentimentAnalysisResult() {} - public static final int INTENT_INFO_FIELD_NUMBER = 3; - private com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.IntentInfo intentInfo_; - /** - * - * - *
-   * Information about the last matched intent.
-   * 
- * - * .google.cloud.dialogflow.cx.v3beta1.WebhookRequest.IntentInfo intent_info = 3; - * - * @return Whether the intentInfo field is set. - */ - @java.lang.Override - public boolean hasIntentInfo() { - return intentInfo_ != null; - } - /** - * - * - *
-   * Information about the last matched intent.
-   * 
- * - * .google.cloud.dialogflow.cx.v3beta1.WebhookRequest.IntentInfo intent_info = 3; - * - * @return The intentInfo. - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.IntentInfo getIntentInfo() { - return intentInfo_ == null - ? com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.IntentInfo.getDefaultInstance() - : intentInfo_; - } - /** - * - * - *
-   * Information about the last matched intent.
-   * 
- * - * .google.cloud.dialogflow.cx.v3beta1.WebhookRequest.IntentInfo intent_info = 3; - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.IntentInfoOrBuilder - getIntentInfoOrBuilder() { - return getIntentInfo(); - } + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SentimentAnalysisResult(); + } - public static final int PAGE_INFO_FIELD_NUMBER = 4; - private com.google.cloud.dialogflow.cx.v3beta1.PageInfo pageInfo_; - /** - * - * - *
-   * Information about page status.
-   * 
- * - * .google.cloud.dialogflow.cx.v3beta1.PageInfo page_info = 4; - * - * @return Whether the pageInfo field is set. - */ - @java.lang.Override - public boolean hasPageInfo() { - return pageInfo_ != null; - } - /** - * - * - *
-   * Information about page status.
-   * 
- * - * .google.cloud.dialogflow.cx.v3beta1.PageInfo page_info = 4; - * - * @return The pageInfo. - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.PageInfo getPageInfo() { - return pageInfo_ == null - ? com.google.cloud.dialogflow.cx.v3beta1.PageInfo.getDefaultInstance() - : pageInfo_; - } - /** - * - * - *
-   * Information about page status.
-   * 
- * - * .google.cloud.dialogflow.cx.v3beta1.PageInfo page_info = 4; - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.PageInfoOrBuilder getPageInfoOrBuilder() { - return getPageInfo(); - } + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } - public static final int SESSION_INFO_FIELD_NUMBER = 5; - private com.google.cloud.dialogflow.cx.v3beta1.SessionInfo sessionInfo_; - /** - * - * - *
-   * Information about session status.
-   * 
- * - * .google.cloud.dialogflow.cx.v3beta1.SessionInfo session_info = 5; - * - * @return Whether the sessionInfo field is set. - */ - @java.lang.Override - public boolean hasSessionInfo() { - return sessionInfo_ != null; - } - /** - * - * - *
-   * Information about session status.
-   * 
+ private SentimentAnalysisResult( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: + { + score_ = input.readFloat(); + break; + } + case 21: + { + magnitude_ = input.readFloat(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.WebhookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_WebhookRequest_SentimentAnalysisResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.WebhookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_WebhookRequest_SentimentAnalysisResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult.class, + com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult.Builder + .class); + } + + public static final int SCORE_FIELD_NUMBER = 1; + private float score_; + /** + * + * + *
+     * Sentiment score between -1.0 (negative sentiment) and 1.0 (positive
+     * sentiment).
+     * 
+ * + * float score = 1; + * + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + + public static final int MAGNITUDE_FIELD_NUMBER = 2; + private float magnitude_; + /** + * + * + *
+     * A non-negative number in the [0, +inf) range, which represents the
+     * absolute magnitude of sentiment, regardless of score (positive or
+     * negative).
+     * 
+ * + * float magnitude = 2; + * + * @return The magnitude. + */ + @java.lang.Override + public float getMagnitude() { + return magnitude_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (score_ != 0F) { + output.writeFloat(1, score_); + } + if (magnitude_ != 0F) { + output.writeFloat(2, magnitude_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (score_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, score_); + } + if (magnitude_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, magnitude_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult other = + (com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult) obj; + + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits(other.getScore())) return false; + if (java.lang.Float.floatToIntBits(getMagnitude()) + != java.lang.Float.floatToIntBits(other.getMagnitude())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getScore()); + hash = (37 * hash) + MAGNITUDE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getMagnitude()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Represents the result of sentiment analysis.
+     * 
+ * + * Protobuf type {@code + * google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult) + com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.WebhookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_WebhookRequest_SentimentAnalysisResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.WebhookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_WebhookRequest_SentimentAnalysisResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult.class, + com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult + .Builder.class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + score_ = 0F; + + magnitude_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.WebhookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_WebhookRequest_SentimentAnalysisResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult build() { + com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult + buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult result = + new com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult(this); + result.score_ = score_; + result.magnitude_ = magnitude_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult + .getDefaultInstance()) return this; + if (other.getScore() != 0F) { + setScore(other.getScore()); + } + if (other.getMagnitude() != 0F) { + setMagnitude(other.getMagnitude()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private float score_; + /** + * + * + *
+       * Sentiment score between -1.0 (negative sentiment) and 1.0 (positive
+       * sentiment).
+       * 
+ * + * float score = 1; + * + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + /** + * + * + *
+       * Sentiment score between -1.0 (negative sentiment) and 1.0 (positive
+       * sentiment).
+       * 
+ * + * float score = 1; + * + * @param value The score to set. + * @return This builder for chaining. + */ + public Builder setScore(float value) { + + score_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Sentiment score between -1.0 (negative sentiment) and 1.0 (positive
+       * sentiment).
+       * 
+ * + * float score = 1; + * + * @return This builder for chaining. + */ + public Builder clearScore() { + + score_ = 0F; + onChanged(); + return this; + } + + private float magnitude_; + /** + * + * + *
+       * A non-negative number in the [0, +inf) range, which represents the
+       * absolute magnitude of sentiment, regardless of score (positive or
+       * negative).
+       * 
+ * + * float magnitude = 2; + * + * @return The magnitude. + */ + @java.lang.Override + public float getMagnitude() { + return magnitude_; + } + /** + * + * + *
+       * A non-negative number in the [0, +inf) range, which represents the
+       * absolute magnitude of sentiment, regardless of score (positive or
+       * negative).
+       * 
+ * + * float magnitude = 2; + * + * @param value The magnitude to set. + * @return This builder for chaining. + */ + public Builder setMagnitude(float value) { + + magnitude_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * A non-negative number in the [0, +inf) range, which represents the
+       * absolute magnitude of sentiment, regardless of score (positive or
+       * negative).
+       * 
+ * + * float magnitude = 2; + * + * @return This builder for chaining. + */ + public Builder clearMagnitude() { + + magnitude_ = 0F; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult) + private static final com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest + .SentimentAnalysisResult + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SentimentAnalysisResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SentimentAnalysisResult(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int DETECT_INTENT_RESPONSE_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object detectIntentResponseId_; + /** + * + * + *
+   * Always present. The unique identifier of the [DetectIntentResponse][google.cloud.dialogflow.cx.v3beta1.DetectIntentResponse] that
+   * will be returned to the API caller.
+   * 
+ * + * string detect_intent_response_id = 1; + * + * @return The detectIntentResponseId. + */ + @java.lang.Override + public java.lang.String getDetectIntentResponseId() { + java.lang.Object ref = detectIntentResponseId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + detectIntentResponseId_ = s; + return s; + } + } + /** + * + * + *
+   * Always present. The unique identifier of the [DetectIntentResponse][google.cloud.dialogflow.cx.v3beta1.DetectIntentResponse] that
+   * will be returned to the API caller.
+   * 
+ * + * string detect_intent_response_id = 1; + * + * @return The bytes for detectIntentResponseId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDetectIntentResponseIdBytes() { + java.lang.Object ref = detectIntentResponseId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + detectIntentResponseId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FULFILLMENT_INFO_FIELD_NUMBER = 6; + private com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.FulfillmentInfo fulfillmentInfo_; + /** + * + * + *
+   * Always present. Information about the fulfillment that triggered this
+   * webhook call.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.WebhookRequest.FulfillmentInfo fulfillment_info = 6; + * + * + * @return Whether the fulfillmentInfo field is set. + */ + @java.lang.Override + public boolean hasFulfillmentInfo() { + return fulfillmentInfo_ != null; + } + /** + * + * + *
+   * Always present. Information about the fulfillment that triggered this
+   * webhook call.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.WebhookRequest.FulfillmentInfo fulfillment_info = 6; + * + * + * @return The fulfillmentInfo. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.FulfillmentInfo + getFulfillmentInfo() { + return fulfillmentInfo_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.FulfillmentInfo.getDefaultInstance() + : fulfillmentInfo_; + } + /** + * + * + *
+   * Always present. Information about the fulfillment that triggered this
+   * webhook call.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.WebhookRequest.FulfillmentInfo fulfillment_info = 6; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.FulfillmentInfoOrBuilder + getFulfillmentInfoOrBuilder() { + return getFulfillmentInfo(); + } + + public static final int INTENT_INFO_FIELD_NUMBER = 3; + private com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.IntentInfo intentInfo_; + /** + * + * + *
+   * Information about the last matched intent.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.WebhookRequest.IntentInfo intent_info = 3; + * + * @return Whether the intentInfo field is set. + */ + @java.lang.Override + public boolean hasIntentInfo() { + return intentInfo_ != null; + } + /** + * + * + *
+   * Information about the last matched intent.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.WebhookRequest.IntentInfo intent_info = 3; + * + * @return The intentInfo. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.IntentInfo getIntentInfo() { + return intentInfo_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.IntentInfo.getDefaultInstance() + : intentInfo_; + } + /** + * + * + *
+   * Information about the last matched intent.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.WebhookRequest.IntentInfo intent_info = 3; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.IntentInfoOrBuilder + getIntentInfoOrBuilder() { + return getIntentInfo(); + } + + public static final int PAGE_INFO_FIELD_NUMBER = 4; + private com.google.cloud.dialogflow.cx.v3beta1.PageInfo pageInfo_; + /** + * + * + *
+   * Information about page status.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.PageInfo page_info = 4; + * + * @return Whether the pageInfo field is set. + */ + @java.lang.Override + public boolean hasPageInfo() { + return pageInfo_ != null; + } + /** + * + * + *
+   * Information about page status.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.PageInfo page_info = 4; + * + * @return The pageInfo. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.PageInfo getPageInfo() { + return pageInfo_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.PageInfo.getDefaultInstance() + : pageInfo_; + } + /** + * + * + *
+   * Information about page status.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.PageInfo page_info = 4; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.PageInfoOrBuilder getPageInfoOrBuilder() { + return getPageInfo(); + } + + public static final int SESSION_INFO_FIELD_NUMBER = 5; + private com.google.cloud.dialogflow.cx.v3beta1.SessionInfo sessionInfo_; + /** + * + * + *
+   * Information about session status.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.SessionInfo session_info = 5; + * + * @return Whether the sessionInfo field is set. + */ + @java.lang.Override + public boolean hasSessionInfo() { + return sessionInfo_ != null; + } + /** + * + * + *
+   * Information about session status.
+   * 
* * .google.cloud.dialogflow.cx.v3beta1.SessionInfo session_info = 5; * @@ -3857,6 +4576,67 @@ public com.google.protobuf.StructOrBuilder getPayloadOrBuilder() { return getPayload(); } + public static final int SENTIMENT_ANALYSIS_RESULT_FIELD_NUMBER = 9; + private com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult + sentimentAnalysisResult_; + /** + * + * + *
+   * The sentiment analysis result of the current user request. The field is
+   * filled when sentiment analysis is configured to be enabled for the request.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult sentiment_analysis_result = 9; + * + * + * @return Whether the sentimentAnalysisResult field is set. + */ + @java.lang.Override + public boolean hasSentimentAnalysisResult() { + return sentimentAnalysisResult_ != 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.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult sentiment_analysis_result = 9; + * + * + * @return The sentimentAnalysisResult. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult + getSentimentAnalysisResult() { + return sentimentAnalysisResult_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult + .getDefaultInstance() + : sentimentAnalysisResult_; + } + /** + * + * + *
+   * The sentiment analysis result of the current user request. The field is
+   * filled when sentiment analysis is configured to be enabled for the request.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult sentiment_analysis_result = 9; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResultOrBuilder + getSentimentAnalysisResultOrBuilder() { + return getSentimentAnalysisResult(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -3892,6 +4672,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (payload_ != null) { output.writeMessage(8, getPayload()); } + if (sentimentAnalysisResult_ != null) { + output.writeMessage(9, getSentimentAnalysisResult()); + } unknownFields.writeTo(output); } @@ -3922,6 +4705,10 @@ public int getSerializedSize() { if (payload_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getPayload()); } + if (sentimentAnalysisResult_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(9, getSentimentAnalysisResult()); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -3960,6 +4747,10 @@ public boolean equals(final java.lang.Object obj) { if (hasPayload()) { if (!getPayload().equals(other.getPayload())) return false; } + if (hasSentimentAnalysisResult() != other.hasSentimentAnalysisResult()) return false; + if (hasSentimentAnalysisResult()) { + if (!getSentimentAnalysisResult().equals(other.getSentimentAnalysisResult())) return false; + } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -3997,6 +4788,10 @@ public int hashCode() { hash = (37 * hash) + PAYLOAD_FIELD_NUMBER; hash = (53 * hash) + getPayload().hashCode(); } + if (hasSentimentAnalysisResult()) { + hash = (37 * hash) + SENTIMENT_ANALYSIS_RESULT_FIELD_NUMBER; + hash = (53 * hash) + getSentimentAnalysisResult().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -4183,6 +4978,12 @@ public Builder clear() { payload_ = null; payloadBuilder_ = null; } + if (sentimentAnalysisResultBuilder_ == null) { + sentimentAnalysisResult_ = null; + } else { + sentimentAnalysisResult_ = null; + sentimentAnalysisResultBuilder_ = null; + } return this; } @@ -4246,6 +5047,11 @@ public com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest buildPartial() { } else { result.payload_ = payloadBuilder_.build(); } + if (sentimentAnalysisResultBuilder_ == null) { + result.sentimentAnalysisResult_ = sentimentAnalysisResult_; + } else { + result.sentimentAnalysisResult_ = sentimentAnalysisResultBuilder_.build(); + } onBuilt(); return result; } @@ -4342,6 +5148,9 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest o if (other.hasPayload()) { mergePayload(other.getPayload()); } + if (other.hasSentimentAnalysisResult()) { + mergeSentimentAnalysisResult(other.getSentimentAnalysisResult()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -5845,6 +6654,231 @@ public com.google.protobuf.StructOrBuilder getPayloadOrBuilder() { return payloadBuilder_; } + private com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult + sentimentAnalysisResult_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult, + com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult.Builder, + com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResultOrBuilder> + sentimentAnalysisResultBuilder_; + /** + * + * + *
+     * The sentiment analysis result of the current user request. The field is
+     * filled when sentiment analysis is configured to be enabled for the request.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult sentiment_analysis_result = 9; + * + * + * @return Whether the sentimentAnalysisResult field is set. + */ + public boolean hasSentimentAnalysisResult() { + return sentimentAnalysisResultBuilder_ != null || sentimentAnalysisResult_ != 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.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult sentiment_analysis_result = 9; + * + * + * @return The sentimentAnalysisResult. + */ + public com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult + getSentimentAnalysisResult() { + if (sentimentAnalysisResultBuilder_ == null) { + return sentimentAnalysisResult_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult + .getDefaultInstance() + : sentimentAnalysisResult_; + } else { + return sentimentAnalysisResultBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The sentiment analysis result of the current user request. The field is
+     * filled when sentiment analysis is configured to be enabled for the request.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult sentiment_analysis_result = 9; + * + */ + public Builder setSentimentAnalysisResult( + com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult value) { + if (sentimentAnalysisResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sentimentAnalysisResult_ = value; + onChanged(); + } else { + sentimentAnalysisResultBuilder_.setMessage(value); + } + + 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.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult sentiment_analysis_result = 9; + * + */ + public Builder setSentimentAnalysisResult( + com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult.Builder + builderForValue) { + if (sentimentAnalysisResultBuilder_ == null) { + sentimentAnalysisResult_ = builderForValue.build(); + onChanged(); + } else { + sentimentAnalysisResultBuilder_.setMessage(builderForValue.build()); + } + + 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.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult sentiment_analysis_result = 9; + * + */ + public Builder mergeSentimentAnalysisResult( + com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult value) { + if (sentimentAnalysisResultBuilder_ == null) { + if (sentimentAnalysisResult_ != null) { + sentimentAnalysisResult_ = + com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult + .newBuilder(sentimentAnalysisResult_) + .mergeFrom(value) + .buildPartial(); + } else { + sentimentAnalysisResult_ = value; + } + onChanged(); + } else { + sentimentAnalysisResultBuilder_.mergeFrom(value); + } + + 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.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult sentiment_analysis_result = 9; + * + */ + public Builder clearSentimentAnalysisResult() { + if (sentimentAnalysisResultBuilder_ == null) { + sentimentAnalysisResult_ = null; + onChanged(); + } else { + sentimentAnalysisResult_ = null; + sentimentAnalysisResultBuilder_ = null; + } + + 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.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult sentiment_analysis_result = 9; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult.Builder + getSentimentAnalysisResultBuilder() { + + onChanged(); + return getSentimentAnalysisResultFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The sentiment analysis result of the current user request. The field is
+     * filled when sentiment analysis is configured to be enabled for the request.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult sentiment_analysis_result = 9; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResultOrBuilder + getSentimentAnalysisResultOrBuilder() { + if (sentimentAnalysisResultBuilder_ != null) { + return sentimentAnalysisResultBuilder_.getMessageOrBuilder(); + } else { + return sentimentAnalysisResult_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult + .getDefaultInstance() + : sentimentAnalysisResult_; + } + } + /** + * + * + *
+     * The sentiment analysis result of the current user request. The field is
+     * filled when sentiment analysis is configured to be enabled for the request.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult sentiment_analysis_result = 9; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult, + com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult.Builder, + com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResultOrBuilder> + getSentimentAnalysisResultFieldBuilder() { + if (sentimentAnalysisResultBuilder_ == null) { + sentimentAnalysisResultBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult, + com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult + .Builder, + com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest + .SentimentAnalysisResultOrBuilder>( + getSentimentAnalysisResult(), getParentForChildren(), isClean()); + sentimentAnalysisResult_ = null; + } + return sentimentAnalysisResultBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/WebhookRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/WebhookRequestOrBuilder.java index 88aac4b74..7647874a1 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/WebhookRequestOrBuilder.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/WebhookRequestOrBuilder.java @@ -294,4 +294,50 @@ public interface WebhookRequestOrBuilder * .google.protobuf.Struct payload = 8; */ com.google.protobuf.StructOrBuilder getPayloadOrBuilder(); + + /** + * + * + *
+   * The sentiment analysis result of the current user request. The field is
+   * filled when sentiment analysis is configured to be enabled for the request.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult sentiment_analysis_result = 9; + * + * + * @return Whether the sentimentAnalysisResult field is set. + */ + boolean hasSentimentAnalysisResult(); + /** + * + * + *
+   * The sentiment analysis result of the current user request. The field is
+   * filled when sentiment analysis is configured to be enabled for the request.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult sentiment_analysis_result = 9; + * + * + * @return The sentimentAnalysisResult. + */ + com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult + getSentimentAnalysisResult(); + /** + * + * + *
+   * The sentiment analysis result of the current user request. The field is
+   * filled when sentiment analysis is configured to be enabled for the request.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResult sentiment_analysis_result = 9; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.WebhookRequest.SentimentAnalysisResultOrBuilder + getSentimentAnalysisResultOrBuilder(); } diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/audio_config.proto b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/audio_config.proto index 93234328b..c6a1b0201 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/audio_config.proto +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/audio_config.proto @@ -29,6 +29,31 @@ option java_outer_classname = "AudioConfigProto"; option java_package = "com.google.cloud.dialogflow.cx.v3beta1"; option objc_class_prefix = "DF"; +// Information for a word recognized by the speech recognizer. +message SpeechWordInfo { + // The word this info is for. + string word = 3; + + // 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. + google.protobuf.Duration start_offset = 1; + + // 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. + google.protobuf.Duration end_offset = 2; + + // 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. + float confidence = 4; +} + // Audio encoding of the audio content sent in the conversational query request. // Refer to the // [Cloud Speech API @@ -78,31 +103,6 @@ enum AudioEncoding { AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE = 7; } -// Information for a word recognized by the speech recognizer. -message SpeechWordInfo { - // The word this info is for. - string word = 3; - - // 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. - google.protobuf.Duration start_offset = 1; - - // 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. - google.protobuf.Duration end_offset = 2; - - // 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. - float confidence = 4; -} - // Instructs the speech recognizer on how to process the audio content. message InputAudioConfig { // Required. Audio encoding of the audio content to process. diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/experiment.proto b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/experiment.proto index a6d69f1cd..f19494309 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/experiment.proto +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/experiment.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -33,26 +33,22 @@ option java_outer_classname = "ExperimentProto"; option java_package = "com.google.cloud.dialogflow.cx.v3beta1"; option objc_class_prefix = "DF"; -// Service for managing -// [Experiments][google.cloud.dialogflow.cx.v3beta1.Experiment]. +// Service for managing [Experiments][google.cloud.dialogflow.cx.v3beta1.Experiment]. service Experiments { option (google.api.default_host) = "dialogflow.googleapis.com"; option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform," "https://www.googleapis.com/auth/dialogflow"; - // Returns the list of all experiments in the specified - // [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. - rpc ListExperiments(ListExperimentsRequest) - returns (ListExperimentsResponse) { + // Returns the list of all experiments in the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. + rpc ListExperiments(ListExperimentsRequest) returns (ListExperimentsResponse) { option (google.api.http) = { get: "/v3beta1/{parent=projects/*/locations/*/agents/*/environments/*}/experiments" }; option (google.api.method_signature) = "parent"; } - // Retrieves the specified - // [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. + // Retrieves the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. rpc GetExperiment(GetExperimentRequest) returns (Experiment) { option (google.api.http) = { get: "/v3beta1/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}" @@ -60,9 +56,7 @@ service Experiments { option (google.api.method_signature) = "name"; } - // Creates an [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment] in - // the specified - // [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. + // Creates an [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment] in the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. rpc CreateExperiment(CreateExperimentRequest) returns (Experiment) { option (google.api.http) = { post: "/v3beta1/{parent=projects/*/locations/*/agents/*/environments/*}/experiments" @@ -71,8 +65,7 @@ service Experiments { option (google.api.method_signature) = "parent,experiment"; } - // Updates the specified - // [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. + // Updates the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. rpc UpdateExperiment(UpdateExperimentRequest) returns (Experiment) { option (google.api.http) = { patch: "/v3beta1/{experiment.name=projects/*/locations/*/agents/*/environments/*/experiments/*}" @@ -81,19 +74,16 @@ service Experiments { option (google.api.method_signature) = "experiment,update_mask"; } - // Deletes the specified - // [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. - rpc DeleteExperiment(DeleteExperimentRequest) - returns (google.protobuf.Empty) { + // Deletes the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. + rpc DeleteExperiment(DeleteExperimentRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v3beta1/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}" }; option (google.api.method_signature) = "name"; } - // Starts the specified - // [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only - // changes the state of experiment from PENDING to RUNNING. + // Starts the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only changes the state of + // experiment from PENDING to RUNNING. rpc StartExperiment(StartExperimentRequest) returns (Experiment) { option (google.api.http) = { post: "/v3beta1/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}:start" @@ -102,9 +92,8 @@ service Experiments { option (google.api.method_signature) = "name"; } - // Stops the specified - // [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only - // changes the state of experiment from RUNNING to DONE. + // Stops the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only changes the state of + // experiment from RUNNING to DONE. rpc StopExperiment(StopExperimentRequest) returns (Experiment) { option (google.api.http) = { post: "/v3beta1/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}:stop" @@ -184,13 +173,12 @@ message Experiment { // Version variant and associated metrics. message VersionMetrics { - // The name of the flow - // [Version][google.cloud.dialogflow.cx.v3beta1.Version]. Format: - // `projects//locations//agents//flows//versions/`. + // The name of the flow [Version][google.cloud.dialogflow.cx.v3beta1.Version]. + // Format: `projects//locations//agents//flows//versions/`. string version = 1 [(google.api.resource_reference) = { - type: "dialogflow.googleapis.com/Version" - }]; + type: "dialogflow.googleapis.com/Version" + }]; // The metrics and corresponding confidence intervals in the inference // result. @@ -265,8 +253,8 @@ message Experiment { // ID>/environments//experiments/.. string name = 1; - // Required. The human-readable name of the experiment (unique in an - // environment). Limit of 64 characters. + // Required. The human-readable name of the experiment (unique in an environment). Limit + // of 64 characters. string display_name = 2 [(google.api.field_behavior) = REQUIRED]; // The human-readable description of the experiment. @@ -337,13 +325,11 @@ message VariantsHistory { google.protobuf.Timestamp update_time = 2; } -// The request message for -// [Experiments.ListExperiments][google.cloud.dialogflow.cx.v3beta1.Experiments.ListExperiments]. +// The request message for [Experiments.ListExperiments][google.cloud.dialogflow.cx.v3beta1.Experiments.ListExperiments]. message ListExperimentsRequest { - // Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] - // to list all environments for. Format: `projects//locations//agents//environments/`. + // Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to list all environments for. + // Format: `projects//locations//agents//environments/`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -359,8 +345,7 @@ message ListExperimentsRequest { string page_token = 3; } -// The response message for -// [Experiments.ListExperiments][google.cloud.dialogflow.cx.v3beta1.Experiments.ListExperiments]. +// The response message for [Experiments.ListExperiments][google.cloud.dialogflow.cx.v3beta1.Experiments.ListExperiments]. message ListExperimentsResponse { // 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 @@ -373,12 +358,10 @@ message ListExperimentsResponse { string next_page_token = 2; } -// The request message for -// [Experiments.GetExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.GetExperiment]. +// The request message for [Experiments.GetExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.GetExperiment]. message GetExperimentRequest { - // Required. The name of the - // [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. Format: - // `projects//locations//agents//locations//agents//environments//experiments/`. string name = 1 [ (google.api.field_behavior) = REQUIRED, @@ -388,11 +371,9 @@ message GetExperimentRequest { ]; } -// The request message for -// [Experiments.CreateExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.CreateExperiment]. +// The request message for [Experiments.CreateExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.CreateExperiment]. message CreateExperimentRequest { - // Required. The [Agent][google.cloud.dialogflow.cx.v3beta1.Agent] to create - // an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] for. + // Required. The [Agent][google.cloud.dialogflow.cx.v3beta1.Agent] to create an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] for. // Format: `projects//locations//agents//environments/`. string parent = 1 [ @@ -406,22 +387,18 @@ message CreateExperimentRequest { Experiment experiment = 2 [(google.api.field_behavior) = REQUIRED]; } -// The request message for -// [Experiments.UpdateExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.UpdateExperiment]. +// The request message for [Experiments.UpdateExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.UpdateExperiment]. message UpdateExperimentRequest { // Required. The experiment to update. Experiment experiment = 1 [(google.api.field_behavior) = REQUIRED]; // Required. The mask to control which fields get updated. - google.protobuf.FieldMask update_mask = 2 - [(google.api.field_behavior) = REQUIRED]; + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; } -// The request message for -// [Experiments.DeleteExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.DeleteExperiment]. +// The request message for [Experiments.DeleteExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.DeleteExperiment]. message DeleteExperimentRequest { - // Required. The name of the - // [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to delete. + // Required. The name of the [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to delete. // Format: `projects//locations//agents//environments//experiments/`. string name = 1 [ @@ -432,8 +409,7 @@ message DeleteExperimentRequest { ]; } -// The request message for -// [Experiments.StartExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.StartExperiment]. +// The request message for [Experiments.StartExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.StartExperiment]. message StartExperimentRequest { // Required. Resource name of the experiment to start. // Format: `projects//locations//agents//locations//agents/ Date: Tue, 16 Feb 2021 19:20:00 -0800 Subject: [PATCH 09/12] feat: supports SentimentAnalysisResult in webhook request, add http rules for long running operations docs: minor updates in wording PiperOrigin-RevId: 356804449 Source-Author: Google APIs Source-Date: Wed Feb 10 12:49:39 2021 -0800 Source-Repo: googleapis/googleapis Source-Sha: 6de7abea4c424025bfcf996ef40c96e53c070100 Source-Link: https://github.com/googleapis/googleapis/commit/6de7abea4c424025bfcf996ef40c96e53c070100 --- .../google/cloud/dialogflow/cx/v3/Page.java | 69 + .../cloud/dialogflow/cx/v3/PageOrBuilder.java | 15 + .../dialogflow/cx/v3/ResponseMessage.java | 982 +++++------ .../cx/v3/ResponseMessageProto.java | 32 +- .../cloud/dialogflow/cx/v3/WebhookProto.java | 186 ++- .../dialogflow/cx/v3/WebhookRequest.java | 1459 ++++++++++++++--- .../cx/v3/WebhookRequestOrBuilder.java | 46 + .../cloud/dialogflow/cx/v3/audio_config.proto | 50 +- .../google/cloud/dialogflow/cx/v3/page.proto | 3 + .../dialogflow/cx/v3/response_message.proto | 14 +- .../cloud/dialogflow/cx/v3/webhook.proto | 16 + synth.metadata | 8 +- 12 files changed, 2038 insertions(+), 842 deletions(-) diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Page.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Page.java index 6d84e0e0a..3f2541657 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Page.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Page.java @@ -527,6 +527,9 @@ public com.google.protobuf.ByteString getTransitionRouteGroupsBytes(int index) { * [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 @@ -554,6 +557,9 @@ public com.google.protobuf.ByteString getTransitionRouteGroupsBytes(int index) { * [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 @@ -581,6 +587,9 @@ public com.google.protobuf.ByteString getTransitionRouteGroupsBytes(int index) { * [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 @@ -607,6 +616,9 @@ public int getTransitionRoutesCount() { * [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 @@ -633,6 +645,9 @@ public com.google.cloud.dialogflow.cx.v3.TransitionRoute getTransitionRoutes(int * [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 @@ -2166,6 +2181,9 @@ private void ensureTransitionRoutesIsMutable() { * [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 @@ -2196,6 +2214,9 @@ private void ensureTransitionRoutesIsMutable() { * [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 @@ -2225,6 +2246,9 @@ public int getTransitionRoutesCount() { * [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 @@ -2254,6 +2278,9 @@ public com.google.cloud.dialogflow.cx.v3.TransitionRoute getTransitionRoutes(int * [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 @@ -2290,6 +2317,9 @@ public Builder setTransitionRoutes( * [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 @@ -2323,6 +2353,9 @@ public Builder setTransitionRoutes( * [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 @@ -2358,6 +2391,9 @@ public Builder addTransitionRoutes(com.google.cloud.dialogflow.cx.v3.TransitionR * [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 @@ -2394,6 +2430,9 @@ public Builder addTransitionRoutes( * [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 @@ -2427,6 +2466,9 @@ public Builder addTransitionRoutes( * [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 @@ -2460,6 +2502,9 @@ public Builder addTransitionRoutes( * [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 @@ -2493,6 +2538,9 @@ public Builder addAllTransitionRoutes( * [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 @@ -2525,6 +2573,9 @@ public Builder clearTransitionRoutes() { * [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 @@ -2557,6 +2608,9 @@ public Builder removeTransitionRoutes(int index) { * [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 @@ -2583,6 +2637,9 @@ public com.google.cloud.dialogflow.cx.v3.TransitionRoute.Builder getTransitionRo * [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 @@ -2613,6 +2670,9 @@ public com.google.cloud.dialogflow.cx.v3.TransitionRouteOrBuilder getTransitionR * [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 @@ -2643,6 +2703,9 @@ public com.google.cloud.dialogflow.cx.v3.TransitionRouteOrBuilder getTransitionR * [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 @@ -2669,6 +2732,9 @@ public com.google.cloud.dialogflow.cx.v3.TransitionRoute.Builder addTransitionRo * [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 @@ -2697,6 +2763,9 @@ public com.google.cloud.dialogflow.cx.v3.TransitionRoute.Builder addTransitionRo * [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 diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PageOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PageOrBuilder.java index db43b4951..34e56d905 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PageOrBuilder.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PageOrBuilder.java @@ -255,6 +255,9 @@ public interface PageOrBuilder * [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 @@ -278,6 +281,9 @@ public interface PageOrBuilder * [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 @@ -301,6 +307,9 @@ public interface PageOrBuilder * [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 @@ -324,6 +333,9 @@ public interface PageOrBuilder * [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 @@ -348,6 +360,9 @@ public interface PageOrBuilder * [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 diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessage.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessage.java index 08cc3a086..9e7fe3b1f 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessage.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessage.java @@ -3889,81 +3889,37 @@ public com.google.protobuf.Parser getParserForType() { } } - public interface PlayAudioOrBuilder + public interface EndInteractionOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Required. URI of the audio clip. Dialogflow does not impose any validation on this
-     * value. It is specific to the client that reads it.
-     * 
- * - * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The audioUri. - */ - java.lang.String getAudioUri(); - /** - * - * - *
-     * Required. URI of the audio clip. Dialogflow does not impose any validation on this
-     * value. It is specific to the client that reads it.
-     * 
- * - * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for audioUri. - */ - com.google.protobuf.ByteString getAudioUriBytes(); - - /** - * - * - *
-     * 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.
-     * 
- * - * bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The allowPlaybackInterruption. - */ - boolean getAllowPlaybackInterruption(); - } + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction) + com.google.protobuf.MessageOrBuilder {} /** * * *
-   * Specifies an audio clip to be played by the client as part of the response.
+   * Indicates that interaction with the Dialogflow agent has ended.
+   * This message is generated by Dialogflow only and not supposed to be
+   * defined by the user.
    * 
* - * Protobuf type {@code google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio} + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction} */ - public static final class PlayAudio extends com.google.protobuf.GeneratedMessageV3 + public static final class EndInteraction extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) - PlayAudioOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction) + EndInteractionOrBuilder { private static final long serialVersionUID = 0L; - // Use PlayAudio.newBuilder() to construct. - private PlayAudio(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use EndInteraction.newBuilder() to construct. + private EndInteraction(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private PlayAudio() { - audioUri_ = ""; - } + private EndInteraction() {} @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new PlayAudio(); + return new EndInteraction(); } @java.lang.Override @@ -3971,7 +3927,7 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PlayAudio( + private EndInteraction( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -3989,18 +3945,6 @@ private PlayAudio( case 0: done = true; break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - audioUri_ = s; - break; - } - case 16: - { - allowPlaybackInterruption_ = input.readBool(); - break; - } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -4022,89 +3966,17 @@ private PlayAudio( public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_descriptor; + .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_EndInteraction_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_fieldAccessorTable + .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_EndInteraction_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.class, - com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.Builder.class); - } - - public static final int AUDIO_URI_FIELD_NUMBER = 1; - private volatile java.lang.Object audioUri_; - /** - * - * - *
-     * Required. URI of the audio clip. Dialogflow does not impose any validation on this
-     * value. It is specific to the client that reads it.
-     * 
- * - * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The audioUri. - */ - @java.lang.Override - public java.lang.String getAudioUri() { - java.lang.Object ref = audioUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - audioUri_ = s; - return s; - } - } - /** - * - * - *
-     * Required. URI of the audio clip. Dialogflow does not impose any validation on this
-     * value. It is specific to the client that reads it.
-     * 
- * - * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for audioUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getAudioUriBytes() { - java.lang.Object ref = audioUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - audioUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ALLOW_PLAYBACK_INTERRUPTION_FIELD_NUMBER = 2; - private boolean allowPlaybackInterruption_; - /** - * - * - *
-     * 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.
-     * 
- * - * bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The allowPlaybackInterruption. - */ - @java.lang.Override - public boolean getAllowPlaybackInterruption() { - return allowPlaybackInterruption_; + com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction.class, + com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction.Builder.class); } private byte memoizedIsInitialized = -1; @@ -4121,12 +3993,6 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getAudioUriBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, audioUri_); - } - if (allowPlaybackInterruption_ != false) { - output.writeBool(2, allowPlaybackInterruption_); - } unknownFields.writeTo(output); } @@ -4136,13 +4002,6 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getAudioUriBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, audioUri_); - } - if (allowPlaybackInterruption_ != false) { - size += - com.google.protobuf.CodedOutputStream.computeBoolSize(2, allowPlaybackInterruption_); - } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -4153,14 +4012,12 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio)) { + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction)) { return super.equals(obj); } - com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio other = - (com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) obj; + com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction other = + (com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction) obj; - if (!getAudioUri().equals(other.getAudioUri())) return false; - if (getAllowPlaybackInterruption() != other.getAllowPlaybackInterruption()) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -4172,80 +4029,77 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + AUDIO_URI_FIELD_NUMBER; - hash = (53 * hash) + getAudioUri().hashCode(); - hash = (37 * hash) + ALLOW_PLAYBACK_INTERRUPTION_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowPlaybackInterruption()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -4263,7 +4117,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio prototype) { + com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -4282,32 +4136,35 @@ protected Builder newBuilderForType( * * *
-     * Specifies an audio clip to be played by the client as part of the response.
+     * Indicates that interaction with the Dialogflow agent has ended.
+     * This message is generated by Dialogflow only and not supposed to be
+     * defined by the user.
      * 
* - * Protobuf type {@code google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio} + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) - com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudioOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction) + com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteractionOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_descriptor; + .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_EndInteraction_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_fieldAccessorTable + .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_EndInteraction_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.class, - com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.Builder.class); + com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction.class, + com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction.Builder.class); } - // Construct using com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.newBuilder() + // Construct using + // com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -4324,28 +4181,25 @@ private void maybeForceBuilderInitialization() { @java.lang.Override public Builder clear() { super.clear(); - audioUri_ = ""; - - allowPlaybackInterruption_ = false; - return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_descriptor; + .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_EndInteraction_descriptor; } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction getDefaultInstanceForType() { - return com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.getDefaultInstance(); + return com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction + .getDefaultInstance(); } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio build() { - com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio result = buildPartial(); + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction build() { + com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -4353,11 +4207,9 @@ public com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio build() { } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio buildPartial() { - com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio result = - new com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio(this); - result.audioUri_ = audioUri_; - result.allowPlaybackInterruption_ = allowPlaybackInterruption_; + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction buildPartial() { + com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction result = + new com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction(this); onBuilt(); return result; } @@ -4399,25 +4251,20 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) { - return mergeFrom((com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) other); + if (other instanceof com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio other) { + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction other) { if (other - == com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.getDefaultInstance()) - return this; - if (!other.getAudioUri().isEmpty()) { - audioUri_ = other.audioUri_; - onChanged(); - } - if (other.getAllowPlaybackInterruption() != false) { - setAllowPlaybackInterruption(other.getAllowPlaybackInterruption()); - } + == com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction + .getDefaultInstance()) return this; this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -4433,12 +4280,12 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parsedMessage = null; + com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = - (com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) + (com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { @@ -4449,178 +4296,6 @@ public Builder mergeFrom( return this; } - private java.lang.Object audioUri_ = ""; - /** - * - * - *
-       * Required. URI of the audio clip. Dialogflow does not impose any validation on this
-       * value. It is specific to the client that reads it.
-       * 
- * - * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The audioUri. - */ - public java.lang.String getAudioUri() { - java.lang.Object ref = audioUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - audioUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-       * Required. URI of the audio clip. Dialogflow does not impose any validation on this
-       * value. It is specific to the client that reads it.
-       * 
- * - * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for audioUri. - */ - public com.google.protobuf.ByteString getAudioUriBytes() { - java.lang.Object ref = audioUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - audioUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-       * Required. URI of the audio clip. Dialogflow does not impose any validation on this
-       * value. It is specific to the client that reads it.
-       * 
- * - * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The audioUri to set. - * @return This builder for chaining. - */ - public Builder setAudioUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - audioUri_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Required. URI of the audio clip. Dialogflow does not impose any validation on this
-       * value. It is specific to the client that reads it.
-       * 
- * - * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearAudioUri() { - - audioUri_ = getDefaultInstance().getAudioUri(); - onChanged(); - return this; - } - /** - * - * - *
-       * Required. URI of the audio clip. Dialogflow does not impose any validation on this
-       * value. It is specific to the client that reads it.
-       * 
- * - * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for audioUri to set. - * @return This builder for chaining. - */ - public Builder setAudioUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - audioUri_ = value; - onChanged(); - return this; - } - - private boolean allowPlaybackInterruption_; - /** - * - * - *
-       * 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.
-       * 
- * - * bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The allowPlaybackInterruption. - */ - @java.lang.Override - public boolean getAllowPlaybackInterruption() { - return allowPlaybackInterruption_; - } - /** - * - * - *
-       * 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.
-       * 
- * - * bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The allowPlaybackInterruption to set. - * @return This builder for chaining. - */ - public Builder setAllowPlaybackInterruption(boolean value) { - - allowPlaybackInterruption_ = value; - onChanged(); - 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.
-       * 
- * - * bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearAllowPlaybackInterruption() { - - allowPlaybackInterruption_ = false; - onChanged(); - return this; - } - @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -4633,78 +4308,124 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction) } - // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) - private static final com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction) + private static final com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio(); + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction(); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio getDefaultInstance() { + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction + getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public PlayAudio parsePartialFrom( + public EndInteraction parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PlayAudio(input, extensionRegistry); + return new EndInteraction(input, extensionRegistry); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio getDefaultInstanceForType() { + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction + getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface EndInteractionOrBuilder + public interface PlayAudioOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction) - com.google.protobuf.MessageOrBuilder {} + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. URI of the audio clip. Dialogflow does not impose any validation on this
+     * value. It is specific to the client that reads it.
+     * 
+ * + * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The audioUri. + */ + java.lang.String getAudioUri(); + /** + * + * + *
+     * Required. URI of the audio clip. Dialogflow does not impose any validation on this
+     * value. It is specific to the client that reads it.
+     * 
+ * + * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for audioUri. + */ + com.google.protobuf.ByteString getAudioUriBytes(); + + /** + * + * + *
+     * 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.
+     * 
+ * + * bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The allowPlaybackInterruption. + */ + boolean getAllowPlaybackInterruption(); + } /** * * *
-   * Indicates that interaction with the Dialogflow agent has ended.
-   * This message is generated by Dialogflow only and not supposed to be
-   * defined by the user.
+   * Specifies an audio clip to be played by the client as part of the response.
    * 
* - * Protobuf type {@code google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction} + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio} */ - public static final class EndInteraction extends com.google.protobuf.GeneratedMessageV3 + public static final class PlayAudio extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction) - EndInteractionOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) + PlayAudioOrBuilder { private static final long serialVersionUID = 0L; - // Use EndInteraction.newBuilder() to construct. - private EndInteraction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use PlayAudio.newBuilder() to construct. + private PlayAudio(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private EndInteraction() {} + private PlayAudio() { + audioUri_ = ""; + } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new EndInteraction(); + return new PlayAudio(); } @java.lang.Override @@ -4712,7 +4433,7 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private EndInteraction( + private PlayAudio( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -4730,6 +4451,18 @@ private EndInteraction( case 0: done = true; break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + audioUri_ = s; + break; + } + case 16: + { + allowPlaybackInterruption_ = input.readBool(); + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -4751,17 +4484,89 @@ private EndInteraction( public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_EndInteraction_descriptor; + .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_EndInteraction_fieldAccessorTable + .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction.class, - com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction.Builder.class); + com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.class, + com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.Builder.class); + } + + public static final int AUDIO_URI_FIELD_NUMBER = 1; + private volatile java.lang.Object audioUri_; + /** + * + * + *
+     * Required. URI of the audio clip. Dialogflow does not impose any validation on this
+     * value. It is specific to the client that reads it.
+     * 
+ * + * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The audioUri. + */ + @java.lang.Override + public java.lang.String getAudioUri() { + java.lang.Object ref = audioUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + audioUri_ = s; + return s; + } + } + /** + * + * + *
+     * Required. URI of the audio clip. Dialogflow does not impose any validation on this
+     * value. It is specific to the client that reads it.
+     * 
+ * + * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for audioUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAudioUriBytes() { + java.lang.Object ref = audioUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + audioUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ALLOW_PLAYBACK_INTERRUPTION_FIELD_NUMBER = 2; + private boolean allowPlaybackInterruption_; + /** + * + * + *
+     * 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.
+     * 
+ * + * bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The allowPlaybackInterruption. + */ + @java.lang.Override + public boolean getAllowPlaybackInterruption() { + return allowPlaybackInterruption_; } private byte memoizedIsInitialized = -1; @@ -4778,6 +4583,12 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getAudioUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, audioUri_); + } + if (allowPlaybackInterruption_ != false) { + output.writeBool(2, allowPlaybackInterruption_); + } unknownFields.writeTo(output); } @@ -4787,6 +4598,13 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; + if (!getAudioUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, audioUri_); + } + if (allowPlaybackInterruption_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(2, allowPlaybackInterruption_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -4797,12 +4615,14 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction)) { + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio)) { return super.equals(obj); } - com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction other = - (com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction) obj; + com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio other = + (com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) obj; + if (!getAudioUri().equals(other.getAudioUri())) return false; + if (getAllowPlaybackInterruption() != other.getAllowPlaybackInterruption()) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -4814,77 +4634,80 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + AUDIO_URI_FIELD_NUMBER; + hash = (53 * hash) + getAudioUri().hashCode(); + hash = (37 * hash) + ALLOW_PLAYBACK_INTERRUPTION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowPlaybackInterruption()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction parseFrom( + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -4902,7 +4725,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction prototype) { + com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -4921,35 +4744,32 @@ protected Builder newBuilderForType( * * *
-     * Indicates that interaction with the Dialogflow agent has ended.
-     * This message is generated by Dialogflow only and not supposed to be
-     * defined by the user.
+     * Specifies an audio clip to be played by the client as part of the response.
      * 
* - * Protobuf type {@code google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction} + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction) - com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteractionOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) + com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudioOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_EndInteraction_descriptor; + .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_EndInteraction_fieldAccessorTable + .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction.class, - com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction.Builder.class); + com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.class, + com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.Builder.class); } - // Construct using - // com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction.newBuilder() + // Construct using com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -4966,25 +4786,28 @@ private void maybeForceBuilderInitialization() { @java.lang.Override public Builder clear() { super.clear(); + audioUri_ = ""; + + allowPlaybackInterruption_ = false; + return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto - .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_EndInteraction_descriptor; + .internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_descriptor; } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio getDefaultInstanceForType() { - return com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction - .getDefaultInstance(); + return com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.getDefaultInstance(); } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction build() { - com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction result = buildPartial(); + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio build() { + com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -4992,9 +4815,11 @@ public com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction build() } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction buildPartial() { - com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction result = - new com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction(this); + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio buildPartial() { + com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio result = + new com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio(this); + result.audioUri_ = audioUri_; + result.allowPlaybackInterruption_ = allowPlaybackInterruption_; onBuilt(); return result; } @@ -5036,20 +4861,25 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction) { - return mergeFrom( - (com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction) other); + if (other instanceof com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom( - com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction other) { + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio other) { if (other - == com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction - .getDefaultInstance()) return this; + == com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.getDefaultInstance()) + return this; + if (!other.getAudioUri().isEmpty()) { + audioUri_ = other.audioUri_; + onChanged(); + } + if (other.getAllowPlaybackInterruption() != false) { + setAllowPlaybackInterruption(other.getAllowPlaybackInterruption()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -5065,12 +4895,12 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction parsedMessage = null; + com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = - (com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction) + (com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { @@ -5081,6 +4911,178 @@ public Builder mergeFrom( return this; } + private java.lang.Object audioUri_ = ""; + /** + * + * + *
+       * Required. URI of the audio clip. Dialogflow does not impose any validation on this
+       * value. It is specific to the client that reads it.
+       * 
+ * + * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The audioUri. + */ + public java.lang.String getAudioUri() { + java.lang.Object ref = audioUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + audioUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. URI of the audio clip. Dialogflow does not impose any validation on this
+       * value. It is specific to the client that reads it.
+       * 
+ * + * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for audioUri. + */ + public com.google.protobuf.ByteString getAudioUriBytes() { + java.lang.Object ref = audioUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + audioUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. URI of the audio clip. Dialogflow does not impose any validation on this
+       * value. It is specific to the client that reads it.
+       * 
+ * + * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The audioUri to set. + * @return This builder for chaining. + */ + public Builder setAudioUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + audioUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. URI of the audio clip. Dialogflow does not impose any validation on this
+       * value. It is specific to the client that reads it.
+       * 
+ * + * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearAudioUri() { + + audioUri_ = getDefaultInstance().getAudioUri(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. URI of the audio clip. Dialogflow does not impose any validation on this
+       * value. It is specific to the client that reads it.
+       * 
+ * + * string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for audioUri to set. + * @return This builder for chaining. + */ + public Builder setAudioUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + audioUri_ = value; + onChanged(); + return this; + } + + private boolean allowPlaybackInterruption_; + /** + * + * + *
+       * 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.
+       * 
+ * + * bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The allowPlaybackInterruption. + */ + @java.lang.Override + public boolean getAllowPlaybackInterruption() { + return allowPlaybackInterruption_; + } + /** + * + * + *
+       * 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.
+       * 
+ * + * bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The allowPlaybackInterruption to set. + * @return This builder for chaining. + */ + public Builder setAllowPlaybackInterruption(boolean value) { + + allowPlaybackInterruption_ = value; + onChanged(); + 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.
+       * 
+ * + * bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearAllowPlaybackInterruption() { + + allowPlaybackInterruption_ = false; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -5093,45 +5095,43 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction) + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) } - // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction) - private static final com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) + private static final com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction(); + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio(); } - public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction - getDefaultInstance() { + public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public EndInteraction parsePartialFrom( + public PlayAudio parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new EndInteraction(input, extensionRegistry); + return new PlayAudio(input, extensionRegistry); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction - getDefaultInstanceForType() { + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessageProto.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessageProto.java index a629c1c90..64f09b7b1 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessageProto.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessageProto.java @@ -47,14 +47,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_OutputAudioText_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_OutputAudioText_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_EndInteraction_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_EndInteraction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -101,9 +101,9 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "gle.protobuf.Struct\032e\n\017OutputAudioText\022\016" + "\n\004text\030\001 \001(\tH\000\022\016\n\004ssml\030\002 \001(\tH\000\022(\n\033allow_" + "playback_interruption\030\003 \001(\010B\003\340A\003B\010\n\006sour" - + "ce\032M\n\tPlayAudio\022\026\n\taudio_uri\030\001 \001(\tB\003\340A\002\022" - + "(\n\033allow_playback_interruption\030\002 \001(\010B\003\340A" - + "\003\032\020\n\016EndInteraction\032\301\001\n\nMixedAudio\022S\n\010se" + + "ce\032\020\n\016EndInteraction\032M\n\tPlayAudio\022\026\n\taud" + + "io_uri\030\001 \001(\tB\003\340A\002\022(\n\033allow_playback_inte" + + "rruption\030\002 \001(\010B\003\340A\003\032\301\001\n\nMixedAudio\022S\n\010se" + "gments\030\001 \003(\0132A.google.cloud.dialogflow.c" + "x.v3.ResponseMessage.MixedAudio.Segment\032" + "^\n\007Segment\022\017\n\005audio\030\001 \001(\014H\000\022\r\n\003uri\030\002 \001(\t" @@ -179,24 +179,24 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Text", "Ssml", "AllowPlaybackInterruption", "Source", }); - internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_EndInteraction_descriptor = internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_descriptor .getNestedTypes() .get(4); + internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_EndInteraction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_EndInteraction_descriptor, + new java.lang.String[] {}); + internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_descriptor + .getNestedTypes() + .get(5); internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_descriptor, new java.lang.String[] { "AudioUri", "AllowPlaybackInterruption", }); - internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_EndInteraction_descriptor = - internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_descriptor - .getNestedTypes() - .get(5); - internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_EndInteraction_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_EndInteraction_descriptor, - new java.lang.String[] {}); internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_descriptor = internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_descriptor .getNestedTypes() diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/WebhookProto.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/WebhookProto.java index 59411d9ae..a9b21babf 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/WebhookProto.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/WebhookProto.java @@ -83,6 +83,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dialogflow_cx_v3_WebhookRequest_IntentInfo_ParametersEntry_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_cx_v3_WebhookRequest_IntentInfo_ParametersEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_WebhookRequest_SentimentAnalysisResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_WebhookRequest_SentimentAnalysisResult_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_dialogflow_cx_v3_WebhookResponse_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -160,7 +164,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\002\022/\n\013update_mask\030\002 \001(\0132\032.google.protobuf" + ".FieldMask\"^\n\024DeleteWebhookRequest\0227\n\004na" + "me\030\001 \001(\tB)\340A\002\372A#\n!dialogflow.googleapis." - + "com/Webhook\022\r\n\005force\030\002 \001(\010\"\243\007\n\016WebhookRe" + + "com/Webhook\022\r\n\005force\030\002 \001(\010\"\312\010\n\016WebhookRe" + "quest\022!\n\031detect_intent_response_id\030\001 \001(\t" + "\022W\n\020fulfillment_info\030\006 \001(\0132=.google.clou" + "d.dialogflow.cx.v3.WebhookRequest.Fulfil" @@ -172,89 +176,94 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "v3.SessionInfo\022@\n\010messages\030\007 \003(\0132..googl" + "e.cloud.dialogflow.cx.v3.ResponseMessage" + "\022(\n\007payload\030\010 \001(\0132\027.google.protobuf.Stru" - + "ct\032\036\n\017FulfillmentInfo\022\013\n\003tag\030\001 \001(\t\032\273\003\n\nI" - + "ntentInfo\022B\n\023last_matched_intent\030\001 \001(\tB%" - + "\372A\"\n dialogflow.googleapis.com/Intent\022\024\n" - + "\014display_name\030\003 \001(\t\022\\\n\nparameters\030\002 \003(\0132" - + "H.google.cloud.dialogflow.cx.v3.WebhookR" - + "equest.IntentInfo.ParametersEntry\022\022\n\ncon" - + "fidence\030\004 \001(\002\032^\n\024IntentParameterValue\022\026\n" - + "\016original_value\030\001 \001(\t\022.\n\016resolved_value\030" - + "\002 \001(\0132\026.google.protobuf.Value\032\200\001\n\017Parame" - + "tersEntry\022\013\n\003key\030\001 \001(\t\022\\\n\005value\030\002 \001(\0132M." + + "ct\022h\n\031sentiment_analysis_result\030\t \001(\0132E." + "google.cloud.dialogflow.cx.v3.WebhookReq" - + "uest.IntentInfo.IntentParameterValue:\0028\001" - + "\"\257\005\n\017WebhookResponse\022`\n\024fulfillment_resp" - + "onse\030\001 \001(\0132B.google.cloud.dialogflow.cx." - + "v3.WebhookResponse.FulfillmentResponse\022:" - + "\n\tpage_info\030\002 \001(\0132\'.google.cloud.dialogf" - + "low.cx.v3.PageInfo\022@\n\014session_info\030\003 \001(\013" - + "2*.google.cloud.dialogflow.cx.v3.Session" - + "Info\022(\n\007payload\030\004 \001(\0132\027.google.protobuf." - + "Struct\022:\n\013target_page\030\005 \001(\tB#\372A \n\036dialog" - + "flow.googleapis.com/PageH\000\022:\n\013target_flo" - + "w\030\006 \001(\tB#\372A \n\036dialogflow.googleapis.com/" - + "FlowH\000\032\213\002\n\023FulfillmentResponse\022@\n\010messag" - + "es\030\001 \003(\0132..google.cloud.dialogflow.cx.v3" - + ".ResponseMessage\022h\n\016merge_behavior\030\002 \001(\016" - + "2P.google.cloud.dialogflow.cx.v3.Webhook" - + "Response.FulfillmentResponse.MergeBehavi" - + "or\"H\n\rMergeBehavior\022\036\n\032MERGE_BEHAVIOR_UN" - + "SPECIFIED\020\000\022\n\n\006APPEND\020\001\022\013\n\007REPLACE\020\002B\014\n\n" - + "transition\"\235\004\n\010PageInfo\0229\n\014current_page\030" - + "\001 \001(\tB#\372A \n\036dialogflow.googleapis.com/Pa" - + "ge\022C\n\tform_info\030\003 \001(\01320.google.cloud.dia" - + "logflow.cx.v3.PageInfo.FormInfo\032\220\003\n\010Form" - + "Info\022V\n\016parameter_info\030\002 \003(\0132>.google.cl" - + "oud.dialogflow.cx.v3.PageInfo.FormInfo.P" - + "arameterInfo\032\253\002\n\rParameterInfo\022\024\n\014displa" - + "y_name\030\001 \001(\t\022\020\n\010required\030\002 \001(\010\022\\\n\005state\030" - + "\003 \001(\0162M.google.cloud.dialogflow.cx.v3.Pa" - + "geInfo.FormInfo.ParameterInfo.ParameterS" - + "tate\022%\n\005value\030\004 \001(\0132\026.google.protobuf.Va" - + "lue\022\026\n\016just_collected\030\005 \001(\010\"U\n\016Parameter" - + "State\022\037\n\033PARAMETER_STATE_UNSPECIFIED\020\000\022\t" - + "\n\005EMPTY\020\001\022\013\n\007INVALID\020\002\022\n\n\006FILLED\020\003\"\341\001\n\013S" - + "essionInfo\0227\n\007session\030\001 \001(\tB&\372A#\n!dialog" - + "flow.googleapis.com/Session\022N\n\nparameter" - + "s\030\002 \003(\0132:.google.cloud.dialogflow.cx.v3." - + "SessionInfo.ParametersEntry\032I\n\017Parameter" - + "sEntry\022\013\n\003key\030\001 \001(\t\022%\n\005value\030\002 \001(\0132\026.goo" - + "gle.protobuf.Value:\0028\0012\267\010\n\010Webhooks\022\277\001\n\014" - + "ListWebhooks\0222.google.cloud.dialogflow.c" - + "x.v3.ListWebhooksRequest\0323.google.cloud." - + "dialogflow.cx.v3.ListWebhooksResponse\"F\202" - + "\323\344\223\0027\0225/v3/{parent=projects/*/locations/" - + "*/agents/*}/webhooks\332A\006parent\022\254\001\n\nGetWeb" - + "hook\0220.google.cloud.dialogflow.cx.v3.Get" - + "WebhookRequest\032&.google.cloud.dialogflow" - + ".cx.v3.Webhook\"D\202\323\344\223\0027\0225/v3/{name=projec" - + "ts/*/locations/*/agents/*/webhooks/*}\332A\004" - + "name\022\305\001\n\rCreateWebhook\0223.google.cloud.di" - + "alogflow.cx.v3.CreateWebhookRequest\032&.go" - + "ogle.cloud.dialogflow.cx.v3.Webhook\"W\202\323\344" - + "\223\002@\"5/v3/{parent=projects/*/locations/*/" - + "agents/*}/webhooks:\007webhook\332A\016parent,web" - + "hook\022\322\001\n\rUpdateWebhook\0223.google.cloud.di" - + "alogflow.cx.v3.UpdateWebhookRequest\032&.go" - + "ogle.cloud.dialogflow.cx.v3.Webhook\"d\202\323\344" - + "\223\002H2=/v3/{webhook.name=projects/*/locati" - + "ons/*/agents/*/webhooks/*}:\007webhook\332A\023we" - + "bhook,update_mask\022\242\001\n\rDeleteWebhook\0223.go" - + "ogle.cloud.dialogflow.cx.v3.DeleteWebhoo" - + "kRequest\032\026.google.protobuf.Empty\"D\202\323\344\223\0027" - + "*5/v3/{name=projects/*/locations/*/agent" - + "s/*/webhooks/*}\332A\004name\032x\312A\031dialogflow.go" - + "ogleapis.com\322AYhttps://www.googleapis.co" - + "m/auth/cloud-platform,https://www.google" - + "apis.com/auth/dialogflowB\233\002\n!com.google." - + "cloud.dialogflow.cx.v3B\014WebhookProtoP\001Z?" - + "google.golang.org/genproto/googleapis/cl" - + "oud/dialogflow/cx/v3;cx\370\001\001\242\002\002DF\252\002\035Google" - + ".Cloud.Dialogflow.Cx.V3\352A|\n\'servicedirec" - + "tory.googleapis.com/Service\022Qprojects/{p" - + "roject}/locations/{location}/namespaces/" - + "{namespace}/services/{service}b\006proto3" + + "uest.SentimentAnalysisResult\032\036\n\017Fulfillm" + + "entInfo\022\013\n\003tag\030\001 \001(\t\032\273\003\n\nIntentInfo\022B\n\023l" + + "ast_matched_intent\030\001 \001(\tB%\372A\"\n dialogflo" + + "w.googleapis.com/Intent\022\024\n\014display_name\030" + + "\003 \001(\t\022\\\n\nparameters\030\002 \003(\0132H.google.cloud" + + ".dialogflow.cx.v3.WebhookRequest.IntentI" + + "nfo.ParametersEntry\022\022\n\nconfidence\030\004 \001(\002\032" + + "^\n\024IntentParameterValue\022\026\n\016original_valu" + + "e\030\001 \001(\t\022.\n\016resolved_value\030\002 \001(\0132\026.google" + + ".protobuf.Value\032\200\001\n\017ParametersEntry\022\013\n\003k" + + "ey\030\001 \001(\t\022\\\n\005value\030\002 \001(\0132M.google.cloud.d" + + "ialogflow.cx.v3.WebhookRequest.IntentInf" + + "o.IntentParameterValue:\0028\001\032;\n\027SentimentA" + + "nalysisResult\022\r\n\005score\030\001 \001(\002\022\021\n\tmagnitud" + + "e\030\002 \001(\002\"\257\005\n\017WebhookResponse\022`\n\024fulfillme" + + "nt_response\030\001 \001(\0132B.google.cloud.dialogf" + + "low.cx.v3.WebhookResponse.FulfillmentRes" + + "ponse\022:\n\tpage_info\030\002 \001(\0132\'.google.cloud." + + "dialogflow.cx.v3.PageInfo\022@\n\014session_inf" + + "o\030\003 \001(\0132*.google.cloud.dialogflow.cx.v3." + + "SessionInfo\022(\n\007payload\030\004 \001(\0132\027.google.pr" + + "otobuf.Struct\022:\n\013target_page\030\005 \001(\tB#\372A \n" + + "\036dialogflow.googleapis.com/PageH\000\022:\n\013tar" + + "get_flow\030\006 \001(\tB#\372A \n\036dialogflow.googleap" + + "is.com/FlowH\000\032\213\002\n\023FulfillmentResponse\022@\n" + + "\010messages\030\001 \003(\0132..google.cloud.dialogflo" + + "w.cx.v3.ResponseMessage\022h\n\016merge_behavio" + + "r\030\002 \001(\0162P.google.cloud.dialogflow.cx.v3." + + "WebhookResponse.FulfillmentResponse.Merg" + + "eBehavior\"H\n\rMergeBehavior\022\036\n\032MERGE_BEHA" + + "VIOR_UNSPECIFIED\020\000\022\n\n\006APPEND\020\001\022\013\n\007REPLAC" + + "E\020\002B\014\n\ntransition\"\235\004\n\010PageInfo\0229\n\014curren" + + "t_page\030\001 \001(\tB#\372A \n\036dialogflow.googleapis" + + ".com/Page\022C\n\tform_info\030\003 \001(\01320.google.cl" + + "oud.dialogflow.cx.v3.PageInfo.FormInfo\032\220" + + "\003\n\010FormInfo\022V\n\016parameter_info\030\002 \003(\0132>.go" + + "ogle.cloud.dialogflow.cx.v3.PageInfo.For" + + "mInfo.ParameterInfo\032\253\002\n\rParameterInfo\022\024\n" + + "\014display_name\030\001 \001(\t\022\020\n\010required\030\002 \001(\010\022\\\n" + + "\005state\030\003 \001(\0162M.google.cloud.dialogflow.c" + + "x.v3.PageInfo.FormInfo.ParameterInfo.Par" + + "ameterState\022%\n\005value\030\004 \001(\0132\026.google.prot" + + "obuf.Value\022\026\n\016just_collected\030\005 \001(\010\"U\n\016Pa" + + "rameterState\022\037\n\033PARAMETER_STATE_UNSPECIF" + + "IED\020\000\022\t\n\005EMPTY\020\001\022\013\n\007INVALID\020\002\022\n\n\006FILLED\020" + + "\003\"\341\001\n\013SessionInfo\0227\n\007session\030\001 \001(\tB&\372A#\n" + + "!dialogflow.googleapis.com/Session\022N\n\npa" + + "rameters\030\002 \003(\0132:.google.cloud.dialogflow" + + ".cx.v3.SessionInfo.ParametersEntry\032I\n\017Pa" + + "rametersEntry\022\013\n\003key\030\001 \001(\t\022%\n\005value\030\002 \001(" + + "\0132\026.google.protobuf.Value:\0028\0012\267\010\n\010Webhoo" + + "ks\022\277\001\n\014ListWebhooks\0222.google.cloud.dialo" + + "gflow.cx.v3.ListWebhooksRequest\0323.google" + + ".cloud.dialogflow.cx.v3.ListWebhooksResp" + + "onse\"F\202\323\344\223\0027\0225/v3/{parent=projects/*/loc" + + "ations/*/agents/*}/webhooks\332A\006parent\022\254\001\n" + + "\nGetWebhook\0220.google.cloud.dialogflow.cx" + + ".v3.GetWebhookRequest\032&.google.cloud.dia" + + "logflow.cx.v3.Webhook\"D\202\323\344\223\0027\0225/v3/{name" + + "=projects/*/locations/*/agents/*/webhook" + + "s/*}\332A\004name\022\305\001\n\rCreateWebhook\0223.google.c" + + "loud.dialogflow.cx.v3.CreateWebhookReque" + + "st\032&.google.cloud.dialogflow.cx.v3.Webho" + + "ok\"W\202\323\344\223\002@\"5/v3/{parent=projects/*/locat" + + "ions/*/agents/*}/webhooks:\007webhook\332A\016par" + + "ent,webhook\022\322\001\n\rUpdateWebhook\0223.google.c" + + "loud.dialogflow.cx.v3.UpdateWebhookReque" + + "st\032&.google.cloud.dialogflow.cx.v3.Webho" + + "ok\"d\202\323\344\223\002H2=/v3/{webhook.name=projects/*" + + "/locations/*/agents/*/webhooks/*}:\007webho" + + "ok\332A\023webhook,update_mask\022\242\001\n\rDeleteWebho" + + "ok\0223.google.cloud.dialogflow.cx.v3.Delet" + + "eWebhookRequest\032\026.google.protobuf.Empty\"" + + "D\202\323\344\223\0027*5/v3/{name=projects/*/locations/" + + "*/agents/*/webhooks/*}\332A\004name\032x\312A\031dialog" + + "flow.googleapis.com\322AYhttps://www.google" + + "apis.com/auth/cloud-platform,https://www" + + ".googleapis.com/auth/dialogflowB\233\002\n!com." + + "google.cloud.dialogflow.cx.v3B\014WebhookPr" + + "otoP\001Z?google.golang.org/genproto/google" + + "apis/cloud/dialogflow/cx/v3;cx\370\001\001\242\002\002DF\252\002" + + "\035Google.Cloud.Dialogflow.Cx.V3\352A|\n\'servi" + + "cedirectory.googleapis.com/Service\022Qproj" + + "ects/{project}/locations/{location}/name" + + "spaces/{namespace}/services/{service}b\006p" + + "roto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -357,6 +366,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "SessionInfo", "Messages", "Payload", + "SentimentAnalysisResult", }); internal_static_google_cloud_dialogflow_cx_v3_WebhookRequest_FulfillmentInfo_descriptor = internal_static_google_cloud_dialogflow_cx_v3_WebhookRequest_descriptor @@ -398,6 +408,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Key", "Value", }); + internal_static_google_cloud_dialogflow_cx_v3_WebhookRequest_SentimentAnalysisResult_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_WebhookRequest_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_dialogflow_cx_v3_WebhookRequest_SentimentAnalysisResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_WebhookRequest_SentimentAnalysisResult_descriptor, + new java.lang.String[] { + "Score", "Magnitude", + }); internal_static_google_cloud_dialogflow_cx_v3_WebhookResponse_descriptor = getDescriptor().getMessageTypes().get(8); internal_static_google_cloud_dialogflow_cx_v3_WebhookResponse_fieldAccessorTable = diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/WebhookRequest.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/WebhookRequest.java index 4e8fe4aeb..152160bfb 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/WebhookRequest.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/WebhookRequest.java @@ -171,6 +171,25 @@ private WebhookRequest( payload_ = subBuilder.buildPartial(); } + break; + } + case 74: + { + com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult.Builder + subBuilder = null; + if (sentimentAnalysisResult_ != null) { + subBuilder = sentimentAnalysisResult_.toBuilder(); + } + sentimentAnalysisResult_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(sentimentAnalysisResult_); + sentimentAnalysisResult_ = subBuilder.buildPartial(); + } + break; } default: @@ -3437,235 +3456,930 @@ public com.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo getDefaultIns } } - public static final int DETECT_INTENT_RESPONSE_ID_FIELD_NUMBER = 1; - private volatile java.lang.Object detectIntentResponseId_; - /** - * - * - *
-   * Always present. The unique identifier of the [DetectIntentResponse][google.cloud.dialogflow.cx.v3.DetectIntentResponse] that
-   * will be returned to the API caller.
-   * 
- * - * string detect_intent_response_id = 1; - * - * @return The detectIntentResponseId. - */ - @java.lang.Override - public java.lang.String getDetectIntentResponseId() { - java.lang.Object ref = detectIntentResponseId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - detectIntentResponseId_ = s; - return s; - } + public interface SentimentAnalysisResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Sentiment score between -1.0 (negative sentiment) and 1.0 (positive
+     * sentiment).
+     * 
+ * + * float score = 1; + * + * @return The score. + */ + float getScore(); + + /** + * + * + *
+     * A non-negative number in the [0, +inf) range, which represents the
+     * absolute magnitude of sentiment, regardless of score (positive or
+     * negative).
+     * 
+ * + * float magnitude = 2; + * + * @return The magnitude. + */ + float getMagnitude(); } /** * * *
-   * Always present. The unique identifier of the [DetectIntentResponse][google.cloud.dialogflow.cx.v3.DetectIntentResponse] that
-   * will be returned to the API caller.
+   * Represents the result of sentiment analysis.
    * 
* - * string detect_intent_response_id = 1; - * - * @return The bytes for detectIntentResponseId. + * Protobuf type {@code google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult} */ - @java.lang.Override - public com.google.protobuf.ByteString getDetectIntentResponseIdBytes() { - java.lang.Object ref = detectIntentResponseId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - detectIntentResponseId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + public static final class SentimentAnalysisResult extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult) + SentimentAnalysisResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use SentimentAnalysisResult.newBuilder() to construct. + private SentimentAnalysisResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); } - } - public static final int FULFILLMENT_INFO_FIELD_NUMBER = 6; - private com.google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo fulfillmentInfo_; - /** - * - * - *
-   * Always present. Information about the fulfillment that triggered this
-   * webhook call.
-   * 
- * - * .google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo fulfillment_info = 6; - * - * - * @return Whether the fulfillmentInfo field is set. - */ - @java.lang.Override - public boolean hasFulfillmentInfo() { - return fulfillmentInfo_ != null; - } - /** - * - * - *
-   * Always present. Information about the fulfillment that triggered this
-   * webhook call.
-   * 
- * - * .google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo fulfillment_info = 6; - * - * - * @return The fulfillmentInfo. - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo getFulfillmentInfo() { - return fulfillmentInfo_ == null - ? com.google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo.getDefaultInstance() - : fulfillmentInfo_; - } - /** - * - * - *
-   * Always present. Information about the fulfillment that triggered this
-   * webhook call.
-   * 
- * - * .google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo fulfillment_info = 6; - * - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfoOrBuilder - getFulfillmentInfoOrBuilder() { - return getFulfillmentInfo(); - } + private SentimentAnalysisResult() {} - public static final int INTENT_INFO_FIELD_NUMBER = 3; - private com.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo intentInfo_; - /** - * - * - *
-   * Information about the last matched intent.
-   * 
- * - * .google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo intent_info = 3; - * - * @return Whether the intentInfo field is set. - */ - @java.lang.Override - public boolean hasIntentInfo() { - return intentInfo_ != null; - } - /** - * - * - *
-   * Information about the last matched intent.
-   * 
- * - * .google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo intent_info = 3; - * - * @return The intentInfo. - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo getIntentInfo() { - return intentInfo_ == null - ? com.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.getDefaultInstance() - : intentInfo_; - } - /** - * - * - *
-   * Information about the last matched intent.
-   * 
- * - * .google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo intent_info = 3; - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfoOrBuilder - getIntentInfoOrBuilder() { - return getIntentInfo(); - } + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SentimentAnalysisResult(); + } - public static final int PAGE_INFO_FIELD_NUMBER = 4; - private com.google.cloud.dialogflow.cx.v3.PageInfo pageInfo_; - /** - * - * - *
-   * Information about page status.
-   * 
- * - * .google.cloud.dialogflow.cx.v3.PageInfo page_info = 4; - * - * @return Whether the pageInfo field is set. - */ - @java.lang.Override - public boolean hasPageInfo() { - return pageInfo_ != null; - } - /** - * - * - *
-   * Information about page status.
-   * 
- * - * .google.cloud.dialogflow.cx.v3.PageInfo page_info = 4; - * - * @return The pageInfo. - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.PageInfo getPageInfo() { - return pageInfo_ == null - ? com.google.cloud.dialogflow.cx.v3.PageInfo.getDefaultInstance() - : pageInfo_; - } - /** - * - * - *
-   * Information about page status.
-   * 
- * - * .google.cloud.dialogflow.cx.v3.PageInfo page_info = 4; - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.PageInfoOrBuilder getPageInfoOrBuilder() { - return getPageInfo(); - } + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } - public static final int SESSION_INFO_FIELD_NUMBER = 5; - private com.google.cloud.dialogflow.cx.v3.SessionInfo sessionInfo_; - /** - * - * - *
-   * Information about session status.
-   * 
- * - * .google.cloud.dialogflow.cx.v3.SessionInfo session_info = 5; - * - * @return Whether the sessionInfo field is set. - */ - @java.lang.Override - public boolean hasSessionInfo() { - return sessionInfo_ != null; - } - /** - * - * - *
-   * Information about session status.
-   * 
- * - * .google.cloud.dialogflow.cx.v3.SessionInfo session_info = 5; - * + private SentimentAnalysisResult( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: + { + score_ = input.readFloat(); + break; + } + case 21: + { + magnitude_ = input.readFloat(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.WebhookProto + .internal_static_google_cloud_dialogflow_cx_v3_WebhookRequest_SentimentAnalysisResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.WebhookProto + .internal_static_google_cloud_dialogflow_cx_v3_WebhookRequest_SentimentAnalysisResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult.class, + com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult.Builder + .class); + } + + public static final int SCORE_FIELD_NUMBER = 1; + private float score_; + /** + * + * + *
+     * Sentiment score between -1.0 (negative sentiment) and 1.0 (positive
+     * sentiment).
+     * 
+ * + * float score = 1; + * + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + + public static final int MAGNITUDE_FIELD_NUMBER = 2; + private float magnitude_; + /** + * + * + *
+     * A non-negative number in the [0, +inf) range, which represents the
+     * absolute magnitude of sentiment, regardless of score (positive or
+     * negative).
+     * 
+ * + * float magnitude = 2; + * + * @return The magnitude. + */ + @java.lang.Override + public float getMagnitude() { + return magnitude_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (score_ != 0F) { + output.writeFloat(1, score_); + } + if (magnitude_ != 0F) { + output.writeFloat(2, magnitude_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (score_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, score_); + } + if (magnitude_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, magnitude_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult other = + (com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult) obj; + + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits(other.getScore())) return false; + if (java.lang.Float.floatToIntBits(getMagnitude()) + != java.lang.Float.floatToIntBits(other.getMagnitude())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getScore()); + hash = (37 * hash) + MAGNITUDE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getMagnitude()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Represents the result of sentiment analysis.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult) + com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.WebhookProto + .internal_static_google_cloud_dialogflow_cx_v3_WebhookRequest_SentimentAnalysisResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.WebhookProto + .internal_static_google_cloud_dialogflow_cx_v3_WebhookRequest_SentimentAnalysisResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult.class, + com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult.Builder + .class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + score_ = 0F; + + magnitude_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.WebhookProto + .internal_static_google_cloud_dialogflow_cx_v3_WebhookRequest_SentimentAnalysisResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult build() { + com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult + buildPartial() { + com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult result = + new com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult(this); + result.score_ = score_; + result.magnitude_ = magnitude_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult other) { + if (other + == com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult + .getDefaultInstance()) return this; + if (other.getScore() != 0F) { + setScore(other.getScore()); + } + if (other.getMagnitude() != 0F) { + setMagnitude(other.getMagnitude()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private float score_; + /** + * + * + *
+       * Sentiment score between -1.0 (negative sentiment) and 1.0 (positive
+       * sentiment).
+       * 
+ * + * float score = 1; + * + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + /** + * + * + *
+       * Sentiment score between -1.0 (negative sentiment) and 1.0 (positive
+       * sentiment).
+       * 
+ * + * float score = 1; + * + * @param value The score to set. + * @return This builder for chaining. + */ + public Builder setScore(float value) { + + score_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Sentiment score between -1.0 (negative sentiment) and 1.0 (positive
+       * sentiment).
+       * 
+ * + * float score = 1; + * + * @return This builder for chaining. + */ + public Builder clearScore() { + + score_ = 0F; + onChanged(); + return this; + } + + private float magnitude_; + /** + * + * + *
+       * A non-negative number in the [0, +inf) range, which represents the
+       * absolute magnitude of sentiment, regardless of score (positive or
+       * negative).
+       * 
+ * + * float magnitude = 2; + * + * @return The magnitude. + */ + @java.lang.Override + public float getMagnitude() { + return magnitude_; + } + /** + * + * + *
+       * A non-negative number in the [0, +inf) range, which represents the
+       * absolute magnitude of sentiment, regardless of score (positive or
+       * negative).
+       * 
+ * + * float magnitude = 2; + * + * @param value The magnitude to set. + * @return This builder for chaining. + */ + public Builder setMagnitude(float value) { + + magnitude_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * A non-negative number in the [0, +inf) range, which represents the
+       * absolute magnitude of sentiment, regardless of score (positive or
+       * negative).
+       * 
+ * + * float magnitude = 2; + * + * @return This builder for chaining. + */ + public Builder clearMagnitude() { + + magnitude_ = 0F; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult) + private static final com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult(); + } + + public static com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SentimentAnalysisResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SentimentAnalysisResult(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int DETECT_INTENT_RESPONSE_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object detectIntentResponseId_; + /** + * + * + *
+   * Always present. The unique identifier of the [DetectIntentResponse][google.cloud.dialogflow.cx.v3.DetectIntentResponse] that
+   * will be returned to the API caller.
+   * 
+ * + * string detect_intent_response_id = 1; + * + * @return The detectIntentResponseId. + */ + @java.lang.Override + public java.lang.String getDetectIntentResponseId() { + java.lang.Object ref = detectIntentResponseId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + detectIntentResponseId_ = s; + return s; + } + } + /** + * + * + *
+   * Always present. The unique identifier of the [DetectIntentResponse][google.cloud.dialogflow.cx.v3.DetectIntentResponse] that
+   * will be returned to the API caller.
+   * 
+ * + * string detect_intent_response_id = 1; + * + * @return The bytes for detectIntentResponseId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDetectIntentResponseIdBytes() { + java.lang.Object ref = detectIntentResponseId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + detectIntentResponseId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FULFILLMENT_INFO_FIELD_NUMBER = 6; + private com.google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo fulfillmentInfo_; + /** + * + * + *
+   * Always present. Information about the fulfillment that triggered this
+   * webhook call.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo fulfillment_info = 6; + * + * + * @return Whether the fulfillmentInfo field is set. + */ + @java.lang.Override + public boolean hasFulfillmentInfo() { + return fulfillmentInfo_ != null; + } + /** + * + * + *
+   * Always present. Information about the fulfillment that triggered this
+   * webhook call.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo fulfillment_info = 6; + * + * + * @return The fulfillmentInfo. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo getFulfillmentInfo() { + return fulfillmentInfo_ == null + ? com.google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo.getDefaultInstance() + : fulfillmentInfo_; + } + /** + * + * + *
+   * Always present. Information about the fulfillment that triggered this
+   * webhook call.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo fulfillment_info = 6; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfoOrBuilder + getFulfillmentInfoOrBuilder() { + return getFulfillmentInfo(); + } + + public static final int INTENT_INFO_FIELD_NUMBER = 3; + private com.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo intentInfo_; + /** + * + * + *
+   * Information about the last matched intent.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo intent_info = 3; + * + * @return Whether the intentInfo field is set. + */ + @java.lang.Override + public boolean hasIntentInfo() { + return intentInfo_ != null; + } + /** + * + * + *
+   * Information about the last matched intent.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo intent_info = 3; + * + * @return The intentInfo. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo getIntentInfo() { + return intentInfo_ == null + ? com.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.getDefaultInstance() + : intentInfo_; + } + /** + * + * + *
+   * Information about the last matched intent.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo intent_info = 3; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfoOrBuilder + getIntentInfoOrBuilder() { + return getIntentInfo(); + } + + public static final int PAGE_INFO_FIELD_NUMBER = 4; + private com.google.cloud.dialogflow.cx.v3.PageInfo pageInfo_; + /** + * + * + *
+   * Information about page status.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.PageInfo page_info = 4; + * + * @return Whether the pageInfo field is set. + */ + @java.lang.Override + public boolean hasPageInfo() { + return pageInfo_ != null; + } + /** + * + * + *
+   * Information about page status.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.PageInfo page_info = 4; + * + * @return The pageInfo. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.PageInfo getPageInfo() { + return pageInfo_ == null + ? com.google.cloud.dialogflow.cx.v3.PageInfo.getDefaultInstance() + : pageInfo_; + } + /** + * + * + *
+   * Information about page status.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.PageInfo page_info = 4; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.PageInfoOrBuilder getPageInfoOrBuilder() { + return getPageInfo(); + } + + public static final int SESSION_INFO_FIELD_NUMBER = 5; + private com.google.cloud.dialogflow.cx.v3.SessionInfo sessionInfo_; + /** + * + * + *
+   * Information about session status.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.SessionInfo session_info = 5; + * + * @return Whether the sessionInfo field is set. + */ + @java.lang.Override + public boolean hasSessionInfo() { + return sessionInfo_ != null; + } + /** + * + * + *
+   * Information about session status.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.SessionInfo session_info = 5; + * * @return The sessionInfo. */ @java.lang.Override @@ -3814,6 +4528,67 @@ public com.google.protobuf.StructOrBuilder getPayloadOrBuilder() { return getPayload(); } + public static final int SENTIMENT_ANALYSIS_RESULT_FIELD_NUMBER = 9; + private com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult + sentimentAnalysisResult_; + /** + * + * + *
+   * The sentiment analysis result of the current user request. The field is
+   * filled when sentiment analysis is configured to be enabled for the request.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult sentiment_analysis_result = 9; + * + * + * @return Whether the sentimentAnalysisResult field is set. + */ + @java.lang.Override + public boolean hasSentimentAnalysisResult() { + return sentimentAnalysisResult_ != 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.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult sentiment_analysis_result = 9; + * + * + * @return The sentimentAnalysisResult. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult + getSentimentAnalysisResult() { + return sentimentAnalysisResult_ == null + ? com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult + .getDefaultInstance() + : sentimentAnalysisResult_; + } + /** + * + * + *
+   * The sentiment analysis result of the current user request. The field is
+   * filled when sentiment analysis is configured to be enabled for the request.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult sentiment_analysis_result = 9; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResultOrBuilder + getSentimentAnalysisResultOrBuilder() { + return getSentimentAnalysisResult(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -3849,6 +4624,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (payload_ != null) { output.writeMessage(8, getPayload()); } + if (sentimentAnalysisResult_ != null) { + output.writeMessage(9, getSentimentAnalysisResult()); + } unknownFields.writeTo(output); } @@ -3879,6 +4657,10 @@ public int getSerializedSize() { if (payload_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getPayload()); } + if (sentimentAnalysisResult_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(9, getSentimentAnalysisResult()); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -3917,6 +4699,10 @@ public boolean equals(final java.lang.Object obj) { if (hasPayload()) { if (!getPayload().equals(other.getPayload())) return false; } + if (hasSentimentAnalysisResult() != other.hasSentimentAnalysisResult()) return false; + if (hasSentimentAnalysisResult()) { + if (!getSentimentAnalysisResult().equals(other.getSentimentAnalysisResult())) return false; + } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -3954,6 +4740,10 @@ public int hashCode() { hash = (37 * hash) + PAYLOAD_FIELD_NUMBER; hash = (53 * hash) + getPayload().hashCode(); } + if (hasSentimentAnalysisResult()) { + hash = (37 * hash) + SENTIMENT_ANALYSIS_RESULT_FIELD_NUMBER; + hash = (53 * hash) + getSentimentAnalysisResult().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -4139,6 +4929,12 @@ public Builder clear() { payload_ = null; payloadBuilder_ = null; } + if (sentimentAnalysisResultBuilder_ == null) { + sentimentAnalysisResult_ = null; + } else { + sentimentAnalysisResult_ = null; + sentimentAnalysisResultBuilder_ = null; + } return this; } @@ -4202,6 +4998,11 @@ public com.google.cloud.dialogflow.cx.v3.WebhookRequest buildPartial() { } else { result.payload_ = payloadBuilder_.build(); } + if (sentimentAnalysisResultBuilder_ == null) { + result.sentimentAnalysisResult_ = sentimentAnalysisResult_; + } else { + result.sentimentAnalysisResult_ = sentimentAnalysisResultBuilder_.build(); + } onBuilt(); return result; } @@ -4298,6 +5099,9 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.WebhookRequest other) if (other.hasPayload()) { mergePayload(other.getPayload()); } + if (other.hasSentimentAnalysisResult()) { + mergeSentimentAnalysisResult(other.getSentimentAnalysisResult()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -5778,6 +6582,229 @@ public com.google.protobuf.StructOrBuilder getPayloadOrBuilder() { return payloadBuilder_; } + private com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult + sentimentAnalysisResult_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult, + com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult.Builder, + com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResultOrBuilder> + sentimentAnalysisResultBuilder_; + /** + * + * + *
+     * The sentiment analysis result of the current user request. The field is
+     * filled when sentiment analysis is configured to be enabled for the request.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult sentiment_analysis_result = 9; + * + * + * @return Whether the sentimentAnalysisResult field is set. + */ + public boolean hasSentimentAnalysisResult() { + return sentimentAnalysisResultBuilder_ != null || sentimentAnalysisResult_ != 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.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult sentiment_analysis_result = 9; + * + * + * @return The sentimentAnalysisResult. + */ + public com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult + getSentimentAnalysisResult() { + if (sentimentAnalysisResultBuilder_ == null) { + return sentimentAnalysisResult_ == null + ? com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult + .getDefaultInstance() + : sentimentAnalysisResult_; + } else { + return sentimentAnalysisResultBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The sentiment analysis result of the current user request. The field is
+     * filled when sentiment analysis is configured to be enabled for the request.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult sentiment_analysis_result = 9; + * + */ + public Builder setSentimentAnalysisResult( + com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult value) { + if (sentimentAnalysisResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sentimentAnalysisResult_ = value; + onChanged(); + } else { + sentimentAnalysisResultBuilder_.setMessage(value); + } + + 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.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult sentiment_analysis_result = 9; + * + */ + public Builder setSentimentAnalysisResult( + com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult.Builder + builderForValue) { + if (sentimentAnalysisResultBuilder_ == null) { + sentimentAnalysisResult_ = builderForValue.build(); + onChanged(); + } else { + sentimentAnalysisResultBuilder_.setMessage(builderForValue.build()); + } + + 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.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult sentiment_analysis_result = 9; + * + */ + public Builder mergeSentimentAnalysisResult( + com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult value) { + if (sentimentAnalysisResultBuilder_ == null) { + if (sentimentAnalysisResult_ != null) { + sentimentAnalysisResult_ = + com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult.newBuilder( + sentimentAnalysisResult_) + .mergeFrom(value) + .buildPartial(); + } else { + sentimentAnalysisResult_ = value; + } + onChanged(); + } else { + sentimentAnalysisResultBuilder_.mergeFrom(value); + } + + 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.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult sentiment_analysis_result = 9; + * + */ + public Builder clearSentimentAnalysisResult() { + if (sentimentAnalysisResultBuilder_ == null) { + sentimentAnalysisResult_ = null; + onChanged(); + } else { + sentimentAnalysisResult_ = null; + sentimentAnalysisResultBuilder_ = null; + } + + 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.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult sentiment_analysis_result = 9; + * + */ + public com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult.Builder + getSentimentAnalysisResultBuilder() { + + onChanged(); + return getSentimentAnalysisResultFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The sentiment analysis result of the current user request. The field is
+     * filled when sentiment analysis is configured to be enabled for the request.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult sentiment_analysis_result = 9; + * + */ + public com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResultOrBuilder + getSentimentAnalysisResultOrBuilder() { + if (sentimentAnalysisResultBuilder_ != null) { + return sentimentAnalysisResultBuilder_.getMessageOrBuilder(); + } else { + return sentimentAnalysisResult_ == null + ? com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult + .getDefaultInstance() + : sentimentAnalysisResult_; + } + } + /** + * + * + *
+     * The sentiment analysis result of the current user request. The field is
+     * filled when sentiment analysis is configured to be enabled for the request.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult sentiment_analysis_result = 9; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult, + com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult.Builder, + com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResultOrBuilder> + getSentimentAnalysisResultFieldBuilder() { + if (sentimentAnalysisResultBuilder_ == null) { + sentimentAnalysisResultBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult, + com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult.Builder, + com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResultOrBuilder>( + getSentimentAnalysisResult(), getParentForChildren(), isClean()); + sentimentAnalysisResult_ = null; + } + return sentimentAnalysisResultBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/WebhookRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/WebhookRequestOrBuilder.java index c7ced55d7..4ddfd3bf1 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/WebhookRequestOrBuilder.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/WebhookRequestOrBuilder.java @@ -293,4 +293,50 @@ public interface WebhookRequestOrBuilder * .google.protobuf.Struct payload = 8; */ com.google.protobuf.StructOrBuilder getPayloadOrBuilder(); + + /** + * + * + *
+   * The sentiment analysis result of the current user request. The field is
+   * filled when sentiment analysis is configured to be enabled for the request.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult sentiment_analysis_result = 9; + * + * + * @return Whether the sentimentAnalysisResult field is set. + */ + boolean hasSentimentAnalysisResult(); + /** + * + * + *
+   * The sentiment analysis result of the current user request. The field is
+   * filled when sentiment analysis is configured to be enabled for the request.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult sentiment_analysis_result = 9; + * + * + * @return The sentimentAnalysisResult. + */ + com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult + getSentimentAnalysisResult(); + /** + * + * + *
+   * The sentiment analysis result of the current user request. The field is
+   * filled when sentiment analysis is configured to be enabled for the request.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult sentiment_analysis_result = 9; + * + */ + com.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResultOrBuilder + getSentimentAnalysisResultOrBuilder(); } diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/audio_config.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/audio_config.proto index dd97ad933..ff09fd67b 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/audio_config.proto +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/audio_config.proto @@ -29,31 +29,6 @@ option java_outer_classname = "AudioConfigProto"; option java_package = "com.google.cloud.dialogflow.cx.v3"; option objc_class_prefix = "DF"; -// Information for a word recognized by the speech recognizer. -message SpeechWordInfo { - // The word this info is for. - string word = 3; - - // 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. - google.protobuf.Duration start_offset = 1; - - // 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. - google.protobuf.Duration end_offset = 2; - - // 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. - float confidence = 4; -} - // Audio encoding of the audio content sent in the conversational query request. // Refer to the // [Cloud Speech API @@ -103,6 +78,31 @@ enum AudioEncoding { AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE = 7; } +// Information for a word recognized by the speech recognizer. +message SpeechWordInfo { + // The word this info is for. + string word = 3; + + // 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. + google.protobuf.Duration start_offset = 1; + + // 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. + google.protobuf.Duration end_offset = 2; + + // 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. + float confidence = 4; +} + // Instructs the speech recognizer on how to process the audio content. message InputAudioConfig { // Required. Audio encoding of the audio content to process. diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/page.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/page.proto index 213dc8b13..8b8ded665 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/page.proto +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/page.proto @@ -150,6 +150,9 @@ message Page { // [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 diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/response_message.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/response_message.proto index 29094abdb..fb54ec9b6 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/response_message.proto +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/response_message.proto @@ -113,6 +113,13 @@ message ResponseMessage { bool allow_playback_interruption = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } + // Indicates that interaction with the Dialogflow agent has ended. + // This message is generated by Dialogflow only and not supposed to be + // defined by the user. + message EndInteraction { + + } + // Specifies an audio clip to be played by the client as part of the response. message PlayAudio { // Required. URI of the audio clip. Dialogflow does not impose any validation on this @@ -125,13 +132,6 @@ message ResponseMessage { bool allow_playback_interruption = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } - // Indicates that interaction with the Dialogflow agent has ended. - // This message is generated by Dialogflow only and not supposed to be - // defined by the user. - message EndInteraction { - - } - // Represents an audio message that is composed of both segments // synthesized from the Dialogflow agent prompts and ones hosted externally // at the specified URIs. diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/webhook.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/webhook.proto index 664f6d06d..684580bfd 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/webhook.proto +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/webhook.proto @@ -273,6 +273,18 @@ message WebhookRequest { float confidence = 4; } + // Represents the result of sentiment analysis. + message SentimentAnalysisResult { + // Sentiment score between -1.0 (negative sentiment) and 1.0 (positive + // sentiment). + float score = 1; + + // A non-negative number in the [0, +inf) range, which represents the + // absolute magnitude of sentiment, regardless of score (positive or + // negative). + float magnitude = 2; + } + // Always present. The unique identifier of the [DetectIntentResponse][google.cloud.dialogflow.cx.v3.DetectIntentResponse] that // will be returned to the API caller. string detect_intent_response_id = 1; @@ -297,6 +309,10 @@ message WebhookRequest { // Custom data set in [QueryParameters.payload][google.cloud.dialogflow.cx.v3.QueryParameters.payload]. google.protobuf.Struct payload = 8; + + // The sentiment analysis result of the current user request. The field is + // filled when sentiment analysis is configured to be enabled for the request. + SentimentAnalysisResult sentiment_analysis_result = 9; } // The response message for a webhook call. diff --git a/synth.metadata b/synth.metadata index 27c46e66d..ba85f411c 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,16 +11,16 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "e28aa8570dc86136fe677202c976f4ee00d77f61", - "internalRef": "356624136" + "sha": "6de7abea4c424025bfcf996ef40c96e53c070100", + "internalRef": "356804449" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "e28aa8570dc86136fe677202c976f4ee00d77f61", - "internalRef": "356624136" + "sha": "6de7abea4c424025bfcf996ef40c96e53c070100", + "internalRef": "356804449" } }, { From 6b64d5fb72e9a6b34e960b2a94bb87abf7a68565 Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Tue, 16 Feb 2021 19:27:02 -0800 Subject: [PATCH 10/12] fix: RunTestCase http template. PHP REST client lib can be generated. feat: Support transition route group coverage for Test Cases. PiperOrigin-RevId: 357757017 Source-Author: Google APIs Source-Date: Tue Feb 16 10:54:33 2021 -0800 Source-Repo: googleapis/googleapis Source-Sha: 38d77abda7059f562774af4ea4107415224d2674 Source-Link: https://github.com/googleapis/googleapis/commit/38d77abda7059f562774af4ea4107415224d2674 --- .../cx/v3beta1/stub/GrpcTestCasesStub.java | 9 + .../cx/v3beta1/CalculateCoverageRequest.java | 26 +- .../cx/v3beta1/CalculateCoverageResponse.java | 381 +- .../CalculateCoverageResponseOrBuilder.java | 48 +- .../cx/v3beta1/ConversationTurn.java | 120 +- .../dialogflow/cx/v3beta1/TestCaseProto.java | 577 +-- .../cx/v3beta1/TransitionCoverage.java | 14 +- .../v3beta1/TransitionRouteGroupCoverage.java | 3684 +++++++++++++++++ ...TransitionRouteGroupCoverageOrBuilder.java | 106 + .../cloud/dialogflow/cx/v3beta1/agent.proto | 2 +- .../dialogflow/cx/v3beta1/audio_config.proto | 52 +- .../dialogflow/cx/v3beta1/entity_type.proto | 2 +- .../dialogflow/cx/v3beta1/environment.proto | 2 +- .../dialogflow/cx/v3beta1/experiment.proto | 2 +- .../cloud/dialogflow/cx/v3beta1/flow.proto | 2 +- .../dialogflow/cx/v3beta1/fulfillment.proto | 2 +- .../cloud/dialogflow/cx/v3beta1/intent.proto | 2 +- .../cloud/dialogflow/cx/v3beta1/page.proto | 2 +- .../cx/v3beta1/response_message.proto | 2 +- .../cx/v3beta1/security_settings.proto | 2 +- .../cloud/dialogflow/cx/v3beta1/session.proto | 2 +- .../cx/v3beta1/session_entity_type.proto | 2 +- .../dialogflow/cx/v3beta1/test_case.proto | 65 +- .../cx/v3beta1/transition_route_group.proto | 2 +- .../cx/v3beta1/validation_message.proto | 2 +- .../cloud/dialogflow/cx/v3beta1/version.proto | 2 +- .../cloud/dialogflow/cx/v3beta1/webhook.proto | 2 +- synth.metadata | 10 +- 28 files changed, 4725 insertions(+), 399 deletions(-) create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupCoverage.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupCoverageOrBuilder.java diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcTestCasesStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcTestCasesStub.java index c60336668..dd9ab8198 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcTestCasesStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcTestCasesStub.java @@ -319,6 +319,15 @@ public Map extract(UpdateTestCaseRequest request) { GrpcCallSettings runTestCaseTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(runTestCaseMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(RunTestCaseRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings batchRunTestCasesTransportSettings = GrpcCallSettings.newBuilder() diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CalculateCoverageRequest.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CalculateCoverageRequest.java index bbaf02c22..83a97fd81 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CalculateCoverageRequest.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CalculateCoverageRequest.java @@ -153,12 +153,22 @@ public enum CoverageType implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * Page transition coverage
+     * Page transition coverage.
      * 
* * PAGE_TRANSITION = 2; */ PAGE_TRANSITION(2), + /** + * + * + *
+     * Transition route group coverage.
+     * 
+ * + * TRANSITION_ROUTE_GROUP = 3; + */ + TRANSITION_ROUTE_GROUP(3), UNRECOGNIZED(-1), ; @@ -186,12 +196,22 @@ public enum CoverageType implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * Page transition coverage
+     * Page transition coverage.
      * 
* * PAGE_TRANSITION = 2; */ public static final int PAGE_TRANSITION_VALUE = 2; + /** + * + * + *
+     * Transition route group coverage.
+     * 
+ * + * TRANSITION_ROUTE_GROUP = 3; + */ + public static final int TRANSITION_ROUTE_GROUP_VALUE = 3; public final int getNumber() { if (this == UNRECOGNIZED) { @@ -223,6 +243,8 @@ public static CoverageType forNumber(int value) { return INTENT; case 2: return PAGE_TRANSITION; + case 3: + return TRANSITION_ROUTE_GROUP; default: return null; } diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CalculateCoverageResponse.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CalculateCoverageResponse.java index 04f1edb25..24fba4b71 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CalculateCoverageResponse.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CalculateCoverageResponse.java @@ -117,6 +117,29 @@ private CalculateCoverageResponse( agent_ = s; break; } + case 50: + { + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Builder + subBuilder = null; + if (coverageTypeCase_ == 6) { + subBuilder = + ((com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage) + coverageType_) + .toBuilder(); + } + coverageType_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage) + coverageType_); + coverageType_ = subBuilder.buildPartial(); + } + coverageTypeCase_ = 6; + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -160,6 +183,7 @@ public enum CoverageTypeCase com.google.protobuf.AbstractMessage.InternalOneOfEnum { INTENT_COVERAGE(2), TRANSITION_COVERAGE(4), + ROUTE_GROUP_COVERAGE(6), COVERAGETYPE_NOT_SET(0); private final int value; @@ -182,6 +206,8 @@ public static CoverageTypeCase forNumber(int value) { return INTENT_COVERAGE; case 4: return TRANSITION_COVERAGE; + case 6: + return ROUTE_GROUP_COVERAGE; case 0: return COVERAGETYPE_NOT_SET; default: @@ -306,7 +332,7 @@ public com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage getIntentCoverage() * * *
-   * Transition coverage.
+   * Transition (excluding transition route groups) coverage.
    * 
* * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage transition_coverage = 4; @@ -321,7 +347,7 @@ public boolean hasTransitionCoverage() { * * *
-   * Transition coverage.
+   * Transition (excluding transition route groups) coverage.
    * 
* * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage transition_coverage = 4; @@ -339,7 +365,7 @@ public com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage getTransitionCo * * *
-   * Transition coverage.
+   * Transition (excluding transition route groups) coverage.
    * 
* * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage transition_coverage = 4; @@ -353,6 +379,65 @@ public com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage getTransitionCo return com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.getDefaultInstance(); } + public static final int ROUTE_GROUP_COVERAGE_FIELD_NUMBER = 6; + /** + * + * + *
+   * Transition route group coverage.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage route_group_coverage = 6; + * + * + * @return Whether the routeGroupCoverage field is set. + */ + @java.lang.Override + public boolean hasRouteGroupCoverage() { + return coverageTypeCase_ == 6; + } + /** + * + * + *
+   * Transition route group coverage.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage route_group_coverage = 6; + * + * + * @return The routeGroupCoverage. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage + getRouteGroupCoverage() { + if (coverageTypeCase_ == 6) { + return (com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage) coverageType_; + } + return com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.getDefaultInstance(); + } + /** + * + * + *
+   * Transition route group coverage.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage route_group_coverage = 6; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverageOrBuilder + getRouteGroupCoverageOrBuilder() { + if (coverageTypeCase_ == 6) { + return (com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage) coverageType_; + } + return com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -377,6 +462,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!getAgentBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, agent_); } + if (coverageTypeCase_ == 6) { + output.writeMessage( + 6, (com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage) coverageType_); + } unknownFields.writeTo(output); } @@ -399,6 +488,12 @@ public int getSerializedSize() { if (!getAgentBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, agent_); } + if (coverageTypeCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, + (com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage) coverageType_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -424,6 +519,9 @@ public boolean equals(final java.lang.Object obj) { case 4: if (!getTransitionCoverage().equals(other.getTransitionCoverage())) return false; break; + case 6: + if (!getRouteGroupCoverage().equals(other.getRouteGroupCoverage())) return false; + break; case 0: default: } @@ -449,6 +547,10 @@ public int hashCode() { hash = (37 * hash) + TRANSITION_COVERAGE_FIELD_NUMBER; hash = (53 * hash) + getTransitionCoverage().hashCode(); break; + case 6: + hash = (37 * hash) + ROUTE_GROUP_COVERAGE_FIELD_NUMBER; + hash = (53 * hash) + getRouteGroupCoverage().hashCode(); + break; case 0: default: } @@ -645,6 +747,13 @@ public com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse buildPar result.coverageType_ = transitionCoverageBuilder_.build(); } } + if (coverageTypeCase_ == 6) { + if (routeGroupCoverageBuilder_ == null) { + result.coverageType_ = coverageType_; + } else { + result.coverageType_ = routeGroupCoverageBuilder_.build(); + } + } result.coverageTypeCase_ = coverageTypeCase_; onBuilt(); return result; @@ -713,6 +822,11 @@ public Builder mergeFrom( mergeTransitionCoverage(other.getTransitionCoverage()); break; } + case ROUTE_GROUP_COVERAGE: + { + mergeRouteGroupCoverage(other.getRouteGroupCoverage()); + break; + } case COVERAGETYPE_NOT_SET: { break; @@ -1097,7 +1211,7 @@ public Builder clearIntentCoverage() { * * *
-     * Transition coverage.
+     * Transition (excluding transition route groups) coverage.
      * 
* * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage transition_coverage = 4; @@ -1112,7 +1226,7 @@ public boolean hasTransitionCoverage() { * * *
-     * Transition coverage.
+     * Transition (excluding transition route groups) coverage.
      * 
* * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage transition_coverage = 4; @@ -1137,7 +1251,7 @@ public com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage getTransitionCo * * *
-     * Transition coverage.
+     * Transition (excluding transition route groups) coverage.
      * 
* * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage transition_coverage = 4; @@ -1160,7 +1274,7 @@ public Builder setTransitionCoverage( * * *
-     * Transition coverage.
+     * Transition (excluding transition route groups) coverage.
      * 
* * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage transition_coverage = 4; @@ -1180,7 +1294,7 @@ public Builder setTransitionCoverage( * * *
-     * Transition coverage.
+     * Transition (excluding transition route groups) coverage.
      * 
* * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage transition_coverage = 4; @@ -1213,7 +1327,7 @@ public Builder mergeTransitionCoverage( * * *
-     * Transition coverage.
+     * Transition (excluding transition route groups) coverage.
      * 
* * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage transition_coverage = 4; @@ -1238,7 +1352,7 @@ public Builder clearTransitionCoverage() { * * *
-     * Transition coverage.
+     * Transition (excluding transition route groups) coverage.
      * 
* * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage transition_coverage = 4; @@ -1251,7 +1365,7 @@ public Builder clearTransitionCoverage() { * * *
-     * Transition coverage.
+     * Transition (excluding transition route groups) coverage.
      * 
* * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage transition_coverage = 4; @@ -1272,7 +1386,7 @@ public Builder clearTransitionCoverage() { * * *
-     * Transition coverage.
+     * Transition (excluding transition route groups) coverage.
      * 
* * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage transition_coverage = 4; @@ -1303,6 +1417,249 @@ public Builder clearTransitionCoverage() { return transitionCoverageBuilder_; } + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage, + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverageOrBuilder> + routeGroupCoverageBuilder_; + /** + * + * + *
+     * Transition route group coverage.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage route_group_coverage = 6; + * + * + * @return Whether the routeGroupCoverage field is set. + */ + @java.lang.Override + public boolean hasRouteGroupCoverage() { + return coverageTypeCase_ == 6; + } + /** + * + * + *
+     * Transition route group coverage.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage route_group_coverage = 6; + * + * + * @return The routeGroupCoverage. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage + getRouteGroupCoverage() { + if (routeGroupCoverageBuilder_ == null) { + if (coverageTypeCase_ == 6) { + return (com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage) + coverageType_; + } + return com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage + .getDefaultInstance(); + } else { + if (coverageTypeCase_ == 6) { + return routeGroupCoverageBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Transition route group coverage.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage route_group_coverage = 6; + * + */ + public Builder setRouteGroupCoverage( + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage value) { + if (routeGroupCoverageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + coverageType_ = value; + onChanged(); + } else { + routeGroupCoverageBuilder_.setMessage(value); + } + coverageTypeCase_ = 6; + return this; + } + /** + * + * + *
+     * Transition route group coverage.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage route_group_coverage = 6; + * + */ + public Builder setRouteGroupCoverage( + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Builder + builderForValue) { + if (routeGroupCoverageBuilder_ == null) { + coverageType_ = builderForValue.build(); + onChanged(); + } else { + routeGroupCoverageBuilder_.setMessage(builderForValue.build()); + } + coverageTypeCase_ = 6; + return this; + } + /** + * + * + *
+     * Transition route group coverage.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage route_group_coverage = 6; + * + */ + public Builder mergeRouteGroupCoverage( + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage value) { + if (routeGroupCoverageBuilder_ == null) { + if (coverageTypeCase_ == 6 + && coverageType_ + != com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage + .getDefaultInstance()) { + coverageType_ = + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.newBuilder( + (com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage) + coverageType_) + .mergeFrom(value) + .buildPartial(); + } else { + coverageType_ = value; + } + onChanged(); + } else { + if (coverageTypeCase_ == 6) { + routeGroupCoverageBuilder_.mergeFrom(value); + } + routeGroupCoverageBuilder_.setMessage(value); + } + coverageTypeCase_ = 6; + return this; + } + /** + * + * + *
+     * Transition route group coverage.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage route_group_coverage = 6; + * + */ + public Builder clearRouteGroupCoverage() { + if (routeGroupCoverageBuilder_ == null) { + if (coverageTypeCase_ == 6) { + coverageTypeCase_ = 0; + coverageType_ = null; + onChanged(); + } + } else { + if (coverageTypeCase_ == 6) { + coverageTypeCase_ = 0; + coverageType_ = null; + } + routeGroupCoverageBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Transition route group coverage.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage route_group_coverage = 6; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Builder + getRouteGroupCoverageBuilder() { + return getRouteGroupCoverageFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Transition route group coverage.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage route_group_coverage = 6; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverageOrBuilder + getRouteGroupCoverageOrBuilder() { + if ((coverageTypeCase_ == 6) && (routeGroupCoverageBuilder_ != null)) { + return routeGroupCoverageBuilder_.getMessageOrBuilder(); + } else { + if (coverageTypeCase_ == 6) { + return (com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage) + coverageType_; + } + return com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Transition route group coverage.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage route_group_coverage = 6; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage, + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverageOrBuilder> + getRouteGroupCoverageFieldBuilder() { + if (routeGroupCoverageBuilder_ == null) { + if (!(coverageTypeCase_ == 6)) { + coverageType_ = + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage + .getDefaultInstance(); + } + routeGroupCoverageBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage, + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverageOrBuilder>( + (com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage) coverageType_, + getParentForChildren(), + isClean()); + coverageType_ = null; + } + coverageTypeCase_ = 6; + onChanged(); + ; + return routeGroupCoverageBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CalculateCoverageResponseOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CalculateCoverageResponseOrBuilder.java index 5775a9d31..f0bd9e0cd 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CalculateCoverageResponseOrBuilder.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CalculateCoverageResponseOrBuilder.java @@ -89,7 +89,7 @@ public interface CalculateCoverageResponseOrBuilder * * *
-   * Transition coverage.
+   * Transition (excluding transition route groups) coverage.
    * 
* * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage transition_coverage = 4; @@ -101,7 +101,7 @@ public interface CalculateCoverageResponseOrBuilder * * *
-   * Transition coverage.
+   * Transition (excluding transition route groups) coverage.
    * 
* * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage transition_coverage = 4; @@ -113,7 +113,7 @@ public interface CalculateCoverageResponseOrBuilder * * *
-   * Transition coverage.
+   * Transition (excluding transition route groups) coverage.
    * 
* * .google.cloud.dialogflow.cx.v3beta1.TransitionCoverage transition_coverage = 4; @@ -121,6 +121,48 @@ public interface CalculateCoverageResponseOrBuilder com.google.cloud.dialogflow.cx.v3beta1.TransitionCoverageOrBuilder getTransitionCoverageOrBuilder(); + /** + * + * + *
+   * Transition route group coverage.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage route_group_coverage = 6; + * + * + * @return Whether the routeGroupCoverage field is set. + */ + boolean hasRouteGroupCoverage(); + /** + * + * + *
+   * Transition route group coverage.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage route_group_coverage = 6; + * + * + * @return The routeGroupCoverage. + */ + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage getRouteGroupCoverage(); + /** + * + * + *
+   * Transition route group coverage.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage route_group_coverage = 6; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverageOrBuilder + getRouteGroupCoverageOrBuilder(); + public com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse.CoverageTypeCase getCoverageTypeCase(); } diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ConversationTurn.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ConversationTurn.java index 5fb0a24ee..72bee9ddd 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ConversationTurn.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ConversationTurn.java @@ -1532,8 +1532,8 @@ com.google.cloud.dialogflow.cx.v3beta1.TestRunDifferenceOrBuilder getDifferences * * *
-     * The [Intent][google.cloud.dialogflow.cx.v3beta1.Intent] that triggered the response. Only some fields such as
-     * name and displayname will be set.
+     * The [Intent][google.cloud.dialogflow.cx.v3beta1.Intent] that triggered the response. Only name and displayName
+     * will be set.
      * 
* * .google.cloud.dialogflow.cx.v3beta1.Intent triggered_intent = 7; @@ -1545,8 +1545,8 @@ com.google.cloud.dialogflow.cx.v3beta1.TestRunDifferenceOrBuilder getDifferences * * *
-     * The [Intent][google.cloud.dialogflow.cx.v3beta1.Intent] that triggered the response. Only some fields such as
-     * name and displayname will be set.
+     * The [Intent][google.cloud.dialogflow.cx.v3beta1.Intent] that triggered the response. Only name and displayName
+     * will be set.
      * 
* * .google.cloud.dialogflow.cx.v3beta1.Intent triggered_intent = 7; @@ -1558,8 +1558,8 @@ com.google.cloud.dialogflow.cx.v3beta1.TestRunDifferenceOrBuilder getDifferences * * *
-     * The [Intent][google.cloud.dialogflow.cx.v3beta1.Intent] that triggered the response. Only some fields such as
-     * name and displayname will be set.
+     * The [Intent][google.cloud.dialogflow.cx.v3beta1.Intent] that triggered the response. Only name and displayName
+     * will be set.
      * 
* * .google.cloud.dialogflow.cx.v3beta1.Intent triggered_intent = 7; @@ -1570,8 +1570,8 @@ com.google.cloud.dialogflow.cx.v3beta1.TestRunDifferenceOrBuilder getDifferences * * *
-     * The [Page][google.cloud.dialogflow.cx.v3beta1.Page] on which the utterance was spoken. Only some fields such as
-     * name and displayname will be set.
+     * The [Page][google.cloud.dialogflow.cx.v3beta1.Page] on which the utterance was spoken. Only name and displayName
+     * will be set.
      * 
* * .google.cloud.dialogflow.cx.v3beta1.Page current_page = 8; @@ -1583,8 +1583,8 @@ com.google.cloud.dialogflow.cx.v3beta1.TestRunDifferenceOrBuilder getDifferences * * *
-     * The [Page][google.cloud.dialogflow.cx.v3beta1.Page] on which the utterance was spoken. Only some fields such as
-     * name and displayname will be set.
+     * The [Page][google.cloud.dialogflow.cx.v3beta1.Page] on which the utterance was spoken. Only name and displayName
+     * will be set.
      * 
* * .google.cloud.dialogflow.cx.v3beta1.Page current_page = 8; @@ -1596,8 +1596,8 @@ com.google.cloud.dialogflow.cx.v3beta1.TestRunDifferenceOrBuilder getDifferences * * *
-     * The [Page][google.cloud.dialogflow.cx.v3beta1.Page] on which the utterance was spoken. Only some fields such as
-     * name and displayname will be set.
+     * The [Page][google.cloud.dialogflow.cx.v3beta1.Page] on which the utterance was spoken. Only name and displayName
+     * will be set.
      * 
* * .google.cloud.dialogflow.cx.v3beta1.Page current_page = 8; @@ -2106,8 +2106,8 @@ public com.google.protobuf.StructOrBuilder getDiagnosticInfoOrBuilder() { * * *
-     * The [Intent][google.cloud.dialogflow.cx.v3beta1.Intent] that triggered the response. Only some fields such as
-     * name and displayname will be set.
+     * The [Intent][google.cloud.dialogflow.cx.v3beta1.Intent] that triggered the response. Only name and displayName
+     * will be set.
      * 
* * .google.cloud.dialogflow.cx.v3beta1.Intent triggered_intent = 7; @@ -2122,8 +2122,8 @@ public boolean hasTriggeredIntent() { * * *
-     * The [Intent][google.cloud.dialogflow.cx.v3beta1.Intent] that triggered the response. Only some fields such as
-     * name and displayname will be set.
+     * The [Intent][google.cloud.dialogflow.cx.v3beta1.Intent] that triggered the response. Only name and displayName
+     * will be set.
      * 
* * .google.cloud.dialogflow.cx.v3beta1.Intent triggered_intent = 7; @@ -2140,8 +2140,8 @@ public com.google.cloud.dialogflow.cx.v3beta1.Intent getTriggeredIntent() { * * *
-     * The [Intent][google.cloud.dialogflow.cx.v3beta1.Intent] that triggered the response. Only some fields such as
-     * name and displayname will be set.
+     * The [Intent][google.cloud.dialogflow.cx.v3beta1.Intent] that triggered the response. Only name and displayName
+     * will be set.
      * 
* * .google.cloud.dialogflow.cx.v3beta1.Intent triggered_intent = 7; @@ -2157,8 +2157,8 @@ public com.google.cloud.dialogflow.cx.v3beta1.IntentOrBuilder getTriggeredIntent * * *
-     * The [Page][google.cloud.dialogflow.cx.v3beta1.Page] on which the utterance was spoken. Only some fields such as
-     * name and displayname will be set.
+     * The [Page][google.cloud.dialogflow.cx.v3beta1.Page] on which the utterance was spoken. Only name and displayName
+     * will be set.
      * 
* * .google.cloud.dialogflow.cx.v3beta1.Page current_page = 8; @@ -2173,8 +2173,8 @@ public boolean hasCurrentPage() { * * *
-     * The [Page][google.cloud.dialogflow.cx.v3beta1.Page] on which the utterance was spoken. Only some fields such as
-     * name and displayname will be set.
+     * The [Page][google.cloud.dialogflow.cx.v3beta1.Page] on which the utterance was spoken. Only name and displayName
+     * will be set.
      * 
* * .google.cloud.dialogflow.cx.v3beta1.Page current_page = 8; @@ -2191,8 +2191,8 @@ public com.google.cloud.dialogflow.cx.v3beta1.Page getCurrentPage() { * * *
-     * The [Page][google.cloud.dialogflow.cx.v3beta1.Page] on which the utterance was spoken. Only some fields such as
-     * name and displayname will be set.
+     * The [Page][google.cloud.dialogflow.cx.v3beta1.Page] on which the utterance was spoken. Only name and displayName
+     * will be set.
      * 
* * .google.cloud.dialogflow.cx.v3beta1.Page current_page = 8; @@ -3765,8 +3765,8 @@ public com.google.protobuf.StructOrBuilder getDiagnosticInfoOrBuilder() { * * *
-       * The [Intent][google.cloud.dialogflow.cx.v3beta1.Intent] that triggered the response. Only some fields such as
-       * name and displayname will be set.
+       * The [Intent][google.cloud.dialogflow.cx.v3beta1.Intent] that triggered the response. Only name and displayName
+       * will be set.
        * 
* * .google.cloud.dialogflow.cx.v3beta1.Intent triggered_intent = 7; @@ -3780,8 +3780,8 @@ public boolean hasTriggeredIntent() { * * *
-       * The [Intent][google.cloud.dialogflow.cx.v3beta1.Intent] that triggered the response. Only some fields such as
-       * name and displayname will be set.
+       * The [Intent][google.cloud.dialogflow.cx.v3beta1.Intent] that triggered the response. Only name and displayName
+       * will be set.
        * 
* * .google.cloud.dialogflow.cx.v3beta1.Intent triggered_intent = 7; @@ -3801,8 +3801,8 @@ public com.google.cloud.dialogflow.cx.v3beta1.Intent getTriggeredIntent() { * * *
-       * The [Intent][google.cloud.dialogflow.cx.v3beta1.Intent] that triggered the response. Only some fields such as
-       * name and displayname will be set.
+       * The [Intent][google.cloud.dialogflow.cx.v3beta1.Intent] that triggered the response. Only name and displayName
+       * will be set.
        * 
* * .google.cloud.dialogflow.cx.v3beta1.Intent triggered_intent = 7; @@ -3824,8 +3824,8 @@ public Builder setTriggeredIntent(com.google.cloud.dialogflow.cx.v3beta1.Intent * * *
-       * The [Intent][google.cloud.dialogflow.cx.v3beta1.Intent] that triggered the response. Only some fields such as
-       * name and displayname will be set.
+       * The [Intent][google.cloud.dialogflow.cx.v3beta1.Intent] that triggered the response. Only name and displayName
+       * will be set.
        * 
* * .google.cloud.dialogflow.cx.v3beta1.Intent triggered_intent = 7; @@ -3845,8 +3845,8 @@ public Builder setTriggeredIntent( * * *
-       * The [Intent][google.cloud.dialogflow.cx.v3beta1.Intent] that triggered the response. Only some fields such as
-       * name and displayname will be set.
+       * The [Intent][google.cloud.dialogflow.cx.v3beta1.Intent] that triggered the response. Only name and displayName
+       * will be set.
        * 
* * .google.cloud.dialogflow.cx.v3beta1.Intent triggered_intent = 7; @@ -3872,8 +3872,8 @@ public Builder mergeTriggeredIntent(com.google.cloud.dialogflow.cx.v3beta1.Inten * * *
-       * The [Intent][google.cloud.dialogflow.cx.v3beta1.Intent] that triggered the response. Only some fields such as
-       * name and displayname will be set.
+       * The [Intent][google.cloud.dialogflow.cx.v3beta1.Intent] that triggered the response. Only name and displayName
+       * will be set.
        * 
* * .google.cloud.dialogflow.cx.v3beta1.Intent triggered_intent = 7; @@ -3893,8 +3893,8 @@ public Builder clearTriggeredIntent() { * * *
-       * The [Intent][google.cloud.dialogflow.cx.v3beta1.Intent] that triggered the response. Only some fields such as
-       * name and displayname will be set.
+       * The [Intent][google.cloud.dialogflow.cx.v3beta1.Intent] that triggered the response. Only name and displayName
+       * will be set.
        * 
* * .google.cloud.dialogflow.cx.v3beta1.Intent triggered_intent = 7; @@ -3908,8 +3908,8 @@ public com.google.cloud.dialogflow.cx.v3beta1.Intent.Builder getTriggeredIntentB * * *
-       * The [Intent][google.cloud.dialogflow.cx.v3beta1.Intent] that triggered the response. Only some fields such as
-       * name and displayname will be set.
+       * The [Intent][google.cloud.dialogflow.cx.v3beta1.Intent] that triggered the response. Only name and displayName
+       * will be set.
        * 
* * .google.cloud.dialogflow.cx.v3beta1.Intent triggered_intent = 7; @@ -3927,8 +3927,8 @@ public com.google.cloud.dialogflow.cx.v3beta1.IntentOrBuilder getTriggeredIntent * * *
-       * The [Intent][google.cloud.dialogflow.cx.v3beta1.Intent] that triggered the response. Only some fields such as
-       * name and displayname will be set.
+       * The [Intent][google.cloud.dialogflow.cx.v3beta1.Intent] that triggered the response. Only name and displayName
+       * will be set.
        * 
* * .google.cloud.dialogflow.cx.v3beta1.Intent triggered_intent = 7; @@ -3960,8 +3960,8 @@ public com.google.cloud.dialogflow.cx.v3beta1.IntentOrBuilder getTriggeredIntent * * *
-       * The [Page][google.cloud.dialogflow.cx.v3beta1.Page] on which the utterance was spoken. Only some fields such as
-       * name and displayname will be set.
+       * The [Page][google.cloud.dialogflow.cx.v3beta1.Page] on which the utterance was spoken. Only name and displayName
+       * will be set.
        * 
* * .google.cloud.dialogflow.cx.v3beta1.Page current_page = 8; @@ -3975,8 +3975,8 @@ public boolean hasCurrentPage() { * * *
-       * The [Page][google.cloud.dialogflow.cx.v3beta1.Page] on which the utterance was spoken. Only some fields such as
-       * name and displayname will be set.
+       * The [Page][google.cloud.dialogflow.cx.v3beta1.Page] on which the utterance was spoken. Only name and displayName
+       * will be set.
        * 
* * .google.cloud.dialogflow.cx.v3beta1.Page current_page = 8; @@ -3996,8 +3996,8 @@ public com.google.cloud.dialogflow.cx.v3beta1.Page getCurrentPage() { * * *
-       * The [Page][google.cloud.dialogflow.cx.v3beta1.Page] on which the utterance was spoken. Only some fields such as
-       * name and displayname will be set.
+       * The [Page][google.cloud.dialogflow.cx.v3beta1.Page] on which the utterance was spoken. Only name and displayName
+       * will be set.
        * 
* * .google.cloud.dialogflow.cx.v3beta1.Page current_page = 8; @@ -4019,8 +4019,8 @@ public Builder setCurrentPage(com.google.cloud.dialogflow.cx.v3beta1.Page value) * * *
-       * The [Page][google.cloud.dialogflow.cx.v3beta1.Page] on which the utterance was spoken. Only some fields such as
-       * name and displayname will be set.
+       * The [Page][google.cloud.dialogflow.cx.v3beta1.Page] on which the utterance was spoken. Only name and displayName
+       * will be set.
        * 
* * .google.cloud.dialogflow.cx.v3beta1.Page current_page = 8; @@ -4040,8 +4040,8 @@ public Builder setCurrentPage( * * *
-       * The [Page][google.cloud.dialogflow.cx.v3beta1.Page] on which the utterance was spoken. Only some fields such as
-       * name and displayname will be set.
+       * The [Page][google.cloud.dialogflow.cx.v3beta1.Page] on which the utterance was spoken. Only name and displayName
+       * will be set.
        * 
* * .google.cloud.dialogflow.cx.v3beta1.Page current_page = 8; @@ -4067,8 +4067,8 @@ public Builder mergeCurrentPage(com.google.cloud.dialogflow.cx.v3beta1.Page valu * * *
-       * The [Page][google.cloud.dialogflow.cx.v3beta1.Page] on which the utterance was spoken. Only some fields such as
-       * name and displayname will be set.
+       * The [Page][google.cloud.dialogflow.cx.v3beta1.Page] on which the utterance was spoken. Only name and displayName
+       * will be set.
        * 
* * .google.cloud.dialogflow.cx.v3beta1.Page current_page = 8; @@ -4088,8 +4088,8 @@ public Builder clearCurrentPage() { * * *
-       * The [Page][google.cloud.dialogflow.cx.v3beta1.Page] on which the utterance was spoken. Only some fields such as
-       * name and displayname will be set.
+       * The [Page][google.cloud.dialogflow.cx.v3beta1.Page] on which the utterance was spoken. Only name and displayName
+       * will be set.
        * 
* * .google.cloud.dialogflow.cx.v3beta1.Page current_page = 8; @@ -4103,8 +4103,8 @@ public com.google.cloud.dialogflow.cx.v3beta1.Page.Builder getCurrentPageBuilder * * *
-       * The [Page][google.cloud.dialogflow.cx.v3beta1.Page] on which the utterance was spoken. Only some fields such as
-       * name and displayname will be set.
+       * The [Page][google.cloud.dialogflow.cx.v3beta1.Page] on which the utterance was spoken. Only name and displayName
+       * will be set.
        * 
* * .google.cloud.dialogflow.cx.v3beta1.Page current_page = 8; @@ -4122,8 +4122,8 @@ public com.google.cloud.dialogflow.cx.v3beta1.PageOrBuilder getCurrentPageOrBuil * * *
-       * The [Page][google.cloud.dialogflow.cx.v3beta1.Page] on which the utterance was spoken. Only some fields such as
-       * name and displayname will be set.
+       * The [Page][google.cloud.dialogflow.cx.v3beta1.Page] on which the utterance was spoken. Only name and displayName
+       * will be set.
        * 
* * .google.cloud.dialogflow.cx.v3beta1.Page current_page = 8; diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseProto.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseProto.java index 8969c1305..934347eb3 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseProto.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCaseProto.java @@ -67,6 +67,18 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionCoverage_Transition_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionCoverage_Transition_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionRouteGroupCoverage_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionRouteGroupCoverage_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionRouteGroupCoverage_Coverage_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionRouteGroupCoverage_Coverage_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionRouteGroupCoverage_Coverage_Transition_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionRouteGroupCoverage_Coverage_Transition_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_dialogflow_cx_v3beta1_IntentCoverage_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -191,243 +203,260 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "flow/cx/v3beta1/page.proto\0329google/cloud" + "/dialogflow/cx/v3beta1/response_message." + "proto\0320google/cloud/dialogflow/cx/v3beta" - + "1/session.proto\032#google/longrunning/oper" - + "ations.proto\032\033google/protobuf/empty.prot" - + "o\032 google/protobuf/field_mask.proto\032\034goo" - + "gle/protobuf/struct.proto\032\037google/protob" - + "uf/timestamp.proto\032\027google/rpc/status.pr" - + "oto\"\356\003\n\010TestCase\022\014\n\004name\030\001 \001(\t\022\014\n\004tags\030\002" - + " \003(\t\022\031\n\014display_name\030\003 \001(\tB\003\340A\002\022\r\n\005notes" - + "\030\004 \001(\t\022C\n\013test_config\030\r \001(\0132..google.clo" - + "ud.dialogflow.cx.v3beta1.TestConfig\022Z\n\034t" - + "est_case_conversation_turns\030\005 \003(\01324.goog" - + "le.cloud.dialogflow.cx.v3beta1.Conversat" - + "ionTurn\0226\n\rcreation_time\030\n \001(\0132\032.google." - + "protobuf.TimestampB\003\340A\003\022L\n\020last_test_res" - + "ult\030\014 \001(\01322.google.cloud.dialogflow.cx.v" - + "3beta1.TestCaseResult:u\352Ar\n\"dialogflow.g" - + "oogleapis.com/TestCase\022Lprojects/{projec" - + "t}/locations/{location}/agents/{agent}/t" - + "estCases/{test_case}\"\265\003\n\016TestCaseResult\022" - + "\014\n\004name\030\001 \001(\t\022?\n\013environment\030\002 \001(\tB*\372A\'\n" - + "%dialogflow.googleapis.com/Environment\022P" - + "\n\022conversation_turns\030\003 \003(\01324.google.clou" - + "d.dialogflow.cx.v3beta1.ConversationTurn" - + "\022C\n\013test_result\030\004 \001(\0162..google.cloud.dia" - + "logflow.cx.v3beta1.TestResult\022-\n\ttest_ti" - + "me\030\005 \001(\0132\032.google.protobuf.Timestamp:\215\001\352" - + "A\211\001\n(dialogflow.googleapis.com/TestCaseR" - + "esult\022]projects/{project}/locations/{loc" - + "ation}/agents/{agent}/testCases/{test_ca" - + "se}/results/{result}\"\\\n\nTestConfig\022\033\n\023tr" - + "acking_parameters\030\001 \003(\t\0221\n\004flow\030\002 \001(\tB#\372" - + "A \n\036dialogflow.googleapis.com/Flow\"\277\006\n\020C" - + "onversationTurn\022R\n\nuser_input\030\001 \001(\0132>.go" - + "ogle.cloud.dialogflow.cx.v3beta1.Convers" - + "ationTurn.UserInput\022e\n\024virtual_agent_out" - + "put\030\002 \001(\0132G.google.cloud.dialogflow.cx.v" - + "3beta1.ConversationTurn.VirtualAgentOutp" - + "ut\032\234\001\n\tUserInput\022=\n\005input\030\005 \001(\0132..google" - + ".cloud.dialogflow.cx.v3beta1.QueryInput\022" - + "4\n\023injected_parameters\030\002 \001(\0132\027.google.pr" - + "otobuf.Struct\022\032\n\022is_webhook_enabled\030\003 \001(" - + "\010\032\320\003\n\022VirtualAgentOutput\0223\n\022session_para" - + "meters\030\004 \001(\0132\027.google.protobuf.Struct\022O\n" - + "\013differences\030\005 \003(\01325.google.cloud.dialog" - + "flow.cx.v3beta1.TestRunDifferenceB\003\340A\003\0228" - + "\n\017diagnostic_info\030\006 \001(\0132\027.google.protobu" - + "f.StructB\006\340A\002\340A\004\022D\n\020triggered_intent\030\007 \001" - + "(\0132*.google.cloud.dialogflow.cx.v3beta1." - + "Intent\022>\n\014current_page\030\010 \001(\0132(.google.cl" - + "oud.dialogflow.cx.v3beta1.Page\022P\n\016text_r" - + "esponses\030\t \003(\01328.google.cloud.dialogflow" - + ".cx.v3beta1.ResponseMessage.Text\022\"\n\006stat" - + "us\030\n \001(\0132\022.google.rpc.Status\"\322\001\n\021TestRun" - + "Difference\022L\n\004type\030\001 \001(\0162>.google.cloud." - + "dialogflow.cx.v3beta1.TestRunDifference." - + "DiffType\022\023\n\013description\030\002 \001(\t\"Z\n\010DiffTyp" - + "e\022\031\n\025DIFF_TYPE_UNSPECIFIED\020\000\022\n\n\006INTENT\020\001" - + "\022\010\n\004PAGE\020\002\022\016\n\nPARAMETERS\020\003\022\r\n\tUTTERANCE\020" - + "\004\"\226\005\n\022TransitionCoverage\022V\n\013transitions\030" - + "\001 \003(\0132A.google.cloud.dialogflow.cx.v3bet" - + "a1.TransitionCoverage.Transition\022\026\n\016cove" - + "rage_score\030\002 \001(\002\032\214\001\n\016TransitionNode\0228\n\004p" - + "age\030\001 \001(\0132(.google.cloud.dialogflow.cx.v" - + "3beta1.PageH\000\0228\n\004flow\030\002 \001(\0132(.google.clo" - + "ud.dialogflow.cx.v3beta1.FlowH\000B\006\n\004kind\032" - + "\200\003\n\nTransition\022U\n\006source\030\001 \001(\0132E.google." + + "1/session.proto\032?google/cloud/dialogflow" + + "/cx/v3beta1/transition_route_group.proto" + + "\032#google/longrunning/operations.proto\032\033g" + + "oogle/protobuf/empty.proto\032 google/proto" + + "buf/field_mask.proto\032\034google/protobuf/st" + + "ruct.proto\032\037google/protobuf/timestamp.pr" + + "oto\032\027google/rpc/status.proto\"\356\003\n\010TestCas" + + "e\022\014\n\004name\030\001 \001(\t\022\014\n\004tags\030\002 \003(\t\022\031\n\014display" + + "_name\030\003 \001(\tB\003\340A\002\022\r\n\005notes\030\004 \001(\t\022C\n\013test_" + + "config\030\r \001(\0132..google.cloud.dialogflow.c" + + "x.v3beta1.TestConfig\022Z\n\034test_case_conver" + + "sation_turns\030\005 \003(\01324.google.cloud.dialog" + + "flow.cx.v3beta1.ConversationTurn\0226\n\rcrea" + + "tion_time\030\n \001(\0132\032.google.protobuf.Timest" + + "ampB\003\340A\003\022L\n\020last_test_result\030\014 \001(\01322.goo" + + "gle.cloud.dialogflow.cx.v3beta1.TestCase" + + "Result:u\352Ar\n\"dialogflow.googleapis.com/T" + + "estCase\022Lprojects/{project}/locations/{l" + + "ocation}/agents/{agent}/testCases/{test_" + + "case}\"\265\003\n\016TestCaseResult\022\014\n\004name\030\001 \001(\t\022?" + + "\n\013environment\030\002 \001(\tB*\372A\'\n%dialogflow.goo" + + "gleapis.com/Environment\022P\n\022conversation_" + + "turns\030\003 \003(\01324.google.cloud.dialogflow.cx" + + ".v3beta1.ConversationTurn\022C\n\013test_result" + + "\030\004 \001(\0162..google.cloud.dialogflow.cx.v3be" + + "ta1.TestResult\022-\n\ttest_time\030\005 \001(\0132\032.goog" + + "le.protobuf.Timestamp:\215\001\352A\211\001\n(dialogflow" + + ".googleapis.com/TestCaseResult\022]projects" + + "/{project}/locations/{location}/agents/{" + + "agent}/testCases/{test_case}/results/{re" + + "sult}\"\\\n\nTestConfig\022\033\n\023tracking_paramete" + + "rs\030\001 \003(\t\0221\n\004flow\030\002 \001(\tB#\372A \n\036dialogflow." + + "googleapis.com/Flow\"\277\006\n\020ConversationTurn" + + "\022R\n\nuser_input\030\001 \001(\0132>.google.cloud.dial" + + "ogflow.cx.v3beta1.ConversationTurn.UserI" + + "nput\022e\n\024virtual_agent_output\030\002 \001(\0132G.goo" + + "gle.cloud.dialogflow.cx.v3beta1.Conversa" + + "tionTurn.VirtualAgentOutput\032\234\001\n\tUserInpu" + + "t\022=\n\005input\030\005 \001(\0132..google.cloud.dialogfl" + + "ow.cx.v3beta1.QueryInput\0224\n\023injected_par" + + "ameters\030\002 \001(\0132\027.google.protobuf.Struct\022\032" + + "\n\022is_webhook_enabled\030\003 \001(\010\032\320\003\n\022VirtualAg" + + "entOutput\0223\n\022session_parameters\030\004 \001(\0132\027." + + "google.protobuf.Struct\022O\n\013differences\030\005 " + + "\003(\01325.google.cloud.dialogflow.cx.v3beta1" + + ".TestRunDifferenceB\003\340A\003\0228\n\017diagnostic_in" + + "fo\030\006 \001(\0132\027.google.protobuf.StructB\006\340A\002\340A" + + "\004\022D\n\020triggered_intent\030\007 \001(\0132*.google.clo" + + "ud.dialogflow.cx.v3beta1.Intent\022>\n\014curre" + + "nt_page\030\010 \001(\0132(.google.cloud.dialogflow." + + "cx.v3beta1.Page\022P\n\016text_responses\030\t \003(\0132" + + "8.google.cloud.dialogflow.cx.v3beta1.Res" + + "ponseMessage.Text\022\"\n\006status\030\n \001(\0132\022.goog" + + "le.rpc.Status\"\322\001\n\021TestRunDifference\022L\n\004t" + + "ype\030\001 \001(\0162>.google.cloud.dialogflow.cx.v" + + "3beta1.TestRunDifference.DiffType\022\023\n\013des" + + "cription\030\002 \001(\t\"Z\n\010DiffType\022\031\n\025DIFF_TYPE_" + + "UNSPECIFIED\020\000\022\n\n\006INTENT\020\001\022\010\n\004PAGE\020\002\022\016\n\nP" + + "ARAMETERS\020\003\022\r\n\tUTTERANCE\020\004\"\226\005\n\022Transitio" + + "nCoverage\022V\n\013transitions\030\001 \003(\0132A.google." + "cloud.dialogflow.cx.v3beta1.TransitionCo" - + "verage.TransitionNode\022\r\n\005index\030\004 \001(\005\022U\n\006" - + "target\030\002 \001(\0132E.google.cloud.dialogflow.c" - + "x.v3beta1.TransitionCoverage.TransitionN" - + "ode\022\017\n\007covered\030\003 \001(\010\022O\n\020transition_route" - + "\030\005 \001(\01323.google.cloud.dialogflow.cx.v3be" - + "ta1.TransitionRouteH\000\022I\n\revent_handler\030\006" - + " \001(\01320.google.cloud.dialogflow.cx.v3beta" - + "1.EventHandlerH\000B\010\n\006detail\"\306\001\n\016IntentCov" - + "erage\022J\n\007intents\030\001 \003(\01329.google.cloud.di" - + "alogflow.cx.v3beta1.IntentCoverage.Inten" - + "t\022\026\n\016coverage_score\030\002 \001(\002\032P\n\006Intent\0225\n\006i" - + "ntent\030\001 \001(\tB%\372A\"\n dialogflow.googleapis." - + "com/Intent\022\017\n\007covered\030\002 \001(\010\"\200\002\n\030Calculat" - + "eCoverageRequest\0226\n\005agent\030\003 \001(\tB\'\340A\002\372A!\n" - + "\037dialogflow.googleapis.com/Agent\022\\\n\004type" - + "\030\002 \001(\0162I.google.cloud.dialogflow.cx.v3be" - + "ta1.CalculateCoverageRequest.CoverageTyp" - + "eB\003\340A\002\"N\n\014CoverageType\022\035\n\031COVERAGE_TYPE_" - + "UNSPECIFIED\020\000\022\n\n\006INTENT\020\001\022\023\n\017PAGE_TRANSI" - + "TION\020\002\"\207\002\n\031CalculateCoverageResponse\0223\n\005" - + "agent\030\005 \001(\tB$\372A!\n\037dialogflow.googleapis." - + "com/Agent\022M\n\017intent_coverage\030\002 \001(\01322.goo" - + "gle.cloud.dialogflow.cx.v3beta1.IntentCo" - + "verageH\000\022U\n\023transition_coverage\030\004 \001(\01326." + + "verage.Transition\022\026\n\016coverage_score\030\002 \001(" + + "\002\032\214\001\n\016TransitionNode\0228\n\004page\030\001 \001(\0132(.goo" + + "gle.cloud.dialogflow.cx.v3beta1.PageH\000\0228" + + "\n\004flow\030\002 \001(\0132(.google.cloud.dialogflow.c" + + "x.v3beta1.FlowH\000B\006\n\004kind\032\200\003\n\nTransition\022" + + "U\n\006source\030\001 \001(\0132E.google.cloud.dialogflo" + + "w.cx.v3beta1.TransitionCoverage.Transiti" + + "onNode\022\r\n\005index\030\004 \001(\005\022U\n\006target\030\002 \001(\0132E." + "google.cloud.dialogflow.cx.v3beta1.Trans" - + "itionCoverageH\000B\017\n\rcoverage_type\"\223\002\n\024Lis" - + "tTestCasesRequest\022:\n\006parent\030\001 \001(\tB*\340A\002\372A" - + "$\022\"dialogflow.googleapis.com/TestCase\022\021\n" - + "\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022S\n\004" - + "view\030\004 \001(\0162E.google.cloud.dialogflow.cx." - + "v3beta1.ListTestCasesRequest.TestCaseVie" - + "w\"C\n\014TestCaseView\022\036\n\032TEST_CASE_VIEW_UNSP" - + "ECIFIED\020\000\022\t\n\005BASIC\020\001\022\010\n\004FULL\020\002\"r\n\025ListTe" - + "stCasesResponse\022@\n\ntest_cases\030\001 \003(\0132,.go" - + "ogle.cloud.dialogflow.cx.v3beta1.TestCas" - + "e\022\027\n\017next_page_token\030\002 \001(\t\"\224\001\n\033BatchDele" - + "teTestCasesRequest\022:\n\006parent\030\001 \001(\tB*\340A\002\372" - + "A$\022\"dialogflow.googleapis.com/TestCase\0229" - + "\n\005names\030\003 \003(\tB*\340A\002\372A$\n\"dialogflow.google" - + "apis.com/TestCase\"\231\001\n\025CreateTestCaseRequ" - + "est\022:\n\006parent\030\001 \001(\tB*\340A\002\372A$\022\"dialogflow." - + "googleapis.com/TestCase\022D\n\ttest_case\030\002 \001" - + "(\0132,.google.cloud.dialogflow.cx.v3beta1." - + "TestCaseB\003\340A\002\"\223\001\n\025UpdateTestCaseRequest\022" - + "D\n\ttest_case\030\001 \001(\0132,.google.cloud.dialog" - + "flow.cx.v3beta1.TestCaseB\003\340A\002\0224\n\013update_" - + "mask\030\002 \001(\0132\032.google.protobuf.FieldMaskB\003" - + "\340A\002\"N\n\022GetTestCaseRequest\0228\n\004name\030\001 \001(\tB" - + "*\340A\002\372A$\n\"dialogflow.googleapis.com/TestC" - + "ase\"\222\001\n\022RunTestCaseRequest\0228\n\004name\030\001 \001(\t" - + "B*\340A\002\372A$\n\"dialogflow.googleapis.com/Test" - + "Case\022B\n\013environment\030\002 \001(\tB-\340A\001\372A\'\n%dialo" - + "gflow.googleapis.com/Environment\"Y\n\023RunT" - + "estCaseResponse\022B\n\006result\030\002 \001(\01322.google" - + ".cloud.dialogflow.cx.v3beta1.TestCaseRes" - + "ult\"\025\n\023RunTestCaseMetadata\"\332\001\n\030BatchRunT" - + "estCasesRequest\022:\n\006parent\030\001 \001(\tB*\340A\002\372A$\022" - + "\"dialogflow.googleapis.com/TestCase\022B\n\013e" - + "nvironment\030\002 \001(\tB-\340A\001\372A\'\n%dialogflow.goo" - + "gleapis.com/Environment\022>\n\ntest_cases\030\003 " - + "\003(\tB*\340A\002\372A$\n\"dialogflow.googleapis.com/T" - + "estCase\"`\n\031BatchRunTestCasesResponse\022C\n\007" - + "results\030\001 \003(\01322.google.cloud.dialogflow." - + "cx.v3beta1.TestCaseResult\"Z\n\031BatchRunTes" - + "tCasesMetadata\022=\n\006errors\030\001 \003(\0132-.google." - + "cloud.dialogflow.cx.v3beta1.TestError\"\232\001" - + "\n\tTestError\022:\n\ttest_case\030\001 \001(\tB\'\372A$\n\"dia" - + "logflow.googleapis.com/TestCase\022\"\n\006statu" - + "s\030\002 \001(\0132\022.google.rpc.Status\022-\n\ttest_time" - + "\030\003 \001(\0132\032.google.protobuf.Timestamp\"\204\001\n\026I" - + "mportTestCasesRequest\022:\n\006parent\030\001 \001(\tB*\340" - + "A\002\372A$\022\"dialogflow.googleapis.com/TestCas" - + "e\022\021\n\007gcs_uri\030\002 \001(\tH\000\022\021\n\007content\030\003 \001(\014H\000B" - + "\010\n\006source\"Q\n\027ImportTestCasesResponse\0226\n\005" - + "names\030\001 \003(\tB\'\372A$\n\"dialogflow.googleapis." - + "com/TestCase\"\\\n\027ImportTestCasesMetadata\022" - + "A\n\006errors\030\001 \003(\01321.google.cloud.dialogflo" - + "w.cx.v3beta1.TestCaseError\"t\n\rTestCaseEr" - + "ror\022?\n\ttest_case\030\001 \001(\0132,.google.cloud.di" - + "alogflow.cx.v3beta1.TestCase\022\"\n\006status\030\002" - + " \001(\0132\022.google.rpc.Status\"\241\002\n\026ExportTestC" - + "asesRequest\022:\n\006parent\030\001 \001(\tB*\340A\002\372A$\022\"dia" - + "logflow.googleapis.com/TestCase\022\021\n\007gcs_u" - + "ri\030\002 \001(\tH\000\022Z\n\013data_format\030\003 \001(\0162E.google" - + ".cloud.dialogflow.cx.v3beta1.ExportTestC" - + "asesRequest.DataFormat\022\016\n\006filter\030\004 \001(\t\"=" - + "\n\nDataFormat\022\033\n\027DATA_FORMAT_UNSPECIFIED\020" - + "\000\022\010\n\004BLOB\020\001\022\010\n\004JSON\020\002B\r\n\013destination\"N\n\027" - + "ExportTestCasesResponse\022\021\n\007gcs_uri\030\001 \001(\t" - + "H\000\022\021\n\007content\030\002 \001(\014H\000B\r\n\013destination\"\031\n\027" - + "ExportTestCasesMetadata\"\225\001\n\032ListTestCase" - + "ResultsRequest\022@\n\006parent\030\001 \001(\tB0\340A\002\372A*\022(" - + "dialogflow.googleapis.com/TestCaseResult" - + "\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022" - + "\016\n\006filter\030\004 \001(\t\"\205\001\n\033ListTestCaseResultsR" - + "esponse\022M\n\021test_case_results\030\001 \003(\01322.goo" - + "gle.cloud.dialogflow.cx.v3beta1.TestCase" - + "Result\022\027\n\017next_page_token\030\002 \001(\t*A\n\nTestR" - + "esult\022\033\n\027TEST_RESULT_UNSPECIFIED\020\000\022\n\n\006PA" - + "SSED\020\001\022\n\n\006FAILED\020\0022\317\024\n\tTestCases\022\322\001\n\rLis" - + "tTestCases\0228.google.cloud.dialogflow.cx." - + "v3beta1.ListTestCasesRequest\0329.google.cl" - + "oud.dialogflow.cx.v3beta1.ListTestCasesR" - + "esponse\"L\202\323\344\223\002=\022;/v3beta1/{parent=projec" - + "ts/*/locations/*/agents/*}/testCases\332A\006p" - + "arent\022\314\001\n\024BatchDeleteTestCases\022?.google." - + "cloud.dialogflow.cx.v3beta1.BatchDeleteT" - + "estCasesRequest\032\026.google.protobuf.Empty\"" - + "[\202\323\344\223\002L\"G/v3beta1/{parent=projects/*/loc" - + "ations/*/agents/*}/testCases:batchDelete" - + ":\001*\332A\006parent\022\277\001\n\013GetTestCase\0226.google.cl" - + "oud.dialogflow.cx.v3beta1.GetTestCaseReq" - + "uest\032,.google.cloud.dialogflow.cx.v3beta" - + "1.TestCase\"J\202\323\344\223\002=\022;/v3beta1/{name=proje" - + "cts/*/locations/*/agents/*/testCases/*}\332" - + "A\004name\022\334\001\n\016CreateTestCase\0229.google.cloud" - + ".dialogflow.cx.v3beta1.CreateTestCaseReq" - + "uest\032,.google.cloud.dialogflow.cx.v3beta" - + "1.TestCase\"a\202\323\344\223\002H\";/v3beta1/{parent=pro" - + "jects/*/locations/*/agents/*}/testCases:" - + "\ttest_case\332A\020parent,test_case\022\353\001\n\016Update" - + "TestCase\0229.google.cloud.dialogflow.cx.v3" - + "beta1.UpdateTestCaseRequest\032,.google.clo" - + "ud.dialogflow.cx.v3beta1.TestCase\"p\202\323\344\223\002" - + "R2E/v3beta1/{test_case.name=projects/*/l" - + "ocations/*/agents/*/testCases/*}:\ttest_c" - + "ase\332A\025test_case,update_mask\022\324\001\n\013RunTestC" - + "ase\0226.google.cloud.dialogflow.cx.v3beta1" - + ".RunTestCaseRequest\032\035.google.longrunning" - + ".Operation\"n\202\323\344\223\002;\"6/v3beta1/projects/*/" - + "locations/*/agents/*/testCases:run:\001*\312A*" - + "\n\023RunTestCaseResponse\022\023RunTestCaseMetada" - + "ta\022\373\001\n\021BatchRunTestCases\022<.google.cloud." - + "dialogflow.cx.v3beta1.BatchRunTestCasesR" - + "equest\032\035.google.longrunning.Operation\"\210\001" - + "\202\323\344\223\002I\"D/v3beta1/{parent=projects/*/loca" - + "tions/*/agents/*}/testCases:batchRun:\001*\312" - + "A6\n\031BatchRunTestCasesResponse\022\031BatchRunT" - + "estCasesMetadata\022\346\001\n\021CalculateCoverage\022<" - + ".google.cloud.dialogflow.cx.v3beta1.Calc" - + "ulateCoverageRequest\032=.google.cloud.dial" - + "ogflow.cx.v3beta1.CalculateCoverageRespo" - + "nse\"T\202\323\344\223\002N\022L/v3beta1/{agent=projects/*/" - + "locations/*/agents/*}/testCases:calculat" - + "eCoverage\022\361\001\n\017ImportTestCases\022:.google.c" - + "loud.dialogflow.cx.v3beta1.ImportTestCas" - + "esRequest\032\035.google.longrunning.Operation" - + "\"\202\001\202\323\344\223\002G\"B/v3beta1/{parent=projects/*/l" - + "ocations/*/agents/*}/testCases:import:\001*" - + "\312A2\n\027ImportTestCasesResponse\022\027ImportTest" - + "CasesMetadata\022\361\001\n\017ExportTestCases\022:.goog" - + "le.cloud.dialogflow.cx.v3beta1.ExportTes" + + "itionCoverage.TransitionNode\022\017\n\007covered\030" + + "\003 \001(\010\022O\n\020transition_route\030\005 \001(\01323.google" + + ".cloud.dialogflow.cx.v3beta1.TransitionR" + + "outeH\000\022I\n\revent_handler\030\006 \001(\01320.google.c" + + "loud.dialogflow.cx.v3beta1.EventHandlerH" + + "\000B\010\n\006detail\"\341\003\n\034TransitionRouteGroupCove" + + "rage\022\\\n\tcoverages\030\001 \003(\0132I.google.cloud.d" + + "ialogflow.cx.v3beta1.TransitionRouteGrou" + + "pCoverage.Coverage\022\026\n\016coverage_score\030\002 \001" + + "(\002\032\312\002\n\010Coverage\022M\n\013route_group\030\001 \001(\01328.g" + + "oogle.cloud.dialogflow.cx.v3beta1.Transi" + + "tionRouteGroup\022i\n\013transitions\030\002 \003(\0132T.go" + + "ogle.cloud.dialogflow.cx.v3beta1.Transit" + + "ionRouteGroupCoverage.Coverage.Transitio" + + "n\022\026\n\016coverage_score\030\003 \001(\002\032l\n\nTransition\022" + + "M\n\020transition_route\030\001 \001(\01323.google.cloud" + + ".dialogflow.cx.v3beta1.TransitionRoute\022\017" + + "\n\007covered\030\002 \001(\010\"\306\001\n\016IntentCoverage\022J\n\007in" + + "tents\030\001 \003(\01329.google.cloud.dialogflow.cx" + + ".v3beta1.IntentCoverage.Intent\022\026\n\016covera" + + "ge_score\030\002 \001(\002\032P\n\006Intent\0225\n\006intent\030\001 \001(\t" + + "B%\372A\"\n dialogflow.googleapis.com/Intent\022" + + "\017\n\007covered\030\002 \001(\010\"\234\002\n\030CalculateCoverageRe" + + "quest\0226\n\005agent\030\003 \001(\tB\'\340A\002\372A!\n\037dialogflow" + + ".googleapis.com/Agent\022\\\n\004type\030\002 \001(\0162I.go" + + "ogle.cloud.dialogflow.cx.v3beta1.Calcula" + + "teCoverageRequest.CoverageTypeB\003\340A\002\"j\n\014C" + + "overageType\022\035\n\031COVERAGE_TYPE_UNSPECIFIED" + + "\020\000\022\n\n\006INTENT\020\001\022\023\n\017PAGE_TRANSITION\020\002\022\032\n\026T" + + "RANSITION_ROUTE_GROUP\020\003\"\351\002\n\031CalculateCov" + + "erageResponse\0223\n\005agent\030\005 \001(\tB$\372A!\n\037dialo" + + "gflow.googleapis.com/Agent\022M\n\017intent_cov" + + "erage\030\002 \001(\01322.google.cloud.dialogflow.cx" + + ".v3beta1.IntentCoverageH\000\022U\n\023transition_" + + "coverage\030\004 \001(\01326.google.cloud.dialogflow" + + ".cx.v3beta1.TransitionCoverageH\000\022`\n\024rout" + + "e_group_coverage\030\006 \001(\0132@.google.cloud.di" + + "alogflow.cx.v3beta1.TransitionRouteGroup" + + "CoverageH\000B\017\n\rcoverage_type\"\223\002\n\024ListTest" + + "CasesRequest\022:\n\006parent\030\001 \001(\tB*\340A\002\372A$\022\"di" + + "alogflow.googleapis.com/TestCase\022\021\n\tpage" + + "_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022S\n\004view\030" + + "\004 \001(\0162E.google.cloud.dialogflow.cx.v3bet" + + "a1.ListTestCasesRequest.TestCaseView\"C\n\014" + + "TestCaseView\022\036\n\032TEST_CASE_VIEW_UNSPECIFI" + + "ED\020\000\022\t\n\005BASIC\020\001\022\010\n\004FULL\020\002\"r\n\025ListTestCas" + + "esResponse\022@\n\ntest_cases\030\001 \003(\0132,.google." + + "cloud.dialogflow.cx.v3beta1.TestCase\022\027\n\017" + + "next_page_token\030\002 \001(\t\"\224\001\n\033BatchDeleteTes" + + "tCasesRequest\022:\n\006parent\030\001 \001(\tB*\340A\002\372A$\022\"d" + + "ialogflow.googleapis.com/TestCase\0229\n\005nam" + + "es\030\003 \003(\tB*\340A\002\372A$\n\"dialogflow.googleapis." + + "com/TestCase\"\231\001\n\025CreateTestCaseRequest\022:" + + "\n\006parent\030\001 \001(\tB*\340A\002\372A$\022\"dialogflow.googl" + + "eapis.com/TestCase\022D\n\ttest_case\030\002 \001(\0132,." + + "google.cloud.dialogflow.cx.v3beta1.TestC" + + "aseB\003\340A\002\"\223\001\n\025UpdateTestCaseRequest\022D\n\tte" + + "st_case\030\001 \001(\0132,.google.cloud.dialogflow." + + "cx.v3beta1.TestCaseB\003\340A\002\0224\n\013update_mask\030" + + "\002 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\002\"N" + + "\n\022GetTestCaseRequest\0228\n\004name\030\001 \001(\tB*\340A\002\372" + + "A$\n\"dialogflow.googleapis.com/TestCase\"\222" + + "\001\n\022RunTestCaseRequest\0228\n\004name\030\001 \001(\tB*\340A\002" + + "\372A$\n\"dialogflow.googleapis.com/TestCase\022" + + "B\n\013environment\030\002 \001(\tB-\340A\001\372A\'\n%dialogflow" + + ".googleapis.com/Environment\"Y\n\023RunTestCa" + + "seResponse\022B\n\006result\030\002 \001(\01322.google.clou" + + "d.dialogflow.cx.v3beta1.TestCaseResult\"\025" + + "\n\023RunTestCaseMetadata\"\332\001\n\030BatchRunTestCa" + + "sesRequest\022:\n\006parent\030\001 \001(\tB*\340A\002\372A$\022\"dial" + + "ogflow.googleapis.com/TestCase\022B\n\013enviro" + + "nment\030\002 \001(\tB-\340A\001\372A\'\n%dialogflow.googleap" + + "is.com/Environment\022>\n\ntest_cases\030\003 \003(\tB*" + + "\340A\002\372A$\n\"dialogflow.googleapis.com/TestCa" + + "se\"`\n\031BatchRunTestCasesResponse\022C\n\007resul" + + "ts\030\001 \003(\01322.google.cloud.dialogflow.cx.v3" + + "beta1.TestCaseResult\"Z\n\031BatchRunTestCase" + + "sMetadata\022=\n\006errors\030\001 \003(\0132-.google.cloud" + + ".dialogflow.cx.v3beta1.TestError\"\232\001\n\tTes" + + "tError\022:\n\ttest_case\030\001 \001(\tB\'\372A$\n\"dialogfl" + + "ow.googleapis.com/TestCase\022\"\n\006status\030\002 \001" + + "(\0132\022.google.rpc.Status\022-\n\ttest_time\030\003 \001(" + + "\0132\032.google.protobuf.Timestamp\"\204\001\n\026Import" + + "TestCasesRequest\022:\n\006parent\030\001 \001(\tB*\340A\002\372A$" + + "\022\"dialogflow.googleapis.com/TestCase\022\021\n\007" + + "gcs_uri\030\002 \001(\tH\000\022\021\n\007content\030\003 \001(\014H\000B\010\n\006so" + + "urce\"Q\n\027ImportTestCasesResponse\0226\n\005names" + + "\030\001 \003(\tB\'\372A$\n\"dialogflow.googleapis.com/T" + + "estCase\"\\\n\027ImportTestCasesMetadata\022A\n\006er" + + "rors\030\001 \003(\01321.google.cloud.dialogflow.cx." + + "v3beta1.TestCaseError\"t\n\rTestCaseError\022?" + + "\n\ttest_case\030\001 \001(\0132,.google.cloud.dialogf" + + "low.cx.v3beta1.TestCase\022\"\n\006status\030\002 \001(\0132" + + "\022.google.rpc.Status\"\241\002\n\026ExportTestCasesR" + + "equest\022:\n\006parent\030\001 \001(\tB*\340A\002\372A$\022\"dialogfl" + + "ow.googleapis.com/TestCase\022\021\n\007gcs_uri\030\002 " + + "\001(\tH\000\022Z\n\013data_format\030\003 \001(\0162E.google.clou" + + "d.dialogflow.cx.v3beta1.ExportTestCasesR" + + "equest.DataFormat\022\016\n\006filter\030\004 \001(\t\"=\n\nDat" + + "aFormat\022\033\n\027DATA_FORMAT_UNSPECIFIED\020\000\022\010\n\004" + + "BLOB\020\001\022\010\n\004JSON\020\002B\r\n\013destination\"N\n\027Expor" + + "tTestCasesResponse\022\021\n\007gcs_uri\030\001 \001(\tH\000\022\021\n" + + "\007content\030\002 \001(\014H\000B\r\n\013destination\"\031\n\027Expor" + + "tTestCasesMetadata\"\225\001\n\032ListTestCaseResul" + + "tsRequest\022@\n\006parent\030\001 \001(\tB0\340A\002\372A*\022(dialo" + + "gflow.googleapis.com/TestCaseResult\022\021\n\tp" + + "age_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\016\n\006fi" + + "lter\030\004 \001(\t\"\205\001\n\033ListTestCaseResultsRespon" + + "se\022M\n\021test_case_results\030\001 \003(\01322.google.c" + + "loud.dialogflow.cx.v3beta1.TestCaseResul" + + "t\022\027\n\017next_page_token\030\002 \001(\t*A\n\nTestResult" + + "\022\033\n\027TEST_RESULT_UNSPECIFIED\020\000\022\n\n\006PASSED\020" + + "\001\022\n\n\006FAILED\020\0022\330\024\n\tTestCases\022\322\001\n\rListTest" + + "Cases\0228.google.cloud.dialogflow.cx.v3bet" + + "a1.ListTestCasesRequest\0329.google.cloud.d" + + "ialogflow.cx.v3beta1.ListTestCasesRespon" + + "se\"L\202\323\344\223\002=\022;/v3beta1/{parent=projects/*/" + + "locations/*/agents/*}/testCases\332A\006parent" + + "\022\314\001\n\024BatchDeleteTestCases\022?.google.cloud" + + ".dialogflow.cx.v3beta1.BatchDeleteTestCa" + + "sesRequest\032\026.google.protobuf.Empty\"[\202\323\344\223" + + "\002L\"G/v3beta1/{parent=projects/*/location" + + "s/*/agents/*}/testCases:batchDelete:\001*\332A" + + "\006parent\022\277\001\n\013GetTestCase\0226.google.cloud.d" + + "ialogflow.cx.v3beta1.GetTestCaseRequest\032" + + ",.google.cloud.dialogflow.cx.v3beta1.Tes" + + "tCase\"J\202\323\344\223\002=\022;/v3beta1/{name=projects/*" + + "/locations/*/agents/*/testCases/*}\332A\004nam" + + "e\022\334\001\n\016CreateTestCase\0229.google.cloud.dial" + + "ogflow.cx.v3beta1.CreateTestCaseRequest\032" + + ",.google.cloud.dialogflow.cx.v3beta1.Tes" + + "tCase\"a\202\323\344\223\002H\";/v3beta1/{parent=projects" + + "/*/locations/*/agents/*}/testCases:\ttest" + + "_case\332A\020parent,test_case\022\353\001\n\016UpdateTestC" + + "ase\0229.google.cloud.dialogflow.cx.v3beta1" + + ".UpdateTestCaseRequest\032,.google.cloud.di" + + "alogflow.cx.v3beta1.TestCase\"p\202\323\344\223\002R2E/v" + + "3beta1/{test_case.name=projects/*/locati" + + "ons/*/agents/*/testCases/*}:\ttest_case\332A" + + "\025test_case,update_mask\022\335\001\n\013RunTestCase\0226" + + ".google.cloud.dialogflow.cx.v3beta1.RunT" + + "estCaseRequest\032\035.google.longrunning.Oper" + + "ation\"w\202\323\344\223\002D\"?/v3beta1/{name=projects/*" + + "/locations/*/agents/*/testCases/*}:run:\001" + + "*\312A*\n\023RunTestCaseResponse\022\023RunTestCaseMe" + + "tadata\022\373\001\n\021BatchRunTestCases\022<.google.cl" + + "oud.dialogflow.cx.v3beta1.BatchRunTestCa" + + "sesRequest\032\035.google.longrunning.Operatio" + + "n\"\210\001\202\323\344\223\002I\"D/v3beta1/{parent=projects/*/" + + "locations/*/agents/*}/testCases:batchRun" + + ":\001*\312A6\n\031BatchRunTestCasesResponse\022\031Batch" + + "RunTestCasesMetadata\022\346\001\n\021CalculateCovera" + + "ge\022<.google.cloud.dialogflow.cx.v3beta1." + + "CalculateCoverageRequest\032=.google.cloud." + + "dialogflow.cx.v3beta1.CalculateCoverageR" + + "esponse\"T\202\323\344\223\002N\022L/v3beta1/{agent=project" + + "s/*/locations/*/agents/*}/testCases:calc" + + "ulateCoverage\022\361\001\n\017ImportTestCases\022:.goog" + + "le.cloud.dialogflow.cx.v3beta1.ImportTes" + "tCasesRequest\032\035.google.longrunning.Opera" + "tion\"\202\001\202\323\344\223\002G\"B/v3beta1/{parent=projects" - + "/*/locations/*/agents/*}/testCases:expor" - + "t:\001*\312A2\n\027ExportTestCasesResponse\022\027Export" - + "TestCasesMetadata\022\356\001\n\023ListTestCaseResult" - + "s\022>.google.cloud.dialogflow.cx.v3beta1.L" - + "istTestCaseResultsRequest\032?.google.cloud" - + ".dialogflow.cx.v3beta1.ListTestCaseResul" - + "tsResponse\"V\202\323\344\223\002G\022E/v3beta1/{parent=pro" - + "jects/*/locations/*/agents/*/testCases/*" - + "}/results\332A\006parent\032x\312A\031dialogflow.google" - + "apis.com\322AYhttps://www.googleapis.com/au" - + "th/cloud-platform,https://www.googleapis" - + ".com/auth/dialogflowB\254\001\n&com.google.clou" - + "d.dialogflow.cx.v3beta1B\rTestCaseProtoP\001" - + "ZDgoogle.golang.org/genproto/googleapis/" - + "cloud/dialogflow/cx/v3beta1;cx\370\001\001\242\002\002DF\252\002" - + "\"Google.Cloud.Dialogflow.Cx.V3Beta1b\006pro" - + "to3" + + "/*/locations/*/agents/*}/testCases:impor" + + "t:\001*\312A2\n\027ImportTestCasesResponse\022\027Import" + + "TestCasesMetadata\022\361\001\n\017ExportTestCases\022:." + + "google.cloud.dialogflow.cx.v3beta1.Expor" + + "tTestCasesRequest\032\035.google.longrunning.O" + + "peration\"\202\001\202\323\344\223\002G\"B/v3beta1/{parent=proj" + + "ects/*/locations/*/agents/*}/testCases:e" + + "xport:\001*\312A2\n\027ExportTestCasesResponse\022\027Ex" + + "portTestCasesMetadata\022\356\001\n\023ListTestCaseRe" + + "sults\022>.google.cloud.dialogflow.cx.v3bet" + + "a1.ListTestCaseResultsRequest\032?.google.c" + + "loud.dialogflow.cx.v3beta1.ListTestCaseR" + + "esultsResponse\"V\202\323\344\223\002G\022E/v3beta1/{parent" + + "=projects/*/locations/*/agents/*/testCas" + + "es/*}/results\332A\006parent\032x\312A\031dialogflow.go" + + "ogleapis.com\322AYhttps://www.googleapis.co" + + "m/auth/cloud-platform,https://www.google" + + "apis.com/auth/dialogflowB\254\001\n&com.google." + + "cloud.dialogflow.cx.v3beta1B\rTestCasePro" + + "toP\001ZDgoogle.golang.org/genproto/googlea" + + "pis/cloud/dialogflow/cx/v3beta1;cx\370\001\001\242\002\002" + + "DF\252\002\"Google.Cloud.Dialogflow.Cx.V3Beta1b" + + "\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -442,6 +471,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.cloud.dialogflow.cx.v3beta1.PageProto.getDescriptor(), com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageProto.getDescriptor(), com.google.cloud.dialogflow.cx.v3beta1.SessionProto.getDescriptor(), + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupProto.getDescriptor(), com.google.longrunning.OperationsProto.getDescriptor(), com.google.protobuf.EmptyProto.getDescriptor(), com.google.protobuf.FieldMaskProto.getDescriptor(), @@ -550,8 +580,36 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Source", "Index", "Target", "Covered", "TransitionRoute", "EventHandler", "Detail", }); - internal_static_google_cloud_dialogflow_cx_v3beta1_IntentCoverage_descriptor = + internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionRouteGroupCoverage_descriptor = getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionRouteGroupCoverage_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionRouteGroupCoverage_descriptor, + new java.lang.String[] { + "Coverages", "CoverageScore", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionRouteGroupCoverage_Coverage_descriptor = + internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionRouteGroupCoverage_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionRouteGroupCoverage_Coverage_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionRouteGroupCoverage_Coverage_descriptor, + new java.lang.String[] { + "RouteGroup", "Transitions", "CoverageScore", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionRouteGroupCoverage_Coverage_Transition_descriptor = + internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionRouteGroupCoverage_Coverage_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionRouteGroupCoverage_Coverage_Transition_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionRouteGroupCoverage_Coverage_Transition_descriptor, + new java.lang.String[] { + "TransitionRoute", "Covered", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_IntentCoverage_descriptor = + getDescriptor().getMessageTypes().get(7); internal_static_google_cloud_dialogflow_cx_v3beta1_IntentCoverage_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_IntentCoverage_descriptor, @@ -569,7 +627,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Intent", "Covered", }); internal_static_google_cloud_dialogflow_cx_v3beta1_CalculateCoverageRequest_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageTypes().get(8); internal_static_google_cloud_dialogflow_cx_v3beta1_CalculateCoverageRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_CalculateCoverageRequest_descriptor, @@ -577,15 +635,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Agent", "Type", }); internal_static_google_cloud_dialogflow_cx_v3beta1_CalculateCoverageResponse_descriptor = - getDescriptor().getMessageTypes().get(8); + getDescriptor().getMessageTypes().get(9); internal_static_google_cloud_dialogflow_cx_v3beta1_CalculateCoverageResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_CalculateCoverageResponse_descriptor, new java.lang.String[] { - "Agent", "IntentCoverage", "TransitionCoverage", "CoverageType", + "Agent", "IntentCoverage", "TransitionCoverage", "RouteGroupCoverage", "CoverageType", }); internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCasesRequest_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageTypes().get(10); internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCasesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCasesRequest_descriptor, @@ -593,7 +651,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", "View", }); internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCasesResponse_descriptor = - getDescriptor().getMessageTypes().get(10); + getDescriptor().getMessageTypes().get(11); internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCasesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCasesResponse_descriptor, @@ -601,7 +659,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "TestCases", "NextPageToken", }); internal_static_google_cloud_dialogflow_cx_v3beta1_BatchDeleteTestCasesRequest_descriptor = - getDescriptor().getMessageTypes().get(11); + getDescriptor().getMessageTypes().get(12); internal_static_google_cloud_dialogflow_cx_v3beta1_BatchDeleteTestCasesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_BatchDeleteTestCasesRequest_descriptor, @@ -609,7 +667,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "Names", }); internal_static_google_cloud_dialogflow_cx_v3beta1_CreateTestCaseRequest_descriptor = - getDescriptor().getMessageTypes().get(12); + getDescriptor().getMessageTypes().get(13); internal_static_google_cloud_dialogflow_cx_v3beta1_CreateTestCaseRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_CreateTestCaseRequest_descriptor, @@ -617,7 +675,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "TestCase", }); internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateTestCaseRequest_descriptor = - getDescriptor().getMessageTypes().get(13); + getDescriptor().getMessageTypes().get(14); internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateTestCaseRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateTestCaseRequest_descriptor, @@ -625,7 +683,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "TestCase", "UpdateMask", }); internal_static_google_cloud_dialogflow_cx_v3beta1_GetTestCaseRequest_descriptor = - getDescriptor().getMessageTypes().get(14); + getDescriptor().getMessageTypes().get(15); internal_static_google_cloud_dialogflow_cx_v3beta1_GetTestCaseRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_GetTestCaseRequest_descriptor, @@ -633,7 +691,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_dialogflow_cx_v3beta1_RunTestCaseRequest_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageTypes().get(16); internal_static_google_cloud_dialogflow_cx_v3beta1_RunTestCaseRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_RunTestCaseRequest_descriptor, @@ -641,7 +699,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "Environment", }); internal_static_google_cloud_dialogflow_cx_v3beta1_RunTestCaseResponse_descriptor = - getDescriptor().getMessageTypes().get(16); + getDescriptor().getMessageTypes().get(17); internal_static_google_cloud_dialogflow_cx_v3beta1_RunTestCaseResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_RunTestCaseResponse_descriptor, @@ -649,13 +707,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Result", }); internal_static_google_cloud_dialogflow_cx_v3beta1_RunTestCaseMetadata_descriptor = - getDescriptor().getMessageTypes().get(17); + getDescriptor().getMessageTypes().get(18); internal_static_google_cloud_dialogflow_cx_v3beta1_RunTestCaseMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_RunTestCaseMetadata_descriptor, new java.lang.String[] {}); internal_static_google_cloud_dialogflow_cx_v3beta1_BatchRunTestCasesRequest_descriptor = - getDescriptor().getMessageTypes().get(18); + getDescriptor().getMessageTypes().get(19); internal_static_google_cloud_dialogflow_cx_v3beta1_BatchRunTestCasesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_BatchRunTestCasesRequest_descriptor, @@ -663,7 +721,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "Environment", "TestCases", }); internal_static_google_cloud_dialogflow_cx_v3beta1_BatchRunTestCasesResponse_descriptor = - getDescriptor().getMessageTypes().get(19); + getDescriptor().getMessageTypes().get(20); internal_static_google_cloud_dialogflow_cx_v3beta1_BatchRunTestCasesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_BatchRunTestCasesResponse_descriptor, @@ -671,7 +729,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Results", }); internal_static_google_cloud_dialogflow_cx_v3beta1_BatchRunTestCasesMetadata_descriptor = - getDescriptor().getMessageTypes().get(20); + getDescriptor().getMessageTypes().get(21); internal_static_google_cloud_dialogflow_cx_v3beta1_BatchRunTestCasesMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_BatchRunTestCasesMetadata_descriptor, @@ -679,7 +737,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Errors", }); internal_static_google_cloud_dialogflow_cx_v3beta1_TestError_descriptor = - getDescriptor().getMessageTypes().get(21); + getDescriptor().getMessageTypes().get(22); internal_static_google_cloud_dialogflow_cx_v3beta1_TestError_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_TestError_descriptor, @@ -687,7 +745,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "TestCase", "Status", "TestTime", }); internal_static_google_cloud_dialogflow_cx_v3beta1_ImportTestCasesRequest_descriptor = - getDescriptor().getMessageTypes().get(22); + getDescriptor().getMessageTypes().get(23); internal_static_google_cloud_dialogflow_cx_v3beta1_ImportTestCasesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_ImportTestCasesRequest_descriptor, @@ -695,7 +753,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "GcsUri", "Content", "Source", }); internal_static_google_cloud_dialogflow_cx_v3beta1_ImportTestCasesResponse_descriptor = - getDescriptor().getMessageTypes().get(23); + getDescriptor().getMessageTypes().get(24); internal_static_google_cloud_dialogflow_cx_v3beta1_ImportTestCasesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_ImportTestCasesResponse_descriptor, @@ -703,7 +761,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Names", }); internal_static_google_cloud_dialogflow_cx_v3beta1_ImportTestCasesMetadata_descriptor = - getDescriptor().getMessageTypes().get(24); + getDescriptor().getMessageTypes().get(25); internal_static_google_cloud_dialogflow_cx_v3beta1_ImportTestCasesMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_ImportTestCasesMetadata_descriptor, @@ -711,7 +769,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Errors", }); internal_static_google_cloud_dialogflow_cx_v3beta1_TestCaseError_descriptor = - getDescriptor().getMessageTypes().get(25); + getDescriptor().getMessageTypes().get(26); internal_static_google_cloud_dialogflow_cx_v3beta1_TestCaseError_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_TestCaseError_descriptor, @@ -719,7 +777,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "TestCase", "Status", }); internal_static_google_cloud_dialogflow_cx_v3beta1_ExportTestCasesRequest_descriptor = - getDescriptor().getMessageTypes().get(26); + getDescriptor().getMessageTypes().get(27); internal_static_google_cloud_dialogflow_cx_v3beta1_ExportTestCasesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_ExportTestCasesRequest_descriptor, @@ -727,7 +785,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "GcsUri", "DataFormat", "Filter", "Destination", }); internal_static_google_cloud_dialogflow_cx_v3beta1_ExportTestCasesResponse_descriptor = - getDescriptor().getMessageTypes().get(27); + getDescriptor().getMessageTypes().get(28); internal_static_google_cloud_dialogflow_cx_v3beta1_ExportTestCasesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_ExportTestCasesResponse_descriptor, @@ -735,13 +793,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "GcsUri", "Content", "Destination", }); internal_static_google_cloud_dialogflow_cx_v3beta1_ExportTestCasesMetadata_descriptor = - getDescriptor().getMessageTypes().get(28); + getDescriptor().getMessageTypes().get(29); internal_static_google_cloud_dialogflow_cx_v3beta1_ExportTestCasesMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_ExportTestCasesMetadata_descriptor, new java.lang.String[] {}); internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCaseResultsRequest_descriptor = - getDescriptor().getMessageTypes().get(29); + getDescriptor().getMessageTypes().get(30); internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCaseResultsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCaseResultsRequest_descriptor, @@ -749,7 +807,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", "Filter", }); internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCaseResultsResponse_descriptor = - getDescriptor().getMessageTypes().get(30); + getDescriptor().getMessageTypes().get(31); internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCaseResultsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_ListTestCaseResultsResponse_descriptor, @@ -777,6 +835,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.cloud.dialogflow.cx.v3beta1.PageProto.getDescriptor(); com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageProto.getDescriptor(); com.google.cloud.dialogflow.cx.v3beta1.SessionProto.getDescriptor(); + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupProto.getDescriptor(); com.google.longrunning.OperationsProto.getDescriptor(); com.google.protobuf.EmptyProto.getDescriptor(); com.google.protobuf.FieldMaskProto.getDescriptor(); diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionCoverage.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionCoverage.java index 24680c83d..d037de92a 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionCoverage.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionCoverage.java @@ -22,8 +22,9 @@ * * *
- * Transition coverage represents the percentage of all possible transitions
- * present within any of a parent's test cases.
+ * Transition coverage represents the percentage of all possible page
+ * transitions (page-level transition routes and event handlers, excluding
+ * transition route groups) present within any of a parent's test cases.
  * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.TransitionCoverage} @@ -1573,7 +1574,7 @@ public interface TransitionOrBuilder * * *
-   * A transition in the agent's graph.
+   * A transition in a page.
    * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition} @@ -2275,7 +2276,7 @@ protected Builder newBuilderForType( * * *
-     * A transition in the agent's graph.
+     * A transition in a page.
      * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition} @@ -3792,8 +3793,9 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Transition coverage represents the percentage of all possible transitions
-   * present within any of a parent's test cases.
+   * Transition coverage represents the percentage of all possible page
+   * transitions (page-level transition routes and event handlers, excluding
+   * transition route groups) present within any of a parent's test cases.
    * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.TransitionCoverage} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupCoverage.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupCoverage.java new file mode 100644 index 000000000..a87f254c4 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupCoverage.java @@ -0,0 +1,3684 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * Transition route group coverage represents the percentage of all possible
+ * transition routes present within any of a parent's test cases. The results
+ * are grouped by the transition route group.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage} + */ +public final class TransitionRouteGroupCoverage extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage) + TransitionRouteGroupCoverageOrBuilder { + private static final long serialVersionUID = 0L; + // Use TransitionRouteGroupCoverage.newBuilder() to construct. + private TransitionRouteGroupCoverage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TransitionRouteGroupCoverage() { + coverages_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TransitionRouteGroupCoverage(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TransitionRouteGroupCoverage( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + coverages_ = + new java.util.ArrayList< + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage + .Coverage>(); + mutable_bitField0_ |= 0x00000001; + } + coverages_.add( + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + .parser(), + extensionRegistry)); + break; + } + case 21: + { + coverageScore_ = input.readFloat(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + coverages_ = java.util.Collections.unmodifiableList(coverages_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionRouteGroupCoverage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionRouteGroupCoverage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.class, + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Builder.class); + } + + public interface CoverageOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Transition route group metadata. Only name and displayName will be set.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup route_group = 1; + * + * @return Whether the routeGroup field is set. + */ + boolean hasRouteGroup(); + /** + * + * + *
+     * Transition route group metadata. Only name and displayName will be set.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup route_group = 1; + * + * @return The routeGroup. + */ + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup getRouteGroup(); + /** + * + * + *
+     * Transition route group metadata. Only name and displayName will be set.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup route_group = 1; + */ + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupOrBuilder getRouteGroupOrBuilder(); + + /** + * + * + *
+     * The list of transition routes and coverage in the transition route group.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; + * + */ + java.util.List< + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition> + getTransitionsList(); + /** + * + * + *
+     * The list of transition routes and coverage in the transition route group.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition + getTransitions(int index); + /** + * + * + *
+     * The list of transition routes and coverage in the transition route group.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; + * + */ + int getTransitionsCount(); + /** + * + * + *
+     * The list of transition routes and coverage in the transition route group.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; + * + */ + java.util.List< + ? extends + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + .TransitionOrBuilder> + getTransitionsOrBuilderList(); + /** + * + * + *
+     * The list of transition routes and coverage in the transition route group.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.TransitionOrBuilder + getTransitionsOrBuilder(int index); + + /** + * + * + *
+     * The percent of transition routes in the transition route group that are
+     * covered.
+     * 
+ * + * float coverage_score = 3; + * + * @return The coverageScore. + */ + float getCoverageScore(); + } + /** + * + * + *
+   * Coverage result message for one transition route group.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage} + */ + public static final class Coverage extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage) + CoverageOrBuilder { + private static final long serialVersionUID = 0L; + // Use Coverage.newBuilder() to construct. + private Coverage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Coverage() { + transitions_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Coverage(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Coverage( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup.Builder subBuilder = + null; + if (routeGroup_ != null) { + subBuilder = routeGroup_.toBuilder(); + } + routeGroup_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(routeGroup_); + routeGroup_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + transitions_ = + new java.util.ArrayList< + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage + .Coverage.Transition>(); + mutable_bitField0_ |= 0x00000001; + } + transitions_.add( + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + .Transition.parser(), + extensionRegistry)); + break; + } + case 29: + { + coverageScore_ = input.readFloat(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + transitions_ = java.util.Collections.unmodifiableList(transitions_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionRouteGroupCoverage_Coverage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionRouteGroupCoverage_Coverage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.class, + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Builder + .class); + } + + public interface TransitionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Intent route or condition route.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_route = 1; + * + * @return Whether the transitionRoute field is set. + */ + boolean hasTransitionRoute(); + /** + * + * + *
+       * Intent route or condition route.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_route = 1; + * + * @return The transitionRoute. + */ + com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute getTransitionRoute(); + /** + * + * + *
+       * Intent route or condition route.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_route = 1; + */ + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteOrBuilder getTransitionRouteOrBuilder(); + + /** + * + * + *
+       * Whether or not the transition route is covered by at least one of the
+       * agent's test cases.
+       * 
+ * + * bool covered = 2; + * + * @return The covered. + */ + boolean getCovered(); + } + /** + * + * + *
+     * A transition coverage in a transition route group.
+     * 
+ * + * Protobuf type {@code + * google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition} + */ + public static final class Transition extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition) + TransitionOrBuilder { + private static final long serialVersionUID = 0L; + // Use Transition.newBuilder() to construct. + private Transition(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Transition() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Transition(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Transition( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.Builder subBuilder = null; + if (transitionRoute_ != null) { + subBuilder = transitionRoute_.toBuilder(); + } + transitionRoute_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(transitionRoute_); + transitionRoute_ = subBuilder.buildPartial(); + } + + break; + } + case 16: + { + covered_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionRouteGroupCoverage_Coverage_Transition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionRouteGroupCoverage_Coverage_Transition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + .Transition.class, + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + .Transition.Builder.class); + } + + public static final int TRANSITION_ROUTE_FIELD_NUMBER = 1; + private com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute transitionRoute_; + /** + * + * + *
+       * Intent route or condition route.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_route = 1; + * + * @return Whether the transitionRoute field is set. + */ + @java.lang.Override + public boolean hasTransitionRoute() { + return transitionRoute_ != null; + } + /** + * + * + *
+       * Intent route or condition route.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_route = 1; + * + * @return The transitionRoute. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute getTransitionRoute() { + return transitionRoute_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.getDefaultInstance() + : transitionRoute_; + } + /** + * + * + *
+       * Intent route or condition route.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_route = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteOrBuilder + getTransitionRouteOrBuilder() { + return getTransitionRoute(); + } + + public static final int COVERED_FIELD_NUMBER = 2; + private boolean covered_; + /** + * + * + *
+       * Whether or not the transition route is covered by at least one of the
+       * agent's test cases.
+       * 
+ * + * bool covered = 2; + * + * @return The covered. + */ + @java.lang.Override + public boolean getCovered() { + return covered_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (transitionRoute_ != null) { + output.writeMessage(1, getTransitionRoute()); + } + if (covered_ != false) { + output.writeBool(2, covered_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (transitionRoute_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTransitionRoute()); + } + if (covered_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, covered_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + .Transition)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition + other = + (com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + .Transition) + obj; + + if (hasTransitionRoute() != other.hasTransitionRoute()) return false; + if (hasTransitionRoute()) { + if (!getTransitionRoute().equals(other.getTransitionRoute())) return false; + } + if (getCovered() != other.getCovered()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasTransitionRoute()) { + hash = (37 * hash) + TRANSITION_ROUTE_FIELD_NUMBER; + hash = (53 * hash) + getTransitionRoute().hashCode(); + } + hash = (37 * hash) + COVERED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getCovered()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + .Transition + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + .Transition + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + .Transition + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + .Transition + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + .Transition + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + .Transition + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + .Transition + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + .Transition + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + .Transition + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + .Transition + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + .Transition + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + .Transition + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * A transition coverage in a transition route group.
+       * 
+ * + * Protobuf type {@code + * google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition) + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + .TransitionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionRouteGroupCoverage_Coverage_Transition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionRouteGroupCoverage_Coverage_Transition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + .Transition.class, + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + .Transition.Builder.class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (transitionRouteBuilder_ == null) { + transitionRoute_ = null; + } else { + transitionRoute_ = null; + transitionRouteBuilder_ = null; + } + covered_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionRouteGroupCoverage_Coverage_Transition_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + .Transition + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + .Transition.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + .Transition + build() { + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + .Transition + buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition + result = + new com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + .Transition(this); + if (transitionRouteBuilder_ == null) { + result.transitionRoute_ = transitionRoute_; + } else { + result.transitionRoute_ = transitionRouteBuilder_.build(); + } + result.covered_ = covered_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + .Transition) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + .Transition) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition + other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + .Transition.getDefaultInstance()) return this; + if (other.hasTransitionRoute()) { + mergeTransitionRoute(other.getTransitionRoute()); + } + if (other.getCovered() != false) { + setCovered(other.getCovered()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + .Transition) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute transitionRoute_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute, + com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteOrBuilder> + transitionRouteBuilder_; + /** + * + * + *
+         * Intent route or condition route.
+         * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_route = 1; + * + * @return Whether the transitionRoute field is set. + */ + public boolean hasTransitionRoute() { + return transitionRouteBuilder_ != null || transitionRoute_ != null; + } + /** + * + * + *
+         * Intent route or condition route.
+         * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_route = 1; + * + * @return The transitionRoute. + */ + public com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute getTransitionRoute() { + if (transitionRouteBuilder_ == null) { + return transitionRoute_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.getDefaultInstance() + : transitionRoute_; + } else { + return transitionRouteBuilder_.getMessage(); + } + } + /** + * + * + *
+         * Intent route or condition route.
+         * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_route = 1; + */ + public Builder setTransitionRoute( + com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute value) { + if (transitionRouteBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transitionRoute_ = value; + onChanged(); + } else { + transitionRouteBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+         * Intent route or condition route.
+         * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_route = 1; + */ + public Builder setTransitionRoute( + com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.Builder builderForValue) { + if (transitionRouteBuilder_ == null) { + transitionRoute_ = builderForValue.build(); + onChanged(); + } else { + transitionRouteBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+         * Intent route or condition route.
+         * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_route = 1; + */ + public Builder mergeTransitionRoute( + com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute value) { + if (transitionRouteBuilder_ == null) { + if (transitionRoute_ != null) { + transitionRoute_ = + com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.newBuilder( + transitionRoute_) + .mergeFrom(value) + .buildPartial(); + } else { + transitionRoute_ = value; + } + onChanged(); + } else { + transitionRouteBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+         * Intent route or condition route.
+         * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_route = 1; + */ + public Builder clearTransitionRoute() { + if (transitionRouteBuilder_ == null) { + transitionRoute_ = null; + onChanged(); + } else { + transitionRoute_ = null; + transitionRouteBuilder_ = null; + } + + return this; + } + /** + * + * + *
+         * Intent route or condition route.
+         * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_route = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.Builder + getTransitionRouteBuilder() { + + onChanged(); + return getTransitionRouteFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * Intent route or condition route.
+         * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_route = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteOrBuilder + getTransitionRouteOrBuilder() { + if (transitionRouteBuilder_ != null) { + return transitionRouteBuilder_.getMessageOrBuilder(); + } else { + return transitionRoute_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.getDefaultInstance() + : transitionRoute_; + } + } + /** + * + * + *
+         * Intent route or condition route.
+         * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_route = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute, + com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteOrBuilder> + getTransitionRouteFieldBuilder() { + if (transitionRouteBuilder_ == null) { + transitionRouteBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute, + com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteOrBuilder>( + getTransitionRoute(), getParentForChildren(), isClean()); + transitionRoute_ = null; + } + return transitionRouteBuilder_; + } + + private boolean covered_; + /** + * + * + *
+         * Whether or not the transition route is covered by at least one of the
+         * agent's test cases.
+         * 
+ * + * bool covered = 2; + * + * @return The covered. + */ + @java.lang.Override + public boolean getCovered() { + return covered_; + } + /** + * + * + *
+         * Whether or not the transition route is covered by at least one of the
+         * agent's test cases.
+         * 
+ * + * bool covered = 2; + * + * @param value The covered to set. + * @return This builder for chaining. + */ + public Builder setCovered(boolean value) { + + covered_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Whether or not the transition route is covered by at least one of the
+         * agent's test cases.
+         * 
+ * + * bool covered = 2; + * + * @return This builder for chaining. + */ + public Builder clearCovered() { + + covered_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition) + private static final com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage + .Coverage.Transition + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + .Transition(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + .Transition + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Transition parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Transition(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int ROUTE_GROUP_FIELD_NUMBER = 1; + private com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup routeGroup_; + /** + * + * + *
+     * Transition route group metadata. Only name and displayName will be set.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup route_group = 1; + * + * @return Whether the routeGroup field is set. + */ + @java.lang.Override + public boolean hasRouteGroup() { + return routeGroup_ != null; + } + /** + * + * + *
+     * Transition route group metadata. Only name and displayName will be set.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup route_group = 1; + * + * @return The routeGroup. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup getRouteGroup() { + return routeGroup_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup.getDefaultInstance() + : routeGroup_; + } + /** + * + * + *
+     * Transition route group metadata. Only name and displayName will be set.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup route_group = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupOrBuilder + getRouteGroupOrBuilder() { + return getRouteGroup(); + } + + public static final int TRANSITIONS_FIELD_NUMBER = 2; + private java.util.List< + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition> + transitions_; + /** + * + * + *
+     * The list of transition routes and coverage in the transition route group.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition> + getTransitionsList() { + return transitions_; + } + /** + * + * + *
+     * The list of transition routes and coverage in the transition route group.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + .TransitionOrBuilder> + getTransitionsOrBuilderList() { + return transitions_; + } + /** + * + * + *
+     * The list of transition routes and coverage in the transition route group.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; + * + */ + @java.lang.Override + public int getTransitionsCount() { + return transitions_.size(); + } + /** + * + * + *
+     * The list of transition routes and coverage in the transition route group.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition + getTransitions(int index) { + return transitions_.get(index); + } + /** + * + * + *
+     * The list of transition routes and coverage in the transition route group.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + .TransitionOrBuilder + getTransitionsOrBuilder(int index) { + return transitions_.get(index); + } + + public static final int COVERAGE_SCORE_FIELD_NUMBER = 3; + private float coverageScore_; + /** + * + * + *
+     * The percent of transition routes in the transition route group that are
+     * covered.
+     * 
+ * + * float coverage_score = 3; + * + * @return The coverageScore. + */ + @java.lang.Override + public float getCoverageScore() { + return coverageScore_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (routeGroup_ != null) { + output.writeMessage(1, getRouteGroup()); + } + for (int i = 0; i < transitions_.size(); i++) { + output.writeMessage(2, transitions_.get(i)); + } + if (coverageScore_ != 0F) { + output.writeFloat(3, coverageScore_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (routeGroup_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getRouteGroup()); + } + for (int i = 0; i < transitions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, transitions_.get(i)); + } + if (coverageScore_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, coverageScore_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage other = + (com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage) obj; + + if (hasRouteGroup() != other.hasRouteGroup()) return false; + if (hasRouteGroup()) { + if (!getRouteGroup().equals(other.getRouteGroup())) return false; + } + if (!getTransitionsList().equals(other.getTransitionsList())) return false; + if (java.lang.Float.floatToIntBits(getCoverageScore()) + != java.lang.Float.floatToIntBits(other.getCoverageScore())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasRouteGroup()) { + hash = (37 * hash) + ROUTE_GROUP_FIELD_NUMBER; + hash = (53 * hash) + getRouteGroup().hashCode(); + } + if (getTransitionsCount() > 0) { + hash = (37 * hash) + TRANSITIONS_FIELD_NUMBER; + hash = (53 * hash) + getTransitionsList().hashCode(); + } + hash = (37 * hash) + COVERAGE_SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getCoverageScore()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Coverage result message for one transition route group.
+     * 
+ * + * Protobuf type {@code + * google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage) + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.CoverageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionRouteGroupCoverage_Coverage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionRouteGroupCoverage_Coverage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.class, + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Builder + .class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getTransitionsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (routeGroupBuilder_ == null) { + routeGroup_ = null; + } else { + routeGroup_ = null; + routeGroupBuilder_ = null; + } + if (transitionsBuilder_ == null) { + transitions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + transitionsBuilder_.clear(); + } + coverageScore_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionRouteGroupCoverage_Coverage_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage build() { + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage result = + new com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage(this); + int from_bitField0_ = bitField0_; + if (routeGroupBuilder_ == null) { + result.routeGroup_ = routeGroup_; + } else { + result.routeGroup_ = routeGroupBuilder_.build(); + } + if (transitionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + transitions_ = java.util.Collections.unmodifiableList(transitions_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.transitions_ = transitions_; + } else { + result.transitions_ = transitionsBuilder_.build(); + } + result.coverageScore_ = coverageScore_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + .getDefaultInstance()) return this; + if (other.hasRouteGroup()) { + mergeRouteGroup(other.getRouteGroup()); + } + if (transitionsBuilder_ == null) { + if (!other.transitions_.isEmpty()) { + if (transitions_.isEmpty()) { + transitions_ = other.transitions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTransitionsIsMutable(); + transitions_.addAll(other.transitions_); + } + onChanged(); + } + } else { + if (!other.transitions_.isEmpty()) { + if (transitionsBuilder_.isEmpty()) { + transitionsBuilder_.dispose(); + transitionsBuilder_ = null; + transitions_ = other.transitions_; + bitField0_ = (bitField0_ & ~0x00000001); + transitionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTransitionsFieldBuilder() + : null; + } else { + transitionsBuilder_.addAllMessages(other.transitions_); + } + } + } + if (other.getCoverageScore() != 0F) { + setCoverageScore(other.getCoverageScore()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup routeGroup_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup, + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupOrBuilder> + routeGroupBuilder_; + /** + * + * + *
+       * Transition route group metadata. Only name and displayName will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup route_group = 1; + * + * @return Whether the routeGroup field is set. + */ + public boolean hasRouteGroup() { + return routeGroupBuilder_ != null || routeGroup_ != null; + } + /** + * + * + *
+       * Transition route group metadata. Only name and displayName will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup route_group = 1; + * + * @return The routeGroup. + */ + public com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup getRouteGroup() { + if (routeGroupBuilder_ == null) { + return routeGroup_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup.getDefaultInstance() + : routeGroup_; + } else { + return routeGroupBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Transition route group metadata. Only name and displayName will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup route_group = 1; + */ + public Builder setRouteGroup( + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup value) { + if (routeGroupBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + routeGroup_ = value; + onChanged(); + } else { + routeGroupBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Transition route group metadata. Only name and displayName will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup route_group = 1; + */ + public Builder setRouteGroup( + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup.Builder builderForValue) { + if (routeGroupBuilder_ == null) { + routeGroup_ = builderForValue.build(); + onChanged(); + } else { + routeGroupBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Transition route group metadata. Only name and displayName will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup route_group = 1; + */ + public Builder mergeRouteGroup( + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup value) { + if (routeGroupBuilder_ == null) { + if (routeGroup_ != null) { + routeGroup_ = + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup.newBuilder(routeGroup_) + .mergeFrom(value) + .buildPartial(); + } else { + routeGroup_ = value; + } + onChanged(); + } else { + routeGroupBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Transition route group metadata. Only name and displayName will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup route_group = 1; + */ + public Builder clearRouteGroup() { + if (routeGroupBuilder_ == null) { + routeGroup_ = null; + onChanged(); + } else { + routeGroup_ = null; + routeGroupBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Transition route group metadata. Only name and displayName will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup route_group = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup.Builder + getRouteGroupBuilder() { + + onChanged(); + return getRouteGroupFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Transition route group metadata. Only name and displayName will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup route_group = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupOrBuilder + getRouteGroupOrBuilder() { + if (routeGroupBuilder_ != null) { + return routeGroupBuilder_.getMessageOrBuilder(); + } else { + return routeGroup_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup.getDefaultInstance() + : routeGroup_; + } + } + /** + * + * + *
+       * Transition route group metadata. Only name and displayName will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup route_group = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup, + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupOrBuilder> + getRouteGroupFieldBuilder() { + if (routeGroupBuilder_ == null) { + routeGroupBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup, + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupOrBuilder>( + getRouteGroup(), getParentForChildren(), isClean()); + routeGroup_ = null; + } + return routeGroupBuilder_; + } + + private java.util.List< + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + .Transition> + transitions_ = java.util.Collections.emptyList(); + + private void ensureTransitionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + transitions_ = + new java.util.ArrayList< + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + .Transition>(transitions_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + .Transition, + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + .Transition.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + .TransitionOrBuilder> + transitionsBuilder_; + + /** + * + * + *
+       * The list of transition routes and coverage in the transition route group.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; + * + */ + public java.util.List< + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + .Transition> + getTransitionsList() { + if (transitionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(transitions_); + } else { + return transitionsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * The list of transition routes and coverage in the transition route group.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; + * + */ + public int getTransitionsCount() { + if (transitionsBuilder_ == null) { + return transitions_.size(); + } else { + return transitionsBuilder_.getCount(); + } + } + /** + * + * + *
+       * The list of transition routes and coverage in the transition route group.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition + getTransitions(int index) { + if (transitionsBuilder_ == null) { + return transitions_.get(index); + } else { + return transitionsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * The list of transition routes and coverage in the transition route group.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; + * + */ + public Builder setTransitions( + int index, + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition + value) { + if (transitionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTransitionsIsMutable(); + transitions_.set(index, value); + onChanged(); + } else { + transitionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * The list of transition routes and coverage in the transition route group.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; + * + */ + public Builder setTransitions( + int index, + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition + .Builder + builderForValue) { + if (transitionsBuilder_ == null) { + ensureTransitionsIsMutable(); + transitions_.set(index, builderForValue.build()); + onChanged(); + } else { + transitionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The list of transition routes and coverage in the transition route group.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; + * + */ + public Builder addTransitions( + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition + value) { + if (transitionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTransitionsIsMutable(); + transitions_.add(value); + onChanged(); + } else { + transitionsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * The list of transition routes and coverage in the transition route group.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; + * + */ + public Builder addTransitions( + int index, + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition + value) { + if (transitionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTransitionsIsMutable(); + transitions_.add(index, value); + onChanged(); + } else { + transitionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * The list of transition routes and coverage in the transition route group.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; + * + */ + public Builder addTransitions( + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition + .Builder + builderForValue) { + if (transitionsBuilder_ == null) { + ensureTransitionsIsMutable(); + transitions_.add(builderForValue.build()); + onChanged(); + } else { + transitionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The list of transition routes and coverage in the transition route group.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; + * + */ + public Builder addTransitions( + int index, + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition + .Builder + builderForValue) { + if (transitionsBuilder_ == null) { + ensureTransitionsIsMutable(); + transitions_.add(index, builderForValue.build()); + onChanged(); + } else { + transitionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The list of transition routes and coverage in the transition route group.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; + * + */ + public Builder addAllTransitions( + java.lang.Iterable< + ? extends + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + .Transition> + values) { + if (transitionsBuilder_ == null) { + ensureTransitionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, transitions_); + onChanged(); + } else { + transitionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * The list of transition routes and coverage in the transition route group.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; + * + */ + public Builder clearTransitions() { + if (transitionsBuilder_ == null) { + transitions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + transitionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * The list of transition routes and coverage in the transition route group.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; + * + */ + public Builder removeTransitions(int index) { + if (transitionsBuilder_ == null) { + ensureTransitionsIsMutable(); + transitions_.remove(index); + onChanged(); + } else { + transitionsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * The list of transition routes and coverage in the transition route group.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition + .Builder + getTransitionsBuilder(int index) { + return getTransitionsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * The list of transition routes and coverage in the transition route group.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + .TransitionOrBuilder + getTransitionsOrBuilder(int index) { + if (transitionsBuilder_ == null) { + return transitions_.get(index); + } else { + return transitionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * The list of transition routes and coverage in the transition route group.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; + * + */ + public java.util.List< + ? extends + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + .TransitionOrBuilder> + getTransitionsOrBuilderList() { + if (transitionsBuilder_ != null) { + return transitionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(transitions_); + } + } + /** + * + * + *
+       * The list of transition routes and coverage in the transition route group.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition + .Builder + addTransitionsBuilder() { + return getTransitionsFieldBuilder() + .addBuilder( + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + .Transition.getDefaultInstance()); + } + /** + * + * + *
+       * The list of transition routes and coverage in the transition route group.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition + .Builder + addTransitionsBuilder(int index) { + return getTransitionsFieldBuilder() + .addBuilder( + index, + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + .Transition.getDefaultInstance()); + } + /** + * + * + *
+       * The list of transition routes and coverage in the transition route group.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; + * + */ + public java.util.List< + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + .Transition.Builder> + getTransitionsBuilderList() { + return getTransitionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + .Transition, + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + .Transition.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + .TransitionOrBuilder> + getTransitionsFieldBuilder() { + if (transitionsBuilder_ == null) { + transitionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + .Transition, + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + .Transition.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + .TransitionOrBuilder>( + transitions_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + transitions_ = null; + } + return transitionsBuilder_; + } + + private float coverageScore_; + /** + * + * + *
+       * The percent of transition routes in the transition route group that are
+       * covered.
+       * 
+ * + * float coverage_score = 3; + * + * @return The coverageScore. + */ + @java.lang.Override + public float getCoverageScore() { + return coverageScore_; + } + /** + * + * + *
+       * The percent of transition routes in the transition route group that are
+       * covered.
+       * 
+ * + * float coverage_score = 3; + * + * @param value The coverageScore to set. + * @return This builder for chaining. + */ + public Builder setCoverageScore(float value) { + + coverageScore_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The percent of transition routes in the transition route group that are
+       * covered.
+       * 
+ * + * float coverage_score = 3; + * + * @return This builder for chaining. + */ + public Builder clearCoverageScore() { + + coverageScore_ = 0F; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage) + private static final com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage + .Coverage + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Coverage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Coverage(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int COVERAGES_FIELD_NUMBER = 1; + private java.util.List< + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage> + coverages_; + /** + * + * + *
+   * Transition route group coverages.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage coverages = 1; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage> + getCoveragesList() { + return coverages_; + } + /** + * + * + *
+   * Transition route group coverages.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage coverages = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.CoverageOrBuilder> + getCoveragesOrBuilderList() { + return coverages_; + } + /** + * + * + *
+   * Transition route group coverages.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage coverages = 1; + * + */ + @java.lang.Override + public int getCoveragesCount() { + return coverages_.size(); + } + /** + * + * + *
+   * Transition route group coverages.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage coverages = 1; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage getCoverages( + int index) { + return coverages_.get(index); + } + /** + * + * + *
+   * Transition route group coverages.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage coverages = 1; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.CoverageOrBuilder + getCoveragesOrBuilder(int index) { + return coverages_.get(index); + } + + public static final int COVERAGE_SCORE_FIELD_NUMBER = 2; + private float coverageScore_; + /** + * + * + *
+   * The percent of transition routes in all the transition route groups that
+   * are covered.
+   * 
+ * + * float coverage_score = 2; + * + * @return The coverageScore. + */ + @java.lang.Override + public float getCoverageScore() { + return coverageScore_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < coverages_.size(); i++) { + output.writeMessage(1, coverages_.get(i)); + } + if (coverageScore_ != 0F) { + output.writeFloat(2, coverageScore_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < coverages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, coverages_.get(i)); + } + if (coverageScore_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, coverageScore_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage other = + (com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage) obj; + + if (!getCoveragesList().equals(other.getCoveragesList())) return false; + if (java.lang.Float.floatToIntBits(getCoverageScore()) + != java.lang.Float.floatToIntBits(other.getCoverageScore())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getCoveragesCount() > 0) { + hash = (37 * hash) + COVERAGES_FIELD_NUMBER; + hash = (53 * hash) + getCoveragesList().hashCode(); + } + hash = (37 * hash) + COVERAGE_SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getCoverageScore()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Transition route group coverage represents the percentage of all possible
+   * transition routes present within any of a parent's test cases. The results
+   * are grouped by the transition route group.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage) + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionRouteGroupCoverage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionRouteGroupCoverage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.class, + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Builder.class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCoveragesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (coveragesBuilder_ == null) { + coverages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + coveragesBuilder_.clear(); + } + coverageScore_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_TransitionRouteGroupCoverage_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage build() { + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage result = + new com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage(this); + int from_bitField0_ = bitField0_; + if (coveragesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + coverages_ = java.util.Collections.unmodifiableList(coverages_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.coverages_ = coverages_; + } else { + result.coverages_ = coveragesBuilder_.build(); + } + result.coverageScore_ = coverageScore_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage + .getDefaultInstance()) return this; + if (coveragesBuilder_ == null) { + if (!other.coverages_.isEmpty()) { + if (coverages_.isEmpty()) { + coverages_ = other.coverages_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureCoveragesIsMutable(); + coverages_.addAll(other.coverages_); + } + onChanged(); + } + } else { + if (!other.coverages_.isEmpty()) { + if (coveragesBuilder_.isEmpty()) { + coveragesBuilder_.dispose(); + coveragesBuilder_ = null; + coverages_ = other.coverages_; + bitField0_ = (bitField0_ & ~0x00000001); + coveragesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getCoveragesFieldBuilder() + : null; + } else { + coveragesBuilder_.addAllMessages(other.coverages_); + } + } + } + if (other.getCoverageScore() != 0F) { + setCoverageScore(other.getCoverageScore()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List< + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage> + coverages_ = java.util.Collections.emptyList(); + + private void ensureCoveragesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + coverages_ = + new java.util.ArrayList< + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage>( + coverages_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage, + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.CoverageOrBuilder> + coveragesBuilder_; + + /** + * + * + *
+     * Transition route group coverages.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage coverages = 1; + * + */ + public java.util.List< + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage> + getCoveragesList() { + if (coveragesBuilder_ == null) { + return java.util.Collections.unmodifiableList(coverages_); + } else { + return coveragesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Transition route group coverages.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage coverages = 1; + * + */ + public int getCoveragesCount() { + if (coveragesBuilder_ == null) { + return coverages_.size(); + } else { + return coveragesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Transition route group coverages.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage coverages = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + getCoverages(int index) { + if (coveragesBuilder_ == null) { + return coverages_.get(index); + } else { + return coveragesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Transition route group coverages.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage coverages = 1; + * + */ + public Builder setCoverages( + int index, + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage value) { + if (coveragesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCoveragesIsMutable(); + coverages_.set(index, value); + onChanged(); + } else { + coveragesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Transition route group coverages.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage coverages = 1; + * + */ + public Builder setCoverages( + int index, + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Builder + builderForValue) { + if (coveragesBuilder_ == null) { + ensureCoveragesIsMutable(); + coverages_.set(index, builderForValue.build()); + onChanged(); + } else { + coveragesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Transition route group coverages.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage coverages = 1; + * + */ + public Builder addCoverages( + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage value) { + if (coveragesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCoveragesIsMutable(); + coverages_.add(value); + onChanged(); + } else { + coveragesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Transition route group coverages.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage coverages = 1; + * + */ + public Builder addCoverages( + int index, + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage value) { + if (coveragesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCoveragesIsMutable(); + coverages_.add(index, value); + onChanged(); + } else { + coveragesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Transition route group coverages.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage coverages = 1; + * + */ + public Builder addCoverages( + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Builder + builderForValue) { + if (coveragesBuilder_ == null) { + ensureCoveragesIsMutable(); + coverages_.add(builderForValue.build()); + onChanged(); + } else { + coveragesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Transition route group coverages.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage coverages = 1; + * + */ + public Builder addCoverages( + int index, + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Builder + builderForValue) { + if (coveragesBuilder_ == null) { + ensureCoveragesIsMutable(); + coverages_.add(index, builderForValue.build()); + onChanged(); + } else { + coveragesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Transition route group coverages.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage coverages = 1; + * + */ + public Builder addAllCoverages( + java.lang.Iterable< + ? extends + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage> + values) { + if (coveragesBuilder_ == null) { + ensureCoveragesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, coverages_); + onChanged(); + } else { + coveragesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Transition route group coverages.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage coverages = 1; + * + */ + public Builder clearCoverages() { + if (coveragesBuilder_ == null) { + coverages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + coveragesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Transition route group coverages.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage coverages = 1; + * + */ + public Builder removeCoverages(int index) { + if (coveragesBuilder_ == null) { + ensureCoveragesIsMutable(); + coverages_.remove(index); + onChanged(); + } else { + coveragesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Transition route group coverages.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage coverages = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Builder + getCoveragesBuilder(int index) { + return getCoveragesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Transition route group coverages.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage coverages = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.CoverageOrBuilder + getCoveragesOrBuilder(int index) { + if (coveragesBuilder_ == null) { + return coverages_.get(index); + } else { + return coveragesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Transition route group coverages.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage coverages = 1; + * + */ + public java.util.List< + ? extends + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage + .CoverageOrBuilder> + getCoveragesOrBuilderList() { + if (coveragesBuilder_ != null) { + return coveragesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(coverages_); + } + } + /** + * + * + *
+     * Transition route group coverages.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage coverages = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Builder + addCoveragesBuilder() { + return getCoveragesFieldBuilder() + .addBuilder( + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + .getDefaultInstance()); + } + /** + * + * + *
+     * Transition route group coverages.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage coverages = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Builder + addCoveragesBuilder(int index) { + return getCoveragesFieldBuilder() + .addBuilder( + index, + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + .getDefaultInstance()); + } + /** + * + * + *
+     * Transition route group coverages.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage coverages = 1; + * + */ + public java.util.List< + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Builder> + getCoveragesBuilderList() { + return getCoveragesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage, + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.CoverageOrBuilder> + getCoveragesFieldBuilder() { + if (coveragesBuilder_ == null) { + coveragesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage, + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + .Builder, + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage + .CoverageOrBuilder>( + coverages_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + coverages_ = null; + } + return coveragesBuilder_; + } + + private float coverageScore_; + /** + * + * + *
+     * The percent of transition routes in all the transition route groups that
+     * are covered.
+     * 
+ * + * float coverage_score = 2; + * + * @return The coverageScore. + */ + @java.lang.Override + public float getCoverageScore() { + return coverageScore_; + } + /** + * + * + *
+     * The percent of transition routes in all the transition route groups that
+     * are covered.
+     * 
+ * + * float coverage_score = 2; + * + * @param value The coverageScore to set. + * @return This builder for chaining. + */ + public Builder setCoverageScore(float value) { + + coverageScore_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The percent of transition routes in all the transition route groups that
+     * are covered.
+     * 
+ * + * float coverage_score = 2; + * + * @return This builder for chaining. + */ + public Builder clearCoverageScore() { + + coverageScore_ = 0F; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage) + private static final com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TransitionRouteGroupCoverage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TransitionRouteGroupCoverage(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupCoverageOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupCoverageOrBuilder.java new file mode 100644 index 000000000..0d6408ac8 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupCoverageOrBuilder.java @@ -0,0 +1,106 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/test_case.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface TransitionRouteGroupCoverageOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Transition route group coverages.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage coverages = 1; + * + */ + java.util.List + getCoveragesList(); + /** + * + * + *
+   * Transition route group coverages.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage coverages = 1; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage getCoverages( + int index); + /** + * + * + *
+   * Transition route group coverages.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage coverages = 1; + * + */ + int getCoveragesCount(); + /** + * + * + *
+   * Transition route group coverages.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage coverages = 1; + * + */ + java.util.List< + ? extends + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.CoverageOrBuilder> + getCoveragesOrBuilderList(); + /** + * + * + *
+   * Transition route group coverages.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage coverages = 1; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.CoverageOrBuilder + getCoveragesOrBuilder(int index); + + /** + * + * + *
+   * The percent of transition routes in all the transition route groups that
+   * are covered.
+   * 
+ * + * float coverage_score = 2; + * + * @return The coverageScore. + */ + float getCoverageScore(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/agent.proto b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/agent.proto index f6fb4b424..d75c9c678 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/agent.proto +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/agent.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/audio_config.proto b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/audio_config.proto index c6a1b0201..ef87031e7 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/audio_config.proto +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/audio_config.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -29,31 +29,6 @@ option java_outer_classname = "AudioConfigProto"; option java_package = "com.google.cloud.dialogflow.cx.v3beta1"; option objc_class_prefix = "DF"; -// Information for a word recognized by the speech recognizer. -message SpeechWordInfo { - // The word this info is for. - string word = 3; - - // 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. - google.protobuf.Duration start_offset = 1; - - // 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. - google.protobuf.Duration end_offset = 2; - - // 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. - float confidence = 4; -} - // Audio encoding of the audio content sent in the conversational query request. // Refer to the // [Cloud Speech API @@ -103,6 +78,31 @@ enum AudioEncoding { AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE = 7; } +// Information for a word recognized by the speech recognizer. +message SpeechWordInfo { + // The word this info is for. + string word = 3; + + // 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. + google.protobuf.Duration start_offset = 1; + + // 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. + google.protobuf.Duration end_offset = 2; + + // 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. + float confidence = 4; +} + // Instructs the speech recognizer on how to process the audio content. message InputAudioConfig { // Required. Audio encoding of the audio content to process. diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/entity_type.proto b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/entity_type.proto index e51d92f88..8381b4de3 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/entity_type.proto +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/entity_type.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/environment.proto b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/environment.proto index a5c444c3d..feddb123a 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/environment.proto +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/environment.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/experiment.proto b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/experiment.proto index f19494309..7ae323b41 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/experiment.proto +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/experiment.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/flow.proto b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/flow.proto index e5aeef4ca..947d44899 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/flow.proto +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/flow.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto index 7a8e5af3c..74d9e8224 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/intent.proto b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/intent.proto index c66df1266..f0e7fd81e 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/intent.proto +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/intent.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/page.proto b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/page.proto index 94daf38a6..c9e5a223d 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/page.proto +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/page.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/response_message.proto b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/response_message.proto index 1627520eb..f982e65b8 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/response_message.proto +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/response_message.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/security_settings.proto b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/security_settings.proto index e86c99424..376a73188 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/security_settings.proto +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/security_settings.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/session.proto b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/session.proto index 5e8f07aa4..89d4d0d7b 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/session.proto +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/session.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/session_entity_type.proto b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/session_entity_type.proto index 5b8f5df92..7bdd3ec31 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/session_entity_type.proto +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/session_entity_type.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/test_case.proto b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/test_case.proto index 4a5137757..05c07a27d 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/test_case.proto +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/test_case.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,6 +25,7 @@ import "google/cloud/dialogflow/cx/v3beta1/intent.proto"; import "google/cloud/dialogflow/cx/v3beta1/page.proto"; import "google/cloud/dialogflow/cx/v3beta1/response_message.proto"; import "google/cloud/dialogflow/cx/v3beta1/session.proto"; +import "google/cloud/dialogflow/cx/v3beta1/transition_route_group.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; @@ -94,7 +95,7 @@ service TestCases { // Kicks off a test case run. rpc RunTestCase(RunTestCaseRequest) returns (google.longrunning.Operation) { option (google.api.http) = { - post: "/v3beta1/projects/*/locations/*/agents/*/testCases:run" + post: "/v3beta1/{name=projects/*/locations/*/agents/*/testCases/*}:run" body: "*" }; option (google.longrunning.operation_info) = { @@ -277,12 +278,12 @@ message ConversationTurn { (google.api.field_behavior) = INPUT_ONLY ]; - // The [Intent][google.cloud.dialogflow.cx.v3beta1.Intent] that triggered the response. Only some fields such as - // name and displayname will be set. + // The [Intent][google.cloud.dialogflow.cx.v3beta1.Intent] that triggered the response. Only name and displayName + // will be set. Intent triggered_intent = 7; - // The [Page][google.cloud.dialogflow.cx.v3beta1.Page] on which the utterance was spoken. Only some fields such as - // name and displayname will be set. + // The [Page][google.cloud.dialogflow.cx.v3beta1.Page] on which the utterance was spoken. Only name and displayName + // will be set. Page current_page = 8; // The [text][google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text] responses from the agent for the turn. @@ -327,8 +328,9 @@ message TestRunDifference { string description = 2; } -// Transition coverage represents the percentage of all possible transitions -// present within any of a parent's test cases. +// Transition coverage represents the percentage of all possible page +// transitions (page-level transition routes and event handlers, excluding +// transition route groups) present within any of a parent's test cases. message TransitionCoverage { // The source or target of a transition. message TransitionNode { @@ -344,7 +346,7 @@ message TransitionCoverage { } } - // A transition in the agent's graph. + // A transition in a page. message Transition { // The start node of a transition. TransitionNode source = 1; @@ -376,6 +378,41 @@ message TransitionCoverage { float coverage_score = 2; } +// Transition route group coverage represents the percentage of all possible +// transition routes present within any of a parent's test cases. The results +// are grouped by the transition route group. +message TransitionRouteGroupCoverage { + // Coverage result message for one transition route group. + message Coverage { + // A transition coverage in a transition route group. + message Transition { + // Intent route or condition route. + TransitionRoute transition_route = 1; + + // Whether or not the transition route is covered by at least one of the + // agent's test cases. + bool covered = 2; + } + + // Transition route group metadata. Only name and displayName will be set. + TransitionRouteGroup route_group = 1; + + // The list of transition routes and coverage in the transition route group. + repeated Transition transitions = 2; + + // The percent of transition routes in the transition route group that are + // covered. + float coverage_score = 3; + } + + // Transition route group coverages. + repeated Coverage coverages = 1; + + // The percent of transition routes in all the transition route groups that + // are covered. + float coverage_score = 2; +} + // Intent coverage represents the percentage of all possible intents in the // agent that are triggered in any of a parent's test cases. message IntentCoverage { @@ -408,8 +445,11 @@ message CalculateCoverageRequest { // Intent coverage. INTENT = 1; - // Page transition coverage + // Page transition coverage. PAGE_TRANSITION = 2; + + // Transition route group coverage. + TRANSITION_ROUTE_GROUP = 3; } // Required. The agent to calculate coverage for. @@ -438,8 +478,11 @@ message CalculateCoverageResponse { // Intent coverage. IntentCoverage intent_coverage = 2; - // Transition coverage. + // Transition (excluding transition route groups) coverage. TransitionCoverage transition_coverage = 4; + + // Transition route group coverage. + TransitionRouteGroupCoverage route_group_coverage = 6; } } diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/transition_route_group.proto b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/transition_route_group.proto index 13d62fdbd..c188ed574 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/transition_route_group.proto +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/transition_route_group.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/validation_message.proto b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/validation_message.proto index 6c50177c3..b80e4fa27 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/validation_message.proto +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/validation_message.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/version.proto b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/version.proto index 819a6d3cd..9648a4277 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/version.proto +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/version.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/webhook.proto b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/webhook.proto index 3bc6735fd..8f94f3027 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/webhook.proto +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/webhook.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/synth.metadata b/synth.metadata index ba85f411c..d9096a39d 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,16 +11,16 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "6de7abea4c424025bfcf996ef40c96e53c070100", - "internalRef": "356804449" + "sha": "38d77abda7059f562774af4ea4107415224d2674", + "internalRef": "357757017" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "6de7abea4c424025bfcf996ef40c96e53c070100", - "internalRef": "356804449" + "sha": "38d77abda7059f562774af4ea4107415224d2674", + "internalRef": "357757017" } }, { @@ -1129,6 +1129,8 @@ "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionCoverageOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRoute.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroup.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupCoverage.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupCoverageOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupName.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupProto.java", From 3635de00475d7bb9c019742bea4c0501ff8af149 Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Tue, 16 Feb 2021 19:28:30 -0800 Subject: [PATCH 11/12] fix: RunTestCase http template. PHP REST client lib can be generated. feat: Support transition route group coverage for Test Cases. feat: Support SentimentAnalysisResult input in the WebhookRequest. PiperOrigin-RevId: 357788001 Source-Author: Google APIs Source-Date: Tue Feb 16 13:06:26 2021 -0800 Source-Repo: googleapis/googleapis Source-Sha: 2bea43cdc7a4443876380732980d83cd8d560582 Source-Link: https://github.com/googleapis/googleapis/commit/2bea43cdc7a4443876380732980d83cd8d560582 --- .../cx/v3/stub/GrpcTestCasesStub.java | 9 + .../cx/v3/CalculateCoverageRequest.java | 26 +- .../cx/v3/CalculateCoverageResponse.java | 357 +- .../CalculateCoverageResponseOrBuilder.java | 45 +- .../dialogflow/cx/v3/ConversationTurn.java | 120 +- .../cloud/dialogflow/cx/v3/TestCaseProto.java | 567 +-- .../dialogflow/cx/v3/TransitionCoverage.java | 14 +- .../cx/v3/TransitionRouteGroupCoverage.java | 3637 +++++++++++++++++ ...TransitionRouteGroupCoverageOrBuilder.java | 105 + .../google/cloud/dialogflow/cx/v3/agent.proto | 2 +- .../cloud/dialogflow/cx/v3/audio_config.proto | 2 +- .../cloud/dialogflow/cx/v3/entity_type.proto | 2 +- .../cloud/dialogflow/cx/v3/environment.proto | 2 +- .../cloud/dialogflow/cx/v3/experiment.proto | 2 +- .../google/cloud/dialogflow/cx/v3/flow.proto | 2 +- .../cloud/dialogflow/cx/v3/fulfillment.proto | 2 +- .../cloud/dialogflow/cx/v3/intent.proto | 2 +- .../google/cloud/dialogflow/cx/v3/page.proto | 2 +- .../dialogflow/cx/v3/response_message.proto | 2 +- .../dialogflow/cx/v3/security_settings.proto | 2 +- .../cloud/dialogflow/cx/v3/session.proto | 2 +- .../cx/v3/session_entity_type.proto | 2 +- .../cloud/dialogflow/cx/v3/test_case.proto | 65 +- .../cx/v3/transition_route_group.proto | 2 +- .../dialogflow/cx/v3/validation_message.proto | 2 +- .../cloud/dialogflow/cx/v3/version.proto | 2 +- .../cloud/dialogflow/cx/v3/webhook.proto | 2 +- synth.metadata | 10 +- 28 files changed, 4620 insertions(+), 369 deletions(-) create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupCoverage.java create mode 100644 proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupCoverageOrBuilder.java diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcTestCasesStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcTestCasesStub.java index 7211a865b..3bd5f1ea1 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcTestCasesStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcTestCasesStub.java @@ -316,6 +316,15 @@ public Map extract(UpdateTestCaseRequest request) { GrpcCallSettings runTestCaseTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(runTestCaseMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(RunTestCaseRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings batchRunTestCasesTransportSettings = GrpcCallSettings.newBuilder() diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CalculateCoverageRequest.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CalculateCoverageRequest.java index 5055dd3b1..0aae863d9 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CalculateCoverageRequest.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CalculateCoverageRequest.java @@ -153,12 +153,22 @@ public enum CoverageType implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * Page transition coverage
+     * Page transition coverage.
      * 
* * PAGE_TRANSITION = 2; */ PAGE_TRANSITION(2), + /** + * + * + *
+     * Transition route group coverage.
+     * 
+ * + * TRANSITION_ROUTE_GROUP = 3; + */ + TRANSITION_ROUTE_GROUP(3), UNRECOGNIZED(-1), ; @@ -186,12 +196,22 @@ public enum CoverageType implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * Page transition coverage
+     * Page transition coverage.
      * 
* * PAGE_TRANSITION = 2; */ public static final int PAGE_TRANSITION_VALUE = 2; + /** + * + * + *
+     * Transition route group coverage.
+     * 
+ * + * TRANSITION_ROUTE_GROUP = 3; + */ + public static final int TRANSITION_ROUTE_GROUP_VALUE = 3; public final int getNumber() { if (this == UNRECOGNIZED) { @@ -223,6 +243,8 @@ public static CoverageType forNumber(int value) { return INTENT; case 2: return PAGE_TRANSITION; + case 3: + return TRANSITION_ROUTE_GROUP; default: return null; } diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CalculateCoverageResponse.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CalculateCoverageResponse.java index ce6329d0a..a168fbc50 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CalculateCoverageResponse.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CalculateCoverageResponse.java @@ -115,6 +115,27 @@ private CalculateCoverageResponse( agent_ = s; break; } + case 50: + { + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Builder subBuilder = + null; + if (coverageTypeCase_ == 6) { + subBuilder = + ((com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage) coverageType_) + .toBuilder(); + } + coverageType_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage) coverageType_); + coverageType_ = subBuilder.buildPartial(); + } + coverageTypeCase_ = 6; + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -158,6 +179,7 @@ public enum CoverageTypeCase com.google.protobuf.AbstractMessage.InternalOneOfEnum { INTENT_COVERAGE(2), TRANSITION_COVERAGE(4), + ROUTE_GROUP_COVERAGE(6), COVERAGETYPE_NOT_SET(0); private final int value; @@ -180,6 +202,8 @@ public static CoverageTypeCase forNumber(int value) { return INTENT_COVERAGE; case 4: return TRANSITION_COVERAGE; + case 6: + return ROUTE_GROUP_COVERAGE; case 0: return COVERAGETYPE_NOT_SET; default: @@ -303,7 +327,7 @@ public com.google.cloud.dialogflow.cx.v3.IntentCoverageOrBuilder getIntentCovera * * *
-   * Transition coverage.
+   * Transition (excluding transition route groups) coverage.
    * 
* * .google.cloud.dialogflow.cx.v3.TransitionCoverage transition_coverage = 4; @@ -318,7 +342,7 @@ public boolean hasTransitionCoverage() { * * *
-   * Transition coverage.
+   * Transition (excluding transition route groups) coverage.
    * 
* * .google.cloud.dialogflow.cx.v3.TransitionCoverage transition_coverage = 4; @@ -336,7 +360,7 @@ public com.google.cloud.dialogflow.cx.v3.TransitionCoverage getTransitionCoverag * * *
-   * Transition coverage.
+   * Transition (excluding transition route groups) coverage.
    * 
* * .google.cloud.dialogflow.cx.v3.TransitionCoverage transition_coverage = 4; @@ -350,6 +374,61 @@ public com.google.cloud.dialogflow.cx.v3.TransitionCoverage getTransitionCoverag return com.google.cloud.dialogflow.cx.v3.TransitionCoverage.getDefaultInstance(); } + public static final int ROUTE_GROUP_COVERAGE_FIELD_NUMBER = 6; + /** + * + * + *
+   * Transition route group coverage.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage route_group_coverage = 6; + * + * + * @return Whether the routeGroupCoverage field is set. + */ + @java.lang.Override + public boolean hasRouteGroupCoverage() { + return coverageTypeCase_ == 6; + } + /** + * + * + *
+   * Transition route group coverage.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage route_group_coverage = 6; + * + * + * @return The routeGroupCoverage. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage getRouteGroupCoverage() { + if (coverageTypeCase_ == 6) { + return (com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage) coverageType_; + } + return com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.getDefaultInstance(); + } + /** + * + * + *
+   * Transition route group coverage.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage route_group_coverage = 6; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverageOrBuilder + getRouteGroupCoverageOrBuilder() { + if (coverageTypeCase_ == 6) { + return (com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage) coverageType_; + } + return com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -373,6 +452,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!getAgentBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, agent_); } + if (coverageTypeCase_ == 6) { + output.writeMessage( + 6, (com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage) coverageType_); + } unknownFields.writeTo(output); } @@ -395,6 +478,11 @@ public int getSerializedSize() { if (!getAgentBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, agent_); } + if (coverageTypeCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage) coverageType_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -420,6 +508,9 @@ public boolean equals(final java.lang.Object obj) { case 4: if (!getTransitionCoverage().equals(other.getTransitionCoverage())) return false; break; + case 6: + if (!getRouteGroupCoverage().equals(other.getRouteGroupCoverage())) return false; + break; case 0: default: } @@ -445,6 +536,10 @@ public int hashCode() { hash = (37 * hash) + TRANSITION_COVERAGE_FIELD_NUMBER; hash = (53 * hash) + getTransitionCoverage().hashCode(); break; + case 6: + hash = (37 * hash) + ROUTE_GROUP_COVERAGE_FIELD_NUMBER; + hash = (53 * hash) + getRouteGroupCoverage().hashCode(); + break; case 0: default: } @@ -640,6 +735,13 @@ public com.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse buildPartial( result.coverageType_ = transitionCoverageBuilder_.build(); } } + if (coverageTypeCase_ == 6) { + if (routeGroupCoverageBuilder_ == null) { + result.coverageType_ = coverageType_; + } else { + result.coverageType_ = routeGroupCoverageBuilder_.build(); + } + } result.coverageTypeCase_ = coverageTypeCase_; onBuilt(); return result; @@ -706,6 +808,11 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.CalculateCoverageResp mergeTransitionCoverage(other.getTransitionCoverage()); break; } + case ROUTE_GROUP_COVERAGE: + { + mergeRouteGroupCoverage(other.getRouteGroupCoverage()); + break; + } case COVERAGETYPE_NOT_SET: { break; @@ -1085,7 +1192,7 @@ public com.google.cloud.dialogflow.cx.v3.IntentCoverageOrBuilder getIntentCovera * * *
-     * Transition coverage.
+     * Transition (excluding transition route groups) coverage.
      * 
* * .google.cloud.dialogflow.cx.v3.TransitionCoverage transition_coverage = 4; @@ -1100,7 +1207,7 @@ public boolean hasTransitionCoverage() { * * *
-     * Transition coverage.
+     * Transition (excluding transition route groups) coverage.
      * 
* * .google.cloud.dialogflow.cx.v3.TransitionCoverage transition_coverage = 4; @@ -1125,7 +1232,7 @@ public com.google.cloud.dialogflow.cx.v3.TransitionCoverage getTransitionCoverag * * *
-     * Transition coverage.
+     * Transition (excluding transition route groups) coverage.
      * 
* * .google.cloud.dialogflow.cx.v3.TransitionCoverage transition_coverage = 4; @@ -1148,7 +1255,7 @@ public Builder setTransitionCoverage( * * *
-     * Transition coverage.
+     * Transition (excluding transition route groups) coverage.
      * 
* * .google.cloud.dialogflow.cx.v3.TransitionCoverage transition_coverage = 4; @@ -1168,7 +1275,7 @@ public Builder setTransitionCoverage( * * *
-     * Transition coverage.
+     * Transition (excluding transition route groups) coverage.
      * 
* * .google.cloud.dialogflow.cx.v3.TransitionCoverage transition_coverage = 4; @@ -1201,7 +1308,7 @@ public Builder mergeTransitionCoverage( * * *
-     * Transition coverage.
+     * Transition (excluding transition route groups) coverage.
      * 
* * .google.cloud.dialogflow.cx.v3.TransitionCoverage transition_coverage = 4; @@ -1226,7 +1333,7 @@ public Builder clearTransitionCoverage() { * * *
-     * Transition coverage.
+     * Transition (excluding transition route groups) coverage.
      * 
* * .google.cloud.dialogflow.cx.v3.TransitionCoverage transition_coverage = 4; @@ -1239,7 +1346,7 @@ public Builder clearTransitionCoverage() { * * *
-     * Transition coverage.
+     * Transition (excluding transition route groups) coverage.
      * 
* * .google.cloud.dialogflow.cx.v3.TransitionCoverage transition_coverage = 4; @@ -1260,7 +1367,7 @@ public Builder clearTransitionCoverage() { * * *
-     * Transition coverage.
+     * Transition (excluding transition route groups) coverage.
      * 
* * .google.cloud.dialogflow.cx.v3.TransitionCoverage transition_coverage = 4; @@ -1290,6 +1397,232 @@ public Builder clearTransitionCoverage() { return transitionCoverageBuilder_; } + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage, + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Builder, + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverageOrBuilder> + routeGroupCoverageBuilder_; + /** + * + * + *
+     * Transition route group coverage.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage route_group_coverage = 6; + * + * + * @return Whether the routeGroupCoverage field is set. + */ + @java.lang.Override + public boolean hasRouteGroupCoverage() { + return coverageTypeCase_ == 6; + } + /** + * + * + *
+     * Transition route group coverage.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage route_group_coverage = 6; + * + * + * @return The routeGroupCoverage. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage getRouteGroupCoverage() { + if (routeGroupCoverageBuilder_ == null) { + if (coverageTypeCase_ == 6) { + return (com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage) coverageType_; + } + return com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.getDefaultInstance(); + } else { + if (coverageTypeCase_ == 6) { + return routeGroupCoverageBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.getDefaultInstance(); + } + } + /** + * + * + *
+     * Transition route group coverage.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage route_group_coverage = 6; + * + */ + public Builder setRouteGroupCoverage( + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage value) { + if (routeGroupCoverageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + coverageType_ = value; + onChanged(); + } else { + routeGroupCoverageBuilder_.setMessage(value); + } + coverageTypeCase_ = 6; + return this; + } + /** + * + * + *
+     * Transition route group coverage.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage route_group_coverage = 6; + * + */ + public Builder setRouteGroupCoverage( + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Builder builderForValue) { + if (routeGroupCoverageBuilder_ == null) { + coverageType_ = builderForValue.build(); + onChanged(); + } else { + routeGroupCoverageBuilder_.setMessage(builderForValue.build()); + } + coverageTypeCase_ = 6; + return this; + } + /** + * + * + *
+     * Transition route group coverage.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage route_group_coverage = 6; + * + */ + public Builder mergeRouteGroupCoverage( + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage value) { + if (routeGroupCoverageBuilder_ == null) { + if (coverageTypeCase_ == 6 + && coverageType_ + != com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage + .getDefaultInstance()) { + coverageType_ = + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.newBuilder( + (com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage) + coverageType_) + .mergeFrom(value) + .buildPartial(); + } else { + coverageType_ = value; + } + onChanged(); + } else { + if (coverageTypeCase_ == 6) { + routeGroupCoverageBuilder_.mergeFrom(value); + } + routeGroupCoverageBuilder_.setMessage(value); + } + coverageTypeCase_ = 6; + return this; + } + /** + * + * + *
+     * Transition route group coverage.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage route_group_coverage = 6; + * + */ + public Builder clearRouteGroupCoverage() { + if (routeGroupCoverageBuilder_ == null) { + if (coverageTypeCase_ == 6) { + coverageTypeCase_ = 0; + coverageType_ = null; + onChanged(); + } + } else { + if (coverageTypeCase_ == 6) { + coverageTypeCase_ = 0; + coverageType_ = null; + } + routeGroupCoverageBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Transition route group coverage.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage route_group_coverage = 6; + * + */ + public com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Builder + getRouteGroupCoverageBuilder() { + return getRouteGroupCoverageFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Transition route group coverage.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage route_group_coverage = 6; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverageOrBuilder + getRouteGroupCoverageOrBuilder() { + if ((coverageTypeCase_ == 6) && (routeGroupCoverageBuilder_ != null)) { + return routeGroupCoverageBuilder_.getMessageOrBuilder(); + } else { + if (coverageTypeCase_ == 6) { + return (com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage) coverageType_; + } + return com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.getDefaultInstance(); + } + } + /** + * + * + *
+     * Transition route group coverage.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage route_group_coverage = 6; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage, + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Builder, + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverageOrBuilder> + getRouteGroupCoverageFieldBuilder() { + if (routeGroupCoverageBuilder_ == null) { + if (!(coverageTypeCase_ == 6)) { + coverageType_ = + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.getDefaultInstance(); + } + routeGroupCoverageBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage, + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Builder, + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverageOrBuilder>( + (com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage) coverageType_, + getParentForChildren(), + isClean()); + coverageType_ = null; + } + coverageTypeCase_ = 6; + onChanged(); + ; + return routeGroupCoverageBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CalculateCoverageResponseOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CalculateCoverageResponseOrBuilder.java index e9ebc8d7f..1c77f73d3 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CalculateCoverageResponseOrBuilder.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CalculateCoverageResponseOrBuilder.java @@ -89,7 +89,7 @@ public interface CalculateCoverageResponseOrBuilder * * *
-   * Transition coverage.
+   * Transition (excluding transition route groups) coverage.
    * 
* * .google.cloud.dialogflow.cx.v3.TransitionCoverage transition_coverage = 4; @@ -101,7 +101,7 @@ public interface CalculateCoverageResponseOrBuilder * * *
-   * Transition coverage.
+   * Transition (excluding transition route groups) coverage.
    * 
* * .google.cloud.dialogflow.cx.v3.TransitionCoverage transition_coverage = 4; @@ -113,13 +113,52 @@ public interface CalculateCoverageResponseOrBuilder * * *
-   * Transition coverage.
+   * Transition (excluding transition route groups) coverage.
    * 
* * .google.cloud.dialogflow.cx.v3.TransitionCoverage transition_coverage = 4; */ com.google.cloud.dialogflow.cx.v3.TransitionCoverageOrBuilder getTransitionCoverageOrBuilder(); + /** + * + * + *
+   * Transition route group coverage.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage route_group_coverage = 6; + * + * + * @return Whether the routeGroupCoverage field is set. + */ + boolean hasRouteGroupCoverage(); + /** + * + * + *
+   * Transition route group coverage.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage route_group_coverage = 6; + * + * + * @return The routeGroupCoverage. + */ + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage getRouteGroupCoverage(); + /** + * + * + *
+   * Transition route group coverage.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage route_group_coverage = 6; + * + */ + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverageOrBuilder + getRouteGroupCoverageOrBuilder(); + public com.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse.CoverageTypeCase getCoverageTypeCase(); } diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ConversationTurn.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ConversationTurn.java index 44706496f..9910e6062 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ConversationTurn.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ConversationTurn.java @@ -1525,8 +1525,8 @@ public interface VirtualAgentOutputOrBuilder * * *
-     * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that triggered the response. Only some fields such as
-     * name and displayname will be set.
+     * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that triggered the response. Only name and displayName
+     * will be set.
      * 
* * .google.cloud.dialogflow.cx.v3.Intent triggered_intent = 7; @@ -1538,8 +1538,8 @@ public interface VirtualAgentOutputOrBuilder * * *
-     * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that triggered the response. Only some fields such as
-     * name and displayname will be set.
+     * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that triggered the response. Only name and displayName
+     * will be set.
      * 
* * .google.cloud.dialogflow.cx.v3.Intent triggered_intent = 7; @@ -1551,8 +1551,8 @@ public interface VirtualAgentOutputOrBuilder * * *
-     * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that triggered the response. Only some fields such as
-     * name and displayname will be set.
+     * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that triggered the response. Only name and displayName
+     * will be set.
      * 
* * .google.cloud.dialogflow.cx.v3.Intent triggered_intent = 7; @@ -1563,8 +1563,8 @@ public interface VirtualAgentOutputOrBuilder * * *
-     * The [Page][google.cloud.dialogflow.cx.v3.Page] on which the utterance was spoken. Only some fields such as
-     * name and displayname will be set.
+     * The [Page][google.cloud.dialogflow.cx.v3.Page] on which the utterance was spoken. Only name and displayName
+     * will be set.
      * 
* * .google.cloud.dialogflow.cx.v3.Page current_page = 8; @@ -1576,8 +1576,8 @@ public interface VirtualAgentOutputOrBuilder * * *
-     * The [Page][google.cloud.dialogflow.cx.v3.Page] on which the utterance was spoken. Only some fields such as
-     * name and displayname will be set.
+     * The [Page][google.cloud.dialogflow.cx.v3.Page] on which the utterance was spoken. Only name and displayName
+     * will be set.
      * 
* * .google.cloud.dialogflow.cx.v3.Page current_page = 8; @@ -1589,8 +1589,8 @@ public interface VirtualAgentOutputOrBuilder * * *
-     * The [Page][google.cloud.dialogflow.cx.v3.Page] on which the utterance was spoken. Only some fields such as
-     * name and displayname will be set.
+     * The [Page][google.cloud.dialogflow.cx.v3.Page] on which the utterance was spoken. Only name and displayName
+     * will be set.
      * 
* * .google.cloud.dialogflow.cx.v3.Page current_page = 8; @@ -2091,8 +2091,8 @@ public com.google.protobuf.StructOrBuilder getDiagnosticInfoOrBuilder() { * * *
-     * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that triggered the response. Only some fields such as
-     * name and displayname will be set.
+     * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that triggered the response. Only name and displayName
+     * will be set.
      * 
* * .google.cloud.dialogflow.cx.v3.Intent triggered_intent = 7; @@ -2107,8 +2107,8 @@ public boolean hasTriggeredIntent() { * * *
-     * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that triggered the response. Only some fields such as
-     * name and displayname will be set.
+     * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that triggered the response. Only name and displayName
+     * will be set.
      * 
* * .google.cloud.dialogflow.cx.v3.Intent triggered_intent = 7; @@ -2125,8 +2125,8 @@ public com.google.cloud.dialogflow.cx.v3.Intent getTriggeredIntent() { * * *
-     * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that triggered the response. Only some fields such as
-     * name and displayname will be set.
+     * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that triggered the response. Only name and displayName
+     * will be set.
      * 
* * .google.cloud.dialogflow.cx.v3.Intent triggered_intent = 7; @@ -2142,8 +2142,8 @@ public com.google.cloud.dialogflow.cx.v3.IntentOrBuilder getTriggeredIntentOrBui * * *
-     * The [Page][google.cloud.dialogflow.cx.v3.Page] on which the utterance was spoken. Only some fields such as
-     * name and displayname will be set.
+     * The [Page][google.cloud.dialogflow.cx.v3.Page] on which the utterance was spoken. Only name and displayName
+     * will be set.
      * 
* * .google.cloud.dialogflow.cx.v3.Page current_page = 8; @@ -2158,8 +2158,8 @@ public boolean hasCurrentPage() { * * *
-     * The [Page][google.cloud.dialogflow.cx.v3.Page] on which the utterance was spoken. Only some fields such as
-     * name and displayname will be set.
+     * The [Page][google.cloud.dialogflow.cx.v3.Page] on which the utterance was spoken. Only name and displayName
+     * will be set.
      * 
* * .google.cloud.dialogflow.cx.v3.Page current_page = 8; @@ -2176,8 +2176,8 @@ public com.google.cloud.dialogflow.cx.v3.Page getCurrentPage() { * * *
-     * The [Page][google.cloud.dialogflow.cx.v3.Page] on which the utterance was spoken. Only some fields such as
-     * name and displayname will be set.
+     * The [Page][google.cloud.dialogflow.cx.v3.Page] on which the utterance was spoken. Only name and displayName
+     * will be set.
      * 
* * .google.cloud.dialogflow.cx.v3.Page current_page = 8; @@ -3728,8 +3728,8 @@ public com.google.protobuf.StructOrBuilder getDiagnosticInfoOrBuilder() { * * *
-       * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that triggered the response. Only some fields such as
-       * name and displayname will be set.
+       * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that triggered the response. Only name and displayName
+       * will be set.
        * 
* * .google.cloud.dialogflow.cx.v3.Intent triggered_intent = 7; @@ -3743,8 +3743,8 @@ public boolean hasTriggeredIntent() { * * *
-       * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that triggered the response. Only some fields such as
-       * name and displayname will be set.
+       * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that triggered the response. Only name and displayName
+       * will be set.
        * 
* * .google.cloud.dialogflow.cx.v3.Intent triggered_intent = 7; @@ -3764,8 +3764,8 @@ public com.google.cloud.dialogflow.cx.v3.Intent getTriggeredIntent() { * * *
-       * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that triggered the response. Only some fields such as
-       * name and displayname will be set.
+       * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that triggered the response. Only name and displayName
+       * will be set.
        * 
* * .google.cloud.dialogflow.cx.v3.Intent triggered_intent = 7; @@ -3787,8 +3787,8 @@ public Builder setTriggeredIntent(com.google.cloud.dialogflow.cx.v3.Intent value * * *
-       * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that triggered the response. Only some fields such as
-       * name and displayname will be set.
+       * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that triggered the response. Only name and displayName
+       * will be set.
        * 
* * .google.cloud.dialogflow.cx.v3.Intent triggered_intent = 7; @@ -3808,8 +3808,8 @@ public Builder setTriggeredIntent( * * *
-       * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that triggered the response. Only some fields such as
-       * name and displayname will be set.
+       * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that triggered the response. Only name and displayName
+       * will be set.
        * 
* * .google.cloud.dialogflow.cx.v3.Intent triggered_intent = 7; @@ -3835,8 +3835,8 @@ public Builder mergeTriggeredIntent(com.google.cloud.dialogflow.cx.v3.Intent val * * *
-       * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that triggered the response. Only some fields such as
-       * name and displayname will be set.
+       * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that triggered the response. Only name and displayName
+       * will be set.
        * 
* * .google.cloud.dialogflow.cx.v3.Intent triggered_intent = 7; @@ -3856,8 +3856,8 @@ public Builder clearTriggeredIntent() { * * *
-       * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that triggered the response. Only some fields such as
-       * name and displayname will be set.
+       * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that triggered the response. Only name and displayName
+       * will be set.
        * 
* * .google.cloud.dialogflow.cx.v3.Intent triggered_intent = 7; @@ -3871,8 +3871,8 @@ public com.google.cloud.dialogflow.cx.v3.Intent.Builder getTriggeredIntentBuilde * * *
-       * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that triggered the response. Only some fields such as
-       * name and displayname will be set.
+       * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that triggered the response. Only name and displayName
+       * will be set.
        * 
* * .google.cloud.dialogflow.cx.v3.Intent triggered_intent = 7; @@ -3890,8 +3890,8 @@ public com.google.cloud.dialogflow.cx.v3.IntentOrBuilder getTriggeredIntentOrBui * * *
-       * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that triggered the response. Only some fields such as
-       * name and displayname will be set.
+       * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that triggered the response. Only name and displayName
+       * will be set.
        * 
* * .google.cloud.dialogflow.cx.v3.Intent triggered_intent = 7; @@ -3923,8 +3923,8 @@ public com.google.cloud.dialogflow.cx.v3.IntentOrBuilder getTriggeredIntentOrBui * * *
-       * The [Page][google.cloud.dialogflow.cx.v3.Page] on which the utterance was spoken. Only some fields such as
-       * name and displayname will be set.
+       * The [Page][google.cloud.dialogflow.cx.v3.Page] on which the utterance was spoken. Only name and displayName
+       * will be set.
        * 
* * .google.cloud.dialogflow.cx.v3.Page current_page = 8; @@ -3938,8 +3938,8 @@ public boolean hasCurrentPage() { * * *
-       * The [Page][google.cloud.dialogflow.cx.v3.Page] on which the utterance was spoken. Only some fields such as
-       * name and displayname will be set.
+       * The [Page][google.cloud.dialogflow.cx.v3.Page] on which the utterance was spoken. Only name and displayName
+       * will be set.
        * 
* * .google.cloud.dialogflow.cx.v3.Page current_page = 8; @@ -3959,8 +3959,8 @@ public com.google.cloud.dialogflow.cx.v3.Page getCurrentPage() { * * *
-       * The [Page][google.cloud.dialogflow.cx.v3.Page] on which the utterance was spoken. Only some fields such as
-       * name and displayname will be set.
+       * The [Page][google.cloud.dialogflow.cx.v3.Page] on which the utterance was spoken. Only name and displayName
+       * will be set.
        * 
* * .google.cloud.dialogflow.cx.v3.Page current_page = 8; @@ -3982,8 +3982,8 @@ public Builder setCurrentPage(com.google.cloud.dialogflow.cx.v3.Page value) { * * *
-       * The [Page][google.cloud.dialogflow.cx.v3.Page] on which the utterance was spoken. Only some fields such as
-       * name and displayname will be set.
+       * The [Page][google.cloud.dialogflow.cx.v3.Page] on which the utterance was spoken. Only name and displayName
+       * will be set.
        * 
* * .google.cloud.dialogflow.cx.v3.Page current_page = 8; @@ -4003,8 +4003,8 @@ public Builder setCurrentPage( * * *
-       * The [Page][google.cloud.dialogflow.cx.v3.Page] on which the utterance was spoken. Only some fields such as
-       * name and displayname will be set.
+       * The [Page][google.cloud.dialogflow.cx.v3.Page] on which the utterance was spoken. Only name and displayName
+       * will be set.
        * 
* * .google.cloud.dialogflow.cx.v3.Page current_page = 8; @@ -4030,8 +4030,8 @@ public Builder mergeCurrentPage(com.google.cloud.dialogflow.cx.v3.Page value) { * * *
-       * The [Page][google.cloud.dialogflow.cx.v3.Page] on which the utterance was spoken. Only some fields such as
-       * name and displayname will be set.
+       * The [Page][google.cloud.dialogflow.cx.v3.Page] on which the utterance was spoken. Only name and displayName
+       * will be set.
        * 
* * .google.cloud.dialogflow.cx.v3.Page current_page = 8; @@ -4051,8 +4051,8 @@ public Builder clearCurrentPage() { * * *
-       * The [Page][google.cloud.dialogflow.cx.v3.Page] on which the utterance was spoken. Only some fields such as
-       * name and displayname will be set.
+       * The [Page][google.cloud.dialogflow.cx.v3.Page] on which the utterance was spoken. Only name and displayName
+       * will be set.
        * 
* * .google.cloud.dialogflow.cx.v3.Page current_page = 8; @@ -4066,8 +4066,8 @@ public com.google.cloud.dialogflow.cx.v3.Page.Builder getCurrentPageBuilder() { * * *
-       * The [Page][google.cloud.dialogflow.cx.v3.Page] on which the utterance was spoken. Only some fields such as
-       * name and displayname will be set.
+       * The [Page][google.cloud.dialogflow.cx.v3.Page] on which the utterance was spoken. Only name and displayName
+       * will be set.
        * 
* * .google.cloud.dialogflow.cx.v3.Page current_page = 8; @@ -4085,8 +4085,8 @@ public com.google.cloud.dialogflow.cx.v3.PageOrBuilder getCurrentPageOrBuilder() * * *
-       * The [Page][google.cloud.dialogflow.cx.v3.Page] on which the utterance was spoken. Only some fields such as
-       * name and displayname will be set.
+       * The [Page][google.cloud.dialogflow.cx.v3.Page] on which the utterance was spoken. Only name and displayName
+       * will be set.
        * 
* * .google.cloud.dialogflow.cx.v3.Page current_page = 8; diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseProto.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseProto.java index c8a130bc0..aa2b1d5f5 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseProto.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCaseProto.java @@ -67,6 +67,18 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dialogflow_cx_v3_TransitionCoverage_Transition_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_cx_v3_TransitionCoverage_Transition_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_TransitionRouteGroupCoverage_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_TransitionRouteGroupCoverage_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_TransitionRouteGroupCoverage_Coverage_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_TransitionRouteGroupCoverage_Coverage_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_TransitionRouteGroupCoverage_Coverage_Transition_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_TransitionRouteGroupCoverage_Coverage_Transition_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_dialogflow_cx_v3_IntentCoverage_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -190,234 +202,251 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "(google/cloud/dialogflow/cx/v3/page.prot" + "o\0324google/cloud/dialogflow/cx/v3/respons" + "e_message.proto\032+google/cloud/dialogflow" - + "/cx/v3/session.proto\032#google/longrunning" - + "/operations.proto\032\033google/protobuf/empty" - + ".proto\032 google/protobuf/field_mask.proto" - + "\032\034google/protobuf/struct.proto\032\037google/p" - + "rotobuf/timestamp.proto\032\027google/rpc/stat" - + "us.proto\"\337\003\n\010TestCase\022\014\n\004name\030\001 \001(\t\022\014\n\004t" - + "ags\030\002 \003(\t\022\031\n\014display_name\030\003 \001(\tB\003\340A\002\022\r\n\005" - + "notes\030\004 \001(\t\022>\n\013test_config\030\r \001(\0132).googl" - + "e.cloud.dialogflow.cx.v3.TestConfig\022U\n\034t" - + "est_case_conversation_turns\030\005 \003(\0132/.goog" - + "le.cloud.dialogflow.cx.v3.ConversationTu" - + "rn\0226\n\rcreation_time\030\n \001(\0132\032.google.proto" - + "buf.TimestampB\003\340A\003\022G\n\020last_test_result\030\014" - + " \001(\0132-.google.cloud.dialogflow.cx.v3.Tes" - + "tCaseResult:u\352Ar\n\"dialogflow.googleapis." - + "com/TestCase\022Lprojects/{project}/locatio" - + "ns/{location}/agents/{agent}/testCases/{" - + "test_case}\"\253\003\n\016TestCaseResult\022\014\n\004name\030\001 " - + "\001(\t\022?\n\013environment\030\002 \001(\tB*\372A\'\n%dialogflo" - + "w.googleapis.com/Environment\022K\n\022conversa" - + "tion_turns\030\003 \003(\0132/.google.cloud.dialogfl" - + "ow.cx.v3.ConversationTurn\022>\n\013test_result" - + "\030\004 \001(\0162).google.cloud.dialogflow.cx.v3.T" - + "estResult\022-\n\ttest_time\030\005 \001(\0132\032.google.pr" - + "otobuf.Timestamp:\215\001\352A\211\001\n(dialogflow.goog" - + "leapis.com/TestCaseResult\022]projects/{pro" - + "ject}/locations/{location}/agents/{agent" - + "}/testCases/{test_case}/results/{result}" - + "\"\\\n\nTestConfig\022\033\n\023tracking_parameters\030\001 " - + "\003(\t\0221\n\004flow\030\002 \001(\tB#\372A \n\036dialogflow.googl" - + "eapis.com/Flow\"\234\006\n\020ConversationTurn\022M\n\nu" - + "ser_input\030\001 \001(\01329.google.cloud.dialogflo" - + "w.cx.v3.ConversationTurn.UserInput\022`\n\024vi" - + "rtual_agent_output\030\002 \001(\0132B.google.cloud." - + "dialogflow.cx.v3.ConversationTurn.Virtua" - + "lAgentOutput\032\227\001\n\tUserInput\0228\n\005input\030\005 \001(" - + "\0132).google.cloud.dialogflow.cx.v3.QueryI" - + "nput\0224\n\023injected_parameters\030\002 \001(\0132\027.goog" - + "le.protobuf.Struct\022\032\n\022is_webhook_enabled" - + "\030\003 \001(\010\032\274\003\n\022VirtualAgentOutput\0223\n\022session" - + "_parameters\030\004 \001(\0132\027.google.protobuf.Stru" - + "ct\022J\n\013differences\030\005 \003(\01320.google.cloud.d" - + "ialogflow.cx.v3.TestRunDifferenceB\003\340A\003\0228" - + "\n\017diagnostic_info\030\006 \001(\0132\027.google.protobu" - + "f.StructB\006\340A\002\340A\004\022?\n\020triggered_intent\030\007 \001" - + "(\0132%.google.cloud.dialogflow.cx.v3.Inten" - + "t\0229\n\014current_page\030\010 \001(\0132#.google.cloud.d" - + "ialogflow.cx.v3.Page\022K\n\016text_responses\030\t" - + " \003(\01323.google.cloud.dialogflow.cx.v3.Res" - + "ponseMessage.Text\022\"\n\006status\030\n \001(\0132\022.goog" - + "le.rpc.Status\"\315\001\n\021TestRunDifference\022G\n\004t" - + "ype\030\001 \001(\01629.google.cloud.dialogflow.cx.v" - + "3.TestRunDifference.DiffType\022\023\n\013descript" - + "ion\030\002 \001(\t\"Z\n\010DiffType\022\031\n\025DIFF_TYPE_UNSPE" - + "CIFIED\020\000\022\n\n\006INTENT\020\001\022\010\n\004PAGE\020\002\022\016\n\nPARAME" - + "TERS\020\003\022\r\n\tUTTERANCE\020\004\"\363\004\n\022TransitionCove" - + "rage\022Q\n\013transitions\030\001 \003(\0132<.google.cloud" - + ".dialogflow.cx.v3.TransitionCoverage.Tra" - + "nsition\022\026\n\016coverage_score\030\002 \001(\002\032\202\001\n\016Tran" - + "sitionNode\0223\n\004page\030\001 \001(\0132#.google.cloud." - + "dialogflow.cx.v3.PageH\000\0223\n\004flow\030\002 \001(\0132#." - + "google.cloud.dialogflow.cx.v3.FlowH\000B\006\n\004" - + "kind\032\354\002\n\nTransition\022P\n\006source\030\001 \001(\0132@.go" - + "ogle.cloud.dialogflow.cx.v3.TransitionCo" - + "verage.TransitionNode\022\r\n\005index\030\004 \001(\005\022P\n\006" - + "target\030\002 \001(\0132@.google.cloud.dialogflow.c" - + "x.v3.TransitionCoverage.TransitionNode\022\017" - + "\n\007covered\030\003 \001(\010\022J\n\020transition_route\030\005 \001(" - + "\0132..google.cloud.dialogflow.cx.v3.Transi" - + "tionRouteH\000\022D\n\revent_handler\030\006 \001(\0132+.goo" - + "gle.cloud.dialogflow.cx.v3.EventHandlerH" - + "\000B\010\n\006detail\"\301\001\n\016IntentCoverage\022E\n\007intent" - + "s\030\001 \003(\01324.google.cloud.dialogflow.cx.v3." - + "IntentCoverage.Intent\022\026\n\016coverage_score\030" - + "\002 \001(\002\032P\n\006Intent\0225\n\006intent\030\001 \001(\tB%\372A\"\n di" - + "alogflow.googleapis.com/Intent\022\017\n\007covere" - + "d\030\002 \001(\010\"\373\001\n\030CalculateCoverageRequest\0226\n\005" - + "agent\030\003 \001(\tB\'\340A\002\372A!\n\037dialogflow.googleap" - + "is.com/Agent\022W\n\004type\030\002 \001(\0162D.google.clou" - + "d.dialogflow.cx.v3.CalculateCoverageRequ" - + "est.CoverageTypeB\003\340A\002\"N\n\014CoverageType\022\035\n" - + "\031COVERAGE_TYPE_UNSPECIFIED\020\000\022\n\n\006INTENT\020\001" - + "\022\023\n\017PAGE_TRANSITION\020\002\"\375\001\n\031CalculateCover" - + "ageResponse\0223\n\005agent\030\005 \001(\tB$\372A!\n\037dialogf" - + "low.googleapis.com/Agent\022H\n\017intent_cover" - + "age\030\002 \001(\0132-.google.cloud.dialogflow.cx.v" - + "3.IntentCoverageH\000\022P\n\023transition_coverag" - + "e\030\004 \001(\01321.google.cloud.dialogflow.cx.v3." - + "TransitionCoverageH\000B\017\n\rcoverage_type\"\216\002" - + "\n\024ListTestCasesRequest\022:\n\006parent\030\001 \001(\tB*" - + "\340A\002\372A$\022\"dialogflow.googleapis.com/TestCa" - + "se\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(" - + "\t\022N\n\004view\030\004 \001(\0162@.google.cloud.dialogflo" - + "w.cx.v3.ListTestCasesRequest.TestCaseVie" - + "w\"C\n\014TestCaseView\022\036\n\032TEST_CASE_VIEW_UNSP" - + "ECIFIED\020\000\022\t\n\005BASIC\020\001\022\010\n\004FULL\020\002\"m\n\025ListTe" - + "stCasesResponse\022;\n\ntest_cases\030\001 \003(\0132\'.go" - + "ogle.cloud.dialogflow.cx.v3.TestCase\022\027\n\017" - + "next_page_token\030\002 \001(\t\"\224\001\n\033BatchDeleteTes" - + "tCasesRequest\022:\n\006parent\030\001 \001(\tB*\340A\002\372A$\022\"d" - + "ialogflow.googleapis.com/TestCase\0229\n\005nam" - + "es\030\003 \003(\tB*\340A\002\372A$\n\"dialogflow.googleapis." - + "com/TestCase\"\224\001\n\025CreateTestCaseRequest\022:" - + "\n\006parent\030\001 \001(\tB*\340A\002\372A$\022\"dialogflow.googl" - + "eapis.com/TestCase\022?\n\ttest_case\030\002 \001(\0132\'." - + "google.cloud.dialogflow.cx.v3.TestCaseB\003" - + "\340A\002\"\216\001\n\025UpdateTestCaseRequest\022?\n\ttest_ca" - + "se\030\001 \001(\0132\'.google.cloud.dialogflow.cx.v3" - + ".TestCaseB\003\340A\002\0224\n\013update_mask\030\002 \001(\0132\032.go" - + "ogle.protobuf.FieldMaskB\003\340A\002\"N\n\022GetTestC" - + "aseRequest\0228\n\004name\030\001 \001(\tB*\340A\002\372A$\n\"dialog" - + "flow.googleapis.com/TestCase\"\222\001\n\022RunTest" - + "CaseRequest\0228\n\004name\030\001 \001(\tB*\340A\002\372A$\n\"dialo" - + "gflow.googleapis.com/TestCase\022B\n\013environ" - + "ment\030\002 \001(\tB-\340A\001\372A\'\n%dialogflow.googleapi" - + "s.com/Environment\"T\n\023RunTestCaseResponse" - + "\022=\n\006result\030\002 \001(\0132-.google.cloud.dialogfl" - + "ow.cx.v3.TestCaseResult\"\025\n\023RunTestCaseMe" - + "tadata\"\332\001\n\030BatchRunTestCasesRequest\022:\n\006p" - + "arent\030\001 \001(\tB*\340A\002\372A$\022\"dialogflow.googleap" - + "is.com/TestCase\022B\n\013environment\030\002 \001(\tB-\340A" - + "\001\372A\'\n%dialogflow.googleapis.com/Environm" - + "ent\022>\n\ntest_cases\030\003 \003(\tB*\340A\002\372A$\n\"dialogf" - + "low.googleapis.com/TestCase\"[\n\031BatchRunT" - + "estCasesResponse\022>\n\007results\030\001 \003(\0132-.goog" - + "le.cloud.dialogflow.cx.v3.TestCaseResult" - + "\"U\n\031BatchRunTestCasesMetadata\0228\n\006errors\030" - + "\001 \003(\0132(.google.cloud.dialogflow.cx.v3.Te" - + "stError\"\232\001\n\tTestError\022:\n\ttest_case\030\001 \001(\t" - + "B\'\372A$\n\"dialogflow.googleapis.com/TestCas" - + "e\022\"\n\006status\030\002 \001(\0132\022.google.rpc.Status\022-\n" - + "\ttest_time\030\003 \001(\0132\032.google.protobuf.Times" - + "tamp\"\204\001\n\026ImportTestCasesRequest\022:\n\006paren" - + "t\030\001 \001(\tB*\340A\002\372A$\022\"dialogflow.googleapis.c" - + "om/TestCase\022\021\n\007gcs_uri\030\002 \001(\tH\000\022\021\n\007conten" - + "t\030\003 \001(\014H\000B\010\n\006source\"Q\n\027ImportTestCasesRe" - + "sponse\0226\n\005names\030\001 \003(\tB\'\372A$\n\"dialogflow.g" - + "oogleapis.com/TestCase\"W\n\027ImportTestCase" - + "sMetadata\022<\n\006errors\030\001 \003(\0132,.google.cloud" - + ".dialogflow.cx.v3.TestCaseError\"o\n\rTestC" - + "aseError\022:\n\ttest_case\030\001 \001(\0132\'.google.clo" - + "ud.dialogflow.cx.v3.TestCase\022\"\n\006status\030\002" - + " \001(\0132\022.google.rpc.Status\"\234\002\n\026ExportTestC" - + "asesRequest\022:\n\006parent\030\001 \001(\tB*\340A\002\372A$\022\"dia" - + "logflow.googleapis.com/TestCase\022\021\n\007gcs_u" - + "ri\030\002 \001(\tH\000\022U\n\013data_format\030\003 \001(\0162@.google" - + ".cloud.dialogflow.cx.v3.ExportTestCasesR" - + "equest.DataFormat\022\016\n\006filter\030\004 \001(\t\"=\n\nDat" - + "aFormat\022\033\n\027DATA_FORMAT_UNSPECIFIED\020\000\022\010\n\004" - + "BLOB\020\001\022\010\n\004JSON\020\002B\r\n\013destination\"N\n\027Expor" - + "tTestCasesResponse\022\021\n\007gcs_uri\030\001 \001(\tH\000\022\021\n" - + "\007content\030\002 \001(\014H\000B\r\n\013destination\"\031\n\027Expor" - + "tTestCasesMetadata\"\225\001\n\032ListTestCaseResul" - + "tsRequest\022@\n\006parent\030\001 \001(\tB0\340A\002\372A*\022(dialo" - + "gflow.googleapis.com/TestCaseResult\022\021\n\tp" - + "age_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\016\n\006fi" - + "lter\030\004 \001(\t\"\200\001\n\033ListTestCaseResultsRespon" - + "se\022H\n\021test_case_results\030\001 \003(\0132-.google.c" - + "loud.dialogflow.cx.v3.TestCaseResult\022\027\n\017" - + "next_page_token\030\002 \001(\t*A\n\nTestResult\022\033\n\027T" - + "EST_RESULT_UNSPECIFIED\020\000\022\n\n\006PASSED\020\001\022\n\n\006" - + "FAILED\020\0022\301\023\n\tTestCases\022\303\001\n\rListTestCases" - + "\0223.google.cloud.dialogflow.cx.v3.ListTes" - + "tCasesRequest\0324.google.cloud.dialogflow." - + "cx.v3.ListTestCasesResponse\"G\202\323\344\223\0028\0226/v3" - + "/{parent=projects/*/locations/*/agents/*" - + "}/testCases\332A\006parent\022\302\001\n\024BatchDeleteTest" - + "Cases\022:.google.cloud.dialogflow.cx.v3.Ba" - + "tchDeleteTestCasesRequest\032\026.google.proto" - + "buf.Empty\"V\202\323\344\223\002G\"B/v3/{parent=projects/" - + "*/locations/*/agents/*}/testCases:batchD" - + "elete:\001*\332A\006parent\022\260\001\n\013GetTestCase\0221.goog" - + "le.cloud.dialogflow.cx.v3.GetTestCaseReq" - + "uest\032\'.google.cloud.dialogflow.cx.v3.Tes" - + "tCase\"E\202\323\344\223\0028\0226/v3/{name=projects/*/loca" - + "tions/*/agents/*/testCases/*}\332A\004name\022\315\001\n" - + "\016CreateTestCase\0224.google.cloud.dialogflo" - + "w.cx.v3.CreateTestCaseRequest\032\'.google.c" - + "loud.dialogflow.cx.v3.TestCase\"\\\202\323\344\223\002C\"6" - + "/v3/{parent=projects/*/locations/*/agent" - + "s/*}/testCases:\ttest_case\332A\020parent,test_" - + "case\022\334\001\n\016UpdateTestCase\0224.google.cloud.d" - + "ialogflow.cx.v3.UpdateTestCaseRequest\032\'." - + "google.cloud.dialogflow.cx.v3.TestCase\"k" - + "\202\323\344\223\002M2@/v3/{test_case.name=projects/*/l" - + "ocations/*/agents/*/testCases/*}:\ttest_c" - + "ase\332A\025test_case,update_mask\022\312\001\n\013RunTestC" - + "ase\0221.google.cloud.dialogflow.cx.v3.RunT" - + "estCaseRequest\032\035.google.longrunning.Oper" - + "ation\"i\202\323\344\223\0026\"1/v3/projects/*/locations/" - + "*/agents/*/testCases:run:\001*\312A*\n\023RunTestC" - + "aseResponse\022\023RunTestCaseMetadata\022\361\001\n\021Bat" - + "chRunTestCases\0227.google.cloud.dialogflow" - + ".cx.v3.BatchRunTestCasesRequest\032\035.google" - + ".longrunning.Operation\"\203\001\202\323\344\223\002D\"?/v3/{pa" - + "rent=projects/*/locations/*/agents/*}/te" - + "stCases:batchRun:\001*\312A6\n\031BatchRunTestCase" - + "sResponse\022\031BatchRunTestCasesMetadata\022\327\001\n" - + "\021CalculateCoverage\0227.google.cloud.dialog" - + "flow.cx.v3.CalculateCoverageRequest\0328.go" - + "ogle.cloud.dialogflow.cx.v3.CalculateCov" - + "erageResponse\"O\202\323\344\223\002I\022G/v3/{agent=projec" - + "ts/*/locations/*/agents/*}/testCases:cal" - + "culateCoverage\022\346\001\n\017ImportTestCases\0225.goo" - + "gle.cloud.dialogflow.cx.v3.ImportTestCas" - + "esRequest\032\035.google.longrunning.Operation" - + "\"}\202\323\344\223\002B\"=/v3/{parent=projects/*/locatio" - + "ns/*/agents/*}/testCases:import:\001*\312A2\n\027I" - + "mportTestCasesResponse\022\027ImportTestCasesM" - + "etadata\022\346\001\n\017ExportTestCases\0225.google.clo" - + "ud.dialogflow.cx.v3.ExportTestCasesReque" - + "st\032\035.google.longrunning.Operation\"}\202\323\344\223\002" - + "B\"=/v3/{parent=projects/*/locations/*/ag" - + "ents/*}/testCases:export:\001*\312A2\n\027ExportTe" - + "stCasesResponse\022\027ExportTestCasesMetadata" - + "\022\337\001\n\023ListTestCaseResults\0229.google.cloud." - + "dialogflow.cx.v3.ListTestCaseResultsRequ" - + "est\032:.google.cloud.dialogflow.cx.v3.List" - + "TestCaseResultsResponse\"Q\202\323\344\223\002B\022@/v3/{pa" - + "rent=projects/*/locations/*/agents/*/tes" - + "tCases/*}/results\332A\006parent\032x\312A\031dialogflo" - + "w.googleapis.com\322AYhttps://www.googleapi" - + "s.com/auth/cloud-platform,https://www.go" - + "ogleapis.com/auth/dialogflowB\235\001\n!com.goo" - + "gle.cloud.dialogflow.cx.v3B\rTestCaseProt" - + "oP\001Z?google.golang.org/genproto/googleap" - + "is/cloud/dialogflow/cx/v3;cx\370\001\001\242\002\002DF\252\002\035G" - + "oogle.Cloud.Dialogflow.Cx.V3b\006proto3" + + "/cx/v3/session.proto\032:google/cloud/dialo" + + "gflow/cx/v3/transition_route_group.proto" + + "\032#google/longrunning/operations.proto\032\033g" + + "oogle/protobuf/empty.proto\032 google/proto" + + "buf/field_mask.proto\032\034google/protobuf/st" + + "ruct.proto\032\037google/protobuf/timestamp.pr" + + "oto\032\027google/rpc/status.proto\"\337\003\n\010TestCas" + + "e\022\014\n\004name\030\001 \001(\t\022\014\n\004tags\030\002 \003(\t\022\031\n\014display" + + "_name\030\003 \001(\tB\003\340A\002\022\r\n\005notes\030\004 \001(\t\022>\n\013test_" + + "config\030\r \001(\0132).google.cloud.dialogflow.c" + + "x.v3.TestConfig\022U\n\034test_case_conversatio" + + "n_turns\030\005 \003(\0132/.google.cloud.dialogflow." + + "cx.v3.ConversationTurn\0226\n\rcreation_time\030" + + "\n \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022G" + + "\n\020last_test_result\030\014 \001(\0132-.google.cloud." + + "dialogflow.cx.v3.TestCaseResult:u\352Ar\n\"di" + + "alogflow.googleapis.com/TestCase\022Lprojec" + + "ts/{project}/locations/{location}/agents" + + "/{agent}/testCases/{test_case}\"\253\003\n\016TestC" + + "aseResult\022\014\n\004name\030\001 \001(\t\022?\n\013environment\030\002" + + " \001(\tB*\372A\'\n%dialogflow.googleapis.com/Env" + + "ironment\022K\n\022conversation_turns\030\003 \003(\0132/.g" + + "oogle.cloud.dialogflow.cx.v3.Conversatio" + + "nTurn\022>\n\013test_result\030\004 \001(\0162).google.clou" + + "d.dialogflow.cx.v3.TestResult\022-\n\ttest_ti" + + "me\030\005 \001(\0132\032.google.protobuf.Timestamp:\215\001\352" + + "A\211\001\n(dialogflow.googleapis.com/TestCaseR" + + "esult\022]projects/{project}/locations/{loc" + + "ation}/agents/{agent}/testCases/{test_ca" + + "se}/results/{result}\"\\\n\nTestConfig\022\033\n\023tr" + + "acking_parameters\030\001 \003(\t\0221\n\004flow\030\002 \001(\tB#\372" + + "A \n\036dialogflow.googleapis.com/Flow\"\234\006\n\020C" + + "onversationTurn\022M\n\nuser_input\030\001 \001(\01329.go" + + "ogle.cloud.dialogflow.cx.v3.Conversation" + + "Turn.UserInput\022`\n\024virtual_agent_output\030\002" + + " \001(\0132B.google.cloud.dialogflow.cx.v3.Con" + + "versationTurn.VirtualAgentOutput\032\227\001\n\tUse" + + "rInput\0228\n\005input\030\005 \001(\0132).google.cloud.dia" + + "logflow.cx.v3.QueryInput\0224\n\023injected_par" + + "ameters\030\002 \001(\0132\027.google.protobuf.Struct\022\032" + + "\n\022is_webhook_enabled\030\003 \001(\010\032\274\003\n\022VirtualAg" + + "entOutput\0223\n\022session_parameters\030\004 \001(\0132\027." + + "google.protobuf.Struct\022J\n\013differences\030\005 " + + "\003(\01320.google.cloud.dialogflow.cx.v3.Test" + + "RunDifferenceB\003\340A\003\0228\n\017diagnostic_info\030\006 " + + "\001(\0132\027.google.protobuf.StructB\006\340A\002\340A\004\022?\n\020" + + "triggered_intent\030\007 \001(\0132%.google.cloud.di" + + "alogflow.cx.v3.Intent\0229\n\014current_page\030\010 " + + "\001(\0132#.google.cloud.dialogflow.cx.v3.Page" + + "\022K\n\016text_responses\030\t \003(\01323.google.cloud." + + "dialogflow.cx.v3.ResponseMessage.Text\022\"\n" + + "\006status\030\n \001(\0132\022.google.rpc.Status\"\315\001\n\021Te" + + "stRunDifference\022G\n\004type\030\001 \001(\01629.google.c" + + "loud.dialogflow.cx.v3.TestRunDifference." + + "DiffType\022\023\n\013description\030\002 \001(\t\"Z\n\010DiffTyp" + + "e\022\031\n\025DIFF_TYPE_UNSPECIFIED\020\000\022\n\n\006INTENT\020\001" + + "\022\010\n\004PAGE\020\002\022\016\n\nPARAMETERS\020\003\022\r\n\tUTTERANCE\020" + + "\004\"\363\004\n\022TransitionCoverage\022Q\n\013transitions\030" + + "\001 \003(\0132<.google.cloud.dialogflow.cx.v3.Tr" + + "ansitionCoverage.Transition\022\026\n\016coverage_" + + "score\030\002 \001(\002\032\202\001\n\016TransitionNode\0223\n\004page\030\001" + + " \001(\0132#.google.cloud.dialogflow.cx.v3.Pag" + + "eH\000\0223\n\004flow\030\002 \001(\0132#.google.cloud.dialogf" + + "low.cx.v3.FlowH\000B\006\n\004kind\032\354\002\n\nTransition\022" + + "P\n\006source\030\001 \001(\0132@.google.cloud.dialogflo" + + "w.cx.v3.TransitionCoverage.TransitionNod" + + "e\022\r\n\005index\030\004 \001(\005\022P\n\006target\030\002 \001(\0132@.googl" + + "e.cloud.dialogflow.cx.v3.TransitionCover" + + "age.TransitionNode\022\017\n\007covered\030\003 \001(\010\022J\n\020t" + + "ransition_route\030\005 \001(\0132..google.cloud.dia" + + "logflow.cx.v3.TransitionRouteH\000\022D\n\revent" + + "_handler\030\006 \001(\0132+.google.cloud.dialogflow" + + ".cx.v3.EventHandlerH\000B\010\n\006detail\"\315\003\n\034Tran" + + "sitionRouteGroupCoverage\022W\n\tcoverages\030\001 " + + "\003(\0132D.google.cloud.dialogflow.cx.v3.Tran" + + "sitionRouteGroupCoverage.Coverage\022\026\n\016cov" + + "erage_score\030\002 \001(\002\032\273\002\n\010Coverage\022H\n\013route_" + + "group\030\001 \001(\01323.google.cloud.dialogflow.cx" + + ".v3.TransitionRouteGroup\022d\n\013transitions\030" + + "\002 \003(\0132O.google.cloud.dialogflow.cx.v3.Tr" + + "ansitionRouteGroupCoverage.Coverage.Tran" + + "sition\022\026\n\016coverage_score\030\003 \001(\002\032g\n\nTransi" + + "tion\022H\n\020transition_route\030\001 \001(\0132..google." + + "cloud.dialogflow.cx.v3.TransitionRoute\022\017" + + "\n\007covered\030\002 \001(\010\"\301\001\n\016IntentCoverage\022E\n\007in" + + "tents\030\001 \003(\01324.google.cloud.dialogflow.cx" + + ".v3.IntentCoverage.Intent\022\026\n\016coverage_sc" + + "ore\030\002 \001(\002\032P\n\006Intent\0225\n\006intent\030\001 \001(\tB%\372A\"" + + "\n dialogflow.googleapis.com/Intent\022\017\n\007co" + + "vered\030\002 \001(\010\"\227\002\n\030CalculateCoverageRequest" + + "\0226\n\005agent\030\003 \001(\tB\'\340A\002\372A!\n\037dialogflow.goog" + + "leapis.com/Agent\022W\n\004type\030\002 \001(\0162D.google." + + "cloud.dialogflow.cx.v3.CalculateCoverage" + + "Request.CoverageTypeB\003\340A\002\"j\n\014CoverageTyp" + + "e\022\035\n\031COVERAGE_TYPE_UNSPECIFIED\020\000\022\n\n\006INTE" + + "NT\020\001\022\023\n\017PAGE_TRANSITION\020\002\022\032\n\026TRANSITION_" + + "ROUTE_GROUP\020\003\"\332\002\n\031CalculateCoverageRespo" + + "nse\0223\n\005agent\030\005 \001(\tB$\372A!\n\037dialogflow.goog" + + "leapis.com/Agent\022H\n\017intent_coverage\030\002 \001(" + + "\0132-.google.cloud.dialogflow.cx.v3.Intent" + + "CoverageH\000\022P\n\023transition_coverage\030\004 \001(\0132" + + "1.google.cloud.dialogflow.cx.v3.Transiti" + + "onCoverageH\000\022[\n\024route_group_coverage\030\006 \001" + + "(\0132;.google.cloud.dialogflow.cx.v3.Trans" + + "itionRouteGroupCoverageH\000B\017\n\rcoverage_ty" + + "pe\"\216\002\n\024ListTestCasesRequest\022:\n\006parent\030\001 " + + "\001(\tB*\340A\002\372A$\022\"dialogflow.googleapis.com/T" + + "estCase\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token" + + "\030\003 \001(\t\022N\n\004view\030\004 \001(\0162@.google.cloud.dial" + + "ogflow.cx.v3.ListTestCasesRequest.TestCa" + + "seView\"C\n\014TestCaseView\022\036\n\032TEST_CASE_VIEW" + + "_UNSPECIFIED\020\000\022\t\n\005BASIC\020\001\022\010\n\004FULL\020\002\"m\n\025L" + + "istTestCasesResponse\022;\n\ntest_cases\030\001 \003(\013" + + "2\'.google.cloud.dialogflow.cx.v3.TestCas" + + "e\022\027\n\017next_page_token\030\002 \001(\t\"\224\001\n\033BatchDele" + + "teTestCasesRequest\022:\n\006parent\030\001 \001(\tB*\340A\002\372" + + "A$\022\"dialogflow.googleapis.com/TestCase\0229" + + "\n\005names\030\003 \003(\tB*\340A\002\372A$\n\"dialogflow.google" + + "apis.com/TestCase\"\224\001\n\025CreateTestCaseRequ" + + "est\022:\n\006parent\030\001 \001(\tB*\340A\002\372A$\022\"dialogflow." + + "googleapis.com/TestCase\022?\n\ttest_case\030\002 \001" + + "(\0132\'.google.cloud.dialogflow.cx.v3.TestC" + + "aseB\003\340A\002\"\216\001\n\025UpdateTestCaseRequest\022?\n\tte" + + "st_case\030\001 \001(\0132\'.google.cloud.dialogflow." + + "cx.v3.TestCaseB\003\340A\002\0224\n\013update_mask\030\002 \001(\013" + + "2\032.google.protobuf.FieldMaskB\003\340A\002\"N\n\022Get" + + "TestCaseRequest\0228\n\004name\030\001 \001(\tB*\340A\002\372A$\n\"d" + + "ialogflow.googleapis.com/TestCase\"\222\001\n\022Ru" + + "nTestCaseRequest\0228\n\004name\030\001 \001(\tB*\340A\002\372A$\n\"" + + "dialogflow.googleapis.com/TestCase\022B\n\013en" + + "vironment\030\002 \001(\tB-\340A\001\372A\'\n%dialogflow.goog" + + "leapis.com/Environment\"T\n\023RunTestCaseRes" + + "ponse\022=\n\006result\030\002 \001(\0132-.google.cloud.dia" + + "logflow.cx.v3.TestCaseResult\"\025\n\023RunTestC" + + "aseMetadata\"\332\001\n\030BatchRunTestCasesRequest" + + "\022:\n\006parent\030\001 \001(\tB*\340A\002\372A$\022\"dialogflow.goo" + + "gleapis.com/TestCase\022B\n\013environment\030\002 \001(" + + "\tB-\340A\001\372A\'\n%dialogflow.googleapis.com/Env" + + "ironment\022>\n\ntest_cases\030\003 \003(\tB*\340A\002\372A$\n\"di" + + "alogflow.googleapis.com/TestCase\"[\n\031Batc" + + "hRunTestCasesResponse\022>\n\007results\030\001 \003(\0132-" + + ".google.cloud.dialogflow.cx.v3.TestCaseR" + + "esult\"U\n\031BatchRunTestCasesMetadata\0228\n\006er" + + "rors\030\001 \003(\0132(.google.cloud.dialogflow.cx." + + "v3.TestError\"\232\001\n\tTestError\022:\n\ttest_case\030" + + "\001 \001(\tB\'\372A$\n\"dialogflow.googleapis.com/Te" + + "stCase\022\"\n\006status\030\002 \001(\0132\022.google.rpc.Stat" + + "us\022-\n\ttest_time\030\003 \001(\0132\032.google.protobuf." + + "Timestamp\"\204\001\n\026ImportTestCasesRequest\022:\n\006" + + "parent\030\001 \001(\tB*\340A\002\372A$\022\"dialogflow.googlea" + + "pis.com/TestCase\022\021\n\007gcs_uri\030\002 \001(\tH\000\022\021\n\007c" + + "ontent\030\003 \001(\014H\000B\010\n\006source\"Q\n\027ImportTestCa" + + "sesResponse\0226\n\005names\030\001 \003(\tB\'\372A$\n\"dialogf" + + "low.googleapis.com/TestCase\"W\n\027ImportTes" + + "tCasesMetadata\022<\n\006errors\030\001 \003(\0132,.google." + + "cloud.dialogflow.cx.v3.TestCaseError\"o\n\r" + + "TestCaseError\022:\n\ttest_case\030\001 \001(\0132\'.googl" + + "e.cloud.dialogflow.cx.v3.TestCase\022\"\n\006sta" + + "tus\030\002 \001(\0132\022.google.rpc.Status\"\234\002\n\026Export" + + "TestCasesRequest\022:\n\006parent\030\001 \001(\tB*\340A\002\372A$" + + "\022\"dialogflow.googleapis.com/TestCase\022\021\n\007" + + "gcs_uri\030\002 \001(\tH\000\022U\n\013data_format\030\003 \001(\0162@.g" + + "oogle.cloud.dialogflow.cx.v3.ExportTestC" + + "asesRequest.DataFormat\022\016\n\006filter\030\004 \001(\t\"=" + + "\n\nDataFormat\022\033\n\027DATA_FORMAT_UNSPECIFIED\020" + + "\000\022\010\n\004BLOB\020\001\022\010\n\004JSON\020\002B\r\n\013destination\"N\n\027" + + "ExportTestCasesResponse\022\021\n\007gcs_uri\030\001 \001(\t" + + "H\000\022\021\n\007content\030\002 \001(\014H\000B\r\n\013destination\"\031\n\027" + + "ExportTestCasesMetadata\"\225\001\n\032ListTestCase" + + "ResultsRequest\022@\n\006parent\030\001 \001(\tB0\340A\002\372A*\022(" + + "dialogflow.googleapis.com/TestCaseResult" + + "\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022" + + "\016\n\006filter\030\004 \001(\t\"\200\001\n\033ListTestCaseResultsR" + + "esponse\022H\n\021test_case_results\030\001 \003(\0132-.goo" + + "gle.cloud.dialogflow.cx.v3.TestCaseResul" + + "t\022\027\n\017next_page_token\030\002 \001(\t*A\n\nTestResult" + + "\022\033\n\027TEST_RESULT_UNSPECIFIED\020\000\022\n\n\006PASSED\020" + + "\001\022\n\n\006FAILED\020\0022\312\023\n\tTestCases\022\303\001\n\rListTest" + + "Cases\0223.google.cloud.dialogflow.cx.v3.Li" + + "stTestCasesRequest\0324.google.cloud.dialog" + + "flow.cx.v3.ListTestCasesResponse\"G\202\323\344\223\0028" + + "\0226/v3/{parent=projects/*/locations/*/age" + + "nts/*}/testCases\332A\006parent\022\302\001\n\024BatchDelet" + + "eTestCases\022:.google.cloud.dialogflow.cx." + + "v3.BatchDeleteTestCasesRequest\032\026.google." + + "protobuf.Empty\"V\202\323\344\223\002G\"B/v3/{parent=proj" + + "ects/*/locations/*/agents/*}/testCases:b" + + "atchDelete:\001*\332A\006parent\022\260\001\n\013GetTestCase\0221" + + ".google.cloud.dialogflow.cx.v3.GetTestCa" + + "seRequest\032\'.google.cloud.dialogflow.cx.v" + + "3.TestCase\"E\202\323\344\223\0028\0226/v3/{name=projects/*" + + "/locations/*/agents/*/testCases/*}\332A\004nam" + + "e\022\315\001\n\016CreateTestCase\0224.google.cloud.dial" + + "ogflow.cx.v3.CreateTestCaseRequest\032\'.goo" + + "gle.cloud.dialogflow.cx.v3.TestCase\"\\\202\323\344" + + "\223\002C\"6/v3/{parent=projects/*/locations/*/" + + "agents/*}/testCases:\ttest_case\332A\020parent," + + "test_case\022\334\001\n\016UpdateTestCase\0224.google.cl" + + "oud.dialogflow.cx.v3.UpdateTestCaseReque" + + "st\032\'.google.cloud.dialogflow.cx.v3.TestC" + + "ase\"k\202\323\344\223\002M2@/v3/{test_case.name=project" + + "s/*/locations/*/agents/*/testCases/*}:\tt" + + "est_case\332A\025test_case,update_mask\022\323\001\n\013Run" + + "TestCase\0221.google.cloud.dialogflow.cx.v3" + + ".RunTestCaseRequest\032\035.google.longrunning" + + ".Operation\"r\202\323\344\223\002?\":/v3/{name=projects/*" + + "/locations/*/agents/*/testCases/*}:run:\001" + + "*\312A*\n\023RunTestCaseResponse\022\023RunTestCaseMe" + + "tadata\022\361\001\n\021BatchRunTestCases\0227.google.cl" + + "oud.dialogflow.cx.v3.BatchRunTestCasesRe" + + "quest\032\035.google.longrunning.Operation\"\203\001\202" + + "\323\344\223\002D\"?/v3/{parent=projects/*/locations/" + + "*/agents/*}/testCases:batchRun:\001*\312A6\n\031Ba" + + "tchRunTestCasesResponse\022\031BatchRunTestCas" + + "esMetadata\022\327\001\n\021CalculateCoverage\0227.googl" + + "e.cloud.dialogflow.cx.v3.CalculateCovera" + + "geRequest\0328.google.cloud.dialogflow.cx.v" + + "3.CalculateCoverageResponse\"O\202\323\344\223\002I\022G/v3" + + "/{agent=projects/*/locations/*/agents/*}" + + "/testCases:calculateCoverage\022\346\001\n\017ImportT" + + "estCases\0225.google.cloud.dialogflow.cx.v3" + + ".ImportTestCasesRequest\032\035.google.longrun" + + "ning.Operation\"}\202\323\344\223\002B\"=/v3/{parent=proj" + + "ects/*/locations/*/agents/*}/testCases:i" + + "mport:\001*\312A2\n\027ImportTestCasesResponse\022\027Im" + + "portTestCasesMetadata\022\346\001\n\017ExportTestCase" + + "s\0225.google.cloud.dialogflow.cx.v3.Export" + + "TestCasesRequest\032\035.google.longrunning.Op" + + "eration\"}\202\323\344\223\002B\"=/v3/{parent=projects/*/" + + "locations/*/agents/*}/testCases:export:\001" + + "*\312A2\n\027ExportTestCasesResponse\022\027ExportTes" + + "tCasesMetadata\022\337\001\n\023ListTestCaseResults\0229" + + ".google.cloud.dialogflow.cx.v3.ListTestC" + + "aseResultsRequest\032:.google.cloud.dialogf" + + "low.cx.v3.ListTestCaseResultsResponse\"Q\202" + + "\323\344\223\002B\022@/v3/{parent=projects/*/locations/" + + "*/agents/*/testCases/*}/results\332A\006parent" + + "\032x\312A\031dialogflow.googleapis.com\322AYhttps:/" + + "/www.googleapis.com/auth/cloud-platform," + + "https://www.googleapis.com/auth/dialogfl" + + "owB\235\001\n!com.google.cloud.dialogflow.cx.v3" + + "B\rTestCaseProtoP\001Z?google.golang.org/gen" + + "proto/googleapis/cloud/dialogflow/cx/v3;" + + "cx\370\001\001\242\002\002DF\252\002\035Google.Cloud.Dialogflow.Cx." + + "V3b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -432,6 +461,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.cloud.dialogflow.cx.v3.PageProto.getDescriptor(), com.google.cloud.dialogflow.cx.v3.ResponseMessageProto.getDescriptor(), com.google.cloud.dialogflow.cx.v3.SessionProto.getDescriptor(), + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupProto.getDescriptor(), com.google.longrunning.OperationsProto.getDescriptor(), com.google.protobuf.EmptyProto.getDescriptor(), com.google.protobuf.FieldMaskProto.getDescriptor(), @@ -540,8 +570,36 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Source", "Index", "Target", "Covered", "TransitionRoute", "EventHandler", "Detail", }); - internal_static_google_cloud_dialogflow_cx_v3_IntentCoverage_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_TransitionRouteGroupCoverage_descriptor = getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_dialogflow_cx_v3_TransitionRouteGroupCoverage_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_TransitionRouteGroupCoverage_descriptor, + new java.lang.String[] { + "Coverages", "CoverageScore", + }); + internal_static_google_cloud_dialogflow_cx_v3_TransitionRouteGroupCoverage_Coverage_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_TransitionRouteGroupCoverage_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_dialogflow_cx_v3_TransitionRouteGroupCoverage_Coverage_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_TransitionRouteGroupCoverage_Coverage_descriptor, + new java.lang.String[] { + "RouteGroup", "Transitions", "CoverageScore", + }); + internal_static_google_cloud_dialogflow_cx_v3_TransitionRouteGroupCoverage_Coverage_Transition_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_TransitionRouteGroupCoverage_Coverage_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_dialogflow_cx_v3_TransitionRouteGroupCoverage_Coverage_Transition_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_TransitionRouteGroupCoverage_Coverage_Transition_descriptor, + new java.lang.String[] { + "TransitionRoute", "Covered", + }); + internal_static_google_cloud_dialogflow_cx_v3_IntentCoverage_descriptor = + getDescriptor().getMessageTypes().get(7); internal_static_google_cloud_dialogflow_cx_v3_IntentCoverage_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_IntentCoverage_descriptor, @@ -559,7 +617,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Intent", "Covered", }); internal_static_google_cloud_dialogflow_cx_v3_CalculateCoverageRequest_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageTypes().get(8); internal_static_google_cloud_dialogflow_cx_v3_CalculateCoverageRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_CalculateCoverageRequest_descriptor, @@ -567,15 +625,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Agent", "Type", }); internal_static_google_cloud_dialogflow_cx_v3_CalculateCoverageResponse_descriptor = - getDescriptor().getMessageTypes().get(8); + getDescriptor().getMessageTypes().get(9); internal_static_google_cloud_dialogflow_cx_v3_CalculateCoverageResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_CalculateCoverageResponse_descriptor, new java.lang.String[] { - "Agent", "IntentCoverage", "TransitionCoverage", "CoverageType", + "Agent", "IntentCoverage", "TransitionCoverage", "RouteGroupCoverage", "CoverageType", }); internal_static_google_cloud_dialogflow_cx_v3_ListTestCasesRequest_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageTypes().get(10); internal_static_google_cloud_dialogflow_cx_v3_ListTestCasesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_ListTestCasesRequest_descriptor, @@ -583,7 +641,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", "View", }); internal_static_google_cloud_dialogflow_cx_v3_ListTestCasesResponse_descriptor = - getDescriptor().getMessageTypes().get(10); + getDescriptor().getMessageTypes().get(11); internal_static_google_cloud_dialogflow_cx_v3_ListTestCasesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_ListTestCasesResponse_descriptor, @@ -591,7 +649,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "TestCases", "NextPageToken", }); internal_static_google_cloud_dialogflow_cx_v3_BatchDeleteTestCasesRequest_descriptor = - getDescriptor().getMessageTypes().get(11); + getDescriptor().getMessageTypes().get(12); internal_static_google_cloud_dialogflow_cx_v3_BatchDeleteTestCasesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_BatchDeleteTestCasesRequest_descriptor, @@ -599,7 +657,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "Names", }); internal_static_google_cloud_dialogflow_cx_v3_CreateTestCaseRequest_descriptor = - getDescriptor().getMessageTypes().get(12); + getDescriptor().getMessageTypes().get(13); internal_static_google_cloud_dialogflow_cx_v3_CreateTestCaseRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_CreateTestCaseRequest_descriptor, @@ -607,7 +665,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "TestCase", }); internal_static_google_cloud_dialogflow_cx_v3_UpdateTestCaseRequest_descriptor = - getDescriptor().getMessageTypes().get(13); + getDescriptor().getMessageTypes().get(14); internal_static_google_cloud_dialogflow_cx_v3_UpdateTestCaseRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_UpdateTestCaseRequest_descriptor, @@ -615,7 +673,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "TestCase", "UpdateMask", }); internal_static_google_cloud_dialogflow_cx_v3_GetTestCaseRequest_descriptor = - getDescriptor().getMessageTypes().get(14); + getDescriptor().getMessageTypes().get(15); internal_static_google_cloud_dialogflow_cx_v3_GetTestCaseRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_GetTestCaseRequest_descriptor, @@ -623,7 +681,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_dialogflow_cx_v3_RunTestCaseRequest_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageTypes().get(16); internal_static_google_cloud_dialogflow_cx_v3_RunTestCaseRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_RunTestCaseRequest_descriptor, @@ -631,7 +689,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "Environment", }); internal_static_google_cloud_dialogflow_cx_v3_RunTestCaseResponse_descriptor = - getDescriptor().getMessageTypes().get(16); + getDescriptor().getMessageTypes().get(17); internal_static_google_cloud_dialogflow_cx_v3_RunTestCaseResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_RunTestCaseResponse_descriptor, @@ -639,13 +697,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Result", }); internal_static_google_cloud_dialogflow_cx_v3_RunTestCaseMetadata_descriptor = - getDescriptor().getMessageTypes().get(17); + getDescriptor().getMessageTypes().get(18); internal_static_google_cloud_dialogflow_cx_v3_RunTestCaseMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_RunTestCaseMetadata_descriptor, new java.lang.String[] {}); internal_static_google_cloud_dialogflow_cx_v3_BatchRunTestCasesRequest_descriptor = - getDescriptor().getMessageTypes().get(18); + getDescriptor().getMessageTypes().get(19); internal_static_google_cloud_dialogflow_cx_v3_BatchRunTestCasesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_BatchRunTestCasesRequest_descriptor, @@ -653,7 +711,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "Environment", "TestCases", }); internal_static_google_cloud_dialogflow_cx_v3_BatchRunTestCasesResponse_descriptor = - getDescriptor().getMessageTypes().get(19); + getDescriptor().getMessageTypes().get(20); internal_static_google_cloud_dialogflow_cx_v3_BatchRunTestCasesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_BatchRunTestCasesResponse_descriptor, @@ -661,7 +719,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Results", }); internal_static_google_cloud_dialogflow_cx_v3_BatchRunTestCasesMetadata_descriptor = - getDescriptor().getMessageTypes().get(20); + getDescriptor().getMessageTypes().get(21); internal_static_google_cloud_dialogflow_cx_v3_BatchRunTestCasesMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_BatchRunTestCasesMetadata_descriptor, @@ -669,7 +727,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Errors", }); internal_static_google_cloud_dialogflow_cx_v3_TestError_descriptor = - getDescriptor().getMessageTypes().get(21); + getDescriptor().getMessageTypes().get(22); internal_static_google_cloud_dialogflow_cx_v3_TestError_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_TestError_descriptor, @@ -677,7 +735,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "TestCase", "Status", "TestTime", }); internal_static_google_cloud_dialogflow_cx_v3_ImportTestCasesRequest_descriptor = - getDescriptor().getMessageTypes().get(22); + getDescriptor().getMessageTypes().get(23); internal_static_google_cloud_dialogflow_cx_v3_ImportTestCasesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_ImportTestCasesRequest_descriptor, @@ -685,7 +743,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "GcsUri", "Content", "Source", }); internal_static_google_cloud_dialogflow_cx_v3_ImportTestCasesResponse_descriptor = - getDescriptor().getMessageTypes().get(23); + getDescriptor().getMessageTypes().get(24); internal_static_google_cloud_dialogflow_cx_v3_ImportTestCasesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_ImportTestCasesResponse_descriptor, @@ -693,7 +751,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Names", }); internal_static_google_cloud_dialogflow_cx_v3_ImportTestCasesMetadata_descriptor = - getDescriptor().getMessageTypes().get(24); + getDescriptor().getMessageTypes().get(25); internal_static_google_cloud_dialogflow_cx_v3_ImportTestCasesMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_ImportTestCasesMetadata_descriptor, @@ -701,7 +759,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Errors", }); internal_static_google_cloud_dialogflow_cx_v3_TestCaseError_descriptor = - getDescriptor().getMessageTypes().get(25); + getDescriptor().getMessageTypes().get(26); internal_static_google_cloud_dialogflow_cx_v3_TestCaseError_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_TestCaseError_descriptor, @@ -709,7 +767,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "TestCase", "Status", }); internal_static_google_cloud_dialogflow_cx_v3_ExportTestCasesRequest_descriptor = - getDescriptor().getMessageTypes().get(26); + getDescriptor().getMessageTypes().get(27); internal_static_google_cloud_dialogflow_cx_v3_ExportTestCasesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_ExportTestCasesRequest_descriptor, @@ -717,7 +775,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "GcsUri", "DataFormat", "Filter", "Destination", }); internal_static_google_cloud_dialogflow_cx_v3_ExportTestCasesResponse_descriptor = - getDescriptor().getMessageTypes().get(27); + getDescriptor().getMessageTypes().get(28); internal_static_google_cloud_dialogflow_cx_v3_ExportTestCasesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_ExportTestCasesResponse_descriptor, @@ -725,13 +783,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "GcsUri", "Content", "Destination", }); internal_static_google_cloud_dialogflow_cx_v3_ExportTestCasesMetadata_descriptor = - getDescriptor().getMessageTypes().get(28); + getDescriptor().getMessageTypes().get(29); internal_static_google_cloud_dialogflow_cx_v3_ExportTestCasesMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_ExportTestCasesMetadata_descriptor, new java.lang.String[] {}); internal_static_google_cloud_dialogflow_cx_v3_ListTestCaseResultsRequest_descriptor = - getDescriptor().getMessageTypes().get(29); + getDescriptor().getMessageTypes().get(30); internal_static_google_cloud_dialogflow_cx_v3_ListTestCaseResultsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_ListTestCaseResultsRequest_descriptor, @@ -739,7 +797,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", "Filter", }); internal_static_google_cloud_dialogflow_cx_v3_ListTestCaseResultsResponse_descriptor = - getDescriptor().getMessageTypes().get(30); + getDescriptor().getMessageTypes().get(31); internal_static_google_cloud_dialogflow_cx_v3_ListTestCaseResultsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_ListTestCaseResultsResponse_descriptor, @@ -767,6 +825,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.cloud.dialogflow.cx.v3.PageProto.getDescriptor(); com.google.cloud.dialogflow.cx.v3.ResponseMessageProto.getDescriptor(); com.google.cloud.dialogflow.cx.v3.SessionProto.getDescriptor(); + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupProto.getDescriptor(); com.google.longrunning.OperationsProto.getDescriptor(); com.google.protobuf.EmptyProto.getDescriptor(); com.google.protobuf.FieldMaskProto.getDescriptor(); diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionCoverage.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionCoverage.java index cfd9ee2be..a208c9fa6 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionCoverage.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionCoverage.java @@ -22,8 +22,9 @@ * * *
- * Transition coverage represents the percentage of all possible transitions
- * present within any of a parent's test cases.
+ * Transition coverage represents the percentage of all possible page
+ * transitions (page-level transition routes and event handlers, excluding
+ * transition route groups) present within any of a parent's test cases.
  * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3.TransitionCoverage} @@ -1554,7 +1555,7 @@ public interface TransitionOrBuilder * * *
-   * A transition in the agent's graph.
+   * A transition in a page.
    * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition} @@ -2244,7 +2245,7 @@ protected Builder newBuilderForType( * * *
-     * A transition in the agent's graph.
+     * A transition in a page.
      * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition} @@ -3728,8 +3729,9 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Transition coverage represents the percentage of all possible transitions
-   * present within any of a parent's test cases.
+   * Transition coverage represents the percentage of all possible page
+   * transitions (page-level transition routes and event handlers, excluding
+   * transition route groups) present within any of a parent's test cases.
    * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3.TransitionCoverage} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupCoverage.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupCoverage.java new file mode 100644 index 000000000..19e9bb3eb --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupCoverage.java @@ -0,0 +1,3637 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/test_case.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * Transition route group coverage represents the percentage of all possible
+ * transition routes present within any of a parent's test cases. The results
+ * are grouped by the transition route group.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage} + */ +public final class TransitionRouteGroupCoverage extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage) + TransitionRouteGroupCoverageOrBuilder { + private static final long serialVersionUID = 0L; + // Use TransitionRouteGroupCoverage.newBuilder() to construct. + private TransitionRouteGroupCoverage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TransitionRouteGroupCoverage() { + coverages_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TransitionRouteGroupCoverage(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TransitionRouteGroupCoverage( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + coverages_ = + new java.util.ArrayList< + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage>(); + mutable_bitField0_ |= 0x00000001; + } + coverages_.add( + input.readMessage( + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage + .parser(), + extensionRegistry)); + break; + } + case 21: + { + coverageScore_ = input.readFloat(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + coverages_ = java.util.Collections.unmodifiableList(coverages_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_TransitionRouteGroupCoverage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_TransitionRouteGroupCoverage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.class, + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Builder.class); + } + + public interface CoverageOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Transition route group metadata. Only name and displayName will be set.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionRouteGroup route_group = 1; + * + * @return Whether the routeGroup field is set. + */ + boolean hasRouteGroup(); + /** + * + * + *
+     * Transition route group metadata. Only name and displayName will be set.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionRouteGroup route_group = 1; + * + * @return The routeGroup. + */ + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroup getRouteGroup(); + /** + * + * + *
+     * Transition route group metadata. Only name and displayName will be set.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionRouteGroup route_group = 1; + */ + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupOrBuilder getRouteGroupOrBuilder(); + + /** + * + * + *
+     * The list of transition routes and coverage in the transition route group.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; + * + */ + java.util.List< + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition> + getTransitionsList(); + /** + * + * + *
+     * The list of transition routes and coverage in the transition route group.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; + * + */ + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition + getTransitions(int index); + /** + * + * + *
+     * The list of transition routes and coverage in the transition route group.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; + * + */ + int getTransitionsCount(); + /** + * + * + *
+     * The list of transition routes and coverage in the transition route group.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; + * + */ + java.util.List< + ? extends + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage + .TransitionOrBuilder> + getTransitionsOrBuilderList(); + /** + * + * + *
+     * The list of transition routes and coverage in the transition route group.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; + * + */ + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.TransitionOrBuilder + getTransitionsOrBuilder(int index); + + /** + * + * + *
+     * The percent of transition routes in the transition route group that are
+     * covered.
+     * 
+ * + * float coverage_score = 3; + * + * @return The coverageScore. + */ + float getCoverageScore(); + } + /** + * + * + *
+   * Coverage result message for one transition route group.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage} + */ + public static final class Coverage extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage) + CoverageOrBuilder { + private static final long serialVersionUID = 0L; + // Use Coverage.newBuilder() to construct. + private Coverage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Coverage() { + transitions_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Coverage(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Coverage( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.Builder subBuilder = null; + if (routeGroup_ != null) { + subBuilder = routeGroup_.toBuilder(); + } + routeGroup_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(routeGroup_); + routeGroup_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + transitions_ = + new java.util.ArrayList< + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage + .Transition>(); + mutable_bitField0_ |= 0x00000001; + } + transitions_.add( + input.readMessage( + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage + .Transition.parser(), + extensionRegistry)); + break; + } + case 29: + { + coverageScore_ = input.readFloat(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + transitions_ = java.util.Collections.unmodifiableList(transitions_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_TransitionRouteGroupCoverage_Coverage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_TransitionRouteGroupCoverage_Coverage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.class, + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Builder + .class); + } + + public interface TransitionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Intent route or condition route.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionRoute transition_route = 1; + * + * @return Whether the transitionRoute field is set. + */ + boolean hasTransitionRoute(); + /** + * + * + *
+       * Intent route or condition route.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionRoute transition_route = 1; + * + * @return The transitionRoute. + */ + com.google.cloud.dialogflow.cx.v3.TransitionRoute getTransitionRoute(); + /** + * + * + *
+       * Intent route or condition route.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionRoute transition_route = 1; + */ + com.google.cloud.dialogflow.cx.v3.TransitionRouteOrBuilder getTransitionRouteOrBuilder(); + + /** + * + * + *
+       * Whether or not the transition route is covered by at least one of the
+       * agent's test cases.
+       * 
+ * + * bool covered = 2; + * + * @return The covered. + */ + boolean getCovered(); + } + /** + * + * + *
+     * A transition coverage in a transition route group.
+     * 
+ * + * Protobuf type {@code + * google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition} + */ + public static final class Transition extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition) + TransitionOrBuilder { + private static final long serialVersionUID = 0L; + // Use Transition.newBuilder() to construct. + private Transition(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Transition() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Transition(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Transition( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.dialogflow.cx.v3.TransitionRoute.Builder subBuilder = null; + if (transitionRoute_ != null) { + subBuilder = transitionRoute_.toBuilder(); + } + transitionRoute_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.TransitionRoute.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(transitionRoute_); + transitionRoute_ = subBuilder.buildPartial(); + } + + break; + } + case 16: + { + covered_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_TransitionRouteGroupCoverage_Coverage_Transition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_TransitionRouteGroupCoverage_Coverage_Transition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition + .class, + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition + .Builder.class); + } + + public static final int TRANSITION_ROUTE_FIELD_NUMBER = 1; + private com.google.cloud.dialogflow.cx.v3.TransitionRoute transitionRoute_; + /** + * + * + *
+       * Intent route or condition route.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionRoute transition_route = 1; + * + * @return Whether the transitionRoute field is set. + */ + @java.lang.Override + public boolean hasTransitionRoute() { + return transitionRoute_ != null; + } + /** + * + * + *
+       * Intent route or condition route.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionRoute transition_route = 1; + * + * @return The transitionRoute. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TransitionRoute getTransitionRoute() { + return transitionRoute_ == null + ? com.google.cloud.dialogflow.cx.v3.TransitionRoute.getDefaultInstance() + : transitionRoute_; + } + /** + * + * + *
+       * Intent route or condition route.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionRoute transition_route = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TransitionRouteOrBuilder + getTransitionRouteOrBuilder() { + return getTransitionRoute(); + } + + public static final int COVERED_FIELD_NUMBER = 2; + private boolean covered_; + /** + * + * + *
+       * Whether or not the transition route is covered by at least one of the
+       * agent's test cases.
+       * 
+ * + * bool covered = 2; + * + * @return The covered. + */ + @java.lang.Override + public boolean getCovered() { + return covered_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (transitionRoute_ != null) { + output.writeMessage(1, getTransitionRoute()); + } + if (covered_ != false) { + output.writeBool(2, covered_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (transitionRoute_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTransitionRoute()); + } + if (covered_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, covered_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition other = + (com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition) + obj; + + if (hasTransitionRoute() != other.hasTransitionRoute()) return false; + if (hasTransitionRoute()) { + if (!getTransitionRoute().equals(other.getTransitionRoute())) return false; + } + if (getCovered() != other.getCovered()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasTransitionRoute()) { + hash = (37 * hash) + TRANSITION_ROUTE_FIELD_NUMBER; + hash = (53 * hash) + getTransitionRoute().hashCode(); + } + hash = (37 * hash) + COVERED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getCovered()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage + .Transition + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage + .Transition + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage + .Transition + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage + .Transition + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage + .Transition + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage + .Transition + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage + .Transition + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage + .Transition + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage + .Transition + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage + .Transition + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage + .Transition + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage + .Transition + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * A transition coverage in a transition route group.
+       * 
+ * + * Protobuf type {@code + * google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition) + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage + .TransitionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_TransitionRouteGroupCoverage_Coverage_Transition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_TransitionRouteGroupCoverage_Coverage_Transition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition + .class, + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition + .Builder.class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (transitionRouteBuilder_ == null) { + transitionRoute_ = null; + } else { + transitionRoute_ = null; + transitionRouteBuilder_ = null; + } + covered_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_TransitionRouteGroupCoverage_Coverage_Transition_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition + build() { + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition + buildPartial() { + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition + result = + new com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage + .Transition(this); + if (transitionRouteBuilder_ == null) { + result.transitionRoute_ = transitionRoute_; + } else { + result.transitionRoute_ = transitionRouteBuilder_.build(); + } + result.covered_ = covered_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition + other) { + if (other + == com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition + .getDefaultInstance()) return this; + if (other.hasTransitionRoute()) { + mergeTransitionRoute(other.getTransitionRoute()); + } + if (other.getCovered() != false) { + setCovered(other.getCovered()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.dialogflow.cx.v3.TransitionRoute transitionRoute_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TransitionRoute, + com.google.cloud.dialogflow.cx.v3.TransitionRoute.Builder, + com.google.cloud.dialogflow.cx.v3.TransitionRouteOrBuilder> + transitionRouteBuilder_; + /** + * + * + *
+         * Intent route or condition route.
+         * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionRoute transition_route = 1; + * + * @return Whether the transitionRoute field is set. + */ + public boolean hasTransitionRoute() { + return transitionRouteBuilder_ != null || transitionRoute_ != null; + } + /** + * + * + *
+         * Intent route or condition route.
+         * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionRoute transition_route = 1; + * + * @return The transitionRoute. + */ + public com.google.cloud.dialogflow.cx.v3.TransitionRoute getTransitionRoute() { + if (transitionRouteBuilder_ == null) { + return transitionRoute_ == null + ? com.google.cloud.dialogflow.cx.v3.TransitionRoute.getDefaultInstance() + : transitionRoute_; + } else { + return transitionRouteBuilder_.getMessage(); + } + } + /** + * + * + *
+         * Intent route or condition route.
+         * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionRoute transition_route = 1; + */ + public Builder setTransitionRoute(com.google.cloud.dialogflow.cx.v3.TransitionRoute value) { + if (transitionRouteBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transitionRoute_ = value; + onChanged(); + } else { + transitionRouteBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+         * Intent route or condition route.
+         * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionRoute transition_route = 1; + */ + public Builder setTransitionRoute( + com.google.cloud.dialogflow.cx.v3.TransitionRoute.Builder builderForValue) { + if (transitionRouteBuilder_ == null) { + transitionRoute_ = builderForValue.build(); + onChanged(); + } else { + transitionRouteBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+         * Intent route or condition route.
+         * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionRoute transition_route = 1; + */ + public Builder mergeTransitionRoute( + com.google.cloud.dialogflow.cx.v3.TransitionRoute value) { + if (transitionRouteBuilder_ == null) { + if (transitionRoute_ != null) { + transitionRoute_ = + com.google.cloud.dialogflow.cx.v3.TransitionRoute.newBuilder(transitionRoute_) + .mergeFrom(value) + .buildPartial(); + } else { + transitionRoute_ = value; + } + onChanged(); + } else { + transitionRouteBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+         * Intent route or condition route.
+         * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionRoute transition_route = 1; + */ + public Builder clearTransitionRoute() { + if (transitionRouteBuilder_ == null) { + transitionRoute_ = null; + onChanged(); + } else { + transitionRoute_ = null; + transitionRouteBuilder_ = null; + } + + return this; + } + /** + * + * + *
+         * Intent route or condition route.
+         * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionRoute transition_route = 1; + */ + public com.google.cloud.dialogflow.cx.v3.TransitionRoute.Builder + getTransitionRouteBuilder() { + + onChanged(); + return getTransitionRouteFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * Intent route or condition route.
+         * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionRoute transition_route = 1; + */ + public com.google.cloud.dialogflow.cx.v3.TransitionRouteOrBuilder + getTransitionRouteOrBuilder() { + if (transitionRouteBuilder_ != null) { + return transitionRouteBuilder_.getMessageOrBuilder(); + } else { + return transitionRoute_ == null + ? com.google.cloud.dialogflow.cx.v3.TransitionRoute.getDefaultInstance() + : transitionRoute_; + } + } + /** + * + * + *
+         * Intent route or condition route.
+         * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionRoute transition_route = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TransitionRoute, + com.google.cloud.dialogflow.cx.v3.TransitionRoute.Builder, + com.google.cloud.dialogflow.cx.v3.TransitionRouteOrBuilder> + getTransitionRouteFieldBuilder() { + if (transitionRouteBuilder_ == null) { + transitionRouteBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TransitionRoute, + com.google.cloud.dialogflow.cx.v3.TransitionRoute.Builder, + com.google.cloud.dialogflow.cx.v3.TransitionRouteOrBuilder>( + getTransitionRoute(), getParentForChildren(), isClean()); + transitionRoute_ = null; + } + return transitionRouteBuilder_; + } + + private boolean covered_; + /** + * + * + *
+         * Whether or not the transition route is covered by at least one of the
+         * agent's test cases.
+         * 
+ * + * bool covered = 2; + * + * @return The covered. + */ + @java.lang.Override + public boolean getCovered() { + return covered_; + } + /** + * + * + *
+         * Whether or not the transition route is covered by at least one of the
+         * agent's test cases.
+         * 
+ * + * bool covered = 2; + * + * @param value The covered to set. + * @return This builder for chaining. + */ + public Builder setCovered(boolean value) { + + covered_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Whether or not the transition route is covered by at least one of the
+         * agent's test cases.
+         * 
+ * + * bool covered = 2; + * + * @return This builder for chaining. + */ + public Builder clearCovered() { + + covered_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition) + private static final com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage + .Transition + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage + .Transition(); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage + .Transition + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Transition parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Transition(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int ROUTE_GROUP_FIELD_NUMBER = 1; + private com.google.cloud.dialogflow.cx.v3.TransitionRouteGroup routeGroup_; + /** + * + * + *
+     * Transition route group metadata. Only name and displayName will be set.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionRouteGroup route_group = 1; + * + * @return Whether the routeGroup field is set. + */ + @java.lang.Override + public boolean hasRouteGroup() { + return routeGroup_ != null; + } + /** + * + * + *
+     * Transition route group metadata. Only name and displayName will be set.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionRouteGroup route_group = 1; + * + * @return The routeGroup. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TransitionRouteGroup getRouteGroup() { + return routeGroup_ == null + ? com.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.getDefaultInstance() + : routeGroup_; + } + /** + * + * + *
+     * Transition route group metadata. Only name and displayName will be set.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionRouteGroup route_group = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupOrBuilder + getRouteGroupOrBuilder() { + return getRouteGroup(); + } + + public static final int TRANSITIONS_FIELD_NUMBER = 2; + private java.util.List< + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition> + transitions_; + /** + * + * + *
+     * The list of transition routes and coverage in the transition route group.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition> + getTransitionsList() { + return transitions_; + } + /** + * + * + *
+     * The list of transition routes and coverage in the transition route group.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage + .TransitionOrBuilder> + getTransitionsOrBuilderList() { + return transitions_; + } + /** + * + * + *
+     * The list of transition routes and coverage in the transition route group.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; + * + */ + @java.lang.Override + public int getTransitionsCount() { + return transitions_.size(); + } + /** + * + * + *
+     * The list of transition routes and coverage in the transition route group.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition + getTransitions(int index) { + return transitions_.get(index); + } + /** + * + * + *
+     * The list of transition routes and coverage in the transition route group.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage + .TransitionOrBuilder + getTransitionsOrBuilder(int index) { + return transitions_.get(index); + } + + public static final int COVERAGE_SCORE_FIELD_NUMBER = 3; + private float coverageScore_; + /** + * + * + *
+     * The percent of transition routes in the transition route group that are
+     * covered.
+     * 
+ * + * float coverage_score = 3; + * + * @return The coverageScore. + */ + @java.lang.Override + public float getCoverageScore() { + return coverageScore_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (routeGroup_ != null) { + output.writeMessage(1, getRouteGroup()); + } + for (int i = 0; i < transitions_.size(); i++) { + output.writeMessage(2, transitions_.get(i)); + } + if (coverageScore_ != 0F) { + output.writeFloat(3, coverageScore_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (routeGroup_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getRouteGroup()); + } + for (int i = 0; i < transitions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, transitions_.get(i)); + } + if (coverageScore_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, coverageScore_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage other = + (com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage) obj; + + if (hasRouteGroup() != other.hasRouteGroup()) return false; + if (hasRouteGroup()) { + if (!getRouteGroup().equals(other.getRouteGroup())) return false; + } + if (!getTransitionsList().equals(other.getTransitionsList())) return false; + if (java.lang.Float.floatToIntBits(getCoverageScore()) + != java.lang.Float.floatToIntBits(other.getCoverageScore())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasRouteGroup()) { + hash = (37 * hash) + ROUTE_GROUP_FIELD_NUMBER; + hash = (53 * hash) + getRouteGroup().hashCode(); + } + if (getTransitionsCount() > 0) { + hash = (37 * hash) + TRANSITIONS_FIELD_NUMBER; + hash = (53 * hash) + getTransitionsList().hashCode(); + } + hash = (37 * hash) + COVERAGE_SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getCoverageScore()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Coverage result message for one transition route group.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage) + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.CoverageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_TransitionRouteGroupCoverage_Coverage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_TransitionRouteGroupCoverage_Coverage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.class, + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Builder + .class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getTransitionsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (routeGroupBuilder_ == null) { + routeGroup_ = null; + } else { + routeGroup_ = null; + routeGroupBuilder_ = null; + } + if (transitionsBuilder_ == null) { + transitions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + transitionsBuilder_.clear(); + } + coverageScore_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_TransitionRouteGroupCoverage_Coverage_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage build() { + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage + buildPartial() { + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage result = + new com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage(this); + int from_bitField0_ = bitField0_; + if (routeGroupBuilder_ == null) { + result.routeGroup_ = routeGroup_; + } else { + result.routeGroup_ = routeGroupBuilder_.build(); + } + if (transitionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + transitions_ = java.util.Collections.unmodifiableList(transitions_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.transitions_ = transitions_; + } else { + result.transitions_ = transitionsBuilder_.build(); + } + result.coverageScore_ = coverageScore_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage other) { + if (other + == com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage + .getDefaultInstance()) return this; + if (other.hasRouteGroup()) { + mergeRouteGroup(other.getRouteGroup()); + } + if (transitionsBuilder_ == null) { + if (!other.transitions_.isEmpty()) { + if (transitions_.isEmpty()) { + transitions_ = other.transitions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTransitionsIsMutable(); + transitions_.addAll(other.transitions_); + } + onChanged(); + } + } else { + if (!other.transitions_.isEmpty()) { + if (transitionsBuilder_.isEmpty()) { + transitionsBuilder_.dispose(); + transitionsBuilder_ = null; + transitions_ = other.transitions_; + bitField0_ = (bitField0_ & ~0x00000001); + transitionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTransitionsFieldBuilder() + : null; + } else { + transitionsBuilder_.addAllMessages(other.transitions_); + } + } + } + if (other.getCoverageScore() != 0F) { + setCoverageScore(other.getCoverageScore()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.cloud.dialogflow.cx.v3.TransitionRouteGroup routeGroup_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroup, + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.Builder, + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupOrBuilder> + routeGroupBuilder_; + /** + * + * + *
+       * Transition route group metadata. Only name and displayName will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionRouteGroup route_group = 1; + * + * @return Whether the routeGroup field is set. + */ + public boolean hasRouteGroup() { + return routeGroupBuilder_ != null || routeGroup_ != null; + } + /** + * + * + *
+       * Transition route group metadata. Only name and displayName will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionRouteGroup route_group = 1; + * + * @return The routeGroup. + */ + public com.google.cloud.dialogflow.cx.v3.TransitionRouteGroup getRouteGroup() { + if (routeGroupBuilder_ == null) { + return routeGroup_ == null + ? com.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.getDefaultInstance() + : routeGroup_; + } else { + return routeGroupBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Transition route group metadata. Only name and displayName will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionRouteGroup route_group = 1; + */ + public Builder setRouteGroup(com.google.cloud.dialogflow.cx.v3.TransitionRouteGroup value) { + if (routeGroupBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + routeGroup_ = value; + onChanged(); + } else { + routeGroupBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Transition route group metadata. Only name and displayName will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionRouteGroup route_group = 1; + */ + public Builder setRouteGroup( + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.Builder builderForValue) { + if (routeGroupBuilder_ == null) { + routeGroup_ = builderForValue.build(); + onChanged(); + } else { + routeGroupBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Transition route group metadata. Only name and displayName will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionRouteGroup route_group = 1; + */ + public Builder mergeRouteGroup(com.google.cloud.dialogflow.cx.v3.TransitionRouteGroup value) { + if (routeGroupBuilder_ == null) { + if (routeGroup_ != null) { + routeGroup_ = + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.newBuilder(routeGroup_) + .mergeFrom(value) + .buildPartial(); + } else { + routeGroup_ = value; + } + onChanged(); + } else { + routeGroupBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Transition route group metadata. Only name and displayName will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionRouteGroup route_group = 1; + */ + public Builder clearRouteGroup() { + if (routeGroupBuilder_ == null) { + routeGroup_ = null; + onChanged(); + } else { + routeGroup_ = null; + routeGroupBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Transition route group metadata. Only name and displayName will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionRouteGroup route_group = 1; + */ + public com.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.Builder getRouteGroupBuilder() { + + onChanged(); + return getRouteGroupFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Transition route group metadata. Only name and displayName will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionRouteGroup route_group = 1; + */ + public com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupOrBuilder + getRouteGroupOrBuilder() { + if (routeGroupBuilder_ != null) { + return routeGroupBuilder_.getMessageOrBuilder(); + } else { + return routeGroup_ == null + ? com.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.getDefaultInstance() + : routeGroup_; + } + } + /** + * + * + *
+       * Transition route group metadata. Only name and displayName will be set.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.TransitionRouteGroup route_group = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroup, + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.Builder, + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupOrBuilder> + getRouteGroupFieldBuilder() { + if (routeGroupBuilder_ == null) { + routeGroupBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroup, + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.Builder, + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupOrBuilder>( + getRouteGroup(), getParentForChildren(), isClean()); + routeGroup_ = null; + } + return routeGroupBuilder_; + } + + private java.util.List< + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition> + transitions_ = java.util.Collections.emptyList(); + + private void ensureTransitionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + transitions_ = + new java.util.ArrayList< + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage + .Transition>(transitions_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition, + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition + .Builder, + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage + .TransitionOrBuilder> + transitionsBuilder_; + + /** + * + * + *
+       * The list of transition routes and coverage in the transition route group.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; + * + */ + public java.util.List< + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition> + getTransitionsList() { + if (transitionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(transitions_); + } else { + return transitionsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * The list of transition routes and coverage in the transition route group.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; + * + */ + public int getTransitionsCount() { + if (transitionsBuilder_ == null) { + return transitions_.size(); + } else { + return transitionsBuilder_.getCount(); + } + } + /** + * + * + *
+       * The list of transition routes and coverage in the transition route group.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition + getTransitions(int index) { + if (transitionsBuilder_ == null) { + return transitions_.get(index); + } else { + return transitionsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * The list of transition routes and coverage in the transition route group.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; + * + */ + public Builder setTransitions( + int index, + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition + value) { + if (transitionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTransitionsIsMutable(); + transitions_.set(index, value); + onChanged(); + } else { + transitionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * The list of transition routes and coverage in the transition route group.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; + * + */ + public Builder setTransitions( + int index, + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition.Builder + builderForValue) { + if (transitionsBuilder_ == null) { + ensureTransitionsIsMutable(); + transitions_.set(index, builderForValue.build()); + onChanged(); + } else { + transitionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The list of transition routes and coverage in the transition route group.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; + * + */ + public Builder addTransitions( + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition + value) { + if (transitionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTransitionsIsMutable(); + transitions_.add(value); + onChanged(); + } else { + transitionsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * The list of transition routes and coverage in the transition route group.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; + * + */ + public Builder addTransitions( + int index, + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition + value) { + if (transitionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTransitionsIsMutable(); + transitions_.add(index, value); + onChanged(); + } else { + transitionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * The list of transition routes and coverage in the transition route group.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; + * + */ + public Builder addTransitions( + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition.Builder + builderForValue) { + if (transitionsBuilder_ == null) { + ensureTransitionsIsMutable(); + transitions_.add(builderForValue.build()); + onChanged(); + } else { + transitionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The list of transition routes and coverage in the transition route group.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; + * + */ + public Builder addTransitions( + int index, + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition.Builder + builderForValue) { + if (transitionsBuilder_ == null) { + ensureTransitionsIsMutable(); + transitions_.add(index, builderForValue.build()); + onChanged(); + } else { + transitionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The list of transition routes and coverage in the transition route group.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; + * + */ + public Builder addAllTransitions( + java.lang.Iterable< + ? extends + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage + .Transition> + values) { + if (transitionsBuilder_ == null) { + ensureTransitionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, transitions_); + onChanged(); + } else { + transitionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * The list of transition routes and coverage in the transition route group.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; + * + */ + public Builder clearTransitions() { + if (transitionsBuilder_ == null) { + transitions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + transitionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * The list of transition routes and coverage in the transition route group.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; + * + */ + public Builder removeTransitions(int index) { + if (transitionsBuilder_ == null) { + ensureTransitionsIsMutable(); + transitions_.remove(index); + onChanged(); + } else { + transitionsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * The list of transition routes and coverage in the transition route group.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition + .Builder + getTransitionsBuilder(int index) { + return getTransitionsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * The list of transition routes and coverage in the transition route group.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage + .TransitionOrBuilder + getTransitionsOrBuilder(int index) { + if (transitionsBuilder_ == null) { + return transitions_.get(index); + } else { + return transitionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * The list of transition routes and coverage in the transition route group.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; + * + */ + public java.util.List< + ? extends + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage + .TransitionOrBuilder> + getTransitionsOrBuilderList() { + if (transitionsBuilder_ != null) { + return transitionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(transitions_); + } + } + /** + * + * + *
+       * The list of transition routes and coverage in the transition route group.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition + .Builder + addTransitionsBuilder() { + return getTransitionsFieldBuilder() + .addBuilder( + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition + .getDefaultInstance()); + } + /** + * + * + *
+       * The list of transition routes and coverage in the transition route group.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition + .Builder + addTransitionsBuilder(int index) { + return getTransitionsFieldBuilder() + .addBuilder( + index, + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition + .getDefaultInstance()); + } + /** + * + * + *
+       * The list of transition routes and coverage in the transition route group.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; + * + */ + public java.util.List< + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition + .Builder> + getTransitionsBuilderList() { + return getTransitionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition, + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition + .Builder, + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage + .TransitionOrBuilder> + getTransitionsFieldBuilder() { + if (transitionsBuilder_ == null) { + transitionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage + .Transition, + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition + .Builder, + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage + .TransitionOrBuilder>( + transitions_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + transitions_ = null; + } + return transitionsBuilder_; + } + + private float coverageScore_; + /** + * + * + *
+       * The percent of transition routes in the transition route group that are
+       * covered.
+       * 
+ * + * float coverage_score = 3; + * + * @return The coverageScore. + */ + @java.lang.Override + public float getCoverageScore() { + return coverageScore_; + } + /** + * + * + *
+       * The percent of transition routes in the transition route group that are
+       * covered.
+       * 
+ * + * float coverage_score = 3; + * + * @param value The coverageScore to set. + * @return This builder for chaining. + */ + public Builder setCoverageScore(float value) { + + coverageScore_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The percent of transition routes in the transition route group that are
+       * covered.
+       * 
+ * + * float coverage_score = 3; + * + * @return This builder for chaining. + */ + public Builder clearCoverageScore() { + + coverageScore_ = 0F; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage) + private static final com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage(); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Coverage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Coverage(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int COVERAGES_FIELD_NUMBER = 1; + private java.util.List + coverages_; + /** + * + * + *
+   * Transition route group coverages.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage coverages = 1; + * + */ + @java.lang.Override + public java.util.List + getCoveragesList() { + return coverages_; + } + /** + * + * + *
+   * Transition route group coverages.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage coverages = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.CoverageOrBuilder> + getCoveragesOrBuilderList() { + return coverages_; + } + /** + * + * + *
+   * Transition route group coverages.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage coverages = 1; + * + */ + @java.lang.Override + public int getCoveragesCount() { + return coverages_.size(); + } + /** + * + * + *
+   * Transition route group coverages.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage coverages = 1; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage getCoverages( + int index) { + return coverages_.get(index); + } + /** + * + * + *
+   * Transition route group coverages.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage coverages = 1; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.CoverageOrBuilder + getCoveragesOrBuilder(int index) { + return coverages_.get(index); + } + + public static final int COVERAGE_SCORE_FIELD_NUMBER = 2; + private float coverageScore_; + /** + * + * + *
+   * The percent of transition routes in all the transition route groups that
+   * are covered.
+   * 
+ * + * float coverage_score = 2; + * + * @return The coverageScore. + */ + @java.lang.Override + public float getCoverageScore() { + return coverageScore_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < coverages_.size(); i++) { + output.writeMessage(1, coverages_.get(i)); + } + if (coverageScore_ != 0F) { + output.writeFloat(2, coverageScore_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < coverages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, coverages_.get(i)); + } + if (coverageScore_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, coverageScore_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage other = + (com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage) obj; + + if (!getCoveragesList().equals(other.getCoveragesList())) return false; + if (java.lang.Float.floatToIntBits(getCoverageScore()) + != java.lang.Float.floatToIntBits(other.getCoverageScore())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getCoveragesCount() > 0) { + hash = (37 * hash) + COVERAGES_FIELD_NUMBER; + hash = (53 * hash) + getCoveragesList().hashCode(); + } + hash = (37 * hash) + COVERAGE_SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getCoverageScore()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Transition route group coverage represents the percentage of all possible
+   * transition routes present within any of a parent's test cases. The results
+   * are grouped by the transition route group.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage) + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_TransitionRouteGroupCoverage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_TransitionRouteGroupCoverage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.class, + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCoveragesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (coveragesBuilder_ == null) { + coverages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + coveragesBuilder_.clear(); + } + coverageScore_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.TestCaseProto + .internal_static_google_cloud_dialogflow_cx_v3_TransitionRouteGroupCoverage_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage build() { + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage buildPartial() { + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage result = + new com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage(this); + int from_bitField0_ = bitField0_; + if (coveragesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + coverages_ = java.util.Collections.unmodifiableList(coverages_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.coverages_ = coverages_; + } else { + result.coverages_ = coveragesBuilder_.build(); + } + result.coverageScore_ = coverageScore_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage other) { + if (other + == com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.getDefaultInstance()) + return this; + if (coveragesBuilder_ == null) { + if (!other.coverages_.isEmpty()) { + if (coverages_.isEmpty()) { + coverages_ = other.coverages_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureCoveragesIsMutable(); + coverages_.addAll(other.coverages_); + } + onChanged(); + } + } else { + if (!other.coverages_.isEmpty()) { + if (coveragesBuilder_.isEmpty()) { + coveragesBuilder_.dispose(); + coveragesBuilder_ = null; + coverages_ = other.coverages_; + bitField0_ = (bitField0_ & ~0x00000001); + coveragesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getCoveragesFieldBuilder() + : null; + } else { + coveragesBuilder_.addAllMessages(other.coverages_); + } + } + } + if (other.getCoverageScore() != 0F) { + setCoverageScore(other.getCoverageScore()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List + coverages_ = java.util.Collections.emptyList(); + + private void ensureCoveragesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + coverages_ = + new java.util.ArrayList< + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage>( + coverages_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage, + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Builder, + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.CoverageOrBuilder> + coveragesBuilder_; + + /** + * + * + *
+     * Transition route group coverages.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage coverages = 1; + * + */ + public java.util.List + getCoveragesList() { + if (coveragesBuilder_ == null) { + return java.util.Collections.unmodifiableList(coverages_); + } else { + return coveragesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Transition route group coverages.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage coverages = 1; + * + */ + public int getCoveragesCount() { + if (coveragesBuilder_ == null) { + return coverages_.size(); + } else { + return coveragesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Transition route group coverages.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage coverages = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage getCoverages( + int index) { + if (coveragesBuilder_ == null) { + return coverages_.get(index); + } else { + return coveragesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Transition route group coverages.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage coverages = 1; + * + */ + public Builder setCoverages( + int index, com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage value) { + if (coveragesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCoveragesIsMutable(); + coverages_.set(index, value); + onChanged(); + } else { + coveragesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Transition route group coverages.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage coverages = 1; + * + */ + public Builder setCoverages( + int index, + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Builder + builderForValue) { + if (coveragesBuilder_ == null) { + ensureCoveragesIsMutable(); + coverages_.set(index, builderForValue.build()); + onChanged(); + } else { + coveragesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Transition route group coverages.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage coverages = 1; + * + */ + public Builder addCoverages( + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage value) { + if (coveragesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCoveragesIsMutable(); + coverages_.add(value); + onChanged(); + } else { + coveragesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Transition route group coverages.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage coverages = 1; + * + */ + public Builder addCoverages( + int index, com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage value) { + if (coveragesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCoveragesIsMutable(); + coverages_.add(index, value); + onChanged(); + } else { + coveragesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Transition route group coverages.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage coverages = 1; + * + */ + public Builder addCoverages( + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Builder + builderForValue) { + if (coveragesBuilder_ == null) { + ensureCoveragesIsMutable(); + coverages_.add(builderForValue.build()); + onChanged(); + } else { + coveragesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Transition route group coverages.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage coverages = 1; + * + */ + public Builder addCoverages( + int index, + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Builder + builderForValue) { + if (coveragesBuilder_ == null) { + ensureCoveragesIsMutable(); + coverages_.add(index, builderForValue.build()); + onChanged(); + } else { + coveragesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Transition route group coverages.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage coverages = 1; + * + */ + public Builder addAllCoverages( + java.lang.Iterable< + ? extends com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage> + values) { + if (coveragesBuilder_ == null) { + ensureCoveragesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, coverages_); + onChanged(); + } else { + coveragesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Transition route group coverages.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage coverages = 1; + * + */ + public Builder clearCoverages() { + if (coveragesBuilder_ == null) { + coverages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + coveragesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Transition route group coverages.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage coverages = 1; + * + */ + public Builder removeCoverages(int index) { + if (coveragesBuilder_ == null) { + ensureCoveragesIsMutable(); + coverages_.remove(index); + onChanged(); + } else { + coveragesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Transition route group coverages.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage coverages = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Builder + getCoveragesBuilder(int index) { + return getCoveragesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Transition route group coverages.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage coverages = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.CoverageOrBuilder + getCoveragesOrBuilder(int index) { + if (coveragesBuilder_ == null) { + return coverages_.get(index); + } else { + return coveragesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Transition route group coverages.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage coverages = 1; + * + */ + public java.util.List< + ? extends + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.CoverageOrBuilder> + getCoveragesOrBuilderList() { + if (coveragesBuilder_ != null) { + return coveragesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(coverages_); + } + } + /** + * + * + *
+     * Transition route group coverages.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage coverages = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Builder + addCoveragesBuilder() { + return getCoveragesFieldBuilder() + .addBuilder( + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage + .getDefaultInstance()); + } + /** + * + * + *
+     * Transition route group coverages.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage coverages = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Builder + addCoveragesBuilder(int index) { + return getCoveragesFieldBuilder() + .addBuilder( + index, + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage + .getDefaultInstance()); + } + /** + * + * + *
+     * Transition route group coverages.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage coverages = 1; + * + */ + public java.util.List< + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Builder> + getCoveragesBuilderList() { + return getCoveragesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage, + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Builder, + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.CoverageOrBuilder> + getCoveragesFieldBuilder() { + if (coveragesBuilder_ == null) { + coveragesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage, + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Builder, + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.CoverageOrBuilder>( + coverages_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + coverages_ = null; + } + return coveragesBuilder_; + } + + private float coverageScore_; + /** + * + * + *
+     * The percent of transition routes in all the transition route groups that
+     * are covered.
+     * 
+ * + * float coverage_score = 2; + * + * @return The coverageScore. + */ + @java.lang.Override + public float getCoverageScore() { + return coverageScore_; + } + /** + * + * + *
+     * The percent of transition routes in all the transition route groups that
+     * are covered.
+     * 
+ * + * float coverage_score = 2; + * + * @param value The coverageScore to set. + * @return This builder for chaining. + */ + public Builder setCoverageScore(float value) { + + coverageScore_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The percent of transition routes in all the transition route groups that
+     * are covered.
+     * 
+ * + * float coverage_score = 2; + * + * @return This builder for chaining. + */ + public Builder clearCoverageScore() { + + coverageScore_ = 0F; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage) + private static final com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage(); + } + + public static com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TransitionRouteGroupCoverage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TransitionRouteGroupCoverage(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupCoverageOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupCoverageOrBuilder.java new file mode 100644 index 000000000..6f76a8171 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupCoverageOrBuilder.java @@ -0,0 +1,105 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/test_case.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface TransitionRouteGroupCoverageOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Transition route group coverages.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage coverages = 1; + * + */ + java.util.List + getCoveragesList(); + /** + * + * + *
+   * Transition route group coverages.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage coverages = 1; + * + */ + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage getCoverages(int index); + /** + * + * + *
+   * Transition route group coverages.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage coverages = 1; + * + */ + int getCoveragesCount(); + /** + * + * + *
+   * Transition route group coverages.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage coverages = 1; + * + */ + java.util.List< + ? extends + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.CoverageOrBuilder> + getCoveragesOrBuilderList(); + /** + * + * + *
+   * Transition route group coverages.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage coverages = 1; + * + */ + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.CoverageOrBuilder + getCoveragesOrBuilder(int index); + + /** + * + * + *
+   * The percent of transition routes in all the transition route groups that
+   * are covered.
+   * 
+ * + * float coverage_score = 2; + * + * @return The coverageScore. + */ + float getCoverageScore(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/agent.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/agent.proto index 41c783e98..29ad329ae 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/agent.proto +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/agent.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/audio_config.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/audio_config.proto index ff09fd67b..95b001d59 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/audio_config.proto +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/audio_config.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/entity_type.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/entity_type.proto index 3e7f4e361..16fdbebae 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/entity_type.proto +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/entity_type.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/environment.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/environment.proto index 962e6a856..e04f1b9ba 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/environment.proto +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/environment.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/experiment.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/experiment.proto index 712fcf404..399ec1c27 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/experiment.proto +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/experiment.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/flow.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/flow.proto index 46c987160..068eb7f83 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/flow.proto +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/flow.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/fulfillment.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/fulfillment.proto index 91181c727..0f04f6836 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/fulfillment.proto +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/fulfillment.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/intent.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/intent.proto index 519cbd09d..3f2027160 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/intent.proto +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/intent.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/page.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/page.proto index 8b8ded665..4d5fc75a5 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/page.proto +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/page.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/response_message.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/response_message.proto index fb54ec9b6..53b720a67 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/response_message.proto +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/response_message.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/security_settings.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/security_settings.proto index 4427effde..a5154bdd2 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/security_settings.proto +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/security_settings.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/session.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/session.proto index 55de80b91..425028506 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/session.proto +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/session.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/session_entity_type.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/session_entity_type.proto index e7b327f24..8500bd03b 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/session_entity_type.proto +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/session_entity_type.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/test_case.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/test_case.proto index 3707cc3ad..baa1aff62 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/test_case.proto +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/test_case.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,6 +25,7 @@ import "google/cloud/dialogflow/cx/v3/intent.proto"; import "google/cloud/dialogflow/cx/v3/page.proto"; import "google/cloud/dialogflow/cx/v3/response_message.proto"; import "google/cloud/dialogflow/cx/v3/session.proto"; +import "google/cloud/dialogflow/cx/v3/transition_route_group.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; @@ -94,7 +95,7 @@ service TestCases { // Kicks off a test case run. rpc RunTestCase(RunTestCaseRequest) returns (google.longrunning.Operation) { option (google.api.http) = { - post: "/v3/projects/*/locations/*/agents/*/testCases:run" + post: "/v3/{name=projects/*/locations/*/agents/*/testCases/*}:run" body: "*" }; option (google.longrunning.operation_info) = { @@ -277,12 +278,12 @@ message ConversationTurn { (google.api.field_behavior) = INPUT_ONLY ]; - // The [Intent][google.cloud.dialogflow.cx.v3.Intent] that triggered the response. Only some fields such as - // name and displayname will be set. + // The [Intent][google.cloud.dialogflow.cx.v3.Intent] that triggered the response. Only name and displayName + // will be set. Intent triggered_intent = 7; - // The [Page][google.cloud.dialogflow.cx.v3.Page] on which the utterance was spoken. Only some fields such as - // name and displayname will be set. + // The [Page][google.cloud.dialogflow.cx.v3.Page] on which the utterance was spoken. Only name and displayName + // will be set. Page current_page = 8; // The [text][google.cloud.dialogflow.cx.v3.ResponseMessage.Text] responses from the agent for the turn. @@ -327,8 +328,9 @@ message TestRunDifference { string description = 2; } -// Transition coverage represents the percentage of all possible transitions -// present within any of a parent's test cases. +// Transition coverage represents the percentage of all possible page +// transitions (page-level transition routes and event handlers, excluding +// transition route groups) present within any of a parent's test cases. message TransitionCoverage { // The source or target of a transition. message TransitionNode { @@ -344,7 +346,7 @@ message TransitionCoverage { } } - // A transition in the agent's graph. + // A transition in a page. message Transition { // The start node of a transition. TransitionNode source = 1; @@ -376,6 +378,41 @@ message TransitionCoverage { float coverage_score = 2; } +// Transition route group coverage represents the percentage of all possible +// transition routes present within any of a parent's test cases. The results +// are grouped by the transition route group. +message TransitionRouteGroupCoverage { + // Coverage result message for one transition route group. + message Coverage { + // A transition coverage in a transition route group. + message Transition { + // Intent route or condition route. + TransitionRoute transition_route = 1; + + // Whether or not the transition route is covered by at least one of the + // agent's test cases. + bool covered = 2; + } + + // Transition route group metadata. Only name and displayName will be set. + TransitionRouteGroup route_group = 1; + + // The list of transition routes and coverage in the transition route group. + repeated Transition transitions = 2; + + // The percent of transition routes in the transition route group that are + // covered. + float coverage_score = 3; + } + + // Transition route group coverages. + repeated Coverage coverages = 1; + + // The percent of transition routes in all the transition route groups that + // are covered. + float coverage_score = 2; +} + // Intent coverage represents the percentage of all possible intents in the // agent that are triggered in any of a parent's test cases. message IntentCoverage { @@ -408,8 +445,11 @@ message CalculateCoverageRequest { // Intent coverage. INTENT = 1; - // Page transition coverage + // Page transition coverage. PAGE_TRANSITION = 2; + + // Transition route group coverage. + TRANSITION_ROUTE_GROUP = 3; } // Required. The agent to calculate coverage for. @@ -438,8 +478,11 @@ message CalculateCoverageResponse { // Intent coverage. IntentCoverage intent_coverage = 2; - // Transition coverage. + // Transition (excluding transition route groups) coverage. TransitionCoverage transition_coverage = 4; + + // Transition route group coverage. + TransitionRouteGroupCoverage route_group_coverage = 6; } } diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/transition_route_group.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/transition_route_group.proto index 8f1f9debd..a2c73914e 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/transition_route_group.proto +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/transition_route_group.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/validation_message.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/validation_message.proto index 8f98efae3..f36c9bb9d 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/validation_message.proto +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/validation_message.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/version.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/version.proto index 3850fd26d..a3a992025 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/version.proto +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/version.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/webhook.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/webhook.proto index 684580bfd..eb0863642 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/webhook.proto +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/webhook.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/synth.metadata b/synth.metadata index d9096a39d..72dd53785 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,16 +11,16 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "38d77abda7059f562774af4ea4107415224d2674", - "internalRef": "357757017" + "sha": "2bea43cdc7a4443876380732980d83cd8d560582", + "internalRef": "357788001" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "38d77abda7059f562774af4ea4107415224d2674", - "internalRef": "357757017" + "sha": "2bea43cdc7a4443876380732980d83cd8d560582", + "internalRef": "357788001" } }, { @@ -729,6 +729,8 @@ "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionCoverageOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRoute.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroup.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupCoverage.java", + "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupCoverageOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupName.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupProto.java", From 6b0c1a156a4dc36324b25b1c62c1333b8f12f107 Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Tue, 16 Feb 2021 19:32:45 -0800 Subject: [PATCH 12/12] chore: update gapic-generator-java to 0.0.20 Committer: @miraleung PiperOrigin-RevId: 357800868 Source-Author: Google APIs Source-Date: Tue Feb 16 14:06:04 2021 -0800 Source-Repo: googleapis/googleapis Source-Sha: e8bc4471a88ac5f60defe3ed436f517174e59ba0 Source-Link: https://github.com/googleapis/googleapis/commit/e8bc4471a88ac5f60defe3ed436f517174e59ba0 --- .../cloud/dialogflow/cx/v3/IntentsClient.java | 2 + .../dialogflow/cx/v3/stub/GrpcAgentsStub.java | 12 +++ .../cx/v3/stub/GrpcEntityTypesStub.java | 6 ++ .../cx/v3/stub/GrpcEnvironmentsStub.java | 10 +++ .../cx/v3/stub/GrpcExperimentsStub.java | 8 ++ .../dialogflow/cx/v3/stub/GrpcFlowsStub.java | 10 +++ .../cx/v3/stub/GrpcIntentsStub.java | 6 ++ .../dialogflow/cx/v3/stub/GrpcPagesStub.java | 6 ++ .../stub/GrpcSecuritySettingsServiceStub.java | 6 ++ .../v3/stub/GrpcSessionEntityTypesStub.java | 6 ++ .../cx/v3/stub/GrpcSessionsStub.java | 4 + .../cx/v3/stub/GrpcTestCasesStub.java | 17 ++++ .../stub/GrpcTransitionRouteGroupsStub.java | 6 ++ .../cx/v3/stub/GrpcVersionsStub.java | 9 ++ .../cx/v3/stub/GrpcWebhooksStub.java | 6 ++ .../dialogflow/cx/v3beta1/IntentsClient.java | 2 + .../cx/v3beta1/stub/GrpcAgentsStub.java | 12 +++ .../cx/v3beta1/stub/GrpcEntityTypesStub.java | 6 ++ .../cx/v3beta1/stub/GrpcEnvironmentsStub.java | 10 +++ .../cx/v3beta1/stub/GrpcExperimentsStub.java | 8 ++ .../cx/v3beta1/stub/GrpcFlowsStub.java | 10 +++ .../cx/v3beta1/stub/GrpcIntentsStub.java | 6 ++ .../cx/v3beta1/stub/GrpcPagesStub.java | 6 ++ .../stub/GrpcSecuritySettingsServiceStub.java | 6 ++ .../stub/GrpcSessionEntityTypesStub.java | 6 ++ .../cx/v3beta1/stub/GrpcSessionsStub.java | 4 + .../cx/v3beta1/stub/GrpcTestCasesStub.java | 17 ++++ .../stub/GrpcTransitionRouteGroupsStub.java | 6 ++ .../cx/v3beta1/stub/GrpcVersionsStub.java | 9 ++ .../cx/v3beta1/stub/GrpcWebhooksStub.java | 6 ++ .../dialogflow/cx/v3/MockAgentsImpl.java | 72 +++++++++++++-- .../dialogflow/cx/v3/MockEntityTypesImpl.java | 40 +++++++-- .../cx/v3/MockEnvironmentsImpl.java | 48 ++++++++-- .../dialogflow/cx/v3/MockExperimentsImpl.java | 56 ++++++++++-- .../cloud/dialogflow/cx/v3/MockFlowsImpl.java | 58 ++++++++++-- .../dialogflow/cx/v3/MockIntentsImpl.java | 40 +++++++-- .../cloud/dialogflow/cx/v3/MockPagesImpl.java | 34 +++++-- .../v3/MockSecuritySettingsServiceImpl.java | 40 +++++++-- .../cx/v3/MockSessionEntityTypesImpl.java | 40 +++++++-- .../dialogflow/cx/v3/MockSessionsImpl.java | 32 ++++++- .../dialogflow/cx/v3/MockTestCasesImpl.java | 88 ++++++++++++++++--- .../cx/v3/MockTransitionRouteGroupsImpl.java | 40 +++++++-- .../dialogflow/cx/v3/MockVersionsImpl.java | 48 ++++++++-- .../dialogflow/cx/v3/MockWebhooksImpl.java | 40 +++++++-- .../dialogflow/cx/v3beta1/MockAgentsImpl.java | 72 +++++++++++++-- .../cx/v3beta1/MockEntityTypesImpl.java | 40 +++++++-- .../cx/v3beta1/MockEnvironmentsImpl.java | 48 ++++++++-- .../cx/v3beta1/MockExperimentsImpl.java | 56 ++++++++++-- .../dialogflow/cx/v3beta1/MockFlowsImpl.java | 58 ++++++++++-- .../cx/v3beta1/MockIntentsImpl.java | 40 +++++++-- .../dialogflow/cx/v3beta1/MockPagesImpl.java | 34 +++++-- .../MockSecuritySettingsServiceImpl.java | 40 +++++++-- .../v3beta1/MockSessionEntityTypesImpl.java | 40 +++++++-- .../cx/v3beta1/MockSessionsImpl.java | 32 ++++++- .../cx/v3beta1/MockTestCasesImpl.java | 88 ++++++++++++++++--- .../MockTransitionRouteGroupsImpl.java | 40 +++++++-- .../cx/v3beta1/MockVersionsImpl.java | 48 ++++++++-- .../cx/v3beta1/MockWebhooksImpl.java | 40 +++++++-- synth.metadata | 8 +- 59 files changed, 1412 insertions(+), 176 deletions(-) diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/IntentsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/IntentsClient.java index c6f18d644..35687d8f3 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/IntentsClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/IntentsClient.java @@ -209,6 +209,7 @@ public final ListIntentsPagedResponse listIntents(String parent) { * ListIntentsRequest.newBuilder() * .setParent(IntentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[INTENT]").toString()) * .setLanguageCode("languageCode-2092349083") + * .setIntentView(IntentView.forNumber(0)) * .setPageSize(883849137) * .setPageToken("pageToken873572522") * .build(); @@ -237,6 +238,7 @@ public final ListIntentsPagedResponse listIntents(ListIntentsRequest request) { * ListIntentsRequest.newBuilder() * .setParent(IntentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[INTENT]").toString()) * .setLanguageCode("languageCode-2092349083") + * .setIntentView(IntentView.forNumber(0)) * .setPageSize(883849137) * .setPageToken("pageToken873572522") * .build(); diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcAgentsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcAgentsStub.java index e263fe117..ae2ee66b5 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcAgentsStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcAgentsStub.java @@ -365,51 +365,63 @@ public GrpcOperationsStub getOperationsStub() { return operationsStub; } + @Override public UnaryCallable listAgentsCallable() { return listAgentsCallable; } + @Override public UnaryCallable listAgentsPagedCallable() { return listAgentsPagedCallable; } + @Override public UnaryCallable getAgentCallable() { return getAgentCallable; } + @Override public UnaryCallable createAgentCallable() { return createAgentCallable; } + @Override public UnaryCallable updateAgentCallable() { return updateAgentCallable; } + @Override public UnaryCallable deleteAgentCallable() { return deleteAgentCallable; } + @Override public UnaryCallable exportAgentCallable() { return exportAgentCallable; } + @Override public OperationCallable exportAgentOperationCallable() { return exportAgentOperationCallable; } + @Override public UnaryCallable restoreAgentCallable() { return restoreAgentCallable; } + @Override public OperationCallable restoreAgentOperationCallable() { return restoreAgentOperationCallable; } + @Override public UnaryCallable validateAgentCallable() { return validateAgentCallable; } + @Override public UnaryCallable getAgentValidationResultCallable() { return getAgentValidationResultCallable; diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcEntityTypesStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcEntityTypesStub.java index 64ec3c7ea..f9a7e8f89 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcEntityTypesStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcEntityTypesStub.java @@ -247,27 +247,33 @@ public GrpcOperationsStub getOperationsStub() { return operationsStub; } + @Override public UnaryCallable listEntityTypesCallable() { return listEntityTypesCallable; } + @Override public UnaryCallable listEntityTypesPagedCallable() { return listEntityTypesPagedCallable; } + @Override public UnaryCallable getEntityTypeCallable() { return getEntityTypeCallable; } + @Override public UnaryCallable createEntityTypeCallable() { return createEntityTypeCallable; } + @Override public UnaryCallable updateEntityTypeCallable() { return updateEntityTypeCallable; } + @Override public UnaryCallable deleteEntityTypeCallable() { return deleteEntityTypeCallable; } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcEnvironmentsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcEnvironmentsStub.java index 601fc7468..028b8f27d 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcEnvironmentsStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcEnvironmentsStub.java @@ -319,47 +319,57 @@ public GrpcOperationsStub getOperationsStub() { return operationsStub; } + @Override public UnaryCallable listEnvironmentsCallable() { return listEnvironmentsCallable; } + @Override public UnaryCallable listEnvironmentsPagedCallable() { return listEnvironmentsPagedCallable; } + @Override public UnaryCallable getEnvironmentCallable() { return getEnvironmentCallable; } + @Override public UnaryCallable createEnvironmentCallable() { return createEnvironmentCallable; } + @Override public OperationCallable createEnvironmentOperationCallable() { return createEnvironmentOperationCallable; } + @Override public UnaryCallable updateEnvironmentCallable() { return updateEnvironmentCallable; } + @Override public OperationCallable updateEnvironmentOperationCallable() { return updateEnvironmentOperationCallable; } + @Override public UnaryCallable deleteEnvironmentCallable() { return deleteEnvironmentCallable; } + @Override public UnaryCallable lookupEnvironmentHistoryCallable() { return lookupEnvironmentHistoryCallable; } + @Override public UnaryCallable lookupEnvironmentHistoryPagedCallable() { return lookupEnvironmentHistoryPagedCallable; diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcExperimentsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcExperimentsStub.java index e33c42ae1..428c69502 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcExperimentsStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcExperimentsStub.java @@ -303,35 +303,43 @@ public GrpcOperationsStub getOperationsStub() { return operationsStub; } + @Override public UnaryCallable listExperimentsCallable() { return listExperimentsCallable; } + @Override public UnaryCallable listExperimentsPagedCallable() { return listExperimentsPagedCallable; } + @Override public UnaryCallable getExperimentCallable() { return getExperimentCallable; } + @Override public UnaryCallable createExperimentCallable() { return createExperimentCallable; } + @Override public UnaryCallable updateExperimentCallable() { return updateExperimentCallable; } + @Override public UnaryCallable deleteExperimentCallable() { return deleteExperimentCallable; } + @Override public UnaryCallable startExperimentCallable() { return startExperimentCallable; } + @Override public UnaryCallable stopExperimentCallable() { return stopExperimentCallable; } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcFlowsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcFlowsStub.java index a7b4fd206..8b9ad1278 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcFlowsStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcFlowsStub.java @@ -328,42 +328,52 @@ public GrpcOperationsStub getOperationsStub() { return operationsStub; } + @Override public UnaryCallable createFlowCallable() { return createFlowCallable; } + @Override public UnaryCallable deleteFlowCallable() { return deleteFlowCallable; } + @Override public UnaryCallable listFlowsCallable() { return listFlowsCallable; } + @Override public UnaryCallable listFlowsPagedCallable() { return listFlowsPagedCallable; } + @Override public UnaryCallable getFlowCallable() { return getFlowCallable; } + @Override public UnaryCallable updateFlowCallable() { return updateFlowCallable; } + @Override public UnaryCallable trainFlowCallable() { return trainFlowCallable; } + @Override public OperationCallable trainFlowOperationCallable() { return trainFlowOperationCallable; } + @Override public UnaryCallable validateFlowCallable() { return validateFlowCallable; } + @Override public UnaryCallable getFlowValidationResultCallable() { return getFlowValidationResultCallable; diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcIntentsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcIntentsStub.java index 55ca6f342..b704e1534 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcIntentsStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcIntentsStub.java @@ -232,26 +232,32 @@ public GrpcOperationsStub getOperationsStub() { return operationsStub; } + @Override public UnaryCallable listIntentsCallable() { return listIntentsCallable; } + @Override public UnaryCallable listIntentsPagedCallable() { return listIntentsPagedCallable; } + @Override public UnaryCallable getIntentCallable() { return getIntentCallable; } + @Override public UnaryCallable createIntentCallable() { return createIntentCallable; } + @Override public UnaryCallable updateIntentCallable() { return updateIntentCallable; } + @Override public UnaryCallable deleteIntentCallable() { return deleteIntentCallable; } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcPagesStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcPagesStub.java index b52f66cfd..7c690e506 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcPagesStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcPagesStub.java @@ -230,26 +230,32 @@ public GrpcOperationsStub getOperationsStub() { return operationsStub; } + @Override public UnaryCallable listPagesCallable() { return listPagesCallable; } + @Override public UnaryCallable listPagesPagedCallable() { return listPagesPagedCallable; } + @Override public UnaryCallable getPageCallable() { return getPageCallable; } + @Override public UnaryCallable createPageCallable() { return createPageCallable; } + @Override public UnaryCallable updatePageCallable() { return updatePageCallable; } + @Override public UnaryCallable deletePageCallable() { return deletePageCallable; } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcSecuritySettingsServiceStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcSecuritySettingsServiceStub.java index 920c68bb4..4a04b984e 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcSecuritySettingsServiceStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcSecuritySettingsServiceStub.java @@ -274,30 +274,36 @@ public GrpcOperationsStub getOperationsStub() { return operationsStub; } + @Override public UnaryCallable createSecuritySettingsCallable() { return createSecuritySettingsCallable; } + @Override public UnaryCallable getSecuritySettingsCallable() { return getSecuritySettingsCallable; } + @Override public UnaryCallable updateSecuritySettingsCallable() { return updateSecuritySettingsCallable; } + @Override public UnaryCallable listSecuritySettingsCallable() { return listSecuritySettingsCallable; } + @Override public UnaryCallable listSecuritySettingsPagedCallable() { return listSecuritySettingsPagedCallable; } + @Override public UnaryCallable deleteSecuritySettingsCallable() { return deleteSecuritySettingsCallable; } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcSessionEntityTypesStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcSessionEntityTypesStub.java index 53a22136c..285175bbf 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcSessionEntityTypesStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcSessionEntityTypesStub.java @@ -278,31 +278,37 @@ public GrpcOperationsStub getOperationsStub() { return operationsStub; } + @Override public UnaryCallable listSessionEntityTypesCallable() { return listSessionEntityTypesCallable; } + @Override public UnaryCallable listSessionEntityTypesPagedCallable() { return listSessionEntityTypesPagedCallable; } + @Override public UnaryCallable getSessionEntityTypeCallable() { return getSessionEntityTypeCallable; } + @Override public UnaryCallable createSessionEntityTypeCallable() { return createSessionEntityTypeCallable; } + @Override public UnaryCallable updateSessionEntityTypeCallable() { return updateSessionEntityTypeCallable; } + @Override public UnaryCallable deleteSessionEntityTypeCallable() { return deleteSessionEntityTypeCallable; } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcSessionsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcSessionsStub.java index d40d66ca8..9f3c43250 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcSessionsStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcSessionsStub.java @@ -207,19 +207,23 @@ public GrpcOperationsStub getOperationsStub() { return operationsStub; } + @Override public UnaryCallable detectIntentCallable() { return detectIntentCallable; } + @Override public BidiStreamingCallable streamingDetectIntentCallable() { return streamingDetectIntentCallable; } + @Override public UnaryCallable matchIntentCallable() { return matchIntentCallable; } + @Override public UnaryCallable fulfillIntentCallable() { return fulfillIntentCallable; } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcTestCasesStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcTestCasesStub.java index 3bd5f1ea1..057f08a43 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcTestCasesStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcTestCasesStub.java @@ -476,78 +476,95 @@ public GrpcOperationsStub getOperationsStub() { return operationsStub; } + @Override public UnaryCallable listTestCasesCallable() { return listTestCasesCallable; } + @Override public UnaryCallable listTestCasesPagedCallable() { return listTestCasesPagedCallable; } + @Override public UnaryCallable batchDeleteTestCasesCallable() { return batchDeleteTestCasesCallable; } + @Override public UnaryCallable getTestCaseCallable() { return getTestCaseCallable; } + @Override public UnaryCallable createTestCaseCallable() { return createTestCaseCallable; } + @Override public UnaryCallable updateTestCaseCallable() { return updateTestCaseCallable; } + @Override public UnaryCallable runTestCaseCallable() { return runTestCaseCallable; } + @Override public OperationCallable runTestCaseOperationCallable() { return runTestCaseOperationCallable; } + @Override public UnaryCallable batchRunTestCasesCallable() { return batchRunTestCasesCallable; } + @Override public OperationCallable< BatchRunTestCasesRequest, BatchRunTestCasesResponse, BatchRunTestCasesMetadata> batchRunTestCasesOperationCallable() { return batchRunTestCasesOperationCallable; } + @Override public UnaryCallable calculateCoverageCallable() { return calculateCoverageCallable; } + @Override public UnaryCallable importTestCasesCallable() { return importTestCasesCallable; } + @Override public OperationCallable importTestCasesOperationCallable() { return importTestCasesOperationCallable; } + @Override public UnaryCallable exportTestCasesCallable() { return exportTestCasesCallable; } + @Override public OperationCallable exportTestCasesOperationCallable() { return exportTestCasesOperationCallable; } + @Override public UnaryCallable listTestCaseResultsCallable() { return listTestCaseResultsCallable; } + @Override public UnaryCallable listTestCaseResultsPagedCallable() { return listTestCaseResultsPagedCallable; diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcTransitionRouteGroupsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcTransitionRouteGroupsStub.java index 00bb534c4..9a1b51a9a 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcTransitionRouteGroupsStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcTransitionRouteGroupsStub.java @@ -285,31 +285,37 @@ public GrpcOperationsStub getOperationsStub() { return operationsStub; } + @Override public UnaryCallable listTransitionRouteGroupsCallable() { return listTransitionRouteGroupsCallable; } + @Override public UnaryCallable listTransitionRouteGroupsPagedCallable() { return listTransitionRouteGroupsPagedCallable; } + @Override public UnaryCallable getTransitionRouteGroupCallable() { return getTransitionRouteGroupCallable; } + @Override public UnaryCallable createTransitionRouteGroupCallable() { return createTransitionRouteGroupCallable; } + @Override public UnaryCallable updateTransitionRouteGroupCallable() { return updateTransitionRouteGroupCallable; } + @Override public UnaryCallable deleteTransitionRouteGroupCallable() { return deleteTransitionRouteGroupCallable; diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcVersionsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcVersionsStub.java index ea32efd63..edfbc6bbc 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcVersionsStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcVersionsStub.java @@ -281,39 +281,48 @@ public GrpcOperationsStub getOperationsStub() { return operationsStub; } + @Override public UnaryCallable listVersionsCallable() { return listVersionsCallable; } + @Override public UnaryCallable listVersionsPagedCallable() { return listVersionsPagedCallable; } + @Override public UnaryCallable getVersionCallable() { return getVersionCallable; } + @Override public UnaryCallable createVersionCallable() { return createVersionCallable; } + @Override public OperationCallable createVersionOperationCallable() { return createVersionOperationCallable; } + @Override public UnaryCallable updateVersionCallable() { return updateVersionCallable; } + @Override public UnaryCallable deleteVersionCallable() { return deleteVersionCallable; } + @Override public UnaryCallable loadVersionCallable() { return loadVersionCallable; } + @Override public OperationCallable loadVersionOperationCallable() { return loadVersionOperationCallable; } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcWebhooksStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcWebhooksStub.java index 8ba87efee..4a1863790 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcWebhooksStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcWebhooksStub.java @@ -236,26 +236,32 @@ public GrpcOperationsStub getOperationsStub() { return operationsStub; } + @Override public UnaryCallable listWebhooksCallable() { return listWebhooksCallable; } + @Override public UnaryCallable listWebhooksPagedCallable() { return listWebhooksPagedCallable; } + @Override public UnaryCallable getWebhookCallable() { return getWebhookCallable; } + @Override public UnaryCallable createWebhookCallable() { return createWebhookCallable; } + @Override public UnaryCallable updateWebhookCallable() { return updateWebhookCallable; } + @Override public UnaryCallable deleteWebhookCallable() { return deleteWebhookCallable; } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/IntentsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/IntentsClient.java index f5d0c1000..7932fc88d 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/IntentsClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/IntentsClient.java @@ -210,6 +210,7 @@ public final ListIntentsPagedResponse listIntents(String parent) { * ListIntentsRequest.newBuilder() * .setParent(IntentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[INTENT]").toString()) * .setLanguageCode("languageCode-2092349083") + * .setIntentView(IntentView.forNumber(0)) * .setPageSize(883849137) * .setPageToken("pageToken873572522") * .build(); @@ -238,6 +239,7 @@ public final ListIntentsPagedResponse listIntents(ListIntentsRequest request) { * ListIntentsRequest.newBuilder() * .setParent(IntentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[INTENT]").toString()) * .setLanguageCode("languageCode-2092349083") + * .setIntentView(IntentView.forNumber(0)) * .setPageSize(883849137) * .setPageToken("pageToken873572522") * .build(); diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcAgentsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcAgentsStub.java index 3b7307504..d9b065a7b 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcAgentsStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcAgentsStub.java @@ -368,51 +368,63 @@ public GrpcOperationsStub getOperationsStub() { return operationsStub; } + @Override public UnaryCallable listAgentsCallable() { return listAgentsCallable; } + @Override public UnaryCallable listAgentsPagedCallable() { return listAgentsPagedCallable; } + @Override public UnaryCallable getAgentCallable() { return getAgentCallable; } + @Override public UnaryCallable createAgentCallable() { return createAgentCallable; } + @Override public UnaryCallable updateAgentCallable() { return updateAgentCallable; } + @Override public UnaryCallable deleteAgentCallable() { return deleteAgentCallable; } + @Override public UnaryCallable exportAgentCallable() { return exportAgentCallable; } + @Override public OperationCallable exportAgentOperationCallable() { return exportAgentOperationCallable; } + @Override public UnaryCallable restoreAgentCallable() { return restoreAgentCallable; } + @Override public OperationCallable restoreAgentOperationCallable() { return restoreAgentOperationCallable; } + @Override public UnaryCallable validateAgentCallable() { return validateAgentCallable; } + @Override public UnaryCallable getAgentValidationResultCallable() { return getAgentValidationResultCallable; diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcEntityTypesStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcEntityTypesStub.java index 0bc95fcf1..1d20f3b4b 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcEntityTypesStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcEntityTypesStub.java @@ -249,27 +249,33 @@ public GrpcOperationsStub getOperationsStub() { return operationsStub; } + @Override public UnaryCallable listEntityTypesCallable() { return listEntityTypesCallable; } + @Override public UnaryCallable listEntityTypesPagedCallable() { return listEntityTypesPagedCallable; } + @Override public UnaryCallable getEntityTypeCallable() { return getEntityTypeCallable; } + @Override public UnaryCallable createEntityTypeCallable() { return createEntityTypeCallable; } + @Override public UnaryCallable updateEntityTypeCallable() { return updateEntityTypeCallable; } + @Override public UnaryCallable deleteEntityTypeCallable() { return deleteEntityTypeCallable; } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcEnvironmentsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcEnvironmentsStub.java index 011052bfa..c10d11d18 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcEnvironmentsStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcEnvironmentsStub.java @@ -324,47 +324,57 @@ public GrpcOperationsStub getOperationsStub() { return operationsStub; } + @Override public UnaryCallable listEnvironmentsCallable() { return listEnvironmentsCallable; } + @Override public UnaryCallable listEnvironmentsPagedCallable() { return listEnvironmentsPagedCallable; } + @Override public UnaryCallable getEnvironmentCallable() { return getEnvironmentCallable; } + @Override public UnaryCallable createEnvironmentCallable() { return createEnvironmentCallable; } + @Override public OperationCallable createEnvironmentOperationCallable() { return createEnvironmentOperationCallable; } + @Override public UnaryCallable updateEnvironmentCallable() { return updateEnvironmentCallable; } + @Override public OperationCallable updateEnvironmentOperationCallable() { return updateEnvironmentOperationCallable; } + @Override public UnaryCallable deleteEnvironmentCallable() { return deleteEnvironmentCallable; } + @Override public UnaryCallable lookupEnvironmentHistoryCallable() { return lookupEnvironmentHistoryCallable; } + @Override public UnaryCallable lookupEnvironmentHistoryPagedCallable() { return lookupEnvironmentHistoryPagedCallable; diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcExperimentsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcExperimentsStub.java index 193b77840..dd3f5b741 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcExperimentsStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcExperimentsStub.java @@ -305,35 +305,43 @@ public GrpcOperationsStub getOperationsStub() { return operationsStub; } + @Override public UnaryCallable listExperimentsCallable() { return listExperimentsCallable; } + @Override public UnaryCallable listExperimentsPagedCallable() { return listExperimentsPagedCallable; } + @Override public UnaryCallable getExperimentCallable() { return getExperimentCallable; } + @Override public UnaryCallable createExperimentCallable() { return createExperimentCallable; } + @Override public UnaryCallable updateExperimentCallable() { return updateExperimentCallable; } + @Override public UnaryCallable deleteExperimentCallable() { return deleteExperimentCallable; } + @Override public UnaryCallable startExperimentCallable() { return startExperimentCallable; } + @Override public UnaryCallable stopExperimentCallable() { return stopExperimentCallable; } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcFlowsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcFlowsStub.java index 3d6e2b326..e1bccef0c 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcFlowsStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcFlowsStub.java @@ -330,42 +330,52 @@ public GrpcOperationsStub getOperationsStub() { return operationsStub; } + @Override public UnaryCallable createFlowCallable() { return createFlowCallable; } + @Override public UnaryCallable deleteFlowCallable() { return deleteFlowCallable; } + @Override public UnaryCallable listFlowsCallable() { return listFlowsCallable; } + @Override public UnaryCallable listFlowsPagedCallable() { return listFlowsPagedCallable; } + @Override public UnaryCallable getFlowCallable() { return getFlowCallable; } + @Override public UnaryCallable updateFlowCallable() { return updateFlowCallable; } + @Override public UnaryCallable trainFlowCallable() { return trainFlowCallable; } + @Override public OperationCallable trainFlowOperationCallable() { return trainFlowOperationCallable; } + @Override public UnaryCallable validateFlowCallable() { return validateFlowCallable; } + @Override public UnaryCallable getFlowValidationResultCallable() { return getFlowValidationResultCallable; diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcIntentsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcIntentsStub.java index 6230258db..041ae661f 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcIntentsStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcIntentsStub.java @@ -234,26 +234,32 @@ public GrpcOperationsStub getOperationsStub() { return operationsStub; } + @Override public UnaryCallable listIntentsCallable() { return listIntentsCallable; } + @Override public UnaryCallable listIntentsPagedCallable() { return listIntentsPagedCallable; } + @Override public UnaryCallable getIntentCallable() { return getIntentCallable; } + @Override public UnaryCallable createIntentCallable() { return createIntentCallable; } + @Override public UnaryCallable updateIntentCallable() { return updateIntentCallable; } + @Override public UnaryCallable deleteIntentCallable() { return deleteIntentCallable; } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcPagesStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcPagesStub.java index 32d1d7df5..ddd2c06d9 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcPagesStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcPagesStub.java @@ -232,26 +232,32 @@ public GrpcOperationsStub getOperationsStub() { return operationsStub; } + @Override public UnaryCallable listPagesCallable() { return listPagesCallable; } + @Override public UnaryCallable listPagesPagedCallable() { return listPagesPagedCallable; } + @Override public UnaryCallable getPageCallable() { return getPageCallable; } + @Override public UnaryCallable createPageCallable() { return createPageCallable; } + @Override public UnaryCallable updatePageCallable() { return updatePageCallable; } + @Override public UnaryCallable deletePageCallable() { return deletePageCallable; } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcSecuritySettingsServiceStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcSecuritySettingsServiceStub.java index 6109ecfc2..785b4e70a 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcSecuritySettingsServiceStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcSecuritySettingsServiceStub.java @@ -276,30 +276,36 @@ public GrpcOperationsStub getOperationsStub() { return operationsStub; } + @Override public UnaryCallable createSecuritySettingsCallable() { return createSecuritySettingsCallable; } + @Override public UnaryCallable getSecuritySettingsCallable() { return getSecuritySettingsCallable; } + @Override public UnaryCallable updateSecuritySettingsCallable() { return updateSecuritySettingsCallable; } + @Override public UnaryCallable listSecuritySettingsCallable() { return listSecuritySettingsCallable; } + @Override public UnaryCallable listSecuritySettingsPagedCallable() { return listSecuritySettingsPagedCallable; } + @Override public UnaryCallable deleteSecuritySettingsCallable() { return deleteSecuritySettingsCallable; } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcSessionEntityTypesStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcSessionEntityTypesStub.java index 9934fcbf5..b0e8d54a0 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcSessionEntityTypesStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcSessionEntityTypesStub.java @@ -280,31 +280,37 @@ public GrpcOperationsStub getOperationsStub() { return operationsStub; } + @Override public UnaryCallable listSessionEntityTypesCallable() { return listSessionEntityTypesCallable; } + @Override public UnaryCallable listSessionEntityTypesPagedCallable() { return listSessionEntityTypesPagedCallable; } + @Override public UnaryCallable getSessionEntityTypeCallable() { return getSessionEntityTypeCallable; } + @Override public UnaryCallable createSessionEntityTypeCallable() { return createSessionEntityTypeCallable; } + @Override public UnaryCallable updateSessionEntityTypeCallable() { return updateSessionEntityTypeCallable; } + @Override public UnaryCallable deleteSessionEntityTypeCallable() { return deleteSessionEntityTypeCallable; } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcSessionsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcSessionsStub.java index b90360edb..b162fd66e 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcSessionsStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcSessionsStub.java @@ -210,19 +210,23 @@ public GrpcOperationsStub getOperationsStub() { return operationsStub; } + @Override public UnaryCallable detectIntentCallable() { return detectIntentCallable; } + @Override public BidiStreamingCallable streamingDetectIntentCallable() { return streamingDetectIntentCallable; } + @Override public UnaryCallable matchIntentCallable() { return matchIntentCallable; } + @Override public UnaryCallable fulfillIntentCallable() { return fulfillIntentCallable; } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcTestCasesStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcTestCasesStub.java index dd9ab8198..c168615d1 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcTestCasesStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcTestCasesStub.java @@ -479,78 +479,95 @@ public GrpcOperationsStub getOperationsStub() { return operationsStub; } + @Override public UnaryCallable listTestCasesCallable() { return listTestCasesCallable; } + @Override public UnaryCallable listTestCasesPagedCallable() { return listTestCasesPagedCallable; } + @Override public UnaryCallable batchDeleteTestCasesCallable() { return batchDeleteTestCasesCallable; } + @Override public UnaryCallable getTestCaseCallable() { return getTestCaseCallable; } + @Override public UnaryCallable createTestCaseCallable() { return createTestCaseCallable; } + @Override public UnaryCallable updateTestCaseCallable() { return updateTestCaseCallable; } + @Override public UnaryCallable runTestCaseCallable() { return runTestCaseCallable; } + @Override public OperationCallable runTestCaseOperationCallable() { return runTestCaseOperationCallable; } + @Override public UnaryCallable batchRunTestCasesCallable() { return batchRunTestCasesCallable; } + @Override public OperationCallable< BatchRunTestCasesRequest, BatchRunTestCasesResponse, BatchRunTestCasesMetadata> batchRunTestCasesOperationCallable() { return batchRunTestCasesOperationCallable; } + @Override public UnaryCallable calculateCoverageCallable() { return calculateCoverageCallable; } + @Override public UnaryCallable importTestCasesCallable() { return importTestCasesCallable; } + @Override public OperationCallable importTestCasesOperationCallable() { return importTestCasesOperationCallable; } + @Override public UnaryCallable exportTestCasesCallable() { return exportTestCasesCallable; } + @Override public OperationCallable exportTestCasesOperationCallable() { return exportTestCasesOperationCallable; } + @Override public UnaryCallable listTestCaseResultsCallable() { return listTestCaseResultsCallable; } + @Override public UnaryCallable listTestCaseResultsPagedCallable() { return listTestCaseResultsPagedCallable; diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcTransitionRouteGroupsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcTransitionRouteGroupsStub.java index e451fdb21..ecbb6bf7a 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcTransitionRouteGroupsStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcTransitionRouteGroupsStub.java @@ -287,31 +287,37 @@ public GrpcOperationsStub getOperationsStub() { return operationsStub; } + @Override public UnaryCallable listTransitionRouteGroupsCallable() { return listTransitionRouteGroupsCallable; } + @Override public UnaryCallable listTransitionRouteGroupsPagedCallable() { return listTransitionRouteGroupsPagedCallable; } + @Override public UnaryCallable getTransitionRouteGroupCallable() { return getTransitionRouteGroupCallable; } + @Override public UnaryCallable createTransitionRouteGroupCallable() { return createTransitionRouteGroupCallable; } + @Override public UnaryCallable updateTransitionRouteGroupCallable() { return updateTransitionRouteGroupCallable; } + @Override public UnaryCallable deleteTransitionRouteGroupCallable() { return deleteTransitionRouteGroupCallable; diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcVersionsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcVersionsStub.java index ffb203085..fceedd6cf 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcVersionsStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcVersionsStub.java @@ -283,39 +283,48 @@ public GrpcOperationsStub getOperationsStub() { return operationsStub; } + @Override public UnaryCallable listVersionsCallable() { return listVersionsCallable; } + @Override public UnaryCallable listVersionsPagedCallable() { return listVersionsPagedCallable; } + @Override public UnaryCallable getVersionCallable() { return getVersionCallable; } + @Override public UnaryCallable createVersionCallable() { return createVersionCallable; } + @Override public OperationCallable createVersionOperationCallable() { return createVersionOperationCallable; } + @Override public UnaryCallable updateVersionCallable() { return updateVersionCallable; } + @Override public UnaryCallable deleteVersionCallable() { return deleteVersionCallable; } + @Override public UnaryCallable loadVersionCallable() { return loadVersionCallable; } + @Override public OperationCallable loadVersionOperationCallable() { return loadVersionOperationCallable; } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcWebhooksStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcWebhooksStub.java index 27a8a0a25..881175df5 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcWebhooksStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcWebhooksStub.java @@ -238,26 +238,32 @@ public GrpcOperationsStub getOperationsStub() { return operationsStub; } + @Override public UnaryCallable listWebhooksCallable() { return listWebhooksCallable; } + @Override public UnaryCallable listWebhooksPagedCallable() { return listWebhooksPagedCallable; } + @Override public UnaryCallable getWebhookCallable() { return getWebhookCallable; } + @Override public UnaryCallable createWebhookCallable() { return createWebhookCallable; } + @Override public UnaryCallable updateWebhookCallable() { return updateWebhookCallable; } + @Override public UnaryCallable deleteWebhookCallable() { return deleteWebhookCallable; } diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockAgentsImpl.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockAgentsImpl.java index f4dffe7cf..ebaa58c32 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockAgentsImpl.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockAgentsImpl.java @@ -71,7 +71,13 @@ public void listAgents( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListAgents, expected %s or %s", + response.getClass().getName(), + ListAgentsResponse.class.getName(), + Exception.class.getName()))); } } @@ -85,7 +91,13 @@ public void getAgent(GetAgentRequest request, StreamObserver responseObse } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetAgent, expected %s or %s", + response.getClass().getName(), + Agent.class.getName(), + Exception.class.getName()))); } } @@ -99,7 +111,13 @@ public void createAgent(CreateAgentRequest request, StreamObserver respon } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateAgent, expected %s or %s", + response.getClass().getName(), + Agent.class.getName(), + Exception.class.getName()))); } } @@ -113,7 +131,13 @@ public void updateAgent(UpdateAgentRequest request, StreamObserver respon } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateAgent, expected %s or %s", + response.getClass().getName(), + Agent.class.getName(), + Exception.class.getName()))); } } @@ -127,7 +151,13 @@ public void deleteAgent(DeleteAgentRequest request, StreamObserver respon } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteAgent, expected %s or %s", + response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); } } @@ -141,7 +171,13 @@ public void exportAgent(ExportAgentRequest request, StreamObserver re } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ExportAgent, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); } } @@ -156,7 +192,13 @@ public void restoreAgent( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method RestoreAgent, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); } } @@ -171,7 +213,13 @@ public void validateAgent( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ValidateAgent, expected %s or %s", + response.getClass().getName(), + AgentValidationResult.class.getName(), + Exception.class.getName()))); } } @@ -187,7 +235,13 @@ public void getAgentValidationResult( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetAgentValidationResult, expected %s or %s", + response.getClass().getName(), + AgentValidationResult.class.getName(), + Exception.class.getName()))); } } } diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockEntityTypesImpl.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockEntityTypesImpl.java index dd786e325..f7f53b611 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockEntityTypesImpl.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockEntityTypesImpl.java @@ -70,7 +70,13 @@ public void listEntityTypes( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListEntityTypes, expected %s or %s", + response.getClass().getName(), + ListEntityTypesResponse.class.getName(), + Exception.class.getName()))); } } @@ -85,7 +91,13 @@ public void getEntityType( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetEntityType, expected %s or %s", + response.getClass().getName(), + EntityType.class.getName(), + Exception.class.getName()))); } } @@ -100,7 +112,13 @@ public void createEntityType( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateEntityType, expected %s or %s", + response.getClass().getName(), + EntityType.class.getName(), + Exception.class.getName()))); } } @@ -115,7 +133,13 @@ public void updateEntityType( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateEntityType, expected %s or %s", + response.getClass().getName(), + EntityType.class.getName(), + Exception.class.getName()))); } } @@ -130,7 +154,13 @@ public void deleteEntityType( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteEntityType, expected %s or %s", + response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); } } } diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockEnvironmentsImpl.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockEnvironmentsImpl.java index de4a9f76c..f9b8527c7 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockEnvironmentsImpl.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockEnvironmentsImpl.java @@ -71,7 +71,13 @@ public void listEnvironments( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListEnvironments, expected %s or %s", + response.getClass().getName(), + ListEnvironmentsResponse.class.getName(), + Exception.class.getName()))); } } @@ -86,7 +92,13 @@ public void getEnvironment( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetEnvironment, expected %s or %s", + response.getClass().getName(), + Environment.class.getName(), + Exception.class.getName()))); } } @@ -101,7 +113,13 @@ public void createEnvironment( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateEnvironment, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); } } @@ -116,7 +134,13 @@ public void updateEnvironment( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateEnvironment, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); } } @@ -131,7 +155,13 @@ public void deleteEnvironment( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteEnvironment, expected %s or %s", + response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); } } @@ -147,7 +177,13 @@ public void lookupEnvironmentHistory( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method LookupEnvironmentHistory, expected %s or %s", + response.getClass().getName(), + LookupEnvironmentHistoryResponse.class.getName(), + Exception.class.getName()))); } } } diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockExperimentsImpl.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockExperimentsImpl.java index e5b7570dc..f2ba50490 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockExperimentsImpl.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockExperimentsImpl.java @@ -70,7 +70,13 @@ public void listExperiments( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListExperiments, expected %s or %s", + response.getClass().getName(), + ListExperimentsResponse.class.getName(), + Exception.class.getName()))); } } @@ -85,7 +91,13 @@ public void getExperiment( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetExperiment, expected %s or %s", + response.getClass().getName(), + Experiment.class.getName(), + Exception.class.getName()))); } } @@ -100,7 +112,13 @@ public void createExperiment( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateExperiment, expected %s or %s", + response.getClass().getName(), + Experiment.class.getName(), + Exception.class.getName()))); } } @@ -115,7 +133,13 @@ public void updateExperiment( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateExperiment, expected %s or %s", + response.getClass().getName(), + Experiment.class.getName(), + Exception.class.getName()))); } } @@ -130,7 +154,13 @@ public void deleteExperiment( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteExperiment, expected %s or %s", + response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); } } @@ -145,7 +175,13 @@ public void startExperiment( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method StartExperiment, expected %s or %s", + response.getClass().getName(), + Experiment.class.getName(), + Exception.class.getName()))); } } @@ -160,7 +196,13 @@ public void stopExperiment( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method StopExperiment, expected %s or %s", + response.getClass().getName(), + Experiment.class.getName(), + Exception.class.getName()))); } } } diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockFlowsImpl.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockFlowsImpl.java index 680ccb1e2..591643cc2 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockFlowsImpl.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockFlowsImpl.java @@ -70,7 +70,11 @@ public void createFlow(CreateFlowRequest request, StreamObserver responseO } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateFlow, expected %s or %s", + response.getClass().getName(), Flow.class.getName(), Exception.class.getName()))); } } @@ -84,7 +88,13 @@ public void deleteFlow(DeleteFlowRequest request, StreamObserver response } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteFlow, expected %s or %s", + response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); } } @@ -99,7 +109,13 @@ public void listFlows( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListFlows, expected %s or %s", + response.getClass().getName(), + ListFlowsResponse.class.getName(), + Exception.class.getName()))); } } @@ -113,7 +129,11 @@ public void getFlow(GetFlowRequest request, StreamObserver responseObserve } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetFlow, expected %s or %s", + response.getClass().getName(), Flow.class.getName(), Exception.class.getName()))); } } @@ -127,7 +147,11 @@ public void updateFlow(UpdateFlowRequest request, StreamObserver responseO } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateFlow, expected %s or %s", + response.getClass().getName(), Flow.class.getName(), Exception.class.getName()))); } } @@ -141,7 +165,13 @@ public void trainFlow(TrainFlowRequest request, StreamObserver respon } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method TrainFlow, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); } } @@ -156,7 +186,13 @@ public void validateFlow( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ValidateFlow, expected %s or %s", + response.getClass().getName(), + FlowValidationResult.class.getName(), + Exception.class.getName()))); } } @@ -172,7 +208,13 @@ public void getFlowValidationResult( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetFlowValidationResult, expected %s or %s", + response.getClass().getName(), + FlowValidationResult.class.getName(), + Exception.class.getName()))); } } } diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockIntentsImpl.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockIntentsImpl.java index 97f656563..ecae59a60 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockIntentsImpl.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockIntentsImpl.java @@ -70,7 +70,13 @@ public void listIntents( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListIntents, expected %s or %s", + response.getClass().getName(), + ListIntentsResponse.class.getName(), + Exception.class.getName()))); } } @@ -84,7 +90,13 @@ public void getIntent(GetIntentRequest request, StreamObserver responseO } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetIntent, expected %s or %s", + response.getClass().getName(), + Intent.class.getName(), + Exception.class.getName()))); } } @@ -98,7 +110,13 @@ public void createIntent(CreateIntentRequest request, StreamObserver res } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateIntent, expected %s or %s", + response.getClass().getName(), + Intent.class.getName(), + Exception.class.getName()))); } } @@ -112,7 +130,13 @@ public void updateIntent(UpdateIntentRequest request, StreamObserver res } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateIntent, expected %s or %s", + response.getClass().getName(), + Intent.class.getName(), + Exception.class.getName()))); } } @@ -126,7 +150,13 @@ public void deleteIntent(DeleteIntentRequest request, StreamObserver resp } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteIntent, expected %s or %s", + response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); } } } diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockPagesImpl.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockPagesImpl.java index 38854165f..c7a2b6ec7 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockPagesImpl.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockPagesImpl.java @@ -70,7 +70,13 @@ public void listPages( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListPages, expected %s or %s", + response.getClass().getName(), + ListPagesResponse.class.getName(), + Exception.class.getName()))); } } @@ -84,7 +90,11 @@ public void getPage(GetPageRequest request, StreamObserver responseObserve } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetPage, expected %s or %s", + response.getClass().getName(), Page.class.getName(), Exception.class.getName()))); } } @@ -98,7 +108,11 @@ public void createPage(CreatePageRequest request, StreamObserver responseO } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreatePage, expected %s or %s", + response.getClass().getName(), Page.class.getName(), Exception.class.getName()))); } } @@ -112,7 +126,11 @@ public void updatePage(UpdatePageRequest request, StreamObserver responseO } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdatePage, expected %s or %s", + response.getClass().getName(), Page.class.getName(), Exception.class.getName()))); } } @@ -126,7 +144,13 @@ public void deletePage(DeletePageRequest request, StreamObserver response } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeletePage, expected %s or %s", + response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); } } } diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockSecuritySettingsServiceImpl.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockSecuritySettingsServiceImpl.java index 8a74c8fe3..75b257fae 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockSecuritySettingsServiceImpl.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockSecuritySettingsServiceImpl.java @@ -70,7 +70,13 @@ public void createSecuritySettings( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateSecuritySettings, expected %s or %s", + response.getClass().getName(), + SecuritySettings.class.getName(), + Exception.class.getName()))); } } @@ -85,7 +91,13 @@ public void getSecuritySettings( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetSecuritySettings, expected %s or %s", + response.getClass().getName(), + SecuritySettings.class.getName(), + Exception.class.getName()))); } } @@ -100,7 +112,13 @@ public void updateSecuritySettings( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateSecuritySettings, expected %s or %s", + response.getClass().getName(), + SecuritySettings.class.getName(), + Exception.class.getName()))); } } @@ -116,7 +134,13 @@ public void listSecuritySettings( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListSecuritySettings, expected %s or %s", + response.getClass().getName(), + ListSecuritySettingsResponse.class.getName(), + Exception.class.getName()))); } } @@ -131,7 +155,13 @@ public void deleteSecuritySettings( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteSecuritySettings, expected %s or %s", + response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); } } } diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockSessionEntityTypesImpl.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockSessionEntityTypesImpl.java index 106b68f9d..d4e48ea07 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockSessionEntityTypesImpl.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockSessionEntityTypesImpl.java @@ -71,7 +71,13 @@ public void listSessionEntityTypes( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListSessionEntityTypes, expected %s or %s", + response.getClass().getName(), + ListSessionEntityTypesResponse.class.getName(), + Exception.class.getName()))); } } @@ -86,7 +92,13 @@ public void getSessionEntityType( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetSessionEntityType, expected %s or %s", + response.getClass().getName(), + SessionEntityType.class.getName(), + Exception.class.getName()))); } } @@ -101,7 +113,13 @@ public void createSessionEntityType( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateSessionEntityType, expected %s or %s", + response.getClass().getName(), + SessionEntityType.class.getName(), + Exception.class.getName()))); } } @@ -116,7 +134,13 @@ public void updateSessionEntityType( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateSessionEntityType, expected %s or %s", + response.getClass().getName(), + SessionEntityType.class.getName(), + Exception.class.getName()))); } } @@ -131,7 +155,13 @@ public void deleteSessionEntityType( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteSessionEntityType, expected %s or %s", + response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); } } } diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockSessionsImpl.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockSessionsImpl.java index 9767198e2..15b8db5a7 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockSessionsImpl.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockSessionsImpl.java @@ -69,7 +69,13 @@ public void detectIntent( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DetectIntent, expected %s or %s", + response.getClass().getName(), + DetectIntentResponse.class.getName(), + Exception.class.getName()))); } } @@ -87,7 +93,13 @@ public void onNext(StreamingDetectIntentRequest value) { } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method StreamingDetectIntent, expected %s or %s", + response.getClass().getName(), + StreamingDetectIntentResponse.class.getName(), + Exception.class.getName()))); } } @@ -115,7 +127,13 @@ public void matchIntent( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method MatchIntent, expected %s or %s", + response.getClass().getName(), + MatchIntentResponse.class.getName(), + Exception.class.getName()))); } } @@ -130,7 +148,13 @@ public void fulfillIntent( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method FulfillIntent, expected %s or %s", + response.getClass().getName(), + FulfillIntentResponse.class.getName(), + Exception.class.getName()))); } } } diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockTestCasesImpl.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockTestCasesImpl.java index 8f68599b4..7a37fc47f 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockTestCasesImpl.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockTestCasesImpl.java @@ -71,7 +71,13 @@ public void listTestCases( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListTestCases, expected %s or %s", + response.getClass().getName(), + ListTestCasesResponse.class.getName(), + Exception.class.getName()))); } } @@ -86,7 +92,13 @@ public void batchDeleteTestCases( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method BatchDeleteTestCases, expected %s or %s", + response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); } } @@ -100,7 +112,13 @@ public void getTestCase(GetTestCaseRequest request, StreamObserver res } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetTestCase, expected %s or %s", + response.getClass().getName(), + TestCase.class.getName(), + Exception.class.getName()))); } } @@ -115,7 +133,13 @@ public void createTestCase( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateTestCase, expected %s or %s", + response.getClass().getName(), + TestCase.class.getName(), + Exception.class.getName()))); } } @@ -130,7 +154,13 @@ public void updateTestCase( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateTestCase, expected %s or %s", + response.getClass().getName(), + TestCase.class.getName(), + Exception.class.getName()))); } } @@ -144,7 +174,13 @@ public void runTestCase(RunTestCaseRequest request, StreamObserver re } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method RunTestCase, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); } } @@ -159,7 +195,13 @@ public void batchRunTestCases( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method BatchRunTestCases, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); } } @@ -175,7 +217,13 @@ public void calculateCoverage( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CalculateCoverage, expected %s or %s", + response.getClass().getName(), + CalculateCoverageResponse.class.getName(), + Exception.class.getName()))); } } @@ -190,7 +238,13 @@ public void importTestCases( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ImportTestCases, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); } } @@ -205,7 +259,13 @@ public void exportTestCases( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ExportTestCases, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); } } @@ -221,7 +281,13 @@ public void listTestCaseResults( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListTestCaseResults, expected %s or %s", + response.getClass().getName(), + ListTestCaseResultsResponse.class.getName(), + Exception.class.getName()))); } } } diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockTransitionRouteGroupsImpl.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockTransitionRouteGroupsImpl.java index f259f4e7f..8b9351bfd 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockTransitionRouteGroupsImpl.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockTransitionRouteGroupsImpl.java @@ -71,7 +71,13 @@ public void listTransitionRouteGroups( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListTransitionRouteGroups, expected %s or %s", + response.getClass().getName(), + ListTransitionRouteGroupsResponse.class.getName(), + Exception.class.getName()))); } } @@ -87,7 +93,13 @@ public void getTransitionRouteGroup( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetTransitionRouteGroup, expected %s or %s", + response.getClass().getName(), + TransitionRouteGroup.class.getName(), + Exception.class.getName()))); } } @@ -103,7 +115,13 @@ public void createTransitionRouteGroup( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateTransitionRouteGroup, expected %s or %s", + response.getClass().getName(), + TransitionRouteGroup.class.getName(), + Exception.class.getName()))); } } @@ -119,7 +137,13 @@ public void updateTransitionRouteGroup( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateTransitionRouteGroup, expected %s or %s", + response.getClass().getName(), + TransitionRouteGroup.class.getName(), + Exception.class.getName()))); } } @@ -134,7 +158,13 @@ public void deleteTransitionRouteGroup( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteTransitionRouteGroup, expected %s or %s", + response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); } } } diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockVersionsImpl.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockVersionsImpl.java index 085ccb48a..65dc987d6 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockVersionsImpl.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockVersionsImpl.java @@ -71,7 +71,13 @@ public void listVersions( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListVersions, expected %s or %s", + response.getClass().getName(), + ListVersionsResponse.class.getName(), + Exception.class.getName()))); } } @@ -85,7 +91,13 @@ public void getVersion(GetVersionRequest request, StreamObserver respon } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetVersion, expected %s or %s", + response.getClass().getName(), + Version.class.getName(), + Exception.class.getName()))); } } @@ -100,7 +112,13 @@ public void createVersion( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateVersion, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); } } @@ -115,7 +133,13 @@ public void updateVersion( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateVersion, expected %s or %s", + response.getClass().getName(), + Version.class.getName(), + Exception.class.getName()))); } } @@ -129,7 +153,13 @@ public void deleteVersion(DeleteVersionRequest request, StreamObserver re } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteVersion, expected %s or %s", + response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); } } @@ -143,7 +173,13 @@ public void loadVersion(LoadVersionRequest request, StreamObserver re } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method LoadVersion, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); } } } diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockWebhooksImpl.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockWebhooksImpl.java index dc7411852..998cad229 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockWebhooksImpl.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockWebhooksImpl.java @@ -70,7 +70,13 @@ public void listWebhooks( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListWebhooks, expected %s or %s", + response.getClass().getName(), + ListWebhooksResponse.class.getName(), + Exception.class.getName()))); } } @@ -84,7 +90,13 @@ public void getWebhook(GetWebhookRequest request, StreamObserver respon } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetWebhook, expected %s or %s", + response.getClass().getName(), + Webhook.class.getName(), + Exception.class.getName()))); } } @@ -99,7 +111,13 @@ public void createWebhook( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateWebhook, expected %s or %s", + response.getClass().getName(), + Webhook.class.getName(), + Exception.class.getName()))); } } @@ -114,7 +132,13 @@ public void updateWebhook( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateWebhook, expected %s or %s", + response.getClass().getName(), + Webhook.class.getName(), + Exception.class.getName()))); } } @@ -128,7 +152,13 @@ public void deleteWebhook(DeleteWebhookRequest request, StreamObserver re } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteWebhook, expected %s or %s", + response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); } } } diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockAgentsImpl.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockAgentsImpl.java index 88924e30e..7bfc37209 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockAgentsImpl.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockAgentsImpl.java @@ -71,7 +71,13 @@ public void listAgents( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListAgents, expected %s or %s", + response.getClass().getName(), + ListAgentsResponse.class.getName(), + Exception.class.getName()))); } } @@ -85,7 +91,13 @@ public void getAgent(GetAgentRequest request, StreamObserver responseObse } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetAgent, expected %s or %s", + response.getClass().getName(), + Agent.class.getName(), + Exception.class.getName()))); } } @@ -99,7 +111,13 @@ public void createAgent(CreateAgentRequest request, StreamObserver respon } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateAgent, expected %s or %s", + response.getClass().getName(), + Agent.class.getName(), + Exception.class.getName()))); } } @@ -113,7 +131,13 @@ public void updateAgent(UpdateAgentRequest request, StreamObserver respon } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateAgent, expected %s or %s", + response.getClass().getName(), + Agent.class.getName(), + Exception.class.getName()))); } } @@ -127,7 +151,13 @@ public void deleteAgent(DeleteAgentRequest request, StreamObserver respon } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteAgent, expected %s or %s", + response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); } } @@ -141,7 +171,13 @@ public void exportAgent(ExportAgentRequest request, StreamObserver re } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ExportAgent, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); } } @@ -156,7 +192,13 @@ public void restoreAgent( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method RestoreAgent, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); } } @@ -171,7 +213,13 @@ public void validateAgent( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ValidateAgent, expected %s or %s", + response.getClass().getName(), + AgentValidationResult.class.getName(), + Exception.class.getName()))); } } @@ -187,7 +235,13 @@ public void getAgentValidationResult( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetAgentValidationResult, expected %s or %s", + response.getClass().getName(), + AgentValidationResult.class.getName(), + Exception.class.getName()))); } } } diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockEntityTypesImpl.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockEntityTypesImpl.java index a3a1b6bf9..60353e4b2 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockEntityTypesImpl.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockEntityTypesImpl.java @@ -70,7 +70,13 @@ public void listEntityTypes( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListEntityTypes, expected %s or %s", + response.getClass().getName(), + ListEntityTypesResponse.class.getName(), + Exception.class.getName()))); } } @@ -85,7 +91,13 @@ public void getEntityType( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetEntityType, expected %s or %s", + response.getClass().getName(), + EntityType.class.getName(), + Exception.class.getName()))); } } @@ -100,7 +112,13 @@ public void createEntityType( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateEntityType, expected %s or %s", + response.getClass().getName(), + EntityType.class.getName(), + Exception.class.getName()))); } } @@ -115,7 +133,13 @@ public void updateEntityType( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateEntityType, expected %s or %s", + response.getClass().getName(), + EntityType.class.getName(), + Exception.class.getName()))); } } @@ -130,7 +154,13 @@ public void deleteEntityType( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteEntityType, expected %s or %s", + response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); } } } diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockEnvironmentsImpl.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockEnvironmentsImpl.java index 9c2b763b9..187370498 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockEnvironmentsImpl.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockEnvironmentsImpl.java @@ -71,7 +71,13 @@ public void listEnvironments( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListEnvironments, expected %s or %s", + response.getClass().getName(), + ListEnvironmentsResponse.class.getName(), + Exception.class.getName()))); } } @@ -86,7 +92,13 @@ public void getEnvironment( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetEnvironment, expected %s or %s", + response.getClass().getName(), + Environment.class.getName(), + Exception.class.getName()))); } } @@ -101,7 +113,13 @@ public void createEnvironment( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateEnvironment, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); } } @@ -116,7 +134,13 @@ public void updateEnvironment( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateEnvironment, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); } } @@ -131,7 +155,13 @@ public void deleteEnvironment( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteEnvironment, expected %s or %s", + response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); } } @@ -147,7 +177,13 @@ public void lookupEnvironmentHistory( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method LookupEnvironmentHistory, expected %s or %s", + response.getClass().getName(), + LookupEnvironmentHistoryResponse.class.getName(), + Exception.class.getName()))); } } } diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockExperimentsImpl.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockExperimentsImpl.java index dcb58f977..4906a1aa5 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockExperimentsImpl.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockExperimentsImpl.java @@ -70,7 +70,13 @@ public void listExperiments( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListExperiments, expected %s or %s", + response.getClass().getName(), + ListExperimentsResponse.class.getName(), + Exception.class.getName()))); } } @@ -85,7 +91,13 @@ public void getExperiment( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetExperiment, expected %s or %s", + response.getClass().getName(), + Experiment.class.getName(), + Exception.class.getName()))); } } @@ -100,7 +112,13 @@ public void createExperiment( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateExperiment, expected %s or %s", + response.getClass().getName(), + Experiment.class.getName(), + Exception.class.getName()))); } } @@ -115,7 +133,13 @@ public void updateExperiment( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateExperiment, expected %s or %s", + response.getClass().getName(), + Experiment.class.getName(), + Exception.class.getName()))); } } @@ -130,7 +154,13 @@ public void deleteExperiment( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteExperiment, expected %s or %s", + response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); } } @@ -145,7 +175,13 @@ public void startExperiment( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method StartExperiment, expected %s or %s", + response.getClass().getName(), + Experiment.class.getName(), + Exception.class.getName()))); } } @@ -160,7 +196,13 @@ public void stopExperiment( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method StopExperiment, expected %s or %s", + response.getClass().getName(), + Experiment.class.getName(), + Exception.class.getName()))); } } } diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockFlowsImpl.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockFlowsImpl.java index 248139ec0..3330c9f14 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockFlowsImpl.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockFlowsImpl.java @@ -70,7 +70,11 @@ public void createFlow(CreateFlowRequest request, StreamObserver responseO } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateFlow, expected %s or %s", + response.getClass().getName(), Flow.class.getName(), Exception.class.getName()))); } } @@ -84,7 +88,13 @@ public void deleteFlow(DeleteFlowRequest request, StreamObserver response } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteFlow, expected %s or %s", + response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); } } @@ -99,7 +109,13 @@ public void listFlows( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListFlows, expected %s or %s", + response.getClass().getName(), + ListFlowsResponse.class.getName(), + Exception.class.getName()))); } } @@ -113,7 +129,11 @@ public void getFlow(GetFlowRequest request, StreamObserver responseObserve } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetFlow, expected %s or %s", + response.getClass().getName(), Flow.class.getName(), Exception.class.getName()))); } } @@ -127,7 +147,11 @@ public void updateFlow(UpdateFlowRequest request, StreamObserver responseO } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateFlow, expected %s or %s", + response.getClass().getName(), Flow.class.getName(), Exception.class.getName()))); } } @@ -141,7 +165,13 @@ public void trainFlow(TrainFlowRequest request, StreamObserver respon } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method TrainFlow, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); } } @@ -156,7 +186,13 @@ public void validateFlow( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ValidateFlow, expected %s or %s", + response.getClass().getName(), + FlowValidationResult.class.getName(), + Exception.class.getName()))); } } @@ -172,7 +208,13 @@ public void getFlowValidationResult( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetFlowValidationResult, expected %s or %s", + response.getClass().getName(), + FlowValidationResult.class.getName(), + Exception.class.getName()))); } } } diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockIntentsImpl.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockIntentsImpl.java index 4493218ad..165ca7573 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockIntentsImpl.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockIntentsImpl.java @@ -70,7 +70,13 @@ public void listIntents( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListIntents, expected %s or %s", + response.getClass().getName(), + ListIntentsResponse.class.getName(), + Exception.class.getName()))); } } @@ -84,7 +90,13 @@ public void getIntent(GetIntentRequest request, StreamObserver responseO } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetIntent, expected %s or %s", + response.getClass().getName(), + Intent.class.getName(), + Exception.class.getName()))); } } @@ -98,7 +110,13 @@ public void createIntent(CreateIntentRequest request, StreamObserver res } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateIntent, expected %s or %s", + response.getClass().getName(), + Intent.class.getName(), + Exception.class.getName()))); } } @@ -112,7 +130,13 @@ public void updateIntent(UpdateIntentRequest request, StreamObserver res } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateIntent, expected %s or %s", + response.getClass().getName(), + Intent.class.getName(), + Exception.class.getName()))); } } @@ -126,7 +150,13 @@ public void deleteIntent(DeleteIntentRequest request, StreamObserver resp } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteIntent, expected %s or %s", + response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); } } } diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockPagesImpl.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockPagesImpl.java index 02ee44596..d52f7160e 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockPagesImpl.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockPagesImpl.java @@ -70,7 +70,13 @@ public void listPages( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListPages, expected %s or %s", + response.getClass().getName(), + ListPagesResponse.class.getName(), + Exception.class.getName()))); } } @@ -84,7 +90,11 @@ public void getPage(GetPageRequest request, StreamObserver responseObserve } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetPage, expected %s or %s", + response.getClass().getName(), Page.class.getName(), Exception.class.getName()))); } } @@ -98,7 +108,11 @@ public void createPage(CreatePageRequest request, StreamObserver responseO } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreatePage, expected %s or %s", + response.getClass().getName(), Page.class.getName(), Exception.class.getName()))); } } @@ -112,7 +126,11 @@ public void updatePage(UpdatePageRequest request, StreamObserver responseO } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdatePage, expected %s or %s", + response.getClass().getName(), Page.class.getName(), Exception.class.getName()))); } } @@ -126,7 +144,13 @@ public void deletePage(DeletePageRequest request, StreamObserver response } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeletePage, expected %s or %s", + response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); } } } diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockSecuritySettingsServiceImpl.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockSecuritySettingsServiceImpl.java index f7225ac8c..986ecaa5c 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockSecuritySettingsServiceImpl.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockSecuritySettingsServiceImpl.java @@ -70,7 +70,13 @@ public void createSecuritySettings( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateSecuritySettings, expected %s or %s", + response.getClass().getName(), + SecuritySettings.class.getName(), + Exception.class.getName()))); } } @@ -85,7 +91,13 @@ public void getSecuritySettings( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetSecuritySettings, expected %s or %s", + response.getClass().getName(), + SecuritySettings.class.getName(), + Exception.class.getName()))); } } @@ -100,7 +112,13 @@ public void updateSecuritySettings( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateSecuritySettings, expected %s or %s", + response.getClass().getName(), + SecuritySettings.class.getName(), + Exception.class.getName()))); } } @@ -116,7 +134,13 @@ public void listSecuritySettings( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListSecuritySettings, expected %s or %s", + response.getClass().getName(), + ListSecuritySettingsResponse.class.getName(), + Exception.class.getName()))); } } @@ -131,7 +155,13 @@ public void deleteSecuritySettings( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteSecuritySettings, expected %s or %s", + response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); } } } diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockSessionEntityTypesImpl.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockSessionEntityTypesImpl.java index 11ac2c939..1722c4a8f 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockSessionEntityTypesImpl.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockSessionEntityTypesImpl.java @@ -71,7 +71,13 @@ public void listSessionEntityTypes( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListSessionEntityTypes, expected %s or %s", + response.getClass().getName(), + ListSessionEntityTypesResponse.class.getName(), + Exception.class.getName()))); } } @@ -86,7 +92,13 @@ public void getSessionEntityType( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetSessionEntityType, expected %s or %s", + response.getClass().getName(), + SessionEntityType.class.getName(), + Exception.class.getName()))); } } @@ -101,7 +113,13 @@ public void createSessionEntityType( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateSessionEntityType, expected %s or %s", + response.getClass().getName(), + SessionEntityType.class.getName(), + Exception.class.getName()))); } } @@ -116,7 +134,13 @@ public void updateSessionEntityType( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateSessionEntityType, expected %s or %s", + response.getClass().getName(), + SessionEntityType.class.getName(), + Exception.class.getName()))); } } @@ -131,7 +155,13 @@ public void deleteSessionEntityType( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteSessionEntityType, expected %s or %s", + response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); } } } diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockSessionsImpl.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockSessionsImpl.java index a80c43488..213f2e43e 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockSessionsImpl.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockSessionsImpl.java @@ -69,7 +69,13 @@ public void detectIntent( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DetectIntent, expected %s or %s", + response.getClass().getName(), + DetectIntentResponse.class.getName(), + Exception.class.getName()))); } } @@ -87,7 +93,13 @@ public void onNext(StreamingDetectIntentRequest value) { } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method StreamingDetectIntent, expected %s or %s", + response.getClass().getName(), + StreamingDetectIntentResponse.class.getName(), + Exception.class.getName()))); } } @@ -115,7 +127,13 @@ public void matchIntent( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method MatchIntent, expected %s or %s", + response.getClass().getName(), + MatchIntentResponse.class.getName(), + Exception.class.getName()))); } } @@ -130,7 +148,13 @@ public void fulfillIntent( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method FulfillIntent, expected %s or %s", + response.getClass().getName(), + FulfillIntentResponse.class.getName(), + Exception.class.getName()))); } } } diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockTestCasesImpl.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockTestCasesImpl.java index 572f090f8..da03846d6 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockTestCasesImpl.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockTestCasesImpl.java @@ -71,7 +71,13 @@ public void listTestCases( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListTestCases, expected %s or %s", + response.getClass().getName(), + ListTestCasesResponse.class.getName(), + Exception.class.getName()))); } } @@ -86,7 +92,13 @@ public void batchDeleteTestCases( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method BatchDeleteTestCases, expected %s or %s", + response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); } } @@ -100,7 +112,13 @@ public void getTestCase(GetTestCaseRequest request, StreamObserver res } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetTestCase, expected %s or %s", + response.getClass().getName(), + TestCase.class.getName(), + Exception.class.getName()))); } } @@ -115,7 +133,13 @@ public void createTestCase( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateTestCase, expected %s or %s", + response.getClass().getName(), + TestCase.class.getName(), + Exception.class.getName()))); } } @@ -130,7 +154,13 @@ public void updateTestCase( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateTestCase, expected %s or %s", + response.getClass().getName(), + TestCase.class.getName(), + Exception.class.getName()))); } } @@ -144,7 +174,13 @@ public void runTestCase(RunTestCaseRequest request, StreamObserver re } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method RunTestCase, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); } } @@ -159,7 +195,13 @@ public void batchRunTestCases( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method BatchRunTestCases, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); } } @@ -175,7 +217,13 @@ public void calculateCoverage( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CalculateCoverage, expected %s or %s", + response.getClass().getName(), + CalculateCoverageResponse.class.getName(), + Exception.class.getName()))); } } @@ -190,7 +238,13 @@ public void importTestCases( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ImportTestCases, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); } } @@ -205,7 +259,13 @@ public void exportTestCases( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ExportTestCases, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); } } @@ -221,7 +281,13 @@ public void listTestCaseResults( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListTestCaseResults, expected %s or %s", + response.getClass().getName(), + ListTestCaseResultsResponse.class.getName(), + Exception.class.getName()))); } } } diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockTransitionRouteGroupsImpl.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockTransitionRouteGroupsImpl.java index 1f1725652..6a5b21782 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockTransitionRouteGroupsImpl.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockTransitionRouteGroupsImpl.java @@ -71,7 +71,13 @@ public void listTransitionRouteGroups( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListTransitionRouteGroups, expected %s or %s", + response.getClass().getName(), + ListTransitionRouteGroupsResponse.class.getName(), + Exception.class.getName()))); } } @@ -87,7 +93,13 @@ public void getTransitionRouteGroup( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetTransitionRouteGroup, expected %s or %s", + response.getClass().getName(), + TransitionRouteGroup.class.getName(), + Exception.class.getName()))); } } @@ -103,7 +115,13 @@ public void createTransitionRouteGroup( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateTransitionRouteGroup, expected %s or %s", + response.getClass().getName(), + TransitionRouteGroup.class.getName(), + Exception.class.getName()))); } } @@ -119,7 +137,13 @@ public void updateTransitionRouteGroup( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateTransitionRouteGroup, expected %s or %s", + response.getClass().getName(), + TransitionRouteGroup.class.getName(), + Exception.class.getName()))); } } @@ -134,7 +158,13 @@ public void deleteTransitionRouteGroup( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteTransitionRouteGroup, expected %s or %s", + response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); } } } diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockVersionsImpl.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockVersionsImpl.java index bfd10811e..63b89e308 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockVersionsImpl.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockVersionsImpl.java @@ -71,7 +71,13 @@ public void listVersions( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListVersions, expected %s or %s", + response.getClass().getName(), + ListVersionsResponse.class.getName(), + Exception.class.getName()))); } } @@ -85,7 +91,13 @@ public void getVersion(GetVersionRequest request, StreamObserver respon } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetVersion, expected %s or %s", + response.getClass().getName(), + Version.class.getName(), + Exception.class.getName()))); } } @@ -100,7 +112,13 @@ public void createVersion( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateVersion, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); } } @@ -115,7 +133,13 @@ public void updateVersion( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateVersion, expected %s or %s", + response.getClass().getName(), + Version.class.getName(), + Exception.class.getName()))); } } @@ -129,7 +153,13 @@ public void deleteVersion(DeleteVersionRequest request, StreamObserver re } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteVersion, expected %s or %s", + response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); } } @@ -143,7 +173,13 @@ public void loadVersion(LoadVersionRequest request, StreamObserver re } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method LoadVersion, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); } } } diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockWebhooksImpl.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockWebhooksImpl.java index 955caa942..1c5c1bee2 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockWebhooksImpl.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockWebhooksImpl.java @@ -70,7 +70,13 @@ public void listWebhooks( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListWebhooks, expected %s or %s", + response.getClass().getName(), + ListWebhooksResponse.class.getName(), + Exception.class.getName()))); } } @@ -84,7 +90,13 @@ public void getWebhook(GetWebhookRequest request, StreamObserver respon } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetWebhook, expected %s or %s", + response.getClass().getName(), + Webhook.class.getName(), + Exception.class.getName()))); } } @@ -99,7 +111,13 @@ public void createWebhook( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateWebhook, expected %s or %s", + response.getClass().getName(), + Webhook.class.getName(), + Exception.class.getName()))); } } @@ -114,7 +132,13 @@ public void updateWebhook( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateWebhook, expected %s or %s", + response.getClass().getName(), + Webhook.class.getName(), + Exception.class.getName()))); } } @@ -128,7 +152,13 @@ public void deleteWebhook(DeleteWebhookRequest request, StreamObserver re } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteWebhook, expected %s or %s", + response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); } } } diff --git a/synth.metadata b/synth.metadata index 72dd53785..d87d68def 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,16 +11,16 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "2bea43cdc7a4443876380732980d83cd8d560582", - "internalRef": "357788001" + "sha": "e8bc4471a88ac5f60defe3ed436f517174e59ba0", + "internalRef": "357800868" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "2bea43cdc7a4443876380732980d83cd8d560582", - "internalRef": "357788001" + "sha": "e8bc4471a88ac5f60defe3ed436f517174e59ba0", + "internalRef": "357800868" } }, {